From 9b955f26725c3771b5c84af7ca6c7b67c6e58002 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Thu, 17 Mar 2016 23:44:52 +0600 Subject: [PATCH] Regamedll API WIP: Added new interfaces-objects Removed some useless code in CBasePlayerWeapon::GetNextAttackDelay Removed the allocation of the entity CSoundEnt, because it is useless for CS 1.6 also removed UpdatePlayerSound --- regamedll/dlls/airtank.cpp | 3 +- regamedll/dlls/airtank.h | 1 - regamedll/dlls/ammo.cpp | 30 +- regamedll/dlls/ammo.h | 10 - regamedll/dlls/bmodels.cpp | 23 +- regamedll/dlls/bmodels.h | 7 - regamedll/dlls/bot/cs_bot.cpp | 2 +- regamedll/dlls/bot/cs_bot.h | 2 - regamedll/dlls/bot/cs_bot_manager.cpp | 6 +- regamedll/dlls/buttons.cpp | 23 +- regamedll/dlls/buttons.h | 5 - regamedll/dlls/cbase.cpp | 4 - regamedll/dlls/cbase.h | 41 +- regamedll/dlls/client.cpp | 42 +- regamedll/dlls/combat.cpp | 10 +- regamedll/dlls/doors.cpp | 13 +- regamedll/dlls/doors.h | 3 - regamedll/dlls/effects.cpp | 67 +- regamedll/dlls/effects.h | 17 - regamedll/dlls/explode.cpp | 6 +- regamedll/dlls/explode.h | 2 - regamedll/dlls/func_break.cpp | 6 +- regamedll/dlls/func_break.h | 2 - regamedll/dlls/func_tank.cpp | 18 +- regamedll/dlls/func_tank.h | 6 - regamedll/dlls/gamerules.h | 10 + regamedll/dlls/ggrenade.cpp | 15 +- regamedll/dlls/h_battery.cpp | 3 +- regamedll/dlls/h_battery.h | 1 - regamedll/dlls/h_cycler.cpp | 17 +- regamedll/dlls/h_cycler.h | 6 - regamedll/dlls/healthkit.cpp | 5 +- regamedll/dlls/healthkit.h | 1 - regamedll/dlls/hostage/hostage.cpp | 20 +- regamedll/dlls/hostage/hostage_localnav.cpp | 6 +- regamedll/dlls/items.cpp | 29 +- regamedll/dlls/items.h | 10 - regamedll/dlls/lights.cpp | 6 +- regamedll/dlls/lights.h | 2 +- regamedll/dlls/maprules.cpp | 22 +- regamedll/dlls/mortar.cpp | 4 +- regamedll/dlls/multiplay_gamerules.cpp | 41 +- regamedll/dlls/pathcorner.cpp | 4 +- regamedll/dlls/plats.cpp | 18 +- regamedll/dlls/plats.h | 2 +- regamedll/dlls/player.cpp | 64 +- regamedll/dlls/player.h | 1 - regamedll/dlls/revert_saved.h | 8 +- regamedll/dlls/sound.cpp | 10 +- regamedll/dlls/soundent.cpp | 11 +- regamedll/dlls/soundent.h | 1 - regamedll/dlls/subs.cpp | 19 +- regamedll/dlls/training_gamerules.cpp | 4 +- regamedll/dlls/training_gamerules.h | 1 - regamedll/dlls/triggers.cpp | 84 +- regamedll/dlls/triggers.h | 2 +- regamedll/dlls/util.h | 10 +- regamedll/dlls/vehicle.cpp | 4 +- regamedll/dlls/weapons.cpp | 11 +- regamedll/dlls/weapons.h | 4 +- regamedll/dlls/world.cpp | 13 +- regamedll/dlls/wpn_shared/wpn_ak47.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_aug.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_awp.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_c4.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_deagle.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_elite.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_famas.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_fiveseven.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_flashbang.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_g3sg1.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_galil.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_glock18.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_hegrenade.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_knife.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_m249.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_m3.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_m4a1.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_mac10.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_mp5navy.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_p228.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_p90.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_scout.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_sg550.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_sg552.cpp | 2 +- .../dlls/wpn_shared/wpn_smokegrenade.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_tmp.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_ump45.cpp | 2 +- regamedll/dlls/wpn_shared/wpn_usp.cpp | 13 +- regamedll/dlls/wpn_shared/wpn_xm1014.cpp | 2 +- regamedll/game_shared/bot/bot.h | 4 +- regamedll/hookers/hooker_impl.cpp | 3 + regamedll/hookers/osconfig.h | 1 - .../public/regamedll/regamedll_interfaces.h | 1142 ++++++++++++++ .../regamedll/regamedll_interfaces_impl.cpp | 18 +- .../regamedll/regamedll_interfaces_impl.h | 1378 ++++++++++++++++- 96 files changed, 2879 insertions(+), 554 deletions(-) diff --git a/regamedll/dlls/airtank.cpp b/regamedll/dlls/airtank.cpp index 27e5178f..b0b58c35 100644 --- a/regamedll/dlls/airtank.cpp +++ b/regamedll/dlls/airtank.cpp @@ -12,8 +12,7 @@ TYPEDESCRIPTION CAirtank::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(item_airtank, CAirtank); -LINK_CLASS_TO_WRAP(CAirtank, CCSAirtank); +LINK_ENTITY_TO_CLASS(item_airtank, CAirtank, CCSAirtank); IMPLEMENT_SAVERESTORE(CAirtank, CGrenade); void CAirtank::__MAKE_VHOOK(Spawn)() diff --git a/regamedll/dlls/airtank.h b/regamedll/dlls/airtank.h index 305dc2f1..89ff2eb9 100644 --- a/regamedll/dlls/airtank.h +++ b/regamedll/dlls/airtank.h @@ -35,7 +35,6 @@ class CAirtank: public CGrenade { public: - CAirtank(); virtual void Spawn(); virtual void Precache(); virtual int Save(CSave &save); diff --git a/regamedll/dlls/ammo.cpp b/regamedll/dlls/ammo.cpp index 5313a7a2..2276a084 100644 --- a/regamedll/dlls/ammo.cpp +++ b/regamedll/dlls/ammo.cpp @@ -24,8 +24,7 @@ BOOL C9MMAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_9mm, C9MMAmmo); -LINK_CLASS_TO_WRAP(C9MMAmmo, CCS9MMAmmo); +LINK_ENTITY_TO_CLASS(ammo_9mm, C9MMAmmo, CCS9MMAmmo); void CBuckShotAmmo::__MAKE_VHOOK(Spawn)() { @@ -51,8 +50,7 @@ BOOL CBuckShotAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_buckshot, CBuckShotAmmo); -LINK_CLASS_TO_WRAP(CBuckShotAmmo, CCSBuckShotAmmo); +LINK_ENTITY_TO_CLASS(ammo_buckshot, CBuckShotAmmo, CCSBuckShotAmmo); void C556NatoAmmo::__MAKE_VHOOK(Spawn)() { @@ -78,8 +76,7 @@ BOOL C556NatoAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_556nato, C556NatoAmmo); -LINK_CLASS_TO_WRAP(C556NatoAmmo, CCS556NatoAmmo); +LINK_ENTITY_TO_CLASS(ammo_556nato, C556NatoAmmo, CCS556NatoAmmo); void C556NatoBoxAmmo::__MAKE_VHOOK(Spawn)() { @@ -105,8 +102,7 @@ BOOL C556NatoBoxAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_556natobox, C556NatoBoxAmmo); -LINK_CLASS_TO_WRAP(C556NatoBoxAmmo, CCS556NatoBoxAmmo); +LINK_ENTITY_TO_CLASS(ammo_556natobox, C556NatoBoxAmmo, CCS556NatoBoxAmmo); void C762NatoAmmo::__MAKE_VHOOK(Spawn)() { @@ -132,8 +128,7 @@ BOOL C762NatoAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_762nato, C762NatoAmmo); -LINK_CLASS_TO_WRAP(C762NatoAmmo, CCS762NatoAmmo); +LINK_ENTITY_TO_CLASS(ammo_762nato, C762NatoAmmo, CCS762NatoAmmo); void C45ACPAmmo::__MAKE_VHOOK(Spawn)() { @@ -159,8 +154,7 @@ BOOL C45ACPAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_45acp, C45ACPAmmo); -LINK_CLASS_TO_WRAP(C45ACPAmmo, CCS45ACPAmmo); +LINK_ENTITY_TO_CLASS(ammo_45acp, C45ACPAmmo, CCS45ACPAmmo); void C50AEAmmo::__MAKE_VHOOK(Spawn)() { @@ -186,8 +180,7 @@ BOOL C50AEAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_50ae, C50AEAmmo); -LINK_CLASS_TO_WRAP(C50AEAmmo, CCS50AEAmmo); +LINK_ENTITY_TO_CLASS(ammo_50ae, C50AEAmmo, CCS50AEAmmo); void C338MagnumAmmo::__MAKE_VHOOK(Spawn)() { @@ -213,8 +206,7 @@ BOOL C338MagnumAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_338magnum, C338MagnumAmmo); -LINK_CLASS_TO_WRAP(C338MagnumAmmo, CCS338MagnumAmmo); +LINK_ENTITY_TO_CLASS(ammo_338magnum, C338MagnumAmmo, CCS338MagnumAmmo); void C57MMAmmo::__MAKE_VHOOK(Spawn)() { @@ -240,8 +232,7 @@ BOOL C57MMAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_57mm, C57MMAmmo); -LINK_CLASS_TO_WRAP(C57MMAmmo, CCS57MMAmmo); +LINK_ENTITY_TO_CLASS(ammo_57mm, C57MMAmmo, CCS57MMAmmo); void C357SIGAmmo::__MAKE_VHOOK(Spawn)() { @@ -267,5 +258,4 @@ BOOL C357SIGAmmo::__MAKE_VHOOK(AddAmmo)(CBaseEntity *pOther) return TRUE; } -LINK_ENTITY_TO_CLASS(ammo_357sig, C357SIGAmmo); -LINK_CLASS_TO_WRAP(C357SIGAmmo, CCS357SIGAmmo); +LINK_ENTITY_TO_CLASS(ammo_357sig, C357SIGAmmo, CCS357SIGAmmo); diff --git a/regamedll/dlls/ammo.h b/regamedll/dlls/ammo.h index b3ab0e9d..6118fa28 100644 --- a/regamedll/dlls/ammo.h +++ b/regamedll/dlls/ammo.h @@ -35,7 +35,6 @@ class C9MMAmmo: public CBasePlayerAmmo { public: - C9MMAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -53,7 +52,6 @@ public: class CBuckShotAmmo: public CBasePlayerAmmo { public: - CBuckShotAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -71,7 +69,6 @@ public: class C556NatoAmmo: public CBasePlayerAmmo { public: - C556NatoAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -89,7 +86,6 @@ public: class C556NatoBoxAmmo: public CBasePlayerAmmo { public: - C556NatoBoxAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -107,7 +103,6 @@ public: class C762NatoAmmo: public CBasePlayerAmmo { public: - C762NatoAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -125,7 +120,6 @@ public: class C45ACPAmmo: public CBasePlayerAmmo { public: - C45ACPAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -143,7 +137,6 @@ public: class C50AEAmmo: public CBasePlayerAmmo { public: - C50AEAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -161,7 +154,6 @@ public: class C338MagnumAmmo: public CBasePlayerAmmo { public: - C338MagnumAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -179,7 +171,6 @@ public: class C57MMAmmo: public CBasePlayerAmmo { public: - C57MMAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); @@ -196,7 +187,6 @@ public: class C357SIGAmmo: public CBasePlayerAmmo { public: - C357SIGAmmo(); virtual void Spawn(); virtual void Precache(); virtual BOOL AddAmmo(CBaseEntity *pOther); diff --git a/regamedll/dlls/bmodels.cpp b/regamedll/dlls/bmodels.cpp index 61801101..979ed3e6 100644 --- a/regamedll/dlls/bmodels.cpp +++ b/regamedll/dlls/bmodels.cpp @@ -31,11 +31,10 @@ TYPEDESCRIPTION CPendulum::m_SaveData[] = // BModelOrigin - calculates origin of a bmodel from absmin/size because all bmodel origins are 0 0 0 Vector VecBModelOrigin(entvars_t *pevBModel) { - return pevBModel->absmin + (pevBModel->size * 0.5); + return pevBModel->absmin + (pevBModel->size * 0.5f); } -LINK_ENTITY_TO_CLASS(func_wall, CFuncWall); -LINK_CLASS_TO_WRAP(CFuncWall, CCSFuncWall); +LINK_ENTITY_TO_CLASS(func_wall, CFuncWall, CCSFuncWall); void CFuncWall::__MAKE_VHOOK(Spawn)() { @@ -59,8 +58,7 @@ void CFuncWall::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, } } -LINK_ENTITY_TO_CLASS(func_wall_toggle, CFuncWallToggle); -LINK_CLASS_TO_WRAP(CFuncWallToggle, CCSFuncWallToggle); +LINK_ENTITY_TO_CLASS(func_wall_toggle, CFuncWallToggle, CCSFuncWallToggle); void CFuncWallToggle::__MAKE_VHOOK(Spawn)() { @@ -109,8 +107,7 @@ void CFuncWallToggle::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC } } -LINK_ENTITY_TO_CLASS(func_conveyor, CFuncConveyor); -LINK_CLASS_TO_WRAP(CFuncConveyor, CCSFuncConveyor); +LINK_ENTITY_TO_CLASS(func_conveyor, CFuncConveyor, CCSFuncConveyor); void CFuncConveyor::__MAKE_VHOOK(Spawn)() { @@ -157,8 +154,7 @@ void CFuncConveyor::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCal UpdateSpeed(pev->speed); } -LINK_ENTITY_TO_CLASS(func_illusionary, CFuncIllusionary); -LINK_CLASS_TO_WRAP(CFuncIllusionary, CCSFuncIllusionary); +LINK_ENTITY_TO_CLASS(func_illusionary, CFuncIllusionary, CCSFuncIllusionary); void CFuncIllusionary::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -188,8 +184,7 @@ void CFuncIllusionary::__MAKE_VHOOK(Spawn)() // MAKE_STATIC(ENT(pev)); } -LINK_ENTITY_TO_CLASS(func_monsterclip, CFuncMonsterClip); -LINK_CLASS_TO_WRAP(CFuncMonsterClip, CCSFuncMonsterClip); +LINK_ENTITY_TO_CLASS(func_monsterclip, CFuncMonsterClip, CCSFuncMonsterClip); void CFuncMonsterClip::__MAKE_VHOOK(Spawn)() { @@ -203,8 +198,7 @@ void CFuncMonsterClip::__MAKE_VHOOK(Spawn)() pev->flags |= FL_MONSTERCLIP; } -LINK_ENTITY_TO_CLASS(func_rotating, CFuncRotating); -LINK_CLASS_TO_WRAP(CFuncRotating, CCSFuncRotating); +LINK_ENTITY_TO_CLASS(func_rotating, CFuncRotating, CCSFuncRotating); IMPLEMENT_SAVERESTORE(CFuncRotating, CBaseEntity); void CFuncRotating::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -607,8 +601,7 @@ void CFuncRotating::__MAKE_VHOOK(Blocked)(CBaseEntity *pOther) pOther->TakeDamage(pev, pev, pev->dmg, DMG_CRUSH); } -LINK_ENTITY_TO_CLASS(func_pendulum, CPendulum); -LINK_CLASS_TO_WRAP(CPendulum, CCSPendulum); +LINK_ENTITY_TO_CLASS(func_pendulum, CPendulum, CCSPendulum); IMPLEMENT_SAVERESTORE(CPendulum, CBaseEntity); void CPendulum::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) diff --git a/regamedll/dlls/bmodels.h b/regamedll/dlls/bmodels.h index 10974d37..c32aa2cd 100644 --- a/regamedll/dlls/bmodels.h +++ b/regamedll/dlls/bmodels.h @@ -59,7 +59,6 @@ class CFuncWall: public CBaseEntity { public: - CFuncWall(); virtual void Spawn(); // Bmodels don't go across transitions @@ -78,7 +77,6 @@ public: class CFuncWallToggle: public CFuncWall { public: - CFuncWallToggle(); virtual void Spawn(); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -98,7 +96,6 @@ public: class CFuncConveyor: public CFuncWall { public: - CFuncConveyor(); virtual void Spawn(); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -117,7 +114,6 @@ public: class CFuncIllusionary: public CBaseToggle { public: - CFuncIllusionary(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual int ObjectCaps() { return CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION; } @@ -143,7 +139,6 @@ public: class CFuncMonsterClip: public CFuncWall { public: - CFuncMonsterClip(); virtual void Spawn(); // Clear out func_wall's use function @@ -161,7 +156,6 @@ public: class CFuncRotating: public CBaseEntity { public: - CFuncRotating(); // basic functions virtual void Spawn(); virtual void Precache(); @@ -203,7 +197,6 @@ public: class CPendulum: public CBaseEntity { public: - CPendulum(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); diff --git a/regamedll/dlls/bot/cs_bot.cpp b/regamedll/dlls/bot/cs_bot.cpp index 648cfc41..efa9da12 100644 --- a/regamedll/dlls/bot/cs_bot.cpp +++ b/regamedll/dlls/bot/cs_bot.cpp @@ -68,7 +68,7 @@ bool CCSBot::__MAKE_VHOOK(Jump)(bool mustJump) // NOTE: We dont want to directly call Attack() here, or the bots will have super-human reaction times when injured int CCSBot::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { - CBaseEntity *attacker = GetClassPtr((CBaseEntity *)pevInflictor); + CBaseEntity *attacker = GetClassPtr((CBaseEntity *)pevInflictor); // if we were attacked by a teammate, rebuke if (attacker->IsPlayer()) diff --git a/regamedll/dlls/bot/cs_bot.h b/regamedll/dlls/bot/cs_bot.h index 4c6a65e9..af70c092 100644 --- a/regamedll/dlls/bot/cs_bot.h +++ b/regamedll/dlls/bot/cs_bot.h @@ -421,8 +421,6 @@ class CCSBot: public CBot { public: CCSBot(); // constructor initializes all values to zero - -public: virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType); // invoked when injured by something (EXTEND) - returns the amount of damage inflicted virtual void Killed(entvars_t *pevAttacker, int iGib); // invoked when killed (EXTEND) virtual void RoundRespawn(); diff --git a/regamedll/dlls/bot/cs_bot_manager.cpp b/regamedll/dlls/bot/cs_bot_manager.cpp index 03fd0a3e..ce2491ae 100644 --- a/regamedll/dlls/bot/cs_bot_manager.cpp +++ b/regamedll/dlls/bot/cs_bot_manager.cpp @@ -347,7 +347,7 @@ void CCSBotManager::__MAKE_VHOOK(ClientDisconnect)(CBasePlayer *pPlayer) FREE_PRIVATE(pPlayer->edict()); - CBasePlayer *player = GetClassPtr((CBasePlayer *)temp); + CBasePlayer *player = GetClassPtr((CBasePlayer *)temp); AddEntityHashValue(player->pev, STRING(player->pev->classname), CLASSNAME); player->pev->flags = FL_DORMANT; } @@ -681,7 +681,7 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd) if ((pEntity->pev->flags & FL_DORMANT) == FL_DORMANT) continue; - CBasePlayer *playerOrBot = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *playerOrBot = GetClassPtr((CBasePlayer *)pEntity->pev); if (playerOrBot->IsBot()) { @@ -1189,7 +1189,7 @@ bool CCSBotManager::AddBot(const BotProfile *profile, BotProfileTeamType team) return false; } - CCSBot *pBot = CreateBot(profile); + CCSBot *pBot = CreateBot(profile); if (pBot == NULL) { return false; diff --git a/regamedll/dlls/buttons.cpp b/regamedll/dlls/buttons.cpp index 54a65fde..3b1e7f3f 100644 --- a/regamedll/dlls/buttons.cpp +++ b/regamedll/dlls/buttons.cpp @@ -53,8 +53,7 @@ TYPEDESCRIPTION CEnvSpark::m_SaveData[] = #endif // HOOK_GAMEDLL IMPLEMENT_SAVERESTORE(CEnvGlobal, CBaseEntity); -LINK_ENTITY_TO_CLASS(env_global, CEnvGlobal); -LINK_CLASS_TO_WRAP(CEnvGlobal, CCSEnvGlobal); +LINK_ENTITY_TO_CLASS(env_global, CEnvGlobal, CCSEnvGlobal); void CEnvGlobal::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -136,8 +135,7 @@ void CEnvGlobal::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller } IMPLEMENT_SAVERESTORE(CMultiSource, CBaseEntity); -LINK_ENTITY_TO_CLASS(multisource, CMultiSource); -LINK_CLASS_TO_WRAP(CMultiSource, CCSMultiSource); +LINK_ENTITY_TO_CLASS(multisource, CMultiSource, CCSMultiSource); // Cache user-entity-field values until spawn is called. void CMultiSource::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -427,8 +425,7 @@ int CBaseButton::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe // 1) wooden clunk // 2) metallic click // 3) in-out -LINK_ENTITY_TO_CLASS(func_button, CBaseButton); -LINK_CLASS_TO_WRAP(CBaseButton, CCSButton); +LINK_ENTITY_TO_CLASS(func_button, CBaseButton, CCSButton); void CBaseButton::__MAKE_VHOOK(Spawn)() { @@ -792,8 +789,7 @@ void CBaseButton::ButtonBackHome() } } -LINK_ENTITY_TO_CLASS(func_rot_button, CRotButton); -LINK_CLASS_TO_WRAP(CRotButton, CCSRotButton); +LINK_ENTITY_TO_CLASS(func_rot_button, CRotButton, CCSRotButton); void CRotButton::__MAKE_VHOOK(Spawn)() { @@ -860,8 +856,7 @@ void CRotButton::__MAKE_VHOOK(Spawn)() } IMPLEMENT_SAVERESTORE(CMomentaryRotButton, CBaseToggle); -LINK_ENTITY_TO_CLASS(momentary_rot_button, CMomentaryRotButton); -LINK_CLASS_TO_WRAP(CMomentaryRotButton, CCSMomentaryRotButton); +LINK_ENTITY_TO_CLASS(momentary_rot_button, CMomentaryRotButton, CCSMomentaryRotButton); void CMomentaryRotButton::__MAKE_VHOOK(Spawn)() { @@ -1076,9 +1071,8 @@ void CMomentaryRotButton::UpdateSelfReturn(float value) } IMPLEMENT_SAVERESTORE(CEnvSpark, CBaseEntity); -LINK_ENTITY_TO_CLASS(env_spark, CEnvSpark); -LINK_ENTITY_TO_CLASS(env_debris, CEnvSpark); -LINK_CLASS_TO_WRAP(CEnvSpark, CCSEnvSpark); +LINK_ENTITY_TO_CLASS(env_spark, CEnvSpark, CCSEnvSpark); +LINK_ENTITY_TO_CLASS(env_debris, CEnvSpark, CCSEnvSpark); void CEnvSpark::__MAKE_VHOOK(Spawn)() { @@ -1160,8 +1154,7 @@ void CEnvSpark::SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYP SetThink(NULL); } -LINK_ENTITY_TO_CLASS(button_target, CButtonTarget); -LINK_CLASS_TO_WRAP(CButtonTarget, CCSButtonTarget); +LINK_ENTITY_TO_CLASS(button_target, CButtonTarget, CCSButtonTarget); void CButtonTarget::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/buttons.h b/regamedll/dlls/buttons.h index d9f5127d..1d756db5 100644 --- a/regamedll/dlls/buttons.h +++ b/regamedll/dlls/buttons.h @@ -57,7 +57,6 @@ class CEnvGlobal: public CPointEntity { public: - CEnvGlobal(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); @@ -85,7 +84,6 @@ public: class CRotButton: public CBaseButton { public: - CRotButton(); virtual void Spawn(); #ifdef HOOK_GAMEDLL @@ -98,7 +96,6 @@ public: class CMomentaryRotButton: public CBaseToggle { public: - CMomentaryRotButton(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); @@ -150,7 +147,6 @@ public: class CEnvSpark: public CBaseEntity { public: - CEnvSpark(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -180,7 +176,6 @@ public: class CButtonTarget: public CBaseEntity { public: - CButtonTarget(); virtual void Spawn(); virtual int ObjectCaps(); virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType); diff --git a/regamedll/dlls/cbase.cpp b/regamedll/dlls/cbase.cpp index 85352ef0..718f6cb1 100644 --- a/regamedll/dlls/cbase.cpp +++ b/regamedll/dlls/cbase.cpp @@ -83,8 +83,6 @@ BOOL gTouchDisabled = FALSE; #endif // HOOK_GAMEDLL -const std::type_info *g_typeInfo = NULL; - int CaseInsensitiveHash(const char *string, int iBounds) { unsigned int hash = 0; @@ -1086,5 +1084,3 @@ void OnFreeEntPrivateData(edict_t *pEnt) RemoveEntityHashValue(pEntity->pev, STRING(pEntity->pev->classname), CLASSNAME); Regamedll_FreeEntities(pEntity); } - -//LINK_CLASS_TO_WRAP(CBaseEntity, CCSEntity); diff --git a/regamedll/dlls/cbase.h b/regamedll/dlls/cbase.h index ae5a377f..eb6568a8 100644 --- a/regamedll/dlls/cbase.h +++ b/regamedll/dlls/cbase.h @@ -358,12 +358,7 @@ public: #endif public: - void *operator new(size_t stAllocateBlock, entvars_t *pevnew) - { - CBaseEntity *ent = (CBaseEntity *)ALLOC_PRIVATE(ENT(pevnew), stAllocateBlock); - ent->pev = pevnew; - return ent; - } + void *operator new(size_t stAllocateBlock, entvars_t *pevnew) { return ALLOC_PRIVATE(ENT(pevnew), stAllocateBlock); } void operator delete(void *pMem, entvars_t *pevnew) { pevnew->flags |= FL_KILLME; } void UpdateOnRemove(); void EXPORT SUB_Remove(); @@ -453,7 +448,6 @@ inline int FNullEnt(EHANDLE hent) { return (hent == NULL || FNullEnt(OFFSET(hent class CPointEntity: public CBaseEntity { public: - CPointEntity(); virtual void Spawn(); virtual int ObjectCaps() { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); } @@ -468,7 +462,6 @@ public: class CMultiSource: public CPointEntity { public: - CMultiSource(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); @@ -503,7 +496,6 @@ public: class CBaseDelay: public CBaseEntity { public: - CBaseDelay(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); @@ -636,7 +628,6 @@ class CBaseButton: public CBaseToggle BUTTON_RETURN }; public: - CBaseButton(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -696,7 +687,6 @@ public: class CWorld: public CBaseEntity { public: - CWorld(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -711,26 +701,11 @@ public: }; -extern const std::type_info *g_typeInfo; +#ifdef REGAMEDLL_SELF extern class CCSEntity **g_GameEntities; +#endif -template -T *GetClassPtrWrap(CBaseEntity *a) -{ - // yet not allocated? - if (g_GameEntities == NULL) - return NULL; - - // to ignore constructor classes invoked by inheritance - if (!g_typeInfo || g_typeInfo != &typeid(*a)) - return NULL; - - int index = a->entindex(); - g_GameEntities[index] = new T (a); - return reinterpret_cast(g_GameEntities[index]); -} - -template +template T *GetClassPtr(T *a) { entvars_t *pev = (entvars_t *)a; @@ -739,14 +714,16 @@ T *GetClassPtr(T *a) a = (T *)GET_PRIVATE(ENT(pev)); if (!a) { - g_typeInfo = &typeid(T); a = new(pev) T; - g_typeInfo = NULL; + a->pev = pev; + +#ifdef REGAMEDLL_SELF + g_GameEntities[a->entindex()] = new TWrap (a); +#endif #if defined(HOOK_GAMEDLL) && defined(_WIN32) && !defined(REGAMEDLL_UNIT_TESTS) VirtualTableInit((void *)a, stripClass(typeid(T).name())); #endif - } return a; diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index b308b924..90578325 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -176,7 +176,7 @@ void respawn(entvars_t *pev, BOOL fCopyCorpse) if (CSGameRules()->m_iTotalRoundsPlayed > 0) CSGameRules()->MarkSpawnSkipped(); - CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev); + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev); if (CSGameRules()->IsCareer() && CSGameRules()->ShouldSkipSpawn() && pPlayer->IsAlive()) g_skipCareerInitialSpawn = true; @@ -257,7 +257,7 @@ NOXREF int CountTeams() if (FNullEnt(pPlayer->edict())) break; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->m_iTeam == UNASSIGNED) continue; @@ -292,7 +292,7 @@ void ListPlayers(CBasePlayer *current) if (pPlayer->pev->flags & FL_DORMANT) continue; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); int iUserID = GETPLAYERUSERID(ENT(player->pev)); Q_sprintf(cNumber, "%d", iUserID); @@ -320,7 +320,7 @@ int CountTeamPlayers(int iTeam) if (pPlayer->pev->flags & FL_DORMANT) continue; - if (GetClassPtr((CBasePlayer *)pPlayer->pev)->m_iTeam == iTeam) + if (GetClassPtr((CBasePlayer *)pPlayer->pev)->m_iTeam == iTeam) ++i; } @@ -353,7 +353,7 @@ void ProcessKickVote(CBasePlayer *pVotingPlayer, CBasePlayer *pKickPlayer) if (FNullEnt(pTempEntity->edict())) break; - pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); + pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); if (!pTempPlayer || pTempPlayer->m_iTeam == UNASSIGNED) continue; @@ -382,7 +382,7 @@ void ProcessKickVote(CBasePlayer *pVotingPlayer, CBasePlayer *pKickPlayer) if (FNullEnt(pTempEntity->edict())) break; - pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); + pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); if (!pTempPlayer || pTempPlayer->m_iTeam == UNASSIGNED) continue; @@ -473,7 +473,7 @@ void CheckStartMoney() void EXT_FUNC ClientPutInServer(edict_t *pEntity) { entvars_t *pev = &pEntity->v; - CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev); + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev); pPlayer->SetCustomDecalFrames(-1); pPlayer->SetPrefsFromUserinfo(GET_INFO_BUFFER(pEntity)); @@ -607,7 +607,7 @@ void Host_Say(edict_t *pEntity, int teamonly) bool bSenderDead = false; entvars_t *pev = &pEntity->v; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pev); if (player->m_flLastTalk != 0.0f && gpGlobals->time - player->m_flLastTalk < 0.66f) return; @@ -2522,7 +2522,7 @@ CBaseEntity *EntityFromUserID(int userID) if (FNullEnt(pTempEntity->edict())) break; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); if (pTempPlayer->m_iTeam != UNASSIGNED && userID == GETPLAYERUSERID(pTempEntity->edict())) { @@ -2543,7 +2543,7 @@ NOXREF int CountPlayersInServer() if (FNullEnt(pTempEntity->edict())) break; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); if (pTempPlayer->m_iTeam != UNASSIGNED) { @@ -2824,7 +2824,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) return; entvars_t *pev = &pEntity->v; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pev); if (FStrEq(pcmd, "say")) { @@ -2899,7 +2899,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) CBaseEntity *pKickEntity = EntityFromUserID(iVoteID); if (pKickEntity != NULL) { - CBasePlayer *pKickPlayer = GetClassPtr((CBasePlayer *)pKickEntity->pev); + CBasePlayer *pKickPlayer = GetClassPtr((CBasePlayer *)pKickEntity->pev); if (pKickPlayer->m_iTeam != player->m_iTeam) { @@ -3460,12 +3460,12 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) } else { - if (g_pGameRules->ClientCommand_DeadOrAlive(GetClassPtr((CBasePlayer *)pev), pcmd)) + if (g_pGameRules->ClientCommand_DeadOrAlive(GetClassPtr((CBasePlayer *)pev), pcmd)) return; if (TheBots != NULL) { - if (TheBots->ClientCommand(GetClassPtr((CBasePlayer *)pev), pcmd)) + if (TheBots->ClientCommand(GetClassPtr((CBasePlayer *)pev), pcmd)) return; } @@ -3613,22 +3613,22 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) { #if 0 if (g_flWeaponCheat && CMD_ARGC() > 1) - GetClassPtr((CBasePlayer *)pev)->m_iFOV = Q_atoi(CMD_ARGV(1)); + GetClassPtr((CBasePlayer *)pev)->m_iFOV = Q_atoi(CMD_ARGV(1)); else - CLIENT_PRINTF(pEntity, print_console, UTIL_VarArgs("\"fov\" is \"%d\"\n", int(GetClassPtr((CBasePlayer *)pev)->m_iFOV))); + CLIENT_PRINTF(pEntity, print_console, UTIL_VarArgs("\"fov\" is \"%d\"\n", int(GetClassPtr((CBasePlayer *)pev)->m_iFOV))); #endif } else if (FStrEq(pcmd, "use")) { - GetClassPtr((CBasePlayer *)pev)->SelectItem(CMD_ARGV_(1)); + GetClassPtr((CBasePlayer *)pev)->SelectItem(CMD_ARGV_(1)); } else if (((pstr = Q_strstr(pcmd, "weapon_")) != NULL) && (pstr == pcmd)) { - GetClassPtr((CBasePlayer *)pev)->SelectItem(pcmd); + GetClassPtr((CBasePlayer *)pev)->SelectItem(pcmd); } else if (FStrEq(pcmd, "lastinv")) { - GetClassPtr((CBasePlayer *)pev)->SelectLastItem(); + GetClassPtr((CBasePlayer *)pev)->SelectLastItem(); } else if (FStrEq(pcmd, "buyammo1")) { @@ -3749,7 +3749,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) if (HandleRadioAliasCommands(player, pcmd)) return; - if (!g_pGameRules->ClientCommand(GetClassPtr((CBasePlayer *)pev), pcmd)) + if (!g_pGameRules->ClientCommand(GetClassPtr((CBasePlayer *)pev), pcmd)) { // tell the user they entered an unknown command char command[128]; @@ -3820,7 +3820,7 @@ void EXT_FUNC ClientUserInfoChanged(edict_t *pEntity, char *infobuffer) } } - g_pGameRules->ClientUserInfoChanged(GetClassPtr((CBasePlayer *)&pEntity->v), infobuffer); + g_pGameRules->ClientUserInfoChanged(GetClassPtr((CBasePlayer *)&pEntity->v), infobuffer); } void EXT_FUNC ServerDeactivate() diff --git a/regamedll/dlls/combat.cpp b/regamedll/dlls/combat.cpp index 750c48a0..f3066ce1 100644 --- a/regamedll/dlls/combat.cpp +++ b/regamedll/dlls/combat.cpp @@ -25,7 +25,7 @@ NOXREF void CGib::SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cG for (i = 0; i < cGibs; ++i) { - CGib *pGib = GetClassPtr((CGib *)NULL); + CGib *pGib = GetClassPtr((CGib *)NULL); pGib->Spawn("models/stickygib.mdl"); pGib->pev->body = RANDOM_LONG(0, 2); @@ -78,7 +78,7 @@ NOXREF void CGib::SpawnStickyGibs(entvars_t *pevVictim, Vector vecOrigin, int cG void CGib::SpawnHeadGib(entvars_t *pevVictim) { - CGib *pGib = GetClassPtr((CGib *)NULL); + CGib *pGib = GetClassPtr((CGib *)NULL); if (g_Language == LANGUAGE_GERMAN) { @@ -139,9 +139,9 @@ void CGib::SpawnHeadGib(entvars_t *pevVictim) void CGib::SpawnRandomGibs(entvars_t *pevVictim, int cGibs, int human) { int cSplat; - for (cSplat = 0; cSplat < cGibs; cSplat++) + for (cSplat = 0; cSplat < cGibs; ++cSplat) { - CGib *pGib = GetClassPtr((CGib *)NULL); + CGib *pGib = GetClassPtr((CGib *)NULL); if (g_Language == LANGUAGE_GERMAN) { @@ -1468,7 +1468,7 @@ void CBaseEntity::FireBullets(ULONG cShots, Vector vecSrc, Vector vecDirShooting ClearMultiDamage(); gMultiDamage.type = (DMG_BULLET | DMG_NEVERGIB); - for (ULONG iShot = 1; iShot <= cShots; iShot++) + for (ULONG iShot = 1; iShot <= cShots; ++iShot) { int spark = 0; diff --git a/regamedll/dlls/doors.cpp b/regamedll/dlls/doors.cpp index bc9cbd78..15993c26 100644 --- a/regamedll/dlls/doors.cpp +++ b/regamedll/dlls/doors.cpp @@ -187,11 +187,10 @@ void CBaseDoor::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) // 2) base // 3) stone chain // 4) screechy metal -LINK_ENTITY_TO_CLASS(func_door, CBaseDoor); +LINK_ENTITY_TO_CLASS(func_door, CBaseDoor, CCSDoor); // func_water - same as a door. -LINK_ENTITY_TO_CLASS(func_water, CBaseDoor); -LINK_CLASS_TO_WRAP(CBaseDoor, CCSDoor); +LINK_ENTITY_TO_CLASS(func_water, CBaseDoor, CCSDoor); void CBaseDoor::__MAKE_VHOOK(Spawn)() { @@ -768,7 +767,7 @@ void CBaseDoor::__MAKE_VHOOK(Blocked)(CBaseEntity *pOther) if (FClassnameIs(pentTarget, "func_door") || FClassnameIs(pentTarget, "func_door_rotating")) { - pDoor = GetClassPtr((CBaseDoor *)VARS(pentTarget)); + pDoor = GetClassPtr((CBaseDoor *)VARS(pentTarget)); if (pDoor->m_flWait >= 0) { @@ -841,8 +840,7 @@ void CBaseDoor::__MAKE_VHOOK(Blocked)(CBaseEntity *pOther) // 2) base // 3) stone chain // 4) screechy metal -LINK_ENTITY_TO_CLASS(func_door_rotating, CRotDoor); -LINK_CLASS_TO_WRAP(CRotDoor, CCSRotDoor); +LINK_ENTITY_TO_CLASS(func_door_rotating, CRotDoor, CCSRotDoor); void CRotDoor::__MAKE_VHOOK(Restart)() { @@ -940,8 +938,7 @@ void CRotDoor::__MAKE_VHOOK(SetToggleState)(int state) UTIL_SetOrigin(pev, pev->origin); } -LINK_ENTITY_TO_CLASS(momentary_door, CMomentaryDoor); -LINK_CLASS_TO_WRAP(CMomentaryDoor, CCSMomentaryDoor); +LINK_ENTITY_TO_CLASS(momentary_door, CMomentaryDoor, CCSMomentaryDoor); IMPLEMENT_SAVERESTORE(CMomentaryDoor, CBaseToggle); void CMomentaryDoor::__MAKE_VHOOK(Spawn)() diff --git a/regamedll/dlls/doors.h b/regamedll/dlls/doors.h index bac668cc..7f266b32 100644 --- a/regamedll/dlls/doors.h +++ b/regamedll/dlls/doors.h @@ -51,7 +51,6 @@ class CBaseDoor: public CBaseToggle { public: - CBaseDoor(); virtual void Spawn(); virtual void Precache(); virtual void Restart(); @@ -113,7 +112,6 @@ public: class CRotDoor: public CBaseDoor { public: - CRotDoor(); virtual void Spawn(); virtual void Restart(); virtual void SetToggleState(int state); @@ -131,7 +129,6 @@ public: class CMomentaryDoor: public CBaseToggle { public: - CMomentaryDoor(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); diff --git a/regamedll/dlls/effects.cpp b/regamedll/dlls/effects.cpp index f98cc834..d9941176 100644 --- a/regamedll/dlls/effects.cpp +++ b/regamedll/dlls/effects.cpp @@ -61,12 +61,8 @@ TYPEDESCRIPTION CGibShooter::m_SaveData[] = #endif // HOOK_GAMEDLL -LINK_ENTITY_TO_CLASS(info_target, CPointEntity); -LINK_CLASS_TO_WRAP(CPointEntity, CCSPointEntity); - -LINK_ENTITY_TO_CLASS(env_bubbles, CBubbling); -LINK_CLASS_TO_WRAP(CBubbling, CCSBubbling); - +LINK_ENTITY_TO_CLASS(info_target, CPointEntity, CCSPointEntity); +LINK_ENTITY_TO_CLASS(env_bubbles, CBubbling, CCSBubbling); IMPLEMENT_SAVERESTORE(CBubbling, CBaseEntity); void CBubbling::__MAKE_VHOOK(Spawn)() @@ -158,8 +154,7 @@ void CBubbling::FizzThink() pev->nextthink = gpGlobals->time + 2.5f - (0.1f * m_frequency); } -LINK_ENTITY_TO_CLASS(beam, CBeam); -LINK_CLASS_TO_WRAP(CBeam, CCSBeam); +LINK_ENTITY_TO_CLASS(beam, CBeam, CCSBeam); void CBeam::__MAKE_VHOOK(Spawn)() { @@ -223,7 +218,7 @@ const Vector &CBeam::GetEndPos() CBeam *CBeam::BeamCreate(const char *pSpriteName, int width) { // Create a new entity with CBeam private data - CBeam *pBeam = GetClassPtr((CBeam *)NULL); + CBeam *pBeam = GetClassPtr((CBeam *)NULL); MAKE_STRING_CLASS("beam", pBeam->pev); pBeam->BeamInit(pSpriteName, width); @@ -355,10 +350,8 @@ void CBeam::DoSparks(const Vector &start, const Vector &end) } } -LINK_ENTITY_TO_CLASS(env_lightning, CLightning); -LINK_ENTITY_TO_CLASS(env_beam, CLightning); -LINK_CLASS_TO_WRAP(CLightning, CCSLightning); - +LINK_ENTITY_TO_CLASS(env_lightning, CLightning, CCSLightning); +LINK_ENTITY_TO_CLASS(env_beam, CLightning, CCSLightning); IMPLEMENT_SAVERESTORE(CLightning, CBeam); void CLightning::__MAKE_VHOOK(Spawn)() @@ -853,8 +846,7 @@ void CLightning::BeamUpdateVars() } } -LINK_ENTITY_TO_CLASS(env_laser, CLaser); -LINK_CLASS_TO_WRAP(CLaser, CCSLaser); +LINK_ENTITY_TO_CLASS(env_laser, CLaser, CCSLaser); IMPLEMENT_SAVERESTORE(CLaser, CBeam); void CLaser::__MAKE_VHOOK(Spawn)() @@ -1013,8 +1005,7 @@ void CLaser::StrikeThink() pev->nextthink = gpGlobals->time + 0.1f; } -LINK_ENTITY_TO_CLASS(env_glow, CGlow); -LINK_CLASS_TO_WRAP(CGlow, CCSGlow); +LINK_ENTITY_TO_CLASS(env_glow, CGlow, CCSGlow); IMPLEMENT_SAVERESTORE(CGlow, CPointEntity); void CGlow::__MAKE_VHOOK(Spawn)() @@ -1053,8 +1044,7 @@ void CGlow::Animate(float frames) } } -LINK_ENTITY_TO_CLASS(env_bombglow, CBombGlow); -LINK_CLASS_TO_WRAP(CBombGlow, CCSBombGlow); +LINK_ENTITY_TO_CLASS(env_bombglow, CBombGlow, CCSBombGlow); void CBombGlow::__MAKE_VHOOK(Spawn)() { @@ -1106,8 +1096,7 @@ void CBombGlow::__MAKE_VHOOK(Think)() pev->nextthink = gpGlobals->time + 0.05f; } -LINK_ENTITY_TO_CLASS(env_sprite, CSprite); -LINK_CLASS_TO_WRAP(CSprite, CCSSprite); +LINK_ENTITY_TO_CLASS(env_sprite, CSprite, CCSSprite); IMPLEMENT_SAVERESTORE(CSprite, CPointEntity); void CSprite::__MAKE_VHOOK(Spawn)() @@ -1171,7 +1160,7 @@ void CSprite::SpriteInit(const char *pSpriteName, const Vector &origin) CSprite *CSprite::SpriteCreate(const char *pSpriteName, const Vector &origin, BOOL animate) { - CSprite *pSprite = GetClassPtr((CSprite *)NULL); + CSprite *pSprite = GetClassPtr((CSprite *)NULL); pSprite->SpriteInit(pSpriteName, origin); MAKE_STRING_CLASS("env_sprite", pSprite->pev); @@ -1284,8 +1273,7 @@ void CSprite::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, U } IMPLEMENT_SAVERESTORE(CGibShooter, CBaseDelay); -LINK_ENTITY_TO_CLASS(gibshooter, CGibShooter); -LINK_CLASS_TO_WRAP(CGibShooter, CCSGibShooter); +LINK_ENTITY_TO_CLASS(gibshooter, CGibShooter, CCSGibShooter); void CGibShooter::__MAKE_VHOOK(Precache)() { @@ -1357,7 +1345,7 @@ CGib *CGibShooter::__MAKE_VHOOK(CreateGib)() if (CVAR_GET_FLOAT("violence_hgibs") == 0) return NULL; - CGib *pGib = GetClassPtr((CGib *)NULL); + CGib *pGib = GetClassPtr((CGib *)NULL); pGib->Spawn("models/hgibs.mdl"); pGib->m_bloodColor = BLOOD_COLOR_RED; @@ -1437,8 +1425,7 @@ void CGibShooter::ShootThink() } } -LINK_ENTITY_TO_CLASS(env_shooter, CEnvShooter); -LINK_CLASS_TO_WRAP(CEnvShooter, CCSEnvShooter); +LINK_ENTITY_TO_CLASS(env_shooter, CEnvShooter, CCSEnvShooter); void CEnvShooter::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -1487,7 +1474,7 @@ void CEnvShooter::__MAKE_VHOOK(Precache)() CGib *CEnvShooter::__MAKE_VHOOK(CreateGib)() { - CGib *pGib = GetClassPtr((CGib *)NULL); + CGib *pGib = GetClassPtr((CGib *)NULL); pGib->Spawn(STRING(pev->model)); @@ -1510,8 +1497,7 @@ CGib *CEnvShooter::__MAKE_VHOOK(CreateGib)() return pGib; } -LINK_ENTITY_TO_CLASS(test_effect, CTestEffect); -LINK_CLASS_TO_WRAP(CTestEffect, CCSTestEffect); +LINK_ENTITY_TO_CLASS(test_effect, CTestEffect, CCSTestEffect); void CTestEffect::__MAKE_VHOOK(Spawn)() { @@ -1585,8 +1571,7 @@ void CTestEffect::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCalle m_flStartTime = gpGlobals->time; } -LINK_ENTITY_TO_CLASS(env_blood, CBlood); -LINK_CLASS_TO_WRAP(CBlood, CCSBlood); +LINK_ENTITY_TO_CLASS(env_blood, CBlood, CCSBlood); void CBlood::__MAKE_VHOOK(Spawn)() { @@ -1674,8 +1659,7 @@ void CBlood::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, US } } -LINK_ENTITY_TO_CLASS(env_shake, CShake); -LINK_CLASS_TO_WRAP(CShake, CCSShake); +LINK_ENTITY_TO_CLASS(env_shake, CShake, CCSShake); void CShake::__MAKE_VHOOK(Spawn)() { @@ -1719,8 +1703,7 @@ void CShake::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, US UTIL_ScreenShake(pev->origin, Amplitude(), Frequency(), Duration(), Radius()); } -LINK_ENTITY_TO_CLASS(env_fade, CFade); -LINK_CLASS_TO_WRAP(CFade, CCSFade); +LINK_ENTITY_TO_CLASS(env_fade, CFade, CCSFade); void CFade::__MAKE_VHOOK(Spawn)() { @@ -1769,8 +1752,7 @@ void CFade::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE SUB_UseTargets(this, USE_TOGGLE, 0); } -LINK_ENTITY_TO_CLASS(env_message, CMessage); -LINK_CLASS_TO_WRAP(CMessage, CCSMessage); +LINK_ENTITY_TO_CLASS(env_message, CMessage, CCSMessage); void CMessage::__MAKE_VHOOK(Spawn)() { @@ -1863,8 +1845,7 @@ void CMessage::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, SUB_UseTargets(this, USE_TOGGLE, 0); } -LINK_ENTITY_TO_CLASS(env_funnel, CEnvFunnel); -LINK_CLASS_TO_WRAP(CEnvFunnel, CCSEnvFunnel); +LINK_ENTITY_TO_CLASS(env_funnel, CEnvFunnel, CCSEnvFunnel); void CEnvFunnel::__MAKE_VHOOK(Precache)() { @@ -1910,8 +1891,7 @@ void CEnvBeverage::__MAKE_VHOOK(Precache)() PRECACHE_SOUND("weapons/g_bounce3.wav"); } -LINK_ENTITY_TO_CLASS(env_beverage, CEnvBeverage); -LINK_CLASS_TO_WRAP(CEnvBeverage, CCSEnvBeverage); +LINK_ENTITY_TO_CLASS(env_beverage, CEnvBeverage, CCSEnvBeverage); void CEnvBeverage::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -1953,8 +1933,7 @@ void CItemSoda::__MAKE_VHOOK(Precache)() ; } -LINK_ENTITY_TO_CLASS(item_sodacan, CItemSoda); -LINK_CLASS_TO_WRAP(CItemSoda, CCSItemSoda); +LINK_ENTITY_TO_CLASS(item_sodacan, CItemSoda, CCSItemSoda); void CItemSoda::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/effects.h b/regamedll/dlls/effects.h index 82b50970..7e6a38f1 100644 --- a/regamedll/dlls/effects.h +++ b/regamedll/dlls/effects.h @@ -71,7 +71,6 @@ class CSprite: public CPointEntity { public: - CSprite(); virtual void Spawn(); virtual void Precache(); virtual void Restart(); @@ -157,7 +156,6 @@ private: class CBeam: public CBaseEntity { public: - CBeam(); virtual void Spawn(); virtual void Precache(); virtual int ObjectCaps() @@ -240,7 +238,6 @@ public: class CLaser: public CBeam { public: - CLaser(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -278,7 +275,6 @@ public: class CBubbling: public CBaseEntity { public: - CBubbling(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -313,7 +309,6 @@ public: class CLightning: public CBeam { public: - CLightning(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -371,7 +366,6 @@ public: class CGlow: public CPointEntity { public: - CGlow(); virtual void Spawn(); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); @@ -398,7 +392,6 @@ public: class CBombGlow: public CSprite { public: - CBombGlow(); virtual void Spawn(); virtual void Think(); @@ -418,7 +411,6 @@ public: class CGibShooter: public CBaseDelay { public: - CGibShooter(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -458,7 +450,6 @@ public: class CEnvShooter: public CGibShooter { public: - CEnvShooter(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); virtual CGib *CreateGib(); @@ -478,7 +469,6 @@ public: class CTestEffect: public CBaseDelay { public: - CTestEffect(); virtual void Spawn(); virtual void Precache(); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -507,7 +497,6 @@ public: class CBlood: public CPointEntity { public: - CBlood(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -535,7 +524,6 @@ public: class CShake: public CPointEntity { public: - CShake(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -563,7 +551,6 @@ public: class CFade: public CPointEntity { public: - CFade(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -587,7 +574,6 @@ public: class CMessage: public CPointEntity { public: - CMessage(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -607,7 +593,6 @@ public: class CEnvFunnel: public CBaseDelay { public: - CEnvFunnel(); virtual void Spawn(); virtual void Precache(); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -627,7 +612,6 @@ public: class CEnvBeverage: public CBaseDelay { public: - CEnvBeverage(); virtual void Spawn(); virtual void Precache(); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -645,7 +629,6 @@ public: class CItemSoda: public CBaseEntity { public: - CItemSoda(); virtual void Spawn(); virtual void Precache(); diff --git a/regamedll/dlls/explode.cpp b/regamedll/dlls/explode.cpp index 9a31f883..78e68703 100644 --- a/regamedll/dlls/explode.cpp +++ b/regamedll/dlls/explode.cpp @@ -13,8 +13,7 @@ TYPEDESCRIPTION CEnvExplosion::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(spark_shower, CShower); -LINK_CLASS_TO_WRAP(CShower, CCSShower); +LINK_ENTITY_TO_CLASS(spark_shower, CShower, CCSShower); void CShower::__MAKE_VHOOK(Spawn)() { @@ -69,8 +68,7 @@ void CShower::__MAKE_VHOOK(Touch)(CBaseEntity *pOther) } IMPLEMENT_SAVERESTORE(CEnvExplosion, CBaseMonster); -LINK_ENTITY_TO_CLASS(env_explosion, CEnvExplosion); -LINK_CLASS_TO_WRAP(CEnvExplosion, CCSEnvExplosion); +LINK_ENTITY_TO_CLASS(env_explosion, CEnvExplosion, CCSEnvExplosion); void CEnvExplosion::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { diff --git a/regamedll/dlls/explode.h b/regamedll/dlls/explode.h index 1ea45d35..eaf5e8be 100644 --- a/regamedll/dlls/explode.h +++ b/regamedll/dlls/explode.h @@ -42,7 +42,6 @@ class CShower: public CBaseEntity { public: - CShower(); virtual void Spawn(); virtual int ObjectCaps() { return FCAP_DONT_SAVE; } virtual void Think(); @@ -61,7 +60,6 @@ public: class CEnvExplosion: public CBaseMonster { public: - CEnvExplosion(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); diff --git a/regamedll/dlls/func_break.cpp b/regamedll/dlls/func_break.cpp index 487cbdd7..45a6e374 100644 --- a/regamedll/dlls/func_break.cpp +++ b/regamedll/dlls/func_break.cpp @@ -169,8 +169,7 @@ void CBreakable::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseDelay::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(func_breakable, CBreakable); -LINK_CLASS_TO_WRAP(CBreakable, CCSBreakable); +LINK_ENTITY_TO_CLASS(func_breakable, CBreakable, CCSBreakable); IMPLEMENT_SAVERESTORE(CBreakable, CBaseEntity); void CBreakable::__MAKE_VHOOK(Spawn)() @@ -849,8 +848,7 @@ int CBreakable::__MAKE_VHOOK(DamageDecal)(int bitsDamageType) return CBaseEntity::DamageDecal(bitsDamageType); } -LINK_ENTITY_TO_CLASS(func_pushable, CPushable); -LINK_CLASS_TO_WRAP(CPushable, CCSPushable); +LINK_ENTITY_TO_CLASS(func_pushable, CPushable, CCSPushable); IMPLEMENT_SAVERESTORE(CPushable, CBreakable); void CPushable::__MAKE_VHOOK(Spawn)() diff --git a/regamedll/dlls/func_break.h b/regamedll/dlls/func_break.h index fba4c986..e09003f4 100644 --- a/regamedll/dlls/func_break.h +++ b/regamedll/dlls/func_break.h @@ -70,7 +70,6 @@ typedef enum class CBreakable: public CBaseDelay { public: - CBreakable(); // basic functions virtual void Spawn(); virtual void Precache(); @@ -144,7 +143,6 @@ public: class CPushable: public CBreakable { public: - CPushable(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); diff --git a/regamedll/dlls/func_tank.cpp b/regamedll/dlls/func_tank.cpp index 27227d63..ca3f9b63 100644 --- a/regamedll/dlls/func_tank.cpp +++ b/regamedll/dlls/func_tank.cpp @@ -60,7 +60,6 @@ Vector gTankSpread[] = const int MAX_FIRING_SPREADS = ARRAYSIZE(gTankSpread); IMPLEMENT_SAVERESTORE(CFuncTank, CBaseEntity); -LINK_CLASS_TO_WRAP(CFuncTank, CCSFuncTank); void CFuncTank::__MAKE_VHOOK(Spawn)() { @@ -655,8 +654,7 @@ void CFuncTank::StopRotSound() pev->spawnflags &= ~SF_TANK_SOUNDON; } -LINK_ENTITY_TO_CLASS(func_tank, CFuncTankGun); -LINK_CLASS_TO_WRAP(CFuncTankGun, CCSFuncTankGun); +LINK_ENTITY_TO_CLASS(func_tank, CFuncTankGun, CCSFuncTankGun); void CFuncTankGun::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { @@ -695,8 +693,7 @@ void CFuncTankGun::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector &for CFuncTank::Fire(barrelEnd, forward, pevAttacker); } -LINK_ENTITY_TO_CLASS(func_tanklaser, CFuncTankLaser); -LINK_CLASS_TO_WRAP(CFuncTankLaser, CCSFuncTankLaser); +LINK_ENTITY_TO_CLASS(func_tanklaser, CFuncTankLaser, CCSFuncTankLaser); IMPLEMENT_SAVERESTORE(CFuncTankLaser, CFuncTank); void CFuncTankLaser::__MAKE_VHOOK(Activate)() @@ -792,8 +789,7 @@ void CFuncTankLaser::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector &f } } -LINK_ENTITY_TO_CLASS(func_tankrocket, CFuncTankRocket); -LINK_CLASS_TO_WRAP(CFuncTankRocket, CCSFuncTankRocket); +LINK_ENTITY_TO_CLASS(func_tankrocket, CFuncTankRocket, CCSFuncTankRocket); void CFuncTankRocket::__MAKE_VHOOK(Precache)() { @@ -823,8 +819,7 @@ void CFuncTankRocket::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector & CFuncTank::Fire(barrelEnd, forward, pev); } -LINK_ENTITY_TO_CLASS(func_tankmortar, CFuncTankMortar); -LINK_CLASS_TO_WRAP(CFuncTankMortar, CCSFuncTankMortar); +LINK_ENTITY_TO_CLASS(func_tankmortar, CFuncTankMortar, CCSFuncTankMortar); void CFuncTankMortar::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -852,9 +847,7 @@ void CFuncTankMortar::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector & UTIL_MakeAimVectors(pev->angles); TankTrace(barrelEnd, forward, gTankSpread[m_spread], tr); - ExplosionCreate(tr.vecEndPos, pev->angles, edict(), pev->impulse, TRUE); - CFuncTank::Fire(barrelEnd, forward, pev); } } @@ -862,8 +855,7 @@ void CFuncTankMortar::__MAKE_VHOOK(Fire)(const Vector &barrelEnd, const Vector & CFuncTank::Fire(barrelEnd, forward, pev); } -LINK_ENTITY_TO_CLASS(func_tankcontrols, CFuncTankControls); -LINK_CLASS_TO_WRAP(CFuncTankControls, CCSFuncTankControls); +LINK_ENTITY_TO_CLASS(func_tankcontrols, CFuncTankControls, CCSFuncTankControls); IMPLEMENT_SAVERESTORE(CFuncTankControls, CBaseEntity); void CFuncTankControls::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) diff --git a/regamedll/dlls/func_tank.h b/regamedll/dlls/func_tank.h index e3e87040..67a70413 100644 --- a/regamedll/dlls/func_tank.h +++ b/regamedll/dlls/func_tank.h @@ -51,7 +51,6 @@ enum TANKBULLET class CFuncTank: public CBaseEntity { public: - CFuncTank(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -160,7 +159,6 @@ protected: class CFuncTankGun: public CFuncTank { public: - CFuncTankGun(); virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker); #ifdef HOOK_GAMEDLL @@ -172,7 +170,6 @@ public: class CFuncTankLaser: public CFuncTank { public: - CFuncTankLaser(); virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); @@ -204,7 +201,6 @@ private: class CFuncTankRocket: public CFuncTank { public: - CFuncTankRocket(); virtual void Precache(); virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker); @@ -220,7 +216,6 @@ public: class CFuncTankMortar: public CFuncTank { public: - CFuncTankMortar(); virtual void KeyValue(KeyValueData *pkvd); virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker); @@ -236,7 +231,6 @@ public: class CFuncTankControls: public CBaseEntity { public: - CFuncTankControls(); virtual void Spawn(); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); diff --git a/regamedll/dlls/gamerules.h b/regamedll/dlls/gamerules.h index c46dd77e..dab21acb 100644 --- a/regamedll/dlls/gamerules.h +++ b/regamedll/dlls/gamerules.h @@ -563,6 +563,16 @@ public: bool IsMatchStarted() { return (m_fTeamCount != 0.0f || m_fCareerRoundMenuTime != 0.0f || m_fCareerMatchMenuTime != 0.0f); } void SendMOTDToClient(edict_t *client); + // allow the mode of fire on a friendly player (FFA) + inline bool IsFriendlyFireAttack() const + { +#ifdef REGAMEDLL_ADD + if (friendlyfire.string[0] == '2') + return true; +#endif + return false; + } + private: bool HasRoundTimeExpired(); bool IsBombPlanted(); diff --git a/regamedll/dlls/ggrenade.cpp b/regamedll/dlls/ggrenade.cpp index 34a03e06..27aaff43 100644 --- a/regamedll/dlls/ggrenade.cpp +++ b/regamedll/dlls/ggrenade.cpp @@ -26,8 +26,7 @@ TYPEDESCRIPTION CGrenade::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(grenade, CGrenade); -LINK_CLASS_TO_WRAP(CGrenade, CCSGrenade); +LINK_ENTITY_TO_CLASS(grenade, CGrenade, CCSGrenade); void CGrenade::Explode(Vector vecSrc, Vector vecAim) { @@ -823,7 +822,7 @@ void CGrenade::__MAKE_VHOOK(Spawn)() NOXREF CGrenade *CGrenade::ShootContact(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity) { - CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); + CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); pGrenade->Spawn(); // contact grenades arc lower @@ -851,7 +850,7 @@ NOXREF CGrenade *CGrenade::ShootContact(entvars_t *pevOwner, Vector vecStart, Ve CGrenade *CGrenade::ShootTimed2(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, int iTeam, unsigned short usEvent) { - CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); + CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); pGrenade->Spawn(); UTIL_SetOrigin(pGrenade->pev, vecStart); @@ -885,7 +884,7 @@ CGrenade *CGrenade::ShootTimed2(entvars_t *pevOwner, Vector vecStart, Vector vec CGrenade *CGrenade::ShootTimed(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time) { - CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); + CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); pGrenade->Spawn(); UTIL_SetOrigin(pGrenade->pev, vecStart); @@ -929,7 +928,7 @@ void CGrenade::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, if (!m_bIsC4) return; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pActivator->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pActivator->pev); // For CTs to defuse the c4 if (player->m_iTeam != CT) @@ -1003,7 +1002,7 @@ void CGrenade::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, CGrenade *CGrenade::ShootSatchelCharge(entvars_t *pevOwner, Vector vecStart, Vector vecAngles) { - CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); + CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); pGrenade->pev->movetype = MOVETYPE_TOSS; MAKE_STRING_CLASS("grenade", pGrenade->pev); @@ -1057,7 +1056,7 @@ CGrenade *CGrenade::ShootSatchelCharge(entvars_t *pevOwner, Vector vecStart, Vec CGrenade *CGrenade::ShootSmokeGrenade(entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, unsigned short usEvent) { - CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); + CGrenade *pGrenade = GetClassPtr((CGrenade *)NULL); pGrenade->Spawn(); UTIL_SetOrigin(pGrenade->pev, vecStart); diff --git a/regamedll/dlls/h_battery.cpp b/regamedll/dlls/h_battery.cpp index b3ea0379..2703bd5b 100644 --- a/regamedll/dlls/h_battery.cpp +++ b/regamedll/dlls/h_battery.cpp @@ -17,8 +17,7 @@ TYPEDESCRIPTION CRecharge::m_SaveData[] = #endif IMPLEMENT_SAVERESTORE(CRecharge, CBaseEntity); -LINK_ENTITY_TO_CLASS(func_recharge, CRecharge); -LINK_CLASS_TO_WRAP(CRecharge, CCSRecharge); +LINK_ENTITY_TO_CLASS(func_recharge, CRecharge, CCSRecharge); void CRecharge::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { diff --git a/regamedll/dlls/h_battery.h b/regamedll/dlls/h_battery.h index ba2fab0d..d9e6fa67 100644 --- a/regamedll/dlls/h_battery.h +++ b/regamedll/dlls/h_battery.h @@ -35,7 +35,6 @@ class CRecharge: public CBaseToggle { public: - CRecharge(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); diff --git a/regamedll/dlls/h_cycler.cpp b/regamedll/dlls/h_cycler.cpp index e31ef323..478c541c 100644 --- a/regamedll/dlls/h_cycler.cpp +++ b/regamedll/dlls/h_cycler.cpp @@ -25,18 +25,14 @@ TYPEDESCRIPTION CWreckage::m_SaveData[] = #endif IMPLEMENT_SAVERESTORE(CCycler, CBaseToggle); -LINK_CLASS_TO_WRAP(CCycler, CCSCycler); void CGenericCycler::__MAKE_VHOOK(Spawn)() { GenericCyclerSpawn((char *)STRING(pev->model), Vector(-16, -16, 0), Vector(16, 16, 72)); } -LINK_ENTITY_TO_CLASS(cycler, CGenericCycler); -LINK_CLASS_TO_WRAP(CGenericCycler, CCSGenericCycler); - -LINK_ENTITY_TO_CLASS(cycler_prdroid, CCyclerProbe); -LINK_CLASS_TO_WRAP(CCyclerProbe, CCSCyclerProbe); +LINK_ENTITY_TO_CLASS(cycler, CGenericCycler, CCSGenericCycler); +LINK_ENTITY_TO_CLASS(cycler_prdroid, CCyclerProbe, CCSCyclerProbe); void CCyclerProbe::__MAKE_VHOOK(Spawn)() { @@ -165,8 +161,7 @@ int CCycler::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAtt return 0; } -LINK_ENTITY_TO_CLASS(cycler_sprite, CCyclerSprite); -LINK_CLASS_TO_WRAP(CCyclerSprite, CCSCyclerSprite); +LINK_ENTITY_TO_CLASS(cycler_sprite, CCyclerSprite, CCSCyclerSprite); IMPLEMENT_SAVERESTORE(CCyclerSprite, CBaseEntity); void CCyclerSprite::__MAKE_VHOOK(Spawn)() @@ -247,8 +242,7 @@ void CCyclerSprite::Animate(float frames) } } -LINK_ENTITY_TO_CLASS(cycler_weapon, CWeaponCycler); -LINK_CLASS_TO_WRAP(CWeaponCycler, CCSWeaponCycler); +LINK_ENTITY_TO_CLASS(cycler_weapon, CWeaponCycler, CCSWeaponCycler); void CWeaponCycler::__MAKE_VHOOK(Spawn)() { @@ -309,8 +303,7 @@ void CWeaponCycler::__MAKE_VHOOK(SecondaryAttack)() } IMPLEMENT_SAVERESTORE(CWreckage, CBaseToggle); -LINK_ENTITY_TO_CLASS(cycler_wreckage, CWreckage); -LINK_CLASS_TO_WRAP(CWreckage, CCSWreckage); +LINK_ENTITY_TO_CLASS(cycler_wreckage, CWreckage, CCSWreckage); void CWreckage::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/h_cycler.h b/regamedll/dlls/h_cycler.h index 59447971..bc5af4db 100644 --- a/regamedll/dlls/h_cycler.h +++ b/regamedll/dlls/h_cycler.h @@ -35,7 +35,6 @@ class CCycler: public CBaseMonster { public: - CCycler(); virtual void Spawn(); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); @@ -71,7 +70,6 @@ public: class CGenericCycler: public CCycler { public: - CGenericCycler(); virtual void Spawn(); #ifdef HOOK_GAMEDLL @@ -86,7 +84,6 @@ public: class CCyclerProbe: public CCycler { public: - CCyclerProbe(); virtual void Spawn(); #ifdef HOOK_GAMEDLL @@ -100,7 +97,6 @@ public: class CCyclerSprite: public CBaseEntity { public: - CCyclerSprite(); virtual void Spawn(); virtual void Restart(); virtual int Save(CSave &save); @@ -141,7 +137,6 @@ public: class CWeaponCycler: public CBasePlayerWeapon { public: - CWeaponCycler(); virtual void Spawn(); virtual int GetItemInfo(ItemInfo *p) { return 0; } virtual BOOL Deploy(); @@ -169,7 +164,6 @@ public: class CWreckage: public CBaseMonster { public: - CWreckage(); virtual void Spawn(); virtual void Precache(); virtual int Save(CSave &save); diff --git a/regamedll/dlls/healthkit.cpp b/regamedll/dlls/healthkit.cpp index 19aba039..3f587a25 100644 --- a/regamedll/dlls/healthkit.cpp +++ b/regamedll/dlls/healthkit.cpp @@ -16,8 +16,7 @@ TYPEDESCRIPTION CWallHealth::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(item_healthkit, CHealthKit); -LINK_CLASS_TO_WRAP(CHealthKit, CCSHealthKit); +LINK_ENTITY_TO_CLASS(item_healthkit, CHealthKit, CCSHealthKit); void CHealthKit::__MAKE_VHOOK(Spawn)() { @@ -55,7 +54,7 @@ BOOL CHealthKit::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) } IMPLEMENT_SAVERESTORE(CWallHealth, CBaseEntity); -LINK_ENTITY_TO_CLASS(func_healthcharger, CWallHealth); +LINK_ENTITY_TO_CLASS(func_healthcharger, CWallHealth, CCSWallHealth); void CWallHealth::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { diff --git a/regamedll/dlls/healthkit.h b/regamedll/dlls/healthkit.h index 2e4eb2c7..6242628c 100644 --- a/regamedll/dlls/healthkit.h +++ b/regamedll/dlls/healthkit.h @@ -35,7 +35,6 @@ class CHealthKit: public CItem { public: - CHealthKit(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); diff --git a/regamedll/dlls/hostage/hostage.cpp b/regamedll/dlls/hostage/hostage.cpp index 0928388b..47e2e9df 100644 --- a/regamedll/dlls/hostage/hostage.cpp +++ b/regamedll/dlls/hostage/hostage.cpp @@ -13,8 +13,8 @@ int g_iHostageNumber = 0; #endif -LINK_ENTITY_TO_CLASS(hostage_entity, CHostage); -LINK_ENTITY_TO_CLASS(monster_scientist, CHostage); +LINK_ENTITY_TO_CLASS(hostage_entity, CHostage, CCSHostage); +LINK_ENTITY_TO_CLASS(monster_scientist, CHostage, CCSHostage); void CHostage::__MAKE_VHOOK(Spawn)() { @@ -229,7 +229,7 @@ void CHostage::IdleThink() player = (CBasePlayer *)m_improv->GetFollowLeader(); } else - player = GetClassPtr((CBasePlayer *)m_hTargetEnt->pev); + player = GetClassPtr((CBasePlayer *)m_hTargetEnt->pev); if (player == NULL || player->m_iTeam == CT) { @@ -428,7 +428,7 @@ int CHostage::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAt if (pevAttacker != NULL) { - CBaseEntity *pAttackingEnt = GetClassPtr((CBaseEntity *)pevAttacker); + CBaseEntity *pAttackingEnt = GetClassPtr((CBaseEntity *)pevAttacker); if (pAttackingEnt->Classify() == CLASS_VEHICLE) { @@ -442,7 +442,7 @@ int CHostage::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pevAt if (pAttackingEnt->IsPlayer()) { - pAttacker = GetClassPtr((CBasePlayer *)pevAttacker); + pAttacker = GetClassPtr((CBasePlayer *)pevAttacker); } } @@ -820,7 +820,7 @@ void CHostage::DoFollow() return; } - pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev); + pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev); m_LocalNav->SetTargetEnt(pFollowing); vecDest = pFollowing->pev->origin; @@ -913,7 +913,7 @@ void CHostage::MoveToward(const Vector &vecLoc) Vector vecAng; float_precision flDist; - pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev); + pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev); vecMove = vecLoc - pev->origin; vecAng = UTIL_VecToAngles(vecMove); vecAng = Vector(0, vecAng.y, 0); @@ -976,7 +976,7 @@ void CHostage::NavReady() return; } - pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev); + pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev); vecDest = pFollowing->pev->origin; if (!(pFollowing->pev->flags & FL_ONGROUND)) @@ -1035,7 +1035,7 @@ void CHostage::SendHostagePositionMsg() if (pEntity->pev->flags == FL_DORMANT) continue; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pTempPlayer->pev->deadflag == DEAD_NO && pTempPlayer->m_iTeam == CT) { @@ -1065,7 +1065,7 @@ void CHostage::SendHostageEventMsg() if (pEntity->pev->flags == FL_DORMANT) continue; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pTempPlayer->pev->deadflag == DEAD_NO && pTempPlayer->m_iTeam == CT) { diff --git a/regamedll/dlls/hostage/hostage_localnav.cpp b/regamedll/dlls/hostage/hostage_localnav.cpp index 7ca4a078..83ed833e 100644 --- a/regamedll/dlls/hostage/hostage_localnav.cpp +++ b/regamedll/dlls/hostage/hostage_localnav.cpp @@ -801,7 +801,7 @@ void CLocalNav::Think() if (hCallback) { - CHostage *pHostage = GetClassPtr((CHostage *)hCallback->pev); + CHostage *pHostage = GetClassPtr((CHostage *)hCallback->pev); if (++qptr == MAX_HOSTAGES_NAV) qptr = 0; @@ -830,7 +830,7 @@ void CLocalNav::RequestNav(CHostage *pCaller) for (int i = 0; i < tot_inqueue; ++i) { - CHostage *pQueueItem = GetClassPtr((CHostage *)_queue[curr]->pev); + CHostage *pQueueItem = GetClassPtr((CHostage *)_queue[curr]->pev); if (pQueueItem == pCaller) return; @@ -859,7 +859,7 @@ void CLocalNav::HostagePrethink() { if (hostages[ iCount ] != NULL) { - GetClassPtr((CHostage *)hostages[ iCount ]->pev)->PreThink(); + GetClassPtr((CHostage *)hostages[ iCount ]->pev)->PreThink(); } } } diff --git a/regamedll/dlls/items.cpp b/regamedll/dlls/items.cpp index a43e2e90..ba50ca43 100644 --- a/regamedll/dlls/items.cpp +++ b/regamedll/dlls/items.cpp @@ -1,7 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(world_items, CWorldItem); -LINK_CLASS_TO_WRAP(CWorldItem, CCSWorldItem); +LINK_ENTITY_TO_CLASS(world_items, CWorldItem, CCSWorldItem); void CWorldItem::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -46,8 +45,6 @@ void CWorldItem::__MAKE_VHOOK(Spawn)() REMOVE_ENTITY(edict()); } -LINK_CLASS_TO_WRAP(CItem, CCSItem); - void CItem::__MAKE_VHOOK(Spawn)() { pev->movetype = MOVETYPE_TOSS; @@ -145,8 +142,7 @@ BOOL CItemSuit::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return TRUE; } -LINK_ENTITY_TO_CLASS(item_suit, CItemSuit); -LINK_CLASS_TO_WRAP(CItemSuit, CCSItemSuit); +LINK_ENTITY_TO_CLASS(item_suit, CItemSuit, CCSItemSuit); void CItemBattery::__MAKE_VHOOK(Spawn)() { @@ -193,8 +189,7 @@ BOOL CItemBattery::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return FALSE; } -LINK_ENTITY_TO_CLASS(item_battery, CItemBattery); -LINK_CLASS_TO_WRAP(CItemBattery, CCSItemBattery); +LINK_ENTITY_TO_CLASS(item_battery, CItemBattery, CCSItemBattery); void CItemAntidote::__MAKE_VHOOK(Spawn)() { @@ -216,8 +211,7 @@ BOOL CItemAntidote::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return TRUE; } -LINK_ENTITY_TO_CLASS(item_antidote, CItemAntidote); -LINK_CLASS_TO_WRAP(CItemAntidote, CCSItemAntidote); +LINK_ENTITY_TO_CLASS(item_antidote, CItemAntidote, CCSItemAntidote); void CItemSecurity::__MAKE_VHOOK(Spawn)() { @@ -237,8 +231,7 @@ BOOL CItemSecurity::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return TRUE; } -LINK_ENTITY_TO_CLASS(item_security, CItemSecurity); -LINK_CLASS_TO_WRAP(CItemSecurity, CCSItemSecurity); +LINK_ENTITY_TO_CLASS(item_security, CItemSecurity, CCSItemSecurity); void CItemLongJump::__MAKE_VHOOK(Spawn)() { @@ -275,8 +268,7 @@ BOOL CItemLongJump::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return FALSE; } -LINK_ENTITY_TO_CLASS(item_longjump, CItemLongJump); -LINK_CLASS_TO_WRAP(CItemLongJump, CCSItemLongJump); +LINK_ENTITY_TO_CLASS(item_longjump, CItemLongJump, CCSItemLongJump); void CItemKevlar::__MAKE_VHOOK(Spawn)() { @@ -314,8 +306,7 @@ BOOL CItemKevlar::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return TRUE; } -LINK_ENTITY_TO_CLASS(item_kevlar, CItemKevlar); -LINK_CLASS_TO_WRAP(CItemKevlar, CCSItemKevlar); +LINK_ENTITY_TO_CLASS(item_kevlar, CItemKevlar, CCSItemKevlar); void CItemAssaultSuit::__MAKE_VHOOK(Spawn)() { @@ -352,8 +343,7 @@ BOOL CItemAssaultSuit::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return TRUE; } -LINK_ENTITY_TO_CLASS(item_assaultsuit, CItemAssaultSuit); -LINK_CLASS_TO_WRAP(CItemAssaultSuit, CCSItemAssaultSuit); +LINK_ENTITY_TO_CLASS(item_assaultsuit, CItemAssaultSuit, CCSItemAssaultSuit); void CItemThighPack::__MAKE_VHOOK(Spawn)() { @@ -396,5 +386,4 @@ BOOL CItemThighPack::__MAKE_VHOOK(MyTouch)(CBasePlayer *pPlayer) return TRUE; } -LINK_ENTITY_TO_CLASS(item_thighpack, CItemThighPack); -LINK_CLASS_TO_WRAP(CItemThighPack, CCSItemThighPack); +LINK_ENTITY_TO_CLASS(item_thighpack, CItemThighPack, CCSItemThighPack); diff --git a/regamedll/dlls/items.h b/regamedll/dlls/items.h index 41a74dcf..3ff709f0 100644 --- a/regamedll/dlls/items.h +++ b/regamedll/dlls/items.h @@ -42,7 +42,6 @@ class CItem: public CBaseEntity { public: - CItem(); virtual void Spawn(); virtual CBaseEntity *Respawn(); virtual BOOL MyTouch(CBasePlayer *pPlayer) { return FALSE; } @@ -62,7 +61,6 @@ public: class CWorldItem: public CBaseEntity { public: - CWorldItem(); virtual void Spawn(); virtual void KeyValue(KeyValueData *pkvd); @@ -80,7 +78,6 @@ public: class CItemSuit: public CItem { public: - CItemSuit(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -98,7 +95,6 @@ public: class CItemBattery: public CItem { public: - CItemBattery(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -116,7 +112,6 @@ public: class CItemAntidote: public CItem { public: - CItemAntidote(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -134,7 +129,6 @@ public: class CItemSecurity: public CItem { public: - CItemSecurity(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -152,7 +146,6 @@ public: class CItemLongJump: public CItem { public: - CItemLongJump(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -170,7 +163,6 @@ public: class CItemKevlar: public CItem { public: - CItemKevlar(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -188,7 +180,6 @@ public: class CItemAssaultSuit: public CItem { public: - CItemAssaultSuit(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); @@ -206,7 +197,6 @@ public: class CItemThighPack: public CItem { public: - CItemThighPack(); virtual void Spawn(); virtual void Precache(); virtual BOOL MyTouch(CBasePlayer *pPlayer); diff --git a/regamedll/dlls/lights.cpp b/regamedll/dlls/lights.cpp index c6cf696d..914a5f02 100644 --- a/regamedll/dlls/lights.cpp +++ b/regamedll/dlls/lights.cpp @@ -13,7 +13,7 @@ TYPEDESCRIPTION CLight::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(light, CLight); +LINK_ENTITY_TO_CLASS(light, CLight, CCSLight); IMPLEMENT_SAVERESTORE(CLight, CPointEntity); // Cache user-entity-field values until spawn is called. @@ -106,8 +106,8 @@ void CLight::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, US } } -LINK_ENTITY_TO_CLASS(light_spot, CLight); -LINK_ENTITY_TO_CLASS(light_environment, CEnvLight); +LINK_ENTITY_TO_CLASS(light_spot, CLight, CCSLight); +LINK_ENTITY_TO_CLASS(light_environment, CEnvLight, CCSEnvLight); void CEnvLight::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { diff --git a/regamedll/dlls/lights.h b/regamedll/dlls/lights.h index d722b743..21f20be0 100644 --- a/regamedll/dlls/lights.h +++ b/regamedll/dlls/lights.h @@ -39,9 +39,9 @@ class CLight: public CPointEntity public: virtual void Spawn(); virtual void Restart(); + virtual void KeyValue(KeyValueData *pkvd); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); - virtual void KeyValue(KeyValueData *pkvd); virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); #ifdef HOOK_GAMEDLL diff --git a/regamedll/dlls/maprules.cpp b/regamedll/dlls/maprules.cpp index c7eb1858..3c2ec72a 100644 --- a/regamedll/dlls/maprules.cpp +++ b/regamedll/dlls/maprules.cpp @@ -73,7 +73,7 @@ void CRuleBrushEntity::__MAKE_VHOOK(Spawn)() CRuleEntity::Spawn(); } -LINK_ENTITY_TO_CLASS(game_score, CGameScore); +LINK_ENTITY_TO_CLASS(game_score, CGameScore, CCSGameScore); void CGameScore::__MAKE_VHOOK(Spawn)() { @@ -110,7 +110,7 @@ void CGameScore::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller } } -LINK_ENTITY_TO_CLASS(game_end, CGameEnd); +LINK_ENTITY_TO_CLASS(game_end, CGameEnd, CCSGameEnd); void CGameEnd::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -120,7 +120,7 @@ void CGameEnd::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, g_pGameRules->EndMultiplayerGame(); } -LINK_ENTITY_TO_CLASS(game_text, CGameText); +LINK_ENTITY_TO_CLASS(game_text, CGameText, CCSGameText); IMPLEMENT_SAVERESTORE(CGameText, CRulePointEntity); void CGameText::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -211,7 +211,7 @@ void CGameText::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, } } -LINK_ENTITY_TO_CLASS(game_team_master, CGameTeamMaster); +LINK_ENTITY_TO_CLASS(game_team_master, CGameTeamMaster, CCSGameTeamMaster); void CGameTeamMaster::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -301,7 +301,7 @@ BOOL CGameTeamMaster::TeamMatch(CBaseEntity *pActivator) return UTIL_TeamsMatch(pActivator->TeamID(), TeamID()); } -LINK_ENTITY_TO_CLASS(game_team_set, CGameTeamSet); +LINK_ENTITY_TO_CLASS(game_team_set, CGameTeamSet, CCSGameTeamSet); void CGameTeamSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -323,7 +323,7 @@ void CGameTeamSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCall } } -LINK_ENTITY_TO_CLASS(game_zone_player, CGamePlayerZone); +LINK_ENTITY_TO_CLASS(game_zone_player, CGamePlayerZone, CCSGamePlayerZone); IMPLEMENT_SAVERESTORE(CGamePlayerZone, CRuleBrushEntity); void CGamePlayerZone::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -410,7 +410,7 @@ void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC } -LINK_ENTITY_TO_CLASS(game_player_hurt, CGamePlayerHurt); +LINK_ENTITY_TO_CLASS(game_player_hurt, CGamePlayerHurt, CCSGamePlayerHurt); void CGamePlayerHurt::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -433,7 +433,7 @@ void CGamePlayerHurt::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC } } -LINK_ENTITY_TO_CLASS(game_counter, CGameCounter); +LINK_ENTITY_TO_CLASS(game_counter, CGameCounter, CCSGameCounter); void CGameCounter::__MAKE_VHOOK(Spawn)() { @@ -479,7 +479,7 @@ void CGameCounter::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCall } } -LINK_ENTITY_TO_CLASS(game_counter_set, CGameCounterSet); +LINK_ENTITY_TO_CLASS(game_counter_set, CGameCounterSet, CCSGameCounterSet); void CGameCounterSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -494,7 +494,7 @@ void CGameCounterSet::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC } } -LINK_ENTITY_TO_CLASS(game_player_equip, CGamePlayerEquip); +LINK_ENTITY_TO_CLASS(game_player_equip, CGamePlayerEquip, CCSGamePlayerEquip); void CGamePlayerEquip::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -560,7 +560,7 @@ void CGamePlayerEquip::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *p EquipPlayer(pActivator); } -LINK_ENTITY_TO_CLASS(game_player_team, CGamePlayerTeam); +LINK_ENTITY_TO_CLASS(game_player_team, CGamePlayerTeam, CCSGamePlayerTeam); const char *CGamePlayerTeam::TargetTeamName(const char *pszTargetName) { diff --git a/regamedll/dlls/mortar.cpp b/regamedll/dlls/mortar.cpp index 1e595106..2ea49573 100644 --- a/regamedll/dlls/mortar.cpp +++ b/regamedll/dlls/mortar.cpp @@ -17,7 +17,7 @@ TYPEDESCRIPTION CFuncMortarField::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(func_mortar_field, CFuncMortarField); +LINK_ENTITY_TO_CLASS(func_mortar_field, CFuncMortarField, CCSFuncMortarField); IMPLEMENT_SAVERESTORE(CFuncMortarField, CBaseToggle); void CFuncMortarField::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -152,7 +152,7 @@ void CFuncMortarField::FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, U } } -LINK_ENTITY_TO_CLASS(monster_mortar, CMortar); +LINK_ENTITY_TO_CLASS(monster_mortar, CMortar, CCSMortar); void CMortar::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 3eceaa5a..fd44d315 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -191,7 +191,7 @@ void CMapInfo::__MAKE_VHOOK(Spawn)() pev->effects |= EF_NODRAW; } -LINK_ENTITY_TO_CLASS(info_map_parameters, CMapInfo); +LINK_ENTITY_TO_CLASS(info_map_parameters, CMapInfo, CCSMapInfo); bool CCStrikeGameMgrHelper::__MAKE_VHOOK(CanPlayerHearPlayer)(CBasePlayer *pListener, CBasePlayer *pSender) { @@ -775,7 +775,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(GiveC4)() if (pPlayer->pev->flags == FL_DORMANT) continue; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->pev->deadflag != DEAD_NO || player->m_iTeam != TERRORIST || (giveToHumans && player->IsBot())) continue; @@ -813,7 +813,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(GiveC4)() if (pPlayer->pev->flags == FL_DORMANT) continue; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->pev->deadflag != DEAD_NO || player->m_iTeam != TERRORIST) continue; @@ -1010,7 +1010,7 @@ void CHalfLifeMultiplay::InitializePlayerCounts(int &NumAliveTerrorist, int &Num break; } - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (pPlayer->pev->flags == FL_DORMANT) { @@ -1487,7 +1487,7 @@ void CHalfLifeMultiplay::SwapAllPlayers() if (pPlayer->pev->flags == FL_DORMANT) continue; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); player->SwitchTeam(); } @@ -1576,7 +1576,7 @@ void CHalfLifeMultiplay::BalanceTeams() if (pPlayer->pev->flags == FL_DORMANT) continue; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->m_iTeam == iTeamToSwap && GETPLAYERUSERID(player->edict()) > iHighestUserID && m_pVIP != player) { @@ -1939,7 +1939,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(RestartRound)() if (pPlayer->pev->flags == FL_DORMANT) continue; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); player->m_iNumSpawns = 0; player->m_bTeamChanged = false; @@ -2249,9 +2249,7 @@ void CHalfLifeMultiplay::PickNextVIP() // If it's been the same VIP for 3 rounds already.. then randomly pick a new one else if (m_iConsecutiveVIP >= 3) { - ++m_iLastPick; - - if (m_iLastPick > m_iNumCT) + if (++m_iLastPick > m_iNumCT) m_iLastPick = 1; int iCount = 1; @@ -2266,7 +2264,7 @@ void CHalfLifeMultiplay::PickNextVIP() { if (!(pPlayer->pev->flags & FL_DORMANT)) { - player = GetClassPtr((CBasePlayer *)pPlayer->pev); + player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->m_iTeam == CT && iCount == m_iLastPick) { @@ -2305,7 +2303,7 @@ void CHalfLifeMultiplay::PickNextVIP() { if (pPlayer->pev->flags != FL_DORMANT) { - player = GetClassPtr((CBasePlayer *)pPlayer->pev); + player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->m_iTeam == CT) { @@ -2756,7 +2754,7 @@ void CHalfLifeMultiplay::CheckRoundTimeExpired() if (!C4->m_bJustBlew) flEndRoundTime = C4->m_flC4Blow; else - flEndRoundTime = gpGlobals->time + 5.0; + flEndRoundTime = gpGlobals->time + 5.0f; } #endif @@ -3549,13 +3547,8 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(PlayerKilled)(CBasePlayer *pVictim, entvar else if (peKiller && peKiller->IsPlayer()) { // if a player dies in a deathmatch game and the killer is a client, award the killer some points - CBasePlayer *killer = GetClassPtr((CBasePlayer *)pKiller); - bool killedByFFA = false; - -#ifdef REGAMEDLL_ADD - if (friendlyfire.string[0] == '2') - killedByFFA = true; -#endif + CBasePlayer *killer = GetClassPtr((CBasePlayer *)pKiller); + bool killedByFFA = CSGameRules()->IsFriendlyFireAttack(); if (killer->m_iTeam == pVictim->m_iTeam && !killedByFFA) { @@ -3932,8 +3925,8 @@ int CHalfLifeMultiplay::__MAKE_VHOOK(PlayerRelationship)(CBasePlayer *pPlayer, C return GR_NOTTEAMMATE; } - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); - CBasePlayer *target = GetClassPtr((CBasePlayer *)pTarget->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *target = GetClassPtr((CBasePlayer *)pTarget->pev); if (player->m_iTeam != target->m_iTeam) { @@ -4348,7 +4341,7 @@ void CHalfLifeMultiplay::ResetAllMapVotes() if (FNullEnt(pTempEntity->edict())) break; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); if (pTempPlayer->m_iTeam != UNASSIGNED) { @@ -4448,7 +4441,7 @@ void CHalfLifeMultiplay::ProcessMapVote(CBasePlayer *player, int iVote) if (FNullEnt(pTempEntity->edict())) break; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pTempEntity->pev); if (pTempPlayer->m_iTeam != UNASSIGNED) { diff --git a/regamedll/dlls/pathcorner.cpp b/regamedll/dlls/pathcorner.cpp index 0a932732..31d55289 100644 --- a/regamedll/dlls/pathcorner.cpp +++ b/regamedll/dlls/pathcorner.cpp @@ -21,7 +21,7 @@ TYPEDESCRIPTION CPathTrack::m_SaveData[] = #endif -LINK_ENTITY_TO_CLASS(path_corner, CPathCorner); +LINK_ENTITY_TO_CLASS(path_corner, CPathCorner, CCSPathCorner); IMPLEMENT_SAVERESTORE(CPathCorner, CPointEntity); void CPathCorner::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -41,7 +41,7 @@ void CPathCorner::__MAKE_VHOOK(Spawn)() } IMPLEMENT_SAVERESTORE(CPathTrack, CBaseEntity); -LINK_ENTITY_TO_CLASS(path_track, CPathTrack); +LINK_ENTITY_TO_CLASS(path_track, CPathTrack, CCSPathTrack); void CPathTrack::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { diff --git a/regamedll/dlls/plats.cpp b/regamedll/dlls/plats.cpp index 3a3486a7..594741d6 100644 --- a/regamedll/dlls/plats.cpp +++ b/regamedll/dlls/plats.cpp @@ -232,7 +232,7 @@ void CFuncPlat::CallHitBottom() HitBottom(); } -LINK_ENTITY_TO_CLASS(func_plat, CFuncPlat); +LINK_ENTITY_TO_CLASS(func_plat, CFuncPlat, CCSFuncPlat); #define noiseMovement noise #define noiseStopMoving noise1 @@ -325,7 +325,7 @@ void CFuncPlat::__MAKE_VHOOK(Spawn)() void PlatSpawnInsideTrigger(entvars_t *pevPlatform) { - GetClassPtr((CPlatTrigger *)NULL)->SpawnInsideTrigger(GetClassPtr((CFuncPlat *)pevPlatform)); + GetClassPtr((CPlatTrigger *)NULL)->SpawnInsideTrigger(GetClassPtr((CFuncPlat *)pevPlatform)); } // Create a trigger entity for a platform. @@ -511,7 +511,7 @@ void CFuncPlat::__MAKE_VHOOK(Blocked)(CBaseEntity *pOther) } } -LINK_ENTITY_TO_CLASS(func_platrot, CFuncPlatRot); +LINK_ENTITY_TO_CLASS(func_platrot, CFuncPlatRot, CCSFuncPlatRot); IMPLEMENT_SAVERESTORE(CFuncPlatRot, CFuncPlat); void CFuncPlatRot::SetupRotation() @@ -588,7 +588,7 @@ void CFuncPlatRot::RotMove(Vector &destAngle, float time) } } -LINK_ENTITY_TO_CLASS(func_train, CFuncTrain); +LINK_ENTITY_TO_CLASS(func_train, CFuncTrain, CCSFuncTrain); IMPLEMENT_SAVERESTORE(CFuncTrain, CBasePlatTrain); void CFuncTrain::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -885,7 +885,7 @@ void CFuncTrain::__MAKE_VHOOK(OverrideReset)() } IMPLEMENT_SAVERESTORE(CFuncTrackTrain, CBaseEntity); -LINK_ENTITY_TO_CLASS(func_tracktrain, CFuncTrackTrain); +LINK_ENTITY_TO_CLASS(func_tracktrain, CFuncTrackTrain, CCSFuncTrackTrain); void CFuncTrackTrain::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -1546,7 +1546,7 @@ void CFuncTrackTrain::__MAKE_VHOOK(Precache)() m_usAdjustPitch = PRECACHE_EVENT(1, "events/train.sc"); } -LINK_ENTITY_TO_CLASS(func_traincontrols, CFuncTrainControls); +LINK_ENTITY_TO_CLASS(func_traincontrols, CFuncTrainControls, CCSFuncTrainControls); void CFuncTrainControls::Find() { @@ -1587,7 +1587,7 @@ BOOL CFuncTrackChange::__MAKE_VHOOK(IsTogglePlat)() return TRUE; } -LINK_ENTITY_TO_CLASS(func_trackchange, CFuncTrackChange); +LINK_ENTITY_TO_CLASS(func_trackchange, CFuncTrackChange, CCSFuncTrackChange); IMPLEMENT_SAVERESTORE(CFuncTrackChange, CFuncPlatRot); void CFuncTrackChange::__MAKE_VHOOK(Spawn)() @@ -1924,7 +1924,7 @@ void CFuncTrackChange::__MAKE_VHOOK(HitTop)() EnableUse(); } -LINK_ENTITY_TO_CLASS(func_trackautochange, CFuncTrackAuto); +LINK_ENTITY_TO_CLASS(func_trackautochange, CFuncTrackAuto, CCSFuncTrackAuto); // Auto track change void CFuncTrackAuto::__MAKE_VHOOK(UpdateAutoTargets)(int toggleState) @@ -2015,7 +2015,7 @@ void CFuncTrackAuto::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCa } } -LINK_ENTITY_TO_CLASS(func_guntarget, CGunTarget); +LINK_ENTITY_TO_CLASS(func_guntarget, CGunTarget, CCSGunTarget); IMPLEMENT_SAVERESTORE(CGunTarget, CBaseMonster); void CGunTarget::__MAKE_VHOOK(Spawn)() diff --git a/regamedll/dlls/plats.h b/regamedll/dlls/plats.h index 08dc479f..940f4428 100644 --- a/regamedll/dlls/plats.h +++ b/regamedll/dlls/plats.h @@ -234,8 +234,8 @@ public: virtual void EXPORT GoUp(); virtual void EXPORT GoDown(); - virtual void HitBottom(); virtual void HitTop(); + virtual void HitBottom(); virtual void UpdateAutoTargets(int toggleState); #ifdef HOOK_GAMEDLL diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index b95ab5a4..0db56314 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -323,8 +323,7 @@ void WriteSigonMessages() } } -LINK_ENTITY_TO_CLASS(player, CBasePlayer); -LINK_CLASS_TO_WRAP(CBasePlayer, CCSPlayer); +LINK_ENTITY_TO_CLASS(player, CBasePlayer, CCSPlayer); void SendItemStatus(CBasePlayer *pPlayer) { @@ -482,7 +481,7 @@ CBasePlayer *CBasePlayer::GetNextRadioRecipient(CBasePlayer *pStartPlayer) break; bool bSend = false; - CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pEntity->IsPlayer()) { @@ -536,7 +535,7 @@ void CBasePlayer::Radio(const char *msg_id, const char *msg_verbose, short pitch break; bool bSend = false; - CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pPlayer == NULL) continue; @@ -982,20 +981,15 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe if (bitsDamageType & DMG_EXPLOSION) { - CBaseEntity *temp = GetClassPtr((CBaseEntity *)pevInflictor); + CBaseEntity *temp = GetClassPtr((CBaseEntity *)pevInflictor); if (!Q_strcmp(STRING(temp->pev->classname), "grenade")) { - CGrenade *pGrenade = GetClassPtr((CGrenade *)pevInflictor); + CGrenade *pGrenade = GetClassPtr((CGrenade *)pevInflictor); if (CVAR_GET_FLOAT("mp_friendlyfire")) { -#ifdef REGAMEDLL_ADD - if (friendlyfire.string[0] == '2') - bTeamAttack = FALSE; - else -#endif - if (pGrenade->m_iTeam == m_iTeam) + if (!CSGameRules()->IsFriendlyFireAttack() && pGrenade->m_iTeam == m_iTeam) bTeamAttack = TRUE; pAttack = dynamic_cast(CBasePlayer::Instance(pevAttacker)); @@ -1147,17 +1141,13 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe if (!IsAlive()) return 0; - pAttacker = GetClassPtr((CBaseEntity *)pevAttacker); + pAttacker = GetClassPtr((CBaseEntity *)pevAttacker); if (pAttacker->IsPlayer()) { - pAttack = GetClassPtr((CBasePlayer *)pevAttacker); + pAttack = GetClassPtr((CBasePlayer *)pevAttacker); - bool bAttackFFA = false; -#ifdef REGAMEDLL_ADD - if (friendlyfire.string[0] == '2') - bAttackFFA = true; -#endif + bool bAttackFFA = CSGameRules()->IsFriendlyFireAttack(); // warn about team attacks if (pAttack != this && pAttack->m_iTeam == m_iTeam && !bAttackFFA) @@ -1186,7 +1176,7 @@ int CBasePlayer::__MAKE_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pe if (FNullEnt(pBasePlayer->edict())) break; - CBasePlayer *basePlayer = GetClassPtr((CBasePlayer *)pBasePlayer->pev); + CBasePlayer *basePlayer = GetClassPtr((CBasePlayer *)pBasePlayer->pev); if (basePlayer->m_iTeam == m_iTeam) { @@ -1606,7 +1596,7 @@ void CBasePlayer::SetProgressBarTime(int time) if (FNullEnt(pPlayer->edict())) break; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->IsObserver() == OBS_IN_EYE && player->pev->iuser2 == myIndex) { @@ -1646,7 +1636,7 @@ void CBasePlayer::SetProgressBarTime2(int time, float timeElapsed) if (FNullEnt(pPlayer->edict())) break; - CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); + CBasePlayer *player = GetClassPtr((CBasePlayer *)pPlayer->pev); if (player->IsObserver() == OBS_IN_EYE && player->pev->iuser2 == myIndex) { @@ -2859,7 +2849,7 @@ NOXREF void CBasePlayer::ThrowWeapon(char *pszItemName) } } -LINK_ENTITY_TO_CLASS(weapon_shield, CWShield); +LINK_ENTITY_TO_CLASS(weapon_shield, CWShield, CCSShield); void CWShield::__MAKE_VHOOK(Spawn)() { @@ -4725,7 +4715,11 @@ void CBasePlayer::__MAKE_VHOOK(PostThink)() StudioFrameAdvance(); CheckPowerups(); + + // s1lent: this is useless for CS 1.6 +#ifndef REGAMEDLL_FIXES UpdatePlayerSound(); +#endif pt_end: #ifdef CLIENT_WEAPONS @@ -5655,7 +5649,7 @@ void CSprayCan::Spawn(entvars_t *pevOwner) pev->owner = ENT(pevOwner); pev->frame = 0; - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; EMIT_SOUND(ENT(pev), CHAN_VOICE, "player/sprayer.wav", VOL_NORM, ATTN_NORM); } @@ -5693,7 +5687,7 @@ void CSprayCan::__MAKE_VHOOK(Think)() UTIL_Remove(this); } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CBloodSplat::Spawn(entvars_t *pevOwner) @@ -5703,7 +5697,7 @@ void CBloodSplat::Spawn(entvars_t *pevOwner) pev->owner = ENT(pevOwner); SetThink(&CBloodSplat::Spray); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CBloodSplat::Spray() @@ -5717,7 +5711,7 @@ void CBloodSplat::Spray() } SetThink(&CBloodSplat::SUB_Remove); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; } void CBasePlayer::GiveNamedItem(const char *pszName) @@ -5864,7 +5858,7 @@ void CBasePlayer::__MAKE_VHOOK(ImpulseCommands)() { // line hit something, so paint a decal m_flNextDecalTime = gpGlobals->time + CVAR_GET_FLOAT("decalfrequency"); - CSprayCan *pCan = GetClassPtr((CSprayCan *)NULL); + CSprayCan *pCan = GetClassPtr((CSprayCan *)NULL); pCan->Spawn(pev); } break; @@ -6006,7 +6000,7 @@ void CBasePlayer::CheatImpulseCommands(int iImpulse) if (tr.flFraction != 1.0f) { // line hit something, so paint a decal - CBloodSplat *pBlood = GetClassPtr((CBloodSplat *)NULL); + CBloodSplat *pBlood = GetClassPtr((CBloodSplat *)NULL); pBlood->Spawn(pev); } break; @@ -6772,7 +6766,7 @@ void CBasePlayer::__MAKE_VHOOK(UpdateClientData)() if (!pEntity || i == entindex()) continue; - CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pPlayer->pev->flags == FL_DORMANT) continue; @@ -7200,7 +7194,7 @@ void CBasePlayer::DropPlayerItem(const char *pszItemName) if (pEntity->pev->flags != FL_DORMANT) { - CBasePlayer *pOther = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pOther = GetClassPtr((CBasePlayer *)pEntity->pev); if (pOther->pev->deadflag == DEAD_NO && pOther->m_iTeam == TERRORIST) { @@ -7545,7 +7539,7 @@ void CDeadHEV::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseMonster::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(monster_hevsuit_dead, CDeadHEV); +LINK_ENTITY_TO_CLASS(monster_hevsuit_dead, CDeadHEV, CCSDeadHEV); void CDeadHEV::__MAKE_VHOOK(Spawn)() { @@ -7572,7 +7566,7 @@ void CDeadHEV::__MAKE_VHOOK(Spawn)() MonsterInitDead(); } -LINK_ENTITY_TO_CLASS(player_weaponstrip, CStripWeapons); +LINK_ENTITY_TO_CLASS(player_weaponstrip, CStripWeapons, CCSStripWeapons); void CStripWeapons::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -7593,7 +7587,7 @@ void CStripWeapons::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCal } } -LINK_ENTITY_TO_CLASS(player_loadsaved, CRevertSaved); +LINK_ENTITY_TO_CLASS(player_loadsaved, CRevertSaved, CCSRevertSaved); IMPLEMENT_SAVERESTORE(CRevertSaved, CPointEntity); void CRevertSaved::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -7670,7 +7664,7 @@ void CInfoIntermission::__MAKE_VHOOK(Think)() } } -LINK_ENTITY_TO_CLASS(info_intermission, CInfoIntermission); +LINK_ENTITY_TO_CLASS(info_intermission, CInfoIntermission, CCSInfoIntermission); void CBasePlayer::StudioEstimateGait() { diff --git a/regamedll/dlls/player.h b/regamedll/dlls/player.h index 26342c41..9751d064 100644 --- a/regamedll/dlls/player.h +++ b/regamedll/dlls/player.h @@ -352,7 +352,6 @@ public: class CBasePlayer: public CBaseMonster { public: - CBasePlayer(); virtual void Spawn(); virtual void Precache(); virtual int Save(CSave &save); diff --git a/regamedll/dlls/revert_saved.h b/regamedll/dlls/revert_saved.h index ac7f9519..4a5854d8 100644 --- a/regamedll/dlls/revert_saved.h +++ b/regamedll/dlls/revert_saved.h @@ -35,10 +35,10 @@ class CRevertSaved: public CPointEntity { public: - void KeyValue(KeyValueData *pkvd); - int Save(CSave &save); - int Restore(CRestore &restore); - void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); + virtual void KeyValue(KeyValueData *pkvd); + virtual int Save(CSave &save); + virtual int Restore(CRestore &restore); + virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); #ifdef HOOK_GAMEDLL diff --git a/regamedll/dlls/sound.cpp b/regamedll/dlls/sound.cpp index 1bf196a1..4cb46b78 100644 --- a/regamedll/dlls/sound.cpp +++ b/regamedll/dlls/sound.cpp @@ -76,7 +76,7 @@ char grgchTextureType[ CTEXTURESMAX ]; int fTextureTypeInit; int gcTextures; -LINK_ENTITY_TO_CLASS(ambient_generic, CAmbientGeneric); +LINK_ENTITY_TO_CLASS(ambient_generic, CAmbientGeneric, CCSAmbientGeneric); IMPLEMENT_SAVERESTORE(CAmbientGeneric, CBaseEntity); // -1 : "Default" @@ -851,7 +851,7 @@ void CAmbientGeneric::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseEntity::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(env_sound, CEnvSound); +LINK_ENTITY_TO_CLASS(env_sound, CEnvSound, CCSEnvSound); IMPLEMENT_SAVERESTORE(CEnvSound, CBaseEntity); void CEnvSound::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -872,7 +872,7 @@ void CEnvSound::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) // and can see the given player entity (pevTarget) BOOL FEnvSoundInRange(entvars_t *pev, entvars_t *pevTarget, float *pflRange) { - CEnvSound *pSound = GetClassPtr((CEnvSound *)pev); + CEnvSound *pSound = GetClassPtr((CEnvSound *)pev); Vector vecSpot1 = pev->origin + pev->view_ofs; Vector vecSpot2 = pevTarget->origin + pevTarget->view_ofs; Vector vecRange; @@ -922,7 +922,7 @@ void CEnvSound::__MAKE_VHOOK(Think)() goto env_sound_Think_slow; } - CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)VARS(pentPlayer)); + CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)VARS(pentPlayer)); float flRange; // check to see if this is the sound entity that is @@ -1809,7 +1809,7 @@ float TEXTURETYPE_PlaySound(TraceResult *ptr, Vector vecSrc, Vector vecEnd, int return fvolbar; } -LINK_ENTITY_TO_CLASS(speaker, CSpeaker); +LINK_ENTITY_TO_CLASS(speaker, CSpeaker, CCSSpeaker); IMPLEMENT_SAVERESTORE(CSpeaker, CBaseEntity); // ambient_generic - general-purpose user-defined static sound diff --git a/regamedll/dlls/soundent.cpp b/regamedll/dlls/soundent.cpp index 70bd6abc..5249bb82 100644 --- a/regamedll/dlls/soundent.cpp +++ b/regamedll/dlls/soundent.cpp @@ -1,8 +1,15 @@ #include "precompiled.h" -CSoundEnt *pSoundEnt; +/* +* Globals initialization +*/ +#ifndef HOOK_GAMEDLL -LINK_ENTITY_TO_CLASS(soundent, CSoundEnt); +CSoundEnt *pSoundEnt = NULL; + +#endif + +LINK_ENTITY_TO_CLASS(soundent, CSoundEnt, CCSSoundEnt); // CSound - Clear - zeros all fields for a sound void CSound::Clear() diff --git a/regamedll/dlls/soundent.h b/regamedll/dlls/soundent.h index 7ca31394..101caa7b 100644 --- a/regamedll/dlls/soundent.h +++ b/regamedll/dlls/soundent.h @@ -79,7 +79,6 @@ public: class CSoundEnt: public CBaseEntity { public: - virtual void Spawn(); virtual void Precache(); virtual int ObjectCaps() { return FCAP_DONT_SAVE; } diff --git a/regamedll/dlls/subs.cpp b/regamedll/dlls/subs.cpp index ba3131ed..82a5cddf 100644 --- a/regamedll/dlls/subs.cpp +++ b/regamedll/dlls/subs.cpp @@ -50,15 +50,15 @@ void CNullEntity::__MAKE_VHOOK(Spawn)() REMOVE_ENTITY(ENT(pev)); } -LINK_ENTITY_TO_CLASS(info_null, CNullEntity); +LINK_ENTITY_TO_CLASS(info_null, CNullEntity, CCSNullEntity); // These are the new entry points to entities. -LINK_ENTITY_TO_CLASS(info_player_deathmatch, CBaseDMStart); -LINK_ENTITY_TO_CLASS(info_player_start, CPointEntity); -LINK_ENTITY_TO_CLASS(info_vip_start, CBaseDMStart); -LINK_ENTITY_TO_CLASS(info_landmark, CPointEntity); -LINK_ENTITY_TO_CLASS(info_hostage_rescue, CPointEntity); -LINK_ENTITY_TO_CLASS(info_bomb_target, CPointEntity); +LINK_ENTITY_TO_CLASS(info_player_deathmatch, CBaseDMStart, CCSDMStart); +LINK_ENTITY_TO_CLASS(info_player_start, CPointEntity, CCSPointEntity); +LINK_ENTITY_TO_CLASS(info_vip_start, CBaseDMStart, CCSDMStart); +LINK_ENTITY_TO_CLASS(info_landmark, CPointEntity, CCSPointEntity); +LINK_ENTITY_TO_CLASS(info_hostage_rescue, CPointEntity, CCSPointEntity); +LINK_ENTITY_TO_CLASS(info_bomb_target, CPointEntity, CCSPointEntity); void CBaseDMStart::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -180,8 +180,7 @@ void FireTargets(const char *targetName, CBaseEntity *pActivator, CBaseEntity *p } } -LINK_ENTITY_TO_CLASS(DelayedUse, CBaseDelay); -LINK_CLASS_TO_WRAP(CBaseDelay, CCSDelay); +LINK_ENTITY_TO_CLASS(DelayedUse, CBaseDelay, CCSDelay); void CBaseDelay::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value) { @@ -193,7 +192,7 @@ void CBaseDelay::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float if (m_flDelay != 0) { // create a temp object to fire at a later time - CBaseDelay *pTemp = GetClassPtr((CBaseDelay *)NULL); + CBaseDelay *pTemp = GetClassPtr((CBaseDelay *)NULL); MAKE_STRING_CLASS("DelayedUse", pTemp->pev); diff --git a/regamedll/dlls/training_gamerules.cpp b/regamedll/dlls/training_gamerules.cpp index a6d584e8..5f30a105 100644 --- a/regamedll/dlls/training_gamerules.cpp +++ b/regamedll/dlls/training_gamerules.cpp @@ -329,7 +329,7 @@ void CHalfLifeTraining::__MAKE_VHOOK(CheckWinConditions)() } IMPLEMENT_SAVERESTORE(CBaseGrenCatch, CBaseEntity); -LINK_ENTITY_TO_CLASS(func_grencatch, CBaseGrenCatch); +LINK_ENTITY_TO_CLASS(func_grencatch, CBaseGrenCatch, CCSGrenCatch); void CBaseGrenCatch::__MAKE_VHOOK(Spawn)() { @@ -458,7 +458,7 @@ void CFuncWeaponCheck::__MAKE_VHOOK(Spawn)() } IMPLEMENT_SAVERESTORE(CFuncWeaponCheck, CBaseEntity); -LINK_ENTITY_TO_CLASS(func_weaponcheck, CFuncWeaponCheck); +LINK_ENTITY_TO_CLASS(func_weaponcheck, CFuncWeaponCheck, CCSFuncWeaponCheck); void CFuncWeaponCheck::__MAKE_VHOOK(Touch)(CBaseEntity *pOther) { diff --git a/regamedll/dlls/training_gamerules.h b/regamedll/dlls/training_gamerules.h index ccc28dfa..23d08f12 100644 --- a/regamedll/dlls/training_gamerules.h +++ b/regamedll/dlls/training_gamerules.h @@ -36,7 +36,6 @@ class CHalfLifeTraining: public CHalfLifeMultiplay { public: CHalfLifeTraining(); - virtual BOOL IsMultiplayer() { return FALSE; } virtual BOOL IsDeathmatch(); virtual void InitHUD(CBasePlayer *pl); diff --git a/regamedll/dlls/triggers.cpp b/regamedll/dlls/triggers.cpp index 80e29047..55beadbc 100644 --- a/regamedll/dlls/triggers.cpp +++ b/regamedll/dlls/triggers.cpp @@ -68,7 +68,7 @@ TYPEDESCRIPTION CTriggerCamera::m_SaveData[] = char st_szNextMap[cchMapNameMost]; char st_szNextSpot[cchMapNameMost]; -LINK_ENTITY_TO_CLASS(func_friction, CFrictionModifier); +LINK_ENTITY_TO_CLASS(func_friction, CFrictionModifier, CCSFrictionModifier); IMPLEMENT_SAVERESTORE(CFrictionModifier, CBaseEntity); void CFrictionModifier::__MAKE_VHOOK(Spawn)() @@ -103,7 +103,7 @@ void CFrictionModifier::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseEntity::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(trigger_auto, CAutoTrigger); +LINK_ENTITY_TO_CLASS(trigger_auto, CAutoTrigger, CCSAutoTrigger); IMPLEMENT_SAVERESTORE(CAutoTrigger, CBaseDelay); void CAutoTrigger::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -157,7 +157,7 @@ void CAutoTrigger::__MAKE_VHOOK(Think)() } } -LINK_ENTITY_TO_CLASS(trigger_relay, CTriggerRelay); +LINK_ENTITY_TO_CLASS(trigger_relay, CTriggerRelay, CCSTriggerRelay); IMPLEMENT_SAVERESTORE(CTriggerRelay, CBaseDelay); void CTriggerRelay::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -197,7 +197,7 @@ void CTriggerRelay::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCal } } -LINK_ENTITY_TO_CLASS(multi_manager, CMultiManager); +LINK_ENTITY_TO_CLASS(multi_manager, CMultiManager, CCSMultiManager); IMPLEMENT_SAVERESTORE(CMultiManager, CBaseToggle); void CMultiManager::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -336,7 +336,7 @@ void CMultiManager::ManagerThink() CMultiManager *CMultiManager::Clone() { - CMultiManager *pMulti = GetClassPtr((CMultiManager *)NULL); + CMultiManager *pMulti = GetClassPtr((CMultiManager *)NULL); edict_t *pEdict = pMulti->pev->pContainingEntity; Q_memcpy(pMulti->pev, pev, sizeof(*pev)); @@ -374,7 +374,7 @@ void CMultiManager::ManagerUse(CBaseEntity *pActivator, CBaseEntity *pCaller, US pev->nextthink = gpGlobals->time; } -LINK_ENTITY_TO_CLASS(env_render, CRenderFxManager); +LINK_ENTITY_TO_CLASS(env_render, CRenderFxManager, CCSRenderFxManager); void CRenderFxManager::__MAKE_VHOOK(Spawn)() { @@ -408,7 +408,7 @@ void CRenderFxManager::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *p } } -LINK_ENTITY_TO_CLASS(trigger, CBaseTrigger); +LINK_ENTITY_TO_CLASS(trigger, CBaseTrigger, CCSTrigger); void CBaseTrigger::InitTrigger() { @@ -453,8 +453,8 @@ void CBaseTrigger::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseToggle::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(trigger_hurt, CTriggerHurt); -LINK_ENTITY_TO_CLASS(trigger_monsterjump, CTriggerMonsterJump); +LINK_ENTITY_TO_CLASS(trigger_hurt, CTriggerHurt, CCSTriggerHurt); +LINK_ENTITY_TO_CLASS(trigger_monsterjump, CTriggerMonsterJump, CCSTriggerMonsterJump); void CTriggerMonsterJump::__MAKE_VHOOK(Spawn)() { @@ -511,7 +511,7 @@ void CTriggerMonsterJump::__MAKE_VHOOK(Touch)(CBaseEntity *pOther) pev->nextthink = gpGlobals->time; } -LINK_ENTITY_TO_CLASS(trigger_cdaudio, CTriggerCDAudio); +LINK_ENTITY_TO_CLASS(trigger_cdaudio, CTriggerCDAudio, CCSTriggerCDAudio); // Changes tracks or stops CD when player touches // HACK: overloaded HEALTH to avoid adding new field @@ -575,7 +575,7 @@ void CTriggerCDAudio::PlayTrack() UTIL_Remove(this); } -LINK_ENTITY_TO_CLASS(target_cdaudio, CTargetCDAudio); +LINK_ENTITY_TO_CLASS(target_cdaudio, CTargetCDAudio, CCSTargetCDAudio); void CTargetCDAudio::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -693,7 +693,7 @@ void CTriggerHurt::RadiationThink() // reset origin if (!FNullEnt(pentPlayer)) { - pPlayer = GetClassPtr((CBasePlayer *)VARS(pentPlayer)); + pPlayer = GetClassPtr((CBasePlayer *)VARS(pentPlayer)); pevTarget = VARS(pentPlayer); @@ -852,7 +852,7 @@ void CBaseTrigger::HurtTouch(CBaseEntity *pOther) } } -LINK_ENTITY_TO_CLASS(trigger_multiple, CTriggerMultiple); +LINK_ENTITY_TO_CLASS(trigger_multiple, CTriggerMultiple, CCSTriggerMultiple); void CTriggerMultiple::__MAKE_VHOOK(Spawn)() { @@ -882,11 +882,11 @@ void CTriggerMultiple::__MAKE_VHOOK(Spawn)() //} //else { - SetTouch(&CTriggerMultiple::MultiTouch); + SetTouch(&CTriggerMultiple::MultiTouch); } } -LINK_ENTITY_TO_CLASS(trigger_once, CTriggerOnce); +LINK_ENTITY_TO_CLASS(trigger_once, CTriggerOnce, CCSTriggerOnce); void CTriggerOnce::__MAKE_VHOOK(Spawn)() { @@ -1007,7 +1007,7 @@ void CBaseTrigger::CounterUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE ActivateMultiTrigger(m_hActivator); } -LINK_ENTITY_TO_CLASS(trigger_counter, CTriggerCounter); +LINK_ENTITY_TO_CLASS(trigger_counter, CTriggerCounter, CCSTriggerCounter); void CTriggerCounter::__MAKE_VHOOK(Spawn)() { @@ -1023,7 +1023,7 @@ void CTriggerCounter::__MAKE_VHOOK(Spawn)() SetUse(&CTriggerCounter::CounterUse); } -LINK_ENTITY_TO_CLASS(trigger_transition, CTriggerVolume); +LINK_ENTITY_TO_CLASS(trigger_transition, CTriggerVolume, CCSTriggerVolume); // Define space that travels across a level transition void CTriggerVolume::__MAKE_VHOOK(Spawn)() @@ -1038,7 +1038,7 @@ void CTriggerVolume::__MAKE_VHOOK(Spawn)() pev->modelindex = 0; } -LINK_ENTITY_TO_CLASS(fireanddie, CFireAndDie); +LINK_ENTITY_TO_CLASS(fireanddie, CFireAndDie, CCSFireAndDie); void CFireAndDie::__MAKE_VHOOK(Spawn)() { @@ -1057,7 +1057,7 @@ void CFireAndDie::__MAKE_VHOOK(Think)() UTIL_Remove(this); } -LINK_ENTITY_TO_CLASS(trigger_changelevel, CChangeLevel); +LINK_ENTITY_TO_CLASS(trigger_changelevel, CChangeLevel, CCSChangeLevel); IMPLEMENT_SAVERESTORE(CChangeLevel, CBaseTrigger); // Cache user-entity-field values until spawn is called. @@ -1184,7 +1184,7 @@ void CChangeLevel::ChangeLevelNow(CBaseEntity *pActivator) // Create an entity to fire the changetarget if (m_changeTarget) { - CFireAndDie *pFireAndDie = GetClassPtr((CFireAndDie *)NULL); + CFireAndDie *pFireAndDie = GetClassPtr((CFireAndDie *)NULL); if (pFireAndDie) { @@ -1324,7 +1324,7 @@ int CChangeLevel::ChangeList(LEVELLIST *pLevelList, int maxList) while (!FNullEnt(pentChangelevel)) { - CChangeLevel *pTrigger = GetClassPtr((CChangeLevel *)VARS(pentChangelevel)); + CChangeLevel *pTrigger = GetClassPtr((CChangeLevel *)VARS(pentChangelevel)); if (pTrigger != NULL) { @@ -1426,11 +1426,11 @@ NOXREF void NextLevel() if (FNullEnt(pent)) { gpGlobals->mapname = ALLOC_STRING("start"); - pChange = GetClassPtr((CChangeLevel *)NULL); + pChange = GetClassPtr((CChangeLevel *)NULL); Q_strcpy(pChange->m_szMapName, "start"); } else - pChange = GetClassPtr((CChangeLevel *)VARS(pent)); + pChange = GetClassPtr((CChangeLevel *)VARS(pent)); Q_strcpy(st_szNextMap, pChange->m_szMapName); g_fGameOver = TRUE; @@ -1442,7 +1442,7 @@ NOXREF void NextLevel() } } -LINK_ENTITY_TO_CLASS(func_ladder, CLadder); +LINK_ENTITY_TO_CLASS(func_ladder, CLadder, CCSLadder); void CLadder::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -1474,7 +1474,7 @@ void CLadder::__MAKE_VHOOK(Spawn)() pev->movetype = MOVETYPE_PUSH; } -LINK_ENTITY_TO_CLASS(trigger_push, CTriggerPush); +LINK_ENTITY_TO_CLASS(trigger_push, CTriggerPush, CCSTriggerPush); void CTriggerPush::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -1615,7 +1615,7 @@ void CBaseTrigger::TeleportTouch(CBaseEntity *pOther) pevToucher->velocity = pevToucher->basevelocity = g_vecZero; } -LINK_ENTITY_TO_CLASS(trigger_teleport, CTriggerTeleport); +LINK_ENTITY_TO_CLASS(trigger_teleport, CTriggerTeleport, CCSTriggerTeleport); void CTriggerTeleport::__MAKE_VHOOK(Spawn)() { @@ -1623,8 +1623,8 @@ void CTriggerTeleport::__MAKE_VHOOK(Spawn)() SetTouch(&CTriggerTeleport::TeleportTouch); } -LINK_ENTITY_TO_CLASS(info_teleport_destination, CPointEntity); -LINK_ENTITY_TO_CLASS(func_buyzone, CBuyZone); +LINK_ENTITY_TO_CLASS(info_teleport_destination, CPointEntity, CCSPointEntity); +LINK_ENTITY_TO_CLASS(func_buyzone, CBuyZone, CCSBuyZone); void CBuyZone::__MAKE_VHOOK(Spawn)() { @@ -1651,7 +1651,7 @@ void CBuyZone::BuyTouch(CBaseEntity *pOther) } } -LINK_ENTITY_TO_CLASS(func_bomb_target, CBombTarget); +LINK_ENTITY_TO_CLASS(func_bomb_target, CBombTarget, CCSBombTarget); void CBombTarget::__MAKE_VHOOK(Spawn)() { @@ -1680,7 +1680,7 @@ void CBombTarget::BombTargetUse(CBaseEntity *pActivator, CBaseEntity *pCaller, U SUB_UseTargets(NULL, USE_TOGGLE, 0); } -LINK_ENTITY_TO_CLASS(func_hostage_rescue, CHostageRescue); +LINK_ENTITY_TO_CLASS(func_hostage_rescue, CHostageRescue, CCSHostageRescue); void CHostageRescue::__MAKE_VHOOK(Spawn)() { @@ -1701,7 +1701,7 @@ void CHostageRescue::HostageRescueTouch(CBaseEntity *pOther) } } -LINK_ENTITY_TO_CLASS(func_escapezone, CEscapeZone); +LINK_ENTITY_TO_CLASS(func_escapezone, CEscapeZone, CCSEscapeZone); void CEscapeZone::__MAKE_VHOOK(Spawn)() { @@ -1746,7 +1746,7 @@ void CEscapeZone::EscapeTouch(CBaseEntity *pOther) } } -LINK_ENTITY_TO_CLASS(func_vip_safetyzone, CVIP_SafetyZone); +LINK_ENTITY_TO_CLASS(func_vip_safetyzone, CVIP_SafetyZone, CCSVIP_SafetyZone); void CVIP_SafetyZone::__MAKE_VHOOK(Spawn)() { @@ -1774,7 +1774,7 @@ void CVIP_SafetyZone::VIP_SafetyTouch(CBaseEntity *pOther) } } -LINK_ENTITY_TO_CLASS(trigger_autosave, CTriggerSave); +LINK_ENTITY_TO_CLASS(trigger_autosave, CTriggerSave, CCSTriggerSave); void CTriggerSave::__MAKE_VHOOK(Spawn)() { @@ -1802,7 +1802,7 @@ void CTriggerSave::SaveTouch(CBaseEntity *pOther) SERVER_COMMAND("autosave\n"); } -LINK_ENTITY_TO_CLASS(trigger_endsection, CTriggerEndSection); +LINK_ENTITY_TO_CLASS(trigger_endsection, CTriggerEndSection, CCSTriggerEndSection); void CTriggerEndSection::EndSectionUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value) { @@ -1864,7 +1864,7 @@ void CTriggerEndSection::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseTrigger::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(trigger_gravity, CTriggerGravity); +LINK_ENTITY_TO_CLASS(trigger_gravity, CTriggerGravity, CCSTriggerGravity); void CTriggerGravity::__MAKE_VHOOK(Spawn)() { @@ -1881,7 +1881,7 @@ void CTriggerGravity::GravityTouch(CBaseEntity *pOther) pOther->pev->gravity = pev->gravity; } -LINK_ENTITY_TO_CLASS(trigger_changetarget, CTriggerChangeTarget); +LINK_ENTITY_TO_CLASS(trigger_changetarget, CTriggerChangeTarget, CCSTriggerChangeTarget); IMPLEMENT_SAVERESTORE(CTriggerChangeTarget, CBaseDelay); void CTriggerChangeTarget::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) @@ -1917,7 +1917,7 @@ void CTriggerChangeTarget::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntit } } -LINK_ENTITY_TO_CLASS(trigger_camera, CTriggerCamera); +LINK_ENTITY_TO_CLASS(trigger_camera, CTriggerCamera, CCSTriggerCamera); IMPLEMENT_SAVERESTORE(CTriggerCamera, CBaseDelay); void CTriggerCamera::__MAKE_VHOOK(Spawn)() @@ -2185,10 +2185,10 @@ void CTriggerCamera::Move() pev->velocity = ((pev->movedir * pev->speed) * fraction) + (pev->velocity * (1 - fraction)); } -LINK_ENTITY_TO_CLASS(env_snow, CWeather); -LINK_ENTITY_TO_CLASS(func_snow, CWeather); -LINK_ENTITY_TO_CLASS(env_rain, CWeather); -LINK_ENTITY_TO_CLASS(func_rain, CWeather); +LINK_ENTITY_TO_CLASS(env_snow, CWeather, CCSWeather); +LINK_ENTITY_TO_CLASS(func_snow, CWeather, CCSWeather); +LINK_ENTITY_TO_CLASS(env_rain, CWeather, CCSWeather); +LINK_ENTITY_TO_CLASS(func_rain, CWeather, CCSWeather); void CWeather::__MAKE_VHOOK(Spawn)() { @@ -2231,4 +2231,4 @@ void CClientFog::__MAKE_VHOOK(Spawn)() pev->rendermode = kRenderTransTexture; } -LINK_ENTITY_TO_CLASS(env_fog, CClientFog); +LINK_ENTITY_TO_CLASS(env_fog, CClientFog, CCSClientFog); diff --git a/regamedll/dlls/triggers.h b/regamedll/dlls/triggers.h index 526ba39b..8b1a3548 100644 --- a/regamedll/dlls/triggers.h +++ b/regamedll/dlls/triggers.h @@ -744,7 +744,7 @@ public: }; void PlayCDTrack(int iTrack); -int BuildChangeList(LEVELLIST * pLevelList, int maxList); +int BuildChangeList(LEVELLIST *pLevelList, int maxList); void NextLevel(); #endif // TRIGGERS_H diff --git a/regamedll/dlls/util.h b/regamedll/dlls/util.h index c702dea5..76c528cf 100644 --- a/regamedll/dlls/util.h +++ b/regamedll/dlls/util.h @@ -159,20 +159,14 @@ extern globalvars_t *gpGlobals; #endif #define REGAMEDLL_ALLOC_FUNC -#define LINK_ENTITY_TO_CLASS(mapClassName, DLLClassName)\ +#define LINK_ENTITY_TO_CLASS(mapClassName, DLLClassName, DLLClassWrapName)\ C_DLLEXPORT void EXT_FUNC mapClassName(entvars_t *pev);\ void mapClassName(entvars_t *pev)\ {\ REGAMEDLL_ALLOC_FUNC\ - GetClassPtr((DLLClassName *)pev);\ + GetClassPtr((DLLClassName *)pev);\ } -#define LINK_CLASS_TO_WRAP(className, classNameWrap)\ - className::className()\ - {\ - GetClassPtrWrap(this);\ - }\ - typedef enum { ignore_monsters = 1, diff --git a/regamedll/dlls/vehicle.cpp b/regamedll/dlls/vehicle.cpp index 680c14a5..409b7bde 100644 --- a/regamedll/dlls/vehicle.cpp +++ b/regamedll/dlls/vehicle.cpp @@ -42,7 +42,7 @@ void FixupAngles2(Vector &v) } IMPLEMENT_SAVERESTORE(CFuncVehicle, CBaseEntity); -LINK_ENTITY_TO_CLASS(func_vehicle, CFuncVehicle); +LINK_ENTITY_TO_CLASS(func_vehicle, CFuncVehicle, CCSFuncVehicle); void CFuncVehicle::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) { @@ -943,7 +943,7 @@ void CFuncVehicle::__MAKE_VHOOK(Precache)() m_usAdjustPitch = PRECACHE_EVENT(1, "events/vehicle.sc"); } -LINK_ENTITY_TO_CLASS(func_vehiclecontrols, CFuncVehicleControls); +LINK_ENTITY_TO_CLASS(func_vehiclecontrols, CFuncVehicleControls, CCSFuncVehicleControls); void CFuncVehicleControls::Find() { diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index 9888d3f4..67ad7062 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -1491,6 +1491,7 @@ void CBasePlayerWeapon::__MAKE_VHOOK(RetireWeapon)() // GetNextAttackDelay - An accurate way of calcualting the next attack time. float CBasePlayerWeapon::GetNextAttackDelay(float delay) { +#ifndef REGAMEDLL_FIXES if (m_flLastFireTime == 0.0f || m_flNextPrimaryAttack == -1.0f) { // At this point, we are assuming that the client has stopped firing @@ -1498,6 +1499,7 @@ float CBasePlayerWeapon::GetNextAttackDelay(float delay) m_flPrevPrimaryAttack = delay; m_flLastFireTime = gpGlobals->time; } +#endif #ifdef REGAMEDLL_BUILD_6153 @@ -1529,8 +1531,7 @@ float CBasePlayerWeapon::GetNextAttackDelay(float delay) return flNextAttack; } -LINK_ENTITY_TO_CLASS(weaponbox, CWeaponBox); -LINK_CLASS_TO_WRAP(CWeaponBox, CCSWeaponBox); +LINK_ENTITY_TO_CLASS(weaponbox, CWeaponBox, CCSWeaponBox); IMPLEMENT_SAVERESTORE(CWeaponBox, CBaseEntity); void CWeaponBox::__MAKE_VHOOK(Precache)() @@ -1567,7 +1568,7 @@ void CWeaponBox::BombThink() if (!pEntity->IsPlayer() || pEntity->IsDormant()) continue; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pTempPlayer->pev->deadflag == DEAD_NO && pTempPlayer->m_iTeam == TERRORIST) { @@ -1717,7 +1718,7 @@ void CWeaponBox::__MAKE_VHOOK(Touch)(CBaseEntity *pOther) if (pEntity->pev->flags == FL_DORMANT) continue; - CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); + CBasePlayer *pTempPlayer = GetClassPtr((CBasePlayer *)pEntity->pev); if (pTempPlayer->pev->deadflag == DEAD_NO && pTempPlayer->m_iTeam == TERRORIST) { @@ -2270,4 +2271,4 @@ void CArmoury::__MAKE_VHOOK(KeyValue)(KeyValueData *pkvd) CBaseEntity::KeyValue(pkvd); } -LINK_ENTITY_TO_CLASS(armoury_entity, CArmoury); +LINK_ENTITY_TO_CLASS(armoury_entity, CArmoury, CCSArmoury); diff --git a/regamedll/dlls/weapons.h b/regamedll/dlls/weapons.h index fbf2994f..205871df 100644 --- a/regamedll/dlls/weapons.h +++ b/regamedll/dlls/weapons.h @@ -155,7 +155,6 @@ public: class CGrenade: public CBaseMonster { public: - CGrenade(); virtual void Spawn(); virtual int Save(CSave &save); virtual int Restore(CRestore &restore); @@ -458,7 +457,6 @@ public: class CWeaponBox: public CBaseEntity { public: - CWeaponBox(); virtual void Spawn(); virtual void Precache(); virtual void KeyValue(KeyValueData *pkvd); @@ -555,7 +553,7 @@ public: virtual int GetItemInfo(ItemInfo *p); virtual BOOL Deploy(); virtual float GetMaxSpeed() { return MP5N_MAX_SPEED; } - int iItemSlot() { return PRIMARY_WEAPON_SLOT; } + virtual int iItemSlot() { return PRIMARY_WEAPON_SLOT; } virtual void PrimaryAttack(); virtual void Reload(); virtual void WeaponIdle(); diff --git a/regamedll/dlls/world.cpp b/regamedll/dlls/world.cpp index 961aaf29..ed6cede9 100644 --- a/regamedll/dlls/world.cpp +++ b/regamedll/dlls/world.cpp @@ -80,7 +80,7 @@ class CDecal: public CBaseEntity void EXPORT TriggerDecal(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); }; -LINK_ENTITY_TO_CLASS(infodecal, CDecal); +LINK_ENTITY_TO_CLASS(infodecal, CDecal, CCSDecal); void CDecal::Spawn() { @@ -173,7 +173,7 @@ class CCorpse: public CBaseEntity virtual int ObjectCaps() { return FCAP_DONT_SAVE; } }; -LINK_ENTITY_TO_CLASS(bodyque, CCorpse); +LINK_ENTITY_TO_CLASS(bodyque, CCorpse, CCSCorpse); static void InitBodyQue() { @@ -413,8 +413,7 @@ void EXT_FUNC ResetGlobalState() #pragma push_macro("REGAMEDLL_ALLOC_FUNC") #define REGAMEDLL_ALLOC_FUNC Regamedll_AllocEntities(gpGlobals->maxEntities); -LINK_ENTITY_TO_CLASS(worldspawn, CWorld); -LINK_CLASS_TO_WRAP(CWorld, CCSWorld); +LINK_ENTITY_TO_CLASS(worldspawn, CWorld, CCSWorld); #pragma pop_macro("REGAMEDLL_ALLOC_FUNC") @@ -481,11 +480,13 @@ void CWorld::__MAKE_VHOOK(Precache)() g_pGameRules = InstallGameRules(); + // s1lent: What is the essence of soundent in CS 1.6? I think this is for NPC monsters. +#ifndef REGAMEDLL_FIXES // UNDONE why is there so much Spawn code in the Precache function? I'll just keep it here // LATER - do we want a sound ent in deathmatch? (sjb) //pSoundEnt = CBaseEntity::Create("soundent", g_vecZero, g_vecZero, edict()); - pSoundEnt = GetClassPtr((CSoundEnt *)NULL); + pSoundEnt = GetClassPtr((CSoundEnt *)NULL); if (pSoundEnt == NULL) { @@ -495,7 +496,7 @@ void CWorld::__MAKE_VHOOK(Precache)() { pSoundEnt->Spawn(); } - +#endif InitBodyQue(); // init sentence group playback stuff from sentences.txt. diff --git a/regamedll/dlls/wpn_shared/wpn_ak47.cpp b/regamedll/dlls/wpn_shared/wpn_ak47.cpp index 93fdae7a..effad9c0 100644 --- a/regamedll/dlls/wpn_shared/wpn_ak47.cpp +++ b/regamedll/dlls/wpn_shared/wpn_ak47.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_ak47, CAK47); +LINK_ENTITY_TO_CLASS(weapon_ak47, CAK47, CCSAK47); void CAK47::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_aug.cpp b/regamedll/dlls/wpn_shared/wpn_aug.cpp index eda5b874..dd0a924c 100644 --- a/regamedll/dlls/wpn_shared/wpn_aug.cpp +++ b/regamedll/dlls/wpn_shared/wpn_aug.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_aug, CAUG); +LINK_ENTITY_TO_CLASS(weapon_aug, CAUG, CCSAUG); void CAUG::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_awp.cpp b/regamedll/dlls/wpn_shared/wpn_awp.cpp index 47e6f3d2..071544de 100644 --- a/regamedll/dlls/wpn_shared/wpn_awp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_awp.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_awp, CAWP); +LINK_ENTITY_TO_CLASS(weapon_awp, CAWP, CCSAWP); void CAWP::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_c4.cpp b/regamedll/dlls/wpn_shared/wpn_c4.cpp index 3b276d75..d76bd1fd 100644 --- a/regamedll/dlls/wpn_shared/wpn_c4.cpp +++ b/regamedll/dlls/wpn_shared/wpn_c4.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_c4, CC4); +LINK_ENTITY_TO_CLASS(weapon_c4, CC4, CCSC4); void CC4::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_deagle.cpp b/regamedll/dlls/wpn_shared/wpn_deagle.cpp index 48f5310e..10d757e2 100644 --- a/regamedll/dlls/wpn_shared/wpn_deagle.cpp +++ b/regamedll/dlls/wpn_shared/wpn_deagle.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_deagle, CDEAGLE); +LINK_ENTITY_TO_CLASS(weapon_deagle, CDEAGLE, CCSDEAGLE); void CDEAGLE::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_elite.cpp b/regamedll/dlls/wpn_shared/wpn_elite.cpp index 30540160..bdc50108 100644 --- a/regamedll/dlls/wpn_shared/wpn_elite.cpp +++ b/regamedll/dlls/wpn_shared/wpn_elite.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_elite, CELITE); +LINK_ENTITY_TO_CLASS(weapon_elite, CELITE, CCSELITE); void CELITE::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_famas.cpp b/regamedll/dlls/wpn_shared/wpn_famas.cpp index 4e98f487..6db12335 100644 --- a/regamedll/dlls/wpn_shared/wpn_famas.cpp +++ b/regamedll/dlls/wpn_shared/wpn_famas.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_famas, CFamas); +LINK_ENTITY_TO_CLASS(weapon_famas, CFamas, CCSFamas); void CFamas::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp b/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp index f8ca05e4..17152ffe 100644 --- a/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp +++ b/regamedll/dlls/wpn_shared/wpn_fiveseven.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_fiveseven, CFiveSeven); +LINK_ENTITY_TO_CLASS(weapon_fiveseven, CFiveSeven, CCSFiveSeven); void CFiveSeven::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_flashbang.cpp b/regamedll/dlls/wpn_shared/wpn_flashbang.cpp index 2137a8fd..f3a96b6c 100644 --- a/regamedll/dlls/wpn_shared/wpn_flashbang.cpp +++ b/regamedll/dlls/wpn_shared/wpn_flashbang.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_flashbang, CFlashbang); +LINK_ENTITY_TO_CLASS(weapon_flashbang, CFlashbang, CCSFlashbang); void CFlashbang::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp b/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp index b6cb7dc1..3b6c930f 100644 --- a/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp +++ b/regamedll/dlls/wpn_shared/wpn_g3sg1.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_g3sg1, CG3SG1); +LINK_ENTITY_TO_CLASS(weapon_g3sg1, CG3SG1, CCSG3SG1); void CG3SG1::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_galil.cpp b/regamedll/dlls/wpn_shared/wpn_galil.cpp index 4743c7dc..d2307d4e 100644 --- a/regamedll/dlls/wpn_shared/wpn_galil.cpp +++ b/regamedll/dlls/wpn_shared/wpn_galil.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_galil, CGalil); +LINK_ENTITY_TO_CLASS(weapon_galil, CGalil, CCSGalil); void CGalil::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_glock18.cpp b/regamedll/dlls/wpn_shared/wpn_glock18.cpp index 09ec0b1b..fab09cc8 100644 --- a/regamedll/dlls/wpn_shared/wpn_glock18.cpp +++ b/regamedll/dlls/wpn_shared/wpn_glock18.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_glock18, CGLOCK18); +LINK_ENTITY_TO_CLASS(weapon_glock18, CGLOCK18, CCSGLOCK18); void CGLOCK18::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp b/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp index f7f463f1..7450d498 100644 --- a/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp +++ b/regamedll/dlls/wpn_shared/wpn_hegrenade.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_hegrenade, CHEGrenade); +LINK_ENTITY_TO_CLASS(weapon_hegrenade, CHEGrenade, CCSHEGrenade); void CHEGrenade::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_knife.cpp b/regamedll/dlls/wpn_shared/wpn_knife.cpp index ec757755..52c4d198 100644 --- a/regamedll/dlls/wpn_shared/wpn_knife.cpp +++ b/regamedll/dlls/wpn_shared/wpn_knife.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_knife, CKnife); +LINK_ENTITY_TO_CLASS(weapon_knife, CKnife, CCSKnife); void CKnife::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_m249.cpp b/regamedll/dlls/wpn_shared/wpn_m249.cpp index 3ae242ee..46a22bc6 100644 --- a/regamedll/dlls/wpn_shared/wpn_m249.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m249.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_m249, CM249); +LINK_ENTITY_TO_CLASS(weapon_m249, CM249, CCSM249); void CM249::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_m3.cpp b/regamedll/dlls/wpn_shared/wpn_m3.cpp index bfc61091..24337cab 100644 --- a/regamedll/dlls/wpn_shared/wpn_m3.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m3.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_m3, CM3); +LINK_ENTITY_TO_CLASS(weapon_m3, CM3, CCSM3); void CM3::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_m4a1.cpp b/regamedll/dlls/wpn_shared/wpn_m4a1.cpp index c0fe7010..33b19ac9 100644 --- a/regamedll/dlls/wpn_shared/wpn_m4a1.cpp +++ b/regamedll/dlls/wpn_shared/wpn_m4a1.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_m4a1, CM4A1); +LINK_ENTITY_TO_CLASS(weapon_m4a1, CM4A1, CCSM4A1); void CM4A1::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_mac10.cpp b/regamedll/dlls/wpn_shared/wpn_mac10.cpp index 8f671ee1..c3407dd6 100644 --- a/regamedll/dlls/wpn_shared/wpn_mac10.cpp +++ b/regamedll/dlls/wpn_shared/wpn_mac10.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_mac10, CMAC10); +LINK_ENTITY_TO_CLASS(weapon_mac10, CMAC10, CCSMAC10); void CMAC10::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp b/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp index a46b559f..f2ae3e1e 100644 --- a/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp +++ b/regamedll/dlls/wpn_shared/wpn_mp5navy.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_mp5navy, CMP5N); +LINK_ENTITY_TO_CLASS(weapon_mp5navy, CMP5N, CCSMP5N); void CMP5N::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_p228.cpp b/regamedll/dlls/wpn_shared/wpn_p228.cpp index f89b2ab3..572b093f 100644 --- a/regamedll/dlls/wpn_shared/wpn_p228.cpp +++ b/regamedll/dlls/wpn_shared/wpn_p228.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_p228, CP228); +LINK_ENTITY_TO_CLASS(weapon_p228, CP228, CCSP228); void CP228::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_p90.cpp b/regamedll/dlls/wpn_shared/wpn_p90.cpp index a3945ac4..b24ba502 100644 --- a/regamedll/dlls/wpn_shared/wpn_p90.cpp +++ b/regamedll/dlls/wpn_shared/wpn_p90.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_p90, CP90); +LINK_ENTITY_TO_CLASS(weapon_p90, CP90, CCSP90); void CP90::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_scout.cpp b/regamedll/dlls/wpn_shared/wpn_scout.cpp index 422bbf9e..a438b863 100644 --- a/regamedll/dlls/wpn_shared/wpn_scout.cpp +++ b/regamedll/dlls/wpn_shared/wpn_scout.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_scout, CSCOUT); +LINK_ENTITY_TO_CLASS(weapon_scout, CSCOUT, CCSSCOUT); void CSCOUT::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_sg550.cpp b/regamedll/dlls/wpn_shared/wpn_sg550.cpp index 5548c51e..690f8b42 100644 --- a/regamedll/dlls/wpn_shared/wpn_sg550.cpp +++ b/regamedll/dlls/wpn_shared/wpn_sg550.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_sg550, CSG550); +LINK_ENTITY_TO_CLASS(weapon_sg550, CSG550, CCSSG550); void CSG550::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_sg552.cpp b/regamedll/dlls/wpn_shared/wpn_sg552.cpp index 20620e5e..a65c7fdf 100644 --- a/regamedll/dlls/wpn_shared/wpn_sg552.cpp +++ b/regamedll/dlls/wpn_shared/wpn_sg552.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_sg552, CSG552); +LINK_ENTITY_TO_CLASS(weapon_sg552, CSG552, CCSSG552); void CSG552::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp b/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp index 6eb07c76..c877f32d 100644 --- a/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp +++ b/regamedll/dlls/wpn_shared/wpn_smokegrenade.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_smokegrenade, CSmokeGrenade); +LINK_ENTITY_TO_CLASS(weapon_smokegrenade, CSmokeGrenade, CCSSmokeGrenade); void CSmokeGrenade::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_tmp.cpp b/regamedll/dlls/wpn_shared/wpn_tmp.cpp index d297fc07..e034448e 100644 --- a/regamedll/dlls/wpn_shared/wpn_tmp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_tmp.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_tmp, CTMP); +LINK_ENTITY_TO_CLASS(weapon_tmp, CTMP, CCSTMP); void CTMP::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_ump45.cpp b/regamedll/dlls/wpn_shared/wpn_ump45.cpp index 51fec742..65e14363 100644 --- a/regamedll/dlls/wpn_shared/wpn_ump45.cpp +++ b/regamedll/dlls/wpn_shared/wpn_ump45.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_ump45, CUMP45); +LINK_ENTITY_TO_CLASS(weapon_ump45, CUMP45, CCSUMP45); void CUMP45::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/dlls/wpn_shared/wpn_usp.cpp b/regamedll/dlls/wpn_shared/wpn_usp.cpp index c35d2958..a96cfc9e 100644 --- a/regamedll/dlls/wpn_shared/wpn_usp.cpp +++ b/regamedll/dlls/wpn_shared/wpn_usp.cpp @@ -1,9 +1,7 @@ #include "precompiled.h" -/* <2bb045> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:68 */ -LINK_ENTITY_TO_CLASS(weapon_usp, CUSP); +LINK_ENTITY_TO_CLASS(weapon_usp, CUSP, CCSUSP); -/* <2bad55> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:70 */ void CUSP::__MAKE_VHOOK(Spawn)() { Precache(); @@ -38,7 +36,6 @@ void CUSP::__MAKE_VHOOK(Precache)() m_usFireUSP = PRECACHE_EVENT(1, "events/usp.sc"); } -/* <2bacfb> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:107 */ int CUSP::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p) { p->pszName = STRING(pev->classname); @@ -60,7 +57,6 @@ int CUSP::__MAKE_VHOOK(GetItemInfo)(ItemInfo *p) return 1; } -/* <2bad2e> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:124 */ BOOL CUSP::__MAKE_VHOOK(Deploy)() { m_iWeaponState &= ~WPNSTATE_SHIELD_DRAWN; @@ -81,7 +77,6 @@ BOOL CUSP::__MAKE_VHOOK(Deploy)() return DefaultDeploy("models/v_usp.mdl", "models/p_usp.mdl", USP_UNSIL_DRAW, "onehanded", UseDecrement()); } -/* <2bae77> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:147 */ void CUSP::__MAKE_VHOOK(SecondaryAttack)() { if (ShieldSecondaryFire(USP_SHIELD_UP, USP_SHIELD_DOWN)) @@ -108,7 +103,6 @@ void CUSP::__MAKE_VHOOK(SecondaryAttack)() m_flNextPrimaryAttack = GetNextAttackDelay(3.0); } -/* <2bb000> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:173 */ void CUSP::__MAKE_VHOOK(PrimaryAttack)() { if (m_iWeaponState & WPNSTATE_USP_SILENCED) @@ -151,7 +145,6 @@ void CUSP::__MAKE_VHOOK(PrimaryAttack)() } } -/* <2bb10f> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:200 */ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseSemi) { int flag; @@ -239,7 +232,6 @@ void CUSP::USPFire(float flSpread, float flCycleTime, BOOL fUseSemi) ResetPlayerShieldAnim(); } -/* <2bae19> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:297 */ void CUSP::__MAKE_VHOOK(Reload)() { if (m_pPlayer->ammo_45acp <= 0) @@ -264,7 +256,6 @@ void CUSP::__MAKE_VHOOK(Reload)() } } -/* <2b9c2a> ../cstrike/dlls/wpn_shared/wpn_usp.cpp:318 */ void CUSP::__MAKE_VHOOK(WeaponIdle)() { ResetEmptySound(); @@ -291,4 +282,4 @@ void CUSP::__MAKE_VHOOK(WeaponIdle)() m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 60.0f; SendWeaponAnim(iAnim, UseDecrement()); } -} \ No newline at end of file +} diff --git a/regamedll/dlls/wpn_shared/wpn_xm1014.cpp b/regamedll/dlls/wpn_shared/wpn_xm1014.cpp index 6b1d2c92..09b26dc6 100644 --- a/regamedll/dlls/wpn_shared/wpn_xm1014.cpp +++ b/regamedll/dlls/wpn_shared/wpn_xm1014.cpp @@ -1,6 +1,6 @@ #include "precompiled.h" -LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014); +LINK_ENTITY_TO_CLASS(weapon_xm1014, CXM1014, CCSXM1014); void CXM1014::__MAKE_VHOOK(Spawn)() { diff --git a/regamedll/game_shared/bot/bot.h b/regamedll/game_shared/bot/bot.h index 17937a73..9bd590bb 100644 --- a/regamedll/game_shared/bot/bot.h +++ b/regamedll/game_shared/bot/bot.h @@ -34,7 +34,7 @@ class BotProfile; -template +template T *CreateBot(const BotProfile *profile) { edict_t *pentBot; @@ -57,7 +57,7 @@ T *CreateBot(const BotProfile *profile) { T *pBot = NULL; FREE_PRIVATE(pentBot); - pBot = GetClassPtr((T *)VARS(pentBot)); + pBot = GetClassPtr((T *)VARS(pentBot)); pBot->Initialize(profile); return pBot; diff --git a/regamedll/hookers/hooker_impl.cpp b/regamedll/hookers/hooker_impl.cpp index edb1d3ec..ed062cd4 100644 --- a/regamedll/hookers/hooker_impl.cpp +++ b/regamedll/hookers/hooker_impl.cpp @@ -111,6 +111,9 @@ float (*CLocalNav::pflLastThinkTime); EHANDLE (*CLocalNav::phostages)[20]; int (*CLocalNav::ptot_hostages); +// soundent +CSoundEnt *pSoundEnt; + // globals weapons const char *g_pModelNameLaser; ItemInfo IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[32]; diff --git a/regamedll/hookers/osconfig.h b/regamedll/hookers/osconfig.h index 63c9ba96..f0535ae0 100644 --- a/regamedll/hookers/osconfig.h +++ b/regamedll/hookers/osconfig.h @@ -91,7 +91,6 @@ #include #include #include - #include // Deail with stupid macro in kernel.h #undef __FUNCTION__ diff --git a/regamedll/public/regamedll/regamedll_interfaces.h b/regamedll/public/regamedll/regamedll_interfaces.h index 481d8dbd..3af40d4a 100644 --- a/regamedll/public/regamedll/regamedll_interfaces.h +++ b/regamedll/public/regamedll/regamedll_interfaces.h @@ -35,6 +35,7 @@ class CRestore; class CCSEntity; class CCSPlayer; class CCSMonster; +class BotProfile; class CCSWeaponBox; class CCSPlayerItem; class CCSPlayerWeapon; @@ -43,6 +44,16 @@ class CCSquadMonster; class ICSMonster; class ICSquadMonster; +enum VisiblePartTypeBot:uint8 +{ + NONE = 0x00, + CHEST = 0x01, + HEAD = 0x02, + LEFT_SIDE = 0x04, + RIGHT_SIDE = 0x08, + FEET = 0x10 +}; + class ICSEntity { public: virtual void Spawn() = 0; @@ -227,6 +238,14 @@ public: virtual void Touch(CCSEntity *pOther) = 0; }; +class ICSArmoury: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void Restart() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; + class ICSPlayer: public ICSMonster { virtual void Spawn() = 0; virtual void Precache() = 0; @@ -271,6 +290,87 @@ class ICSPlayer: public ICSMonster { virtual bool IsConnected() const = 0; }; +class IAPI_Bot: public ICSPlayer { +public: + virtual void Spawn() = 0; + virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; + virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; + virtual void Think() = 0; + virtual bool IsBot() = 0; + virtual Vector GetAutoaimVector(float flDelta) = 0; + virtual void OnTouchingWeapon(CCSWeaponBox *box) = 0; + virtual bool Initialize(const BotProfile *profile) = 0; + virtual void SpawnBot() = 0; + virtual void Upkeep() = 0; + virtual void Update() = 0; + virtual void Run() = 0; + virtual void Walk() = 0; + virtual void Crouch() = 0; + virtual void StandUp() = 0; + virtual void MoveForward() = 0; + virtual void MoveBackward() = 0; + virtual void StrafeLeft() = 0; + virtual void StrafeRight() = 0; + virtual bool Jump(bool mustJump = false) = 0; + virtual void ClearMovement() = 0; + virtual void UseEnvironment() = 0; + virtual void PrimaryAttack() = 0; + virtual void ClearPrimaryAttack() = 0; + virtual void TogglePrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void OnEvent(GameEventType event, CCSEntity *entity = NULL, CCSEntity *other = NULL) = 0; + virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; + virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; + virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; + virtual bool IsPlayerFacingMe(CCSPlayer *other) const = 0; + virtual bool IsPlayerLookingAtMe(CCSPlayer *other) const = 0; + virtual void ExecuteCommand() = 0; + virtual void SetModel(const char *modelName) = 0; +}; + +class IAPI_CSBot: public IAPI_Bot { +public: + virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; + virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; + virtual void RoundRespawn() = 0; + virtual void Blind(float duration, float holdTime, float fadeTime, int alpha = 255) = 0; + virtual void OnTouchingWeapon(CCSWeaponBox *box) = 0; + virtual bool Initialize(const BotProfile *profile) = 0; + virtual void SpawnBot() = 0; + virtual void Upkeep() = 0; + virtual void Update() = 0; + virtual void Walk() = 0; + virtual bool Jump(bool mustJump = false) = 0; + virtual void OnEvent(GameEventType event, CCSEntity *entity = NULL, CCSEntity *other = NULL) = 0; + virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; + virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; + virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; +}; + +class ICSShield: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Touch(CCSEntity *pOther) = 0; +}; + +class ICSDeadHEV: public ICSMonster { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Classify() = 0; +}; + +class ICSSprayCan: public ICSEntity { +public: + virtual void Think() = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSBloodSplat: public ICSEntity { +public: +}; + class ICSWorld: public ICSEntity { public: virtual void Spawn() = 0; @@ -278,6 +378,17 @@ public: virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; }; +class ICSDecal: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; + +class ICSCorpse: public ICSEntity { +public: + virtual int ObjectCaps() = 0; +}; + class ICSGrenade: public ICSMonster { public: virtual void Spawn() = 0; @@ -437,6 +548,25 @@ public: virtual int ObjectCaps() = 0; }; +class ICSStripWeapons: public ICSPointEntity { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSInfoIntermission: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void Think() = 0; +}; + +class ICSRevertSaved: public ICSPointEntity { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + class ICSEnvGlobal: public ICSPointEntity { public: virtual void Spawn() = 0; @@ -859,6 +989,17 @@ public: virtual bool MyTouch(CCSPlayer *pPlayer) = 0; }; +class ICSWallHealth: public ICSToggle { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + class ICSItemSuit: public ICSItem { public: virtual void Spawn() = 0; @@ -915,3 +1056,1004 @@ public: virtual bool MyTouch(CCSPlayer *pPlayer) = 0; }; +class ICSGrenCatch: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Think() = 0; + virtual void Touch(CCSEntity *pOther) = 0; +}; + +class ICSFuncWeaponCheck: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Touch(CCSEntity *pOther) = 0; +}; + +class ICSHostage: public ICSMonster { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int ObjectCaps() = 0; + virtual int Classify() = 0; + virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; + virtual int BloodColor() = 0; + virtual void Touch(CCSEntity *pOther) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSLight: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void Restart() = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSEnvLight: public ICSLight { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; + +class ICSRuleEntity: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; +}; + +class ICSRulePointEntity: public ICSRuleEntity { +public: + virtual void Spawn() = 0; +}; + +class ICSRuleBrushEntity: public ICSRuleEntity { +public: + virtual void Spawn() = 0; +}; + +class ICSGameScore: public ICSRulePointEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGameEnd: public ICSRulePointEntity { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGameText: public ICSRulePointEntity { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGameTeamMaster: public ICSRulePointEntity { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int ObjectCaps() = 0; + virtual bool IsTriggered(CCSEntity *pActivator) = 0; + virtual const char *TeamID() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGameTeamSet: public ICSRulePointEntity { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGamePlayerZone: public ICSRuleBrushEntity { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGamePlayerHurt: public ICSRulePointEntity { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGameCounter: public ICSRulePointEntity { +public: + virtual void Spawn() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGameCounterSet: public ICSRulePointEntity { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGamePlayerEquip: public ICSRulePointEntity { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual void Touch(CCSEntity *pOther) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSGamePlayerTeam: public ICSRulePointEntity { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSFuncMortarField: public ICSToggle { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSMortar: public ICSGrenade { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; +}; + +class ICSMapInfo: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; + +class ICSPathCorner: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual float GetDelay() = 0; +}; + +class ICSPathTrack: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Activate() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSFuncTrackTrain: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void Restart() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void OverrideReset() = 0; + virtual bool OnControls(struct entvars_s *pev) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual void Blocked(CCSEntity *pOther) = 0; +}; + +class ICSFuncVehicleControls: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSFuncVehicle: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void Restart() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual int Classify() = 0; + virtual void OverrideReset() = 0; + virtual bool OnControls(struct entvars_s *pev) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual void Blocked(CCSEntity *pOther) = 0; +}; + +class ICSPlatTrain: public ICSToggle { +public: + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual bool IsTogglePlat() = 0; +}; + +class ICSFuncPlat: public ICSPlatTrain { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void Blocked(CCSEntity *pOther) = 0; + virtual void GoUp() = 0; + virtual void GoDown() = 0; + virtual void HitTop() = 0; + virtual void HitBottom() = 0; +}; + +class ICSPlatTrigger: public ICSEntity { +public: + virtual int ObjectCaps() = 0; + virtual void Touch(CCSEntity *pOther) = 0; +}; + +class ICSFuncPlatRot: public ICSFuncPlat { +public: + virtual void Spawn() = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void GoUp() = 0; + virtual void GoDown() = 0; + virtual void HitTop() = 0; + virtual void HitBottom() = 0; +}; + +class ICSFuncTrain: public ICSPlatTrain { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void Restart() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Activate() = 0; + virtual void OverrideReset() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual void Blocked(CCSEntity *pOther) = 0; +}; + +class ICSFuncTrainControls: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSFuncTrackChange: public ICSFuncPlatRot { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void OverrideReset() = 0; + virtual void Touch(CCSEntity *pOther) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual bool IsTogglePlat() = 0; + virtual void GoUp() = 0; + virtual void GoDown() = 0; + virtual void HitTop() = 0; + virtual void HitBottom() = 0; + virtual void UpdateAutoTargets(int toggleState) = 0; +}; + +class ICSFuncTrackAuto: public ICSFuncTrackChange { +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual void UpdateAutoTargets(int toggleState) = 0; +}; + +class ICSGunTarget: public ICSMonster { +public: + virtual void Spawn() = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Activate() = 0; + virtual int Classify() = 0; + virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; + virtual int BloodColor() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual Vector BodyTarget(const Vector &posSrc) = 0; +}; + +class ICSAmbientGeneric: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void Restart() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSEnvSound: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual void Think() = 0; +}; + +class ICSSpeaker: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSSoundEnt: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int ObjectCaps() = 0; + virtual void Think() = 0; +}; + +class ICSUSP: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSMP5N: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSSG552: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSAK47: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSAUG: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSAWP: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSC4: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual void Holster(int skiplocal) = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSDEAGLE: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; + virtual bool IsPistol() = 0; +}; + +class ICSFlashbang: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool CanDeploy() = 0; + virtual bool CanDrop() = 0; + virtual bool Deploy() = 0; + virtual void Holster(int skiplocal) = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; + virtual bool IsPistol() = 0; +}; + +class ICSG3SG1: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSGLOCK18: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSHEGrenade: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool CanDeploy() = 0; + virtual bool CanDrop() = 0; + virtual bool Deploy() = 0; + virtual void Holster(int skiplocal) = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSKnife: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool CanDrop() = 0; + virtual bool Deploy() = 0; + virtual void Holster(int skiplocal) = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSM249: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSM3: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSM4A1: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSMAC10: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSP228: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; + virtual bool IsPistol() = 0; +}; + +class ICSP90: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSSCOUT: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSSmokeGrenade: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool CanDeploy() = 0; + virtual bool CanDrop() = 0; + virtual bool Deploy() = 0; + virtual void Holster(int skiplocal) = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSTMP: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSXM1014: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSELITE: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSFiveSeven: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSUMP45: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSSG550: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSGalil: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSFamas: public ICSPlayerWeapon { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int GetItemInfo(ItemInfo *p) = 0; + virtual bool Deploy() = 0; + virtual float GetMaxSpeed() = 0; + virtual int iItemSlot() = 0; + virtual void PrimaryAttack() = 0; + virtual void SecondaryAttack() = 0; + virtual void Reload() = 0; + virtual void WeaponIdle() = 0; + virtual bool UseDecrement() = 0; +}; + +class ICSNullEntity: public ICSEntity { +public: + virtual void Spawn() = 0; +}; + +class ICSDMStart: public ICSPointEntity { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual bool IsTriggered(CCSEntity *pEntity) = 0; +}; + +class ICSFrictionModifier: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSAutoTrigger: public ICSDelay { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Think() = 0; +}; + +class ICSTriggerRelay: public ICSDelay { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSMultiManager: public ICSToggle { +public: + virtual void Spawn() = 0; + virtual void Restart() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual bool HasTarget(string_t targetname) = 0; +}; + +class ICSRenderFxManager: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSTrigger: public ICSToggle { +public: + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int ObjectCaps() = 0; +}; + +class ICSTriggerHurt: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerMonsterJump: public ICSTrigger { +public: + virtual void Spawn() = 0; + virtual void Think() = 0; + virtual void Touch(CCSEntity *pOther) = 0; +}; + +class ICSTriggerCDAudio: public ICSTrigger { +public: + virtual void Spawn() = 0; + virtual void Touch(CCSEntity *pOther) = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSTargetCDAudio: public ICSPointEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual void Think() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSTriggerMultiple: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerOnce: public ICSTriggerMultiple { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerCounter: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerVolume: public ICSPointEntity { +public: + virtual void Spawn() = 0; +}; + +class ICSFireAndDie: public ICSDelay { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual int ObjectCaps() = 0; + virtual void Think() = 0; +}; + +class ICSChangeLevel: public ICSTrigger { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; +}; + +class ICSLadder: public ICSTrigger { +public: + virtual void Spawn() = 0; + virtual void Precache() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; + +class ICSTriggerPush: public ICSTrigger { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual void Touch(CCSEntity *pOther) = 0; +}; + +class ICSTriggerTeleport: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSBuyZone: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSBombTarget: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSHostageRescue: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSEscapeZone: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSVIP_SafetyZone: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerSave: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerEndSection: public ICSTrigger { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; + +class ICSTriggerGravity: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSTriggerChangeTarget: public ICSDelay { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSTriggerCamera: public ICSDelay { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; + virtual int Save(CSave &save) = 0; + virtual int Restore(CRestore &restore) = 0; + virtual int ObjectCaps() = 0; + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; +}; + +class ICSWeather: public ICSTrigger { +public: + virtual void Spawn() = 0; +}; + +class ICSClientFog: public ICSEntity { +public: + virtual void Spawn() = 0; + virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; +}; diff --git a/regamedll/regamedll/regamedll_interfaces_impl.cpp b/regamedll/regamedll/regamedll_interfaces_impl.cpp index af9b19fe..68c228ca 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.cpp +++ b/regamedll/regamedll/regamedll_interfaces_impl.cpp @@ -40,11 +40,13 @@ void Regamedll_AllocEntities(int maxEdicts) g_GameEntities = (CCSEntity **)Q_malloc(sizeof(CCSEntity *) * maxEdicts); Q_memset(g_GameEntities, 0, sizeof(CCSEntity *) * maxEdicts); +#ifdef _DEBUG CONSOLE_ECHO(__FUNCTION__":: alloc entities!\n"); - ADD_SERVER_COMMAND("check", [](){ + ADD_SERVER_COMMAND("check_ent", [](){ Regamedll_MonitorEntities(); }); +#endif } void Regamedll_FreeEntities(CBaseEntity *pEntity) @@ -70,7 +72,9 @@ void Regamedll_FreeEntities(CBaseEntity *pEntity) delete g_GameEntities[index]; g_GameEntities[index] = NULL; +#ifdef _DEBUG CONSOLE_ECHO(__FUNCTION__ ":: Free on (#%d. %s)\n", index, STRING(pEntity->edict()->v.classname)); +#endif } void Regamedll_MonitorEntities() @@ -102,6 +106,12 @@ ICSPlayer *CBASE_TO_CSPLAYER(CBaseEntity *pEntity) return reinterpret_cast(g_GameEntities[index]); } +ICSPlayer *INDEX_TO_CSPLAYER(int iPlayerIndex) +{ + CBaseEntity *pEntity = CBaseEntity::Instance(iPlayerIndex); + return CBASE_TO_CSPLAYER(pEntity); +} + ICSEntity *CBASE_TO_CSENTITY(CBaseEntity *pEntity) { if (pEntity == NULL) @@ -116,3 +126,9 @@ ICSEntity *CBASE_TO_CSENTITY(CBaseEntity *pEntity) return g_GameEntities[index]; } + +ICSEntity *INDEX_TO_CSENTITY(int iEntityIndex) +{ + CBaseEntity *pEntity = CBaseEntity::Instance(iEntityIndex); + return CBASE_TO_CSENTITY(pEntity); +} diff --git a/regamedll/regamedll/regamedll_interfaces_impl.h b/regamedll/regamedll/regamedll_interfaces_impl.h index e7e8c323..188e3c0f 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.h +++ b/regamedll/regamedll/regamedll_interfaces_impl.h @@ -39,6 +39,8 @@ class CCSquadMonster; extern CCSEntity **g_GameEntities; extern ICSEntity *CBASE_TO_CSENTITY(CBaseEntity *pEntity); extern ICSPlayer *CBASE_TO_CSPLAYER(CBaseEntity *pEntity); +extern ICSPlayer *INDEX_TO_CSPLAYER(int iPlayerIndex); +extern ICSEntity *INDEX_TO_CSENTITY(int iEntityIndex); class CCSEntity: public ICSEntity { public: @@ -62,7 +64,7 @@ public: virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } virtual int BloodColor() { return m_pEntity->BloodColor(); } virtual void TraceBleed(float flDamage, Vector vecDir, TraceResult *ptr, int bitsDamageType) { m_pEntity->TraceBleed(flDamage, vecDir, ptr, bitsDamageType); } - virtual bool IsTriggered(CCSEntity *pActivator) { return m_pEntity->IsTriggered(pActivator->m_pEntity) ? TRUE : FALSE; } + virtual bool IsTriggered(CCSEntity *pActivator) { return m_pEntity->IsTriggered(pActivator->m_pEntity) ? true : false; } virtual ICSMonster *MyMonsterPointer() { return (ICSMonster *)CBASE_TO_CSENTITY(m_pEntity->MyMonsterPointer()); } virtual ICSquadMonster *MySquadMonsterPointer() { return (ICSquadMonster *)m_pEntity->MySquadMonsterPointer(); } virtual int GetToggleState() { return m_pEntity->GetToggleState(); } @@ -208,6 +210,16 @@ public: virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } }; +class CCSArmoury: public CCSEntity { +public: + CCSArmoury(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + class CCSPlayer: public CCSMonster { private: bool m_bConnected; @@ -259,6 +271,98 @@ public: virtual bool IsConnected() const { return m_bConnected; } }; +class CAPI_Bot: public CCSPlayer { +public: + CAPI_Bot(CBaseEntity *pEntity) : CCSPlayer(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } + virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } + virtual void Think() { m_pEntity->Think(); } + virtual bool IsBot() { return ((CBot *)m_pEntity)->IsBot() ? true : false; } + virtual Vector GetAutoaimVector(float flDelta) { return ((CBot *)m_pEntity)->GetAutoaimVector(flDelta); } + virtual void OnTouchingWeapon(CCSWeaponBox *box) { ((CBot *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)box->m_pEntity); } + virtual bool Initialize(const BotProfile *profile) { ((CBot *)m_pEntity)->Initialize(profile); } + virtual void SpawnBot() = 0; + virtual void Upkeep() = 0; + virtual void Update() = 0; + virtual void Run() { ((CBot *)m_pEntity)->Run(); } + virtual void Walk() { ((CBot *)m_pEntity)->Walk(); } + virtual void Crouch() { ((CBot *)m_pEntity)->Crouch(); } + virtual void StandUp() { ((CBot *)m_pEntity)->StandUp(); } + virtual void MoveForward() { ((CBot *)m_pEntity)->MoveForward(); } + virtual void MoveBackward() { ((CBot *)m_pEntity)->MoveBackward(); } + virtual void StrafeLeft() { ((CBot *)m_pEntity)->StrafeLeft(); } + virtual void StrafeRight() { ((CBot *)m_pEntity)->StrafeRight(); } + virtual bool Jump(bool mustJump) { return ((CBot *)m_pEntity)->Jump(mustJump); } + virtual void ClearMovement() { ((CBot *)m_pEntity)->ClearMovement(); } + virtual void UseEnvironment() { ((CBot *)m_pEntity)->UseEnvironment(); } + virtual void PrimaryAttack() { ((CBot *)m_pEntity)->PrimaryAttack(); } + virtual void ClearPrimaryAttack() { ((CBot *)m_pEntity)->ClearPrimaryAttack(); } + virtual void TogglePrimaryAttack() { ((CBot *)m_pEntity)->TogglePrimaryAttack(); } + virtual void SecondaryAttack() { ((CBot *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBot *)m_pEntity)->Reload(); } + virtual void OnEvent(GameEventType event, CCSEntity *entity, CCSEntity *other) { ((CBot *)m_pEntity)->OnEvent(event, entity->m_pEntity, other->m_pEntity); } + virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; + virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; + virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; + virtual bool IsPlayerFacingMe(CCSPlayer *other) const { return ((CBot *)m_pEntity)->IsPlayerFacingMe((CBasePlayer *)other->m_pEntity); } + virtual bool IsPlayerLookingAtMe(CCSPlayer *other) const { return ((CBot *)m_pEntity)->IsPlayerLookingAtMe((CBasePlayer *)other->m_pEntity); } + virtual void ExecuteCommand() { ((CBot *)m_pEntity)->ExecuteCommand(); } + virtual void SetModel(const char *modelName) { ((CBot *)m_pEntity)->SetModel(modelName); } +}; + +class CAPI_CSBot: public CAPI_Bot { +public: + CAPI_CSBot(CBaseEntity *pEntity) : CAPI_Bot(pEntity) {} +public: + virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } + virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } + virtual void RoundRespawn() { ((CCSBot *)m_pEntity)->RoundRespawn(); } + virtual void Blind(float duration, float holdTime, float fadeTime, int alpha) { ((CCSBot *)m_pEntity)->Blind(duration, holdTime, fadeTime, alpha); } + virtual void OnTouchingWeapon(CCSWeaponBox *box) { ((CCSBot *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)box->m_pEntity); } + virtual bool Initialize(const BotProfile *profile) { return ((CCSBot *)m_pEntity)->Initialize(profile); } + virtual void SpawnBot() { ((CCSBot *)m_pEntity)->SpawnBot(); } + virtual void Upkeep() { ((CCSBot *)m_pEntity)->Upkeep(); } + virtual void Update() { ((CCSBot *)m_pEntity)->Update(); } + virtual void Walk() { ((CCSBot *)m_pEntity)->Walk(); } + virtual bool Jump(bool mustJump) { return ((CCSBot *)m_pEntity)->Jump(); } + virtual void OnEvent(GameEventType event, CCSEntity *entity, CCSEntity *other) { ((CCSBot *)m_pEntity)->OnEvent(event, entity->m_pEntity, other->m_pEntity); } + virtual bool IsVisible(const Vector *pos, bool testFOV) const { return ((CCSBot *)m_pEntity)->IsVisible(pos, testFOV); } + virtual bool IsVisible(CCSPlayer *player, bool testFOV, unsigned char *visParts) const { return ((CCSBot *)m_pEntity)->IsVisible((CBasePlayer *)player->m_pEntity, testFOV, visParts); } + virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const { return ((CCSBot *)m_pEntity)->IsEnemyPartVisible((CBot::VisiblePartType)part); } +}; + +class CCSShield: public CCSEntity { +public: + CCSShield(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } +}; + +class CCSDeadHEV: public CCSMonster { +public: + CCSDeadHEV(CBaseEntity *pEntity) : CCSMonster(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Classify() { return m_pEntity->Classify(); } +}; + +class CCSSprayCan: public CCSEntity { +public: + CCSSprayCan(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Think() { m_pEntity->Think(); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSBloodSplat: public CCSEntity { +public: + CCSBloodSplat(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +}; + class CCSPlayerWeapon: public CCSPlayerItem { public: CCSPlayerWeapon(CBaseEntity *pEntity) : CCSPlayerItem(pEntity) {} @@ -292,8 +396,7 @@ public: virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } }; -class CCSWorld: public CCSEntity -{ +class CCSWorld: public CCSEntity { public: CCSWorld(CBaseEntity *pEntity) : CCSEntity(pEntity) {} public: @@ -302,6 +405,21 @@ public: virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } }; +class CCSDecal: public CCSEntity { +public: + CCSDecal(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + +class CCSCorpse: public CCSEntity { +public: + CCSCorpse(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + class CCSGrenade: public CCSMonster { public: CCSGrenade(CBaseEntity *pEntity) : CCSMonster(pEntity) {} @@ -503,6 +621,31 @@ public: virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } }; +class CCSStripWeapons: public CCSPointEntity { +public: + CCSStripWeapons(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSInfoIntermission: public CCSPointEntity { +public: + CCSInfoIntermission(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Think() { m_pEntity->Think(); } +}; + +class CCSRevertSaved: public CCSPointEntity { +public: + CCSRevertSaved(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + class CCSEnvGlobal: public CCSPointEntity { public: CCSEnvGlobal(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} @@ -914,11 +1057,6 @@ public: virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } }; - - - - - class CCSRecharge: public CCSToggle { public: CCSRecharge(CBaseEntity *pEntity) : CCSToggle(pEntity) {} @@ -1024,6 +1162,19 @@ public: virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CHealthKit *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } }; +class CCSWallHealth: public CCSToggle { +public: + CCSWallHealth(CBaseEntity *pEntity) : CCSToggle(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + class CCSItemSuit: public CCSItem { public: CCSItemSuit(CBaseEntity *pEntity) : CCSItem(pEntity) {} @@ -1096,8 +1247,1219 @@ public: virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemThighPack *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } }; +class CCSGrenCatch: public CCSEntity { +public: + CCSGrenCatch(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Think() { m_pEntity->Think(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } +}; +class CCSFuncWeaponCheck: public CCSEntity { +public: + CCSFuncWeaponCheck(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } +}; +class CCSHostage: public CCSMonster { +public: + CCSHostage(CBaseEntity *pEntity) : CCSMonster(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual int Classify() { return m_pEntity->Classify(); } + virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } + virtual int BloodColor() { return m_pEntity->BloodColor(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSLight: public CCSPointEntity { +public: + CCSLight(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSEnvLight: public CCSLight { +public: + CCSEnvLight(CBaseEntity *pEntity) : CCSLight(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + +class CCSRuleEntity: public CCSEntity { +public: + CCSRuleEntity(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } +}; + +class CCSRulePointEntity: public CCSRuleEntity { +public: + CCSRulePointEntity(CBaseEntity *pEntity) : CCSRuleEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSRuleBrushEntity: public CCSRuleEntity { +public: + CCSRuleBrushEntity(CBaseEntity *pEntity) : CCSRuleEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSGameScore: public CCSRulePointEntity { +public: + CCSGameScore(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGameEnd: public CCSRulePointEntity { +public: + CCSGameEnd(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGameText: public CCSRulePointEntity { +public: + CCSGameText(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGameTeamMaster: public CCSRulePointEntity { +public: + CCSGameTeamMaster(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int ObjectCaps() { m_pEntity->ObjectCaps(); } + virtual bool IsTriggered(CCSEntity *pActivator) { return m_pEntity->IsTriggered(pActivator->m_pEntity) ? true : false; } + virtual const char *TeamID() { return m_pEntity->TeamID(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGameTeamSet: public CCSRulePointEntity { +public: + CCSGameTeamSet(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGamePlayerZone: public CCSRuleBrushEntity { +public: + CCSGamePlayerZone(CBaseEntity *pEntity) : CCSRuleBrushEntity(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGamePlayerHurt: public CCSRulePointEntity { +public: + CCSGamePlayerHurt(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGameCounter: public CCSRulePointEntity { +public: + CCSGameCounter(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGameCounterSet: public CCSRulePointEntity { +public: + CCSGameCounterSet(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGamePlayerEquip: public CCSRulePointEntity { +public: + CCSGamePlayerEquip(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSGamePlayerTeam: public CCSRulePointEntity { +public: + CCSGamePlayerTeam(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSFuncMortarField: public CCSToggle { +public: + CCSFuncMortarField(CBaseEntity *pEntity) : CCSToggle(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSMortar: public CCSGrenade { +public: + CCSMortar(CBaseEntity *pEntity) : CCSGrenade(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } +}; + +class CCSMapInfo: public CCSPointEntity { +public: + CCSMapInfo(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + +class CCSPathCorner: public CCSPointEntity { +public: + CCSPathCorner(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual float GetDelay() { return m_pEntity->GetDelay(); } +}; + +class CCSPathTrack: public CCSPointEntity { +public: + CCSPathTrack(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Activate() { m_pEntity->Activate(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSFuncTrackTrain: public CCSEntity { +public: + CCSFuncTrackTrain(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void OverrideReset() { m_pEntity->OverrideReset(); } + virtual bool OnControls(entvars_t *pev) { return m_pEntity->OnControls(pev) ? true : false; } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } +}; + +class CCSFuncVehicleControls: public CCSEntity { +public: + CCSFuncVehicleControls(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSFuncVehicle: public CCSEntity { +public: + CCSFuncVehicle(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual int Classify() { return m_pEntity->Classify(); } + virtual void OverrideReset() { m_pEntity->OverrideReset(); } + virtual bool OnControls(entvars_t *pev) { return m_pEntity->OnControls(pev) ? true : false; } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } +}; + +class CCSPlatTrain: public CCSToggle { +public: + CCSPlatTrain(CBaseEntity *pEntity) : CCSToggle(pEntity) {} +public: + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual bool IsTogglePlat() { return ((CBasePlatTrain *)m_pEntity)->IsTogglePlat() ? true : false; } +}; + +class CCSFuncPlat: public CCSPlatTrain { +public: + CCSFuncPlat(CBaseEntity *pEntity) : CCSPlatTrain(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } + virtual void GoUp() { ((CFuncPlat *)m_pEntity)->GoUp(); } + virtual void GoDown() { ((CFuncPlat *)m_pEntity)->GoDown(); } + virtual void HitTop() { ((CFuncPlat *)m_pEntity)->HitTop(); } + virtual void HitBottom() { ((CFuncPlat *)m_pEntity)->HitBottom(); } +}; + +class CCSPlatTrigger: public CCSEntity { +public: + CCSPlatTrigger(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } +}; + +class CCSFuncPlatRot: public CCSFuncPlat { +public: + CCSFuncPlatRot(CBaseEntity *pEntity) : CCSFuncPlat(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void GoUp() { ((CFuncPlatRot *)m_pEntity)->GoUp(); } + virtual void GoDown() { ((CFuncPlatRot *)m_pEntity)->GoDown(); } + virtual void HitTop() { ((CFuncPlatRot *)m_pEntity)->HitTop(); } + virtual void HitBottom() { ((CFuncPlatRot *)m_pEntity)->HitBottom(); } +}; + +class CCSFuncTrain: public CCSPlatTrain { +public: + CCSFuncTrain(CBaseEntity *pEntity) : CCSPlatTrain(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Activate() { m_pEntity->Activate(); } + virtual void OverrideReset() { m_pEntity->OverrideReset(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } +}; + +class CCSFuncTrainControls: public CCSEntity { +public: + CCSFuncTrainControls(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSFuncTrackChange: public CCSFuncPlatRot { +public: + CCSFuncTrackChange(CBaseEntity *pEntity) : CCSFuncPlatRot(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void OverrideReset() { m_pEntity->OverrideReset(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual bool IsTogglePlat() { return ((CFuncTrackChange *)m_pEntity)->IsTogglePlat() ? true : false; } + virtual void GoUp() { ((CFuncTrackChange *)m_pEntity)->GoUp(); } + virtual void GoDown() { ((CFuncTrackChange *)m_pEntity)->GoDown(); } + virtual void HitTop() { ((CFuncTrackChange *)m_pEntity)->HitTop(); } + virtual void HitBottom() { ((CFuncTrackChange *)m_pEntity)->HitBottom(); } + virtual void UpdateAutoTargets(int toggleState) { ((CFuncTrackChange *)m_pEntity)->UpdateAutoTargets(toggleState); } +}; + +class CCSFuncTrackAuto: public CCSFuncTrackChange { +public: + CCSFuncTrackAuto(CBaseEntity *pEntity) : CCSFuncTrackChange(pEntity) {} +public: + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual void UpdateAutoTargets(int toggleState) { ((CFuncTrackAuto *)m_pEntity)->UpdateAutoTargets(toggleState); } +}; + +class CCSGunTarget: public CCSMonster { +public: + CCSGunTarget(CBaseEntity *pEntity) : CCSMonster(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Activate() { m_pEntity->Activate(); } + virtual int Classify() { return m_pEntity->Classify(); } + virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } + virtual int BloodColor() { return m_pEntity->BloodColor(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual Vector BodyTarget(const Vector &posSrc) { return m_pEntity->BodyTarget(posSrc); } +}; + +class CCSAmbientGeneric: public CCSEntity { +public: + CCSAmbientGeneric(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSEnvSound: public CCSPointEntity { +public: + CCSEnvSound(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual void Think() { m_pEntity->Think(); } +}; + +class CCSSpeaker: public CCSEntity { +public: + CCSSpeaker(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSSoundEnt: public CCSEntity { +public: + CCSSoundEnt(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Think() { m_pEntity->Think(); } +}; + +class CCSUSP: public CCSPlayerWeapon { +public: + CCSUSP(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSMP5N: public CCSPlayerWeapon { +public: + CCSMP5N(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSSG552: public CCSPlayerWeapon { +public: + CCSSG552(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSAK47: public CCSPlayerWeapon { +public: + CCSAK47(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSAUG: public CCSPlayerWeapon { +public: + CCSAUG(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSAWP: public CCSPlayerWeapon { +public: + CCSAWP(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSC4: public CCSPlayerWeapon { +public: + CCSC4(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSDEAGLE: public CCSPlayerWeapon { +public: + CCSDEAGLE(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } + virtual bool IsPistol() { return ((CDEAGLE *)m_pEntity)->IsPistol() ? true : false; } +}; + +class CCSFlashbang: public CCSPlayerWeapon { +public: + CCSFlashbang(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } + virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } + virtual bool IsPistol() { return ((CFlashbang *)m_pEntity)->IsPistol() ? true : false; } +}; + +class CCSG3SG1: public CCSPlayerWeapon { +public: + CCSG3SG1(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSGLOCK18: public CCSPlayerWeapon { +public: + CCSGLOCK18(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSHEGrenade: public CCSPlayerWeapon { +public: + CCSHEGrenade(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } + virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSKnife: public CCSPlayerWeapon { +public: + CCSKnife(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool CanDrop() { return ((CBasePlayerWeapon *)m_pEntity)->CanDrop() ? true : false; } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSM249: public CCSPlayerWeapon { +public: + CCSM249(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSM3: public CCSPlayerWeapon { +public: + CCSM3(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSM4A1: public CCSPlayerWeapon { +public: + CCSM4A1(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSMAC10: public CCSPlayerWeapon { +public: + CCSMAC10(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSP228: public CCSPlayerWeapon { +public: + CCSP228(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } + virtual bool IsPistol() { return ((CP228 *)m_pEntity)->IsPistol() ? true : false; } +}; + +class CCSP90: public CCSPlayerWeapon { +public: + CCSP90(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSSCOUT: public CCSPlayerWeapon { +public: + CCSSCOUT(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSSmokeGrenade: public CCSPlayerWeapon { +public: + CCSSmokeGrenade(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } + virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSTMP: public CCSPlayerWeapon { +public: + CCSTMP(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSXM1014: public CCSPlayerWeapon { +public: + CCSXM1014(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSELITE: public CCSPlayerWeapon { +public: + CCSELITE(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSFiveSeven: public CCSPlayerWeapon { +public: + CCSFiveSeven(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSUMP45: public CCSPlayerWeapon { +public: + CCSUMP45(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSSG550: public CCSPlayerWeapon { +public: + CCSSG550(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSGalil: public CCSPlayerWeapon { +public: + CCSGalil(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSFamas: public CCSPlayerWeapon { +public: + CCSFamas(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } + virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } + virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } + virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } + virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } + virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } + virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } + virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } + virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } +}; + +class CCSNullEntity: public CCSEntity { +public: + CCSNullEntity(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSDMStart: public CCSPointEntity { +public: + CCSDMStart(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual bool IsTriggered(CCSEntity *pEntity) { return m_pEntity->IsTriggered(pEntity->m_pEntity) ? true : false; } +}; + +class CCSFrictionModifier: public CCSEntity { +public: + CCSFrictionModifier(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSAutoTrigger: public CCSDelay { +public: + CCSAutoTrigger(CBaseEntity *pEntity) : CCSDelay(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Think() { m_pEntity->Think(); } +}; + +class CCSTriggerRelay: public CCSDelay { +public: + CCSTriggerRelay(CBaseEntity *pEntity) : CCSDelay(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSMultiManager: public CCSToggle { +public: + CCSMultiManager(CBaseEntity *pEntity) : CCSToggle(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Restart() { m_pEntity->Restart(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual bool HasTarget(string_t targetname) { m_pEntity->HasTarget(targetname) ? true : false; } +}; + +class CCSRenderFxManager: public CCSEntity { +public: + CCSRenderFxManager(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSTrigger: public CCSToggle { +public: + CCSTrigger(CBaseEntity *pEntity) : CCSToggle(pEntity) {} +public: + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } +}; + +class CCSTriggerHurt: public CCSTrigger { +public: + CCSTriggerHurt(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerMonsterJump: public CCSTrigger { +public: + CCSTriggerMonsterJump(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Think() { m_pEntity->Think(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } +}; + +class CCSTriggerCDAudio: public CCSTrigger { +public: + CCSTriggerCDAudio(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSTargetCDAudio: public CCSPointEntity { +public: + CCSTargetCDAudio(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual void Think() { m_pEntity->Think(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSTriggerMultiple: public CCSTrigger { +public: + CCSTriggerMultiple(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerOnce: public CCSTriggerMultiple { +public: + CCSTriggerOnce(CBaseEntity *pEntity) : CCSTriggerMultiple(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerCounter: public CCSTrigger { +public: + CCSTriggerCounter(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerVolume: public CCSPointEntity { +public: + CCSTriggerVolume(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSFireAndDie: public CCSDelay { +public: + CCSFireAndDie(CBaseEntity *pEntity) : CCSDelay(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Think() { m_pEntity->Think(); } +}; + +class CCSChangeLevel: public CCSTrigger { +public: + CCSChangeLevel(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } +}; + +class CCSLadder: public CCSTrigger { +public: + CCSLadder(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void Precache() { m_pEntity->Precache(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + +class CCSTriggerPush: public CCSTrigger { +public: + CCSTriggerPush(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } +}; + +class CCSTriggerTeleport: public CCSTrigger { +public: + CCSTriggerTeleport(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSBuyZone: public CCSTrigger { +public: + CCSBuyZone(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSBombTarget: public CCSTrigger { +public: + CCSBombTarget(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSHostageRescue: public CCSTrigger { +public: + CCSHostageRescue(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSEscapeZone: public CCSTrigger { +public: + CCSEscapeZone(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSVIP_SafetyZone: public CCSTrigger { +public: + CCSVIP_SafetyZone(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerSave: public CCSTrigger { +public: + CCSTriggerSave(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerEndSection: public CCSTrigger { +public: + CCSTriggerEndSection(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + +class CCSTriggerGravity: public CCSTrigger { +public: + CCSTriggerGravity(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSTriggerChangeTarget: public CCSDelay { +public: + CCSTriggerChangeTarget(CBaseEntity *pEntity) : CCSDelay(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSTriggerCamera: public CCSDelay { +public: + CCSTriggerCamera(CBaseEntity *pEntity) : CCSDelay(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } + virtual int Save(CSave &save) { return m_pEntity->Save(save); } + virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } + virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } + virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } +}; + +class CCSWeather: public CCSTrigger { +public: + CCSWeather(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } +}; + +class CCSClientFog: public CCSEntity { +public: + CCSClientFog(CBaseEntity *pEntity) : CCSEntity(pEntity) {} +public: + virtual void Spawn() { m_pEntity->Spawn(); } + virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } +}; + +template +inline T *Regamedll_InitializeEntities(CBaseEntity *a) +{ + int index = a->entindex(); + g_GameEntities[index] = new T (a); + return reinterpret_cast(g_GameEntities[index]); +} inline CCSPlayer *CSPlayer(int iPlayerNum) { return reinterpret_cast(g_GameEntities[iPlayerNum]); } inline CCSPlayer *CSPlayer(const edict_t *pEdict) { return CSPlayer(ENTINDEX(pEdict)); }