Convert all classes to use the new parent names. The old ones were marked for deprecation long ago.

This commit is contained in:
Marco Cawthorne 2022-05-10 15:00:56 -07:00
parent 0f77b36804
commit 707d1bd31e
Signed by: eukara
GPG Key ID: C196CD8BA993248A
5 changed files with 14 additions and 14 deletions

View File

@ -77,7 +77,7 @@ Damage_Apply(entity t, entity c, float dmg, int w, damageType_t type)
t.health = t.max_health;
}
CBaseEntity s = (CBaseEntity)t;
NSSurfacePropEntity s = (NSSurfacePropEntity)t;
if (s.health <= 0) {
if (s.flags & FL_CLIENT) {

View File

@ -21,7 +21,7 @@ enum pwuptype_choice{
#ifdef SERVER
class CTSPowerUp:CBaseEntity{
class CTSPowerUp:NSRenderableEntity{
//key values?
pwuptype_choice m_ePwuptype;
@ -61,9 +61,9 @@ CTSPowerUp::CTSPowerUp(void)
// And why don't we just receive these as name/value pairs like clientside does?
// I HAVE NO CLUE.
// And is it a problem we never call CBaseEntity's constructor?
// And is it a problem we never call NSRenderableEntity's constructor?
// If we did it would read every single field that way, in addition to us
// reading every single field here, just to get info that the CBaseEntity expects
// reading every single field here, just to get info that the NSRenderableEntity expects
// (origin) and what CTSPowerUp expects. Not efficient!
@ -148,7 +148,7 @@ CTSPowerUp::CustomInit(void)
//takedamage = DAMAGE_NO;
// start at where I spawned, already recorded by CBaseEntity for us.
// start at where I spawned, already recorded by NSRenderableEntity for us.
origin = GetSpawnOrigin();
// Tone the gravity down to see them fall better / prove their positions are reset on spawn.
@ -287,7 +287,7 @@ CTSPowerUp::touch(void)
if(this.expireTime == -1){
//pre-placed by the map? Create the illusion we disappeared.
CBaseEntity::Hide();
NSRenderableEntity::Hide();
this.alreadyPickedUp = TRUE;
//respawn 'm_iPwupduration seconds from now, often 60 (at least it is in ts_bikini)
@ -459,7 +459,7 @@ CTSPowerUp::declareDisposable(void)
#ifdef CLIENT
class CTSPowerUp:CBaseEntity{
class CTSPowerUp:NSRenderableEntity{
//key values?
pwuptype_choice m_ePwuptype;
@ -498,7 +498,7 @@ void
CTSPowerUp::Initialized(void)
{
//base method is empty, this is pointless
//CBaseEntity::Initialized();
//NSRenderableEntity::Initialized();
// until the server tells us!
dataID = POWERUP_ID::NONE;
@ -741,7 +741,7 @@ CTSPowerUp::SpawnKey(string strField, string strKey)
break;
*/
default:
CBaseEntity::SpawnKey(strField, strKey);
NSRenderableEntity::SpawnKey(strField, strKey);
}
}

View File

@ -48,7 +48,7 @@ TSMultiplayerRules::RespawnMain(void){
// If anything can potentially be out of alignment since round-start that should be returned that way,
// go ahead and call respawn for that classname too
for (entity a = world; (a = findfloat(a, ::identity, 1));) {
CBaseEntity ent = (CBaseEntity)a;
NSEntity ent = (NSEntity)a;
// Not a player, spectator, or viewmodel (if it's even possible to run into those this way)? Go ahead
if(
!(ent.classname == "player" || ent.classname == "spectator" || ent.classname == "vm")
@ -95,7 +95,7 @@ TSMultiplayerRules::RespawnRoutine(void){
//for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
for (entity a = world; (a = findfloat(a, ::identity, IDENTITY_CANRESPAWN));) {
CBaseEntity caw = (CBaseEntity)a;
NSEntity caw = (NSEntity)a;
if(caw.classname == "func_breakable"){
caw.Respawn();
}
@ -642,7 +642,7 @@ TSMultiplayerRules::RestartRound(int iWipe)
/*
// actually not necessary, all map powerups get the same GF_CANRESPAWN flag anyway.
for (entity eFind = world; (eFind = find(eFind, classname, "ts_powerup"));) {
CBaseEntity caw = (CBaseEntity)eFind;
NSEntity caw = (NSEntity)eFind;
caw.Respawn();
}
*/

View File

@ -21,7 +21,7 @@
// Although that could fill in Nuclide's expected item_pickup and let anything in-map
// redirect to this if that were preferred.
class item_pickup:CBaseTrigger
class item_pickup:NSRenderableEntity
{
int m_iClip;
int m_iWasDropped;

View File

@ -19,7 +19,7 @@
/* This is one of those leftovers from trying to get a game out in time */
class world_items:CBaseTrigger
class world_items:NSRenderableEntity
{
void(void) world_items;
};