mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Integrating vscript interface code (based on Alien Swarm)
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
#include "toolframework/itoolentity.h"
|
||||
#include "tier0/threadtools.h"
|
||||
|
||||
#include "vscript/ivscript.h"
|
||||
#include "vscript_shared.h"
|
||||
|
||||
class C_Team;
|
||||
class IPhysicsObject;
|
||||
class IClientVehicle;
|
||||
@@ -183,6 +186,8 @@ public:
|
||||
DECLARE_DATADESC();
|
||||
DECLARE_CLIENTCLASS();
|
||||
DECLARE_PREDICTABLE();
|
||||
// script description
|
||||
DECLARE_ENT_SCRIPTDESC();
|
||||
|
||||
C_BaseEntity();
|
||||
virtual ~C_BaseEntity();
|
||||
@@ -256,6 +261,11 @@ public:
|
||||
|
||||
string_t m_iClassname;
|
||||
|
||||
HSCRIPT GetScriptInstance();
|
||||
|
||||
HSCRIPT m_hScriptInstance;
|
||||
string_t m_iszScriptId;
|
||||
|
||||
// IClientUnknown overrides.
|
||||
public:
|
||||
|
||||
@@ -1119,6 +1129,10 @@ public:
|
||||
virtual int GetBody() { return 0; }
|
||||
virtual int GetSkin() { return 0; }
|
||||
|
||||
const Vector& ScriptGetForward(void) { static Vector vecForward; GetVectors(&vecForward, NULL, NULL); return vecForward; }
|
||||
const Vector& ScriptGetLeft(void) { static Vector vecLeft; GetVectors(NULL, &vecLeft, NULL); return vecLeft; }
|
||||
const Vector& ScriptGetUp(void) { static Vector vecUp; GetVectors(NULL, NULL, &vecUp); return vecUp; }
|
||||
|
||||
// Stubs on client
|
||||
void NetworkStateManualMode( bool activate ) { }
|
||||
void NetworkStateChanged() { }
|
||||
@@ -1266,6 +1280,7 @@ public:
|
||||
void SetRenderMode( RenderMode_t nRenderMode, bool bForceUpdate = false );
|
||||
RenderMode_t GetRenderMode() const;
|
||||
|
||||
const char* GetEntityName();
|
||||
public:
|
||||
|
||||
// Determine what entity this corresponds to
|
||||
@@ -1648,6 +1663,8 @@ private:
|
||||
// The owner!
|
||||
EHANDLE m_hOwnerEntity;
|
||||
EHANDLE m_hEffectEntity;
|
||||
|
||||
char m_iName[MAX_PATH];
|
||||
|
||||
// This is a random seed used by the networking code to allow client - side prediction code
|
||||
// randon number generators to spit out the same random numbers on both sides for a particular
|
||||
@@ -2203,6 +2220,12 @@ inline bool C_BaseEntity::ShouldRecordInTools() const
|
||||
#endif
|
||||
}
|
||||
|
||||
inline const char *C_BaseEntity::GetEntityName()
|
||||
{
|
||||
return m_iName;
|
||||
}
|
||||
|
||||
|
||||
C_BaseEntity *CreateEntityByName( const char *className );
|
||||
|
||||
#endif // C_BASEENTITY_H
|
||||
|
||||
Reference in New Issue
Block a user