Ultimately remove the deprecated old class names for base entities.
This commit is contained in:
parent
77c3cf4e10
commit
a039a69dd3
6 changed files with 26 additions and 81 deletions
|
@ -19,34 +19,3 @@
|
|||
|
||||
void FX_Spark(vector, vector);
|
||||
void FX_BreakModel(int, vector, vector, vector, float);
|
||||
|
||||
/* Backwards compat */
|
||||
class CBaseMonster:NSMonster
|
||||
{
|
||||
void(void) CBaseMonster;
|
||||
};
|
||||
void
|
||||
CBaseMonster::CBaseMonster(void)
|
||||
{
|
||||
super::NSMonster();
|
||||
}
|
||||
|
||||
class CBaseNPC:NSTalkMonster
|
||||
{
|
||||
void(void) CBaseNPC;
|
||||
};
|
||||
void
|
||||
CBaseNPC::CBaseNPC(void)
|
||||
{
|
||||
super::NSTalkMonster();
|
||||
}
|
||||
|
||||
class CBasePhysics:NSPhysicsEntity
|
||||
{
|
||||
void(void) CBasePhysics;
|
||||
};
|
||||
void
|
||||
CBasePhysics::CBasePhysics(void)
|
||||
{
|
||||
super::NSPhysicsEntity();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ Dynamic door that will move back down if it's not being used.
|
|||
This entity was introduced in Half-Life (1998).
|
||||
*/
|
||||
|
||||
class momentary_door:CBaseMomentary
|
||||
class
|
||||
momentary_door:NSMomentary
|
||||
{
|
||||
void(void) momentary_door;
|
||||
|
||||
|
@ -137,5 +138,5 @@ momentary_door::SpawnKey(string strKey, string strValue)
|
|||
void
|
||||
momentary_door::momentary_door(void)
|
||||
{
|
||||
super::CBaseMomentary();
|
||||
super::NSMomentary();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,8 @@ enumflags
|
|||
MRBFL_YAXIS
|
||||
};
|
||||
|
||||
class momentary_rot_button:CBaseMomentary
|
||||
class
|
||||
momentary_rot_button:NSMomentary
|
||||
{
|
||||
int m_iTurnDir;
|
||||
|
||||
|
@ -155,12 +156,12 @@ momentary_rot_button::OnPlayerUse(void)
|
|||
m_iTurnDir = 1 - m_iTurnDir;
|
||||
|
||||
for (entity e = world; (e = find(e, ::targetname, target));) {
|
||||
CBaseMomentary b = (CBaseMomentary)e;
|
||||
NSMomentary b = (NSMomentary)e;
|
||||
b.SetMoveState(iEndState);
|
||||
}
|
||||
|
||||
for (entity e = world; (e = find(e, ::targetname, targetname));) {
|
||||
CBaseMomentary b = (CBaseMomentary)e;
|
||||
NSMomentary b = (NSMomentary)e;
|
||||
|
||||
/* door hack: any entity with the same name as ours will follow our states */
|
||||
if (b.HasSpawnFlags(MRBFL_DOORHACK))
|
||||
|
@ -185,12 +186,12 @@ momentary_rot_button::OnPlayerUnUse(void)
|
|||
SetMoveState(iEndState);
|
||||
|
||||
for (entity e = world; (e = find(e, ::targetname, target));) {
|
||||
CBaseMomentary b = (CBaseMomentary)e;
|
||||
NSMomentary b = (NSMomentary)e;
|
||||
b.SetMoveState(iEndState);
|
||||
}
|
||||
|
||||
for (entity e = world; (e = find(e, ::targetname, targetname));) {
|
||||
CBaseMomentary b = (CBaseMomentary)e;
|
||||
NSMomentary b = (NSMomentary)e;
|
||||
|
||||
/* door hack: any entity with the same name as ours will follow our states */
|
||||
if (b.HasSpawnFlags(MRBFL_DOORHACK))
|
||||
|
@ -262,5 +263,5 @@ void
|
|||
momentary_rot_button::momentary_rot_button(void)
|
||||
{
|
||||
m_flReturnspeed = m_flSpeed = -1;
|
||||
super::CBaseMomentary();
|
||||
super::NSMomentary();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ typedef enum
|
|||
MOMENTARY_RETURNING
|
||||
};
|
||||
|
||||
class CBaseMomentary:NSRenderableEntity
|
||||
class
|
||||
NSMomentary:NSRenderableEntity
|
||||
{
|
||||
entity m_eUser;
|
||||
vector m_vecMoveDir;
|
||||
|
@ -36,7 +37,7 @@ class CBaseMomentary:NSRenderableEntity
|
|||
float m_flSpeed;
|
||||
float m_flReturnspeed;
|
||||
|
||||
void(void) CBaseMomentary;
|
||||
void(void) NSMomentary;
|
||||
|
||||
/* overrides */
|
||||
virtual void(float) Save;
|
||||
|
@ -48,19 +49,19 @@ class CBaseMomentary:NSRenderableEntity
|
|||
};
|
||||
|
||||
float
|
||||
CBaseMomentary::GetProgress(void)
|
||||
NSMomentary::GetProgress(void)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void
|
||||
CBaseMomentary::MovementStateChanged(void)
|
||||
NSMomentary::MovementStateChanged(void)
|
||||
{
|
||||
/* this is handled by the respective sub entity */
|
||||
}
|
||||
|
||||
void
|
||||
CBaseMomentary::SetMoveState(int status)
|
||||
NSMomentary::SetMoveState(int status)
|
||||
{
|
||||
if (m_iMoveState == status)
|
||||
return;
|
||||
|
@ -70,7 +71,7 @@ CBaseMomentary::SetMoveState(int status)
|
|||
}
|
||||
|
||||
void
|
||||
CBaseMomentary::Save(float handle)
|
||||
NSMomentary::Save(float handle)
|
||||
{
|
||||
SaveFloat(handle, "user", num_for_edict(m_eUser));
|
||||
SaveVector(handle, "move_dir", m_vecMoveDir);
|
||||
|
@ -85,7 +86,7 @@ CBaseMomentary::Save(float handle)
|
|||
}
|
||||
|
||||
void
|
||||
CBaseMomentary::Restore(string strKey, string strValue)
|
||||
NSMomentary::Restore(string strKey, string strValue)
|
||||
{
|
||||
switch (strKey) {
|
||||
case "user":
|
||||
|
@ -118,7 +119,7 @@ CBaseMomentary::Restore(string strKey, string strValue)
|
|||
}
|
||||
|
||||
void
|
||||
CBaseMomentary::CBaseMomentary(void)
|
||||
NSMomentary::NSMomentary(void)
|
||||
{
|
||||
super::NSRenderableEntity();
|
||||
}
|
||||
|
|
|
@ -28,38 +28,4 @@
|
|||
#include "NSMonster.h"
|
||||
#include "NSTalkMonster.h"
|
||||
#include "NSProjectile.h"
|
||||
|
||||
/*
|
||||
============
|
||||
Compatibility Layer
|
||||
|
||||
CBaseEntity was once the main, bloated class.
|
||||
It's since been replaced by a smaller NSEntity class.
|
||||
|
||||
Here we have to make sure that CBaseEntity points to the
|
||||
largest general purpose entity that is renderable.
|
||||
============
|
||||
*/
|
||||
/* TODO: Throw this out */
|
||||
class CBaseEntity:NSSurfacePropEntity
|
||||
{
|
||||
void(void) CBaseEntity;
|
||||
};
|
||||
|
||||
void
|
||||
CBaseEntity::CBaseEntity(void)
|
||||
{
|
||||
NSSurfacePropEntity::NSSurfacePropEntity();
|
||||
}
|
||||
|
||||
class CBaseTrigger:CBaseEntity
|
||||
{
|
||||
void(void) CBaseTrigger;
|
||||
};
|
||||
|
||||
void
|
||||
CBaseTrigger::CBaseTrigger(void)
|
||||
{
|
||||
CBaseEntity::CBaseEntity();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -73,6 +73,13 @@
|
|||
|
||||
#define printf(x, ...) print(sprintf(x, ...))
|
||||
|
||||
void
|
||||
_NSLog(string msg)
|
||||
{
|
||||
print(sprintf("%f %s\n", time, msg));
|
||||
}
|
||||
#define NSLog(x, ...) _NSLog(sprintf(x, ...))
|
||||
|
||||
const vector VEC_HULL_MIN = [-16,-16,-36];
|
||||
const vector VEC_HULL_MAX = [16,16,36];
|
||||
const vector VEC_CHULL_MIN = [-16,-16,-18];
|
||||
|
|
Loading…
Reference in a new issue