mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
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
This commit is contained in:
parent
7b227c0edb
commit
9b955f2672
@ -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)()
|
||||
|
@ -35,7 +35,6 @@
|
||||
class CAirtank: public CGrenade
|
||||
{
|
||||
public:
|
||||
CAirtank();
|
||||
virtual void Spawn();
|
||||
virtual void Precache();
|
||||
virtual int Save(CSave &save);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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<CCSEntity>((CBaseEntity *)pevInflictor);
|
||||
|
||||
// if we were attacked by a teammate, rebuke
|
||||
if (attacker->IsPlayer())
|
||||
|
@ -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();
|
||||
|
@ -347,7 +347,7 @@ void CCSBotManager::__MAKE_VHOOK(ClientDisconnect)(CBasePlayer *pPlayer)
|
||||
|
||||
FREE_PRIVATE(pPlayer->edict());
|
||||
|
||||
CBasePlayer *player = GetClassPtr((CBasePlayer *)temp);
|
||||
CBasePlayer *player = GetClassPtr<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)pEntity->pev);
|
||||
|
||||
if (playerOrBot->IsBot())
|
||||
{
|
||||
@ -1189,7 +1189,7 @@ bool CCSBotManager::AddBot(const BotProfile *profile, BotProfileTeamType team)
|
||||
return false;
|
||||
}
|
||||
|
||||
CCSBot *pBot = CreateBot<CCSBot>(profile);
|
||||
CCSBot *pBot = CreateBot<CCSBot, CAPI_CSBot>(profile);
|
||||
if (pBot == NULL)
|
||||
{
|
||||
return false;
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 <class T>
|
||||
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<T *>(g_GameEntities[index]);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
template <class TWrap, class T>
|
||||
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;
|
||||
|
@ -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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)pev), pcmd))
|
||||
return;
|
||||
|
||||
if (TheBots != NULL)
|
||||
{
|
||||
if (TheBots->ClientCommand(GetClassPtr((CBasePlayer *)pev), pcmd))
|
||||
if (TheBots->ClientCommand(GetClassPtr<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)pev)->m_iFOV)));
|
||||
#endif
|
||||
}
|
||||
else if (FStrEq(pcmd, "use"))
|
||||
{
|
||||
GetClassPtr((CBasePlayer *)pev)->SelectItem(CMD_ARGV_(1));
|
||||
GetClassPtr<CCSPlayer>((CBasePlayer *)pev)->SelectItem(CMD_ARGV_(1));
|
||||
}
|
||||
else if (((pstr = Q_strstr(pcmd, "weapon_")) != NULL) && (pstr == pcmd))
|
||||
{
|
||||
GetClassPtr((CBasePlayer *)pev)->SelectItem(pcmd);
|
||||
GetClassPtr<CCSPlayer>((CBasePlayer *)pev)->SelectItem(pcmd);
|
||||
}
|
||||
else if (FStrEq(pcmd, "lastinv"))
|
||||
{
|
||||
GetClassPtr((CBasePlayer *)pev)->SelectLastItem();
|
||||
GetClassPtr<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)&pEntity->v), infobuffer);
|
||||
}
|
||||
|
||||
void EXT_FUNC ServerDeactivate()
|
||||
|
@ -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<CCSGib>((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<CCSGib>((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<CCSGib>((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;
|
||||
|
||||
|
@ -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<CCSDoor>((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)()
|
||||
|
@ -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);
|
||||
|
@ -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<CCSBeam>((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<CCSSprite>((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<CCSGib>((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<CCSGib>((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)()
|
||||
{
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)()
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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<CCSGrenade>((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<CCSGrenade>((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<CCSGrenade>((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<CCSPlayer>((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<CCSGrenade>((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<CCSGrenade>((CGrenade *)NULL);
|
||||
pGrenade->Spawn();
|
||||
|
||||
UTIL_SetOrigin(pGrenade->pev, vecStart);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -35,7 +35,6 @@
|
||||
class CRecharge: public CBaseToggle
|
||||
{
|
||||
public:
|
||||
CRecharge();
|
||||
virtual void Spawn();
|
||||
virtual void Precache();
|
||||
virtual void KeyValue(KeyValueData *pkvd);
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -35,7 +35,6 @@
|
||||
class CHealthKit: public CItem
|
||||
{
|
||||
public:
|
||||
CHealthKit();
|
||||
virtual void Spawn();
|
||||
virtual void Precache();
|
||||
virtual BOOL MyTouch(CBasePlayer *pPlayer);
|
||||
|
@ -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<CCSPlayer>((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<CCSEntity>((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<CCSPlayer>((CBasePlayer *)pevAttacker);
|
||||
}
|
||||
}
|
||||
|
||||
@ -820,7 +820,7 @@ void CHostage::DoFollow()
|
||||
return;
|
||||
}
|
||||
|
||||
pFollowing = GetClassPtr((CBaseEntity *)m_hTargetEnt->pev);
|
||||
pFollowing = GetClassPtr<CCSEntity>((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<CCSEntity>((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<CCSEntity>((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<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)pEntity->pev);
|
||||
|
||||
if (pTempPlayer->pev->deadflag == DEAD_NO && pTempPlayer->m_iTeam == CT)
|
||||
{
|
||||
|
@ -801,7 +801,7 @@ void CLocalNav::Think()
|
||||
|
||||
if (hCallback)
|
||||
{
|
||||
CHostage *pHostage = GetClassPtr((CHostage *)hCallback->pev);
|
||||
CHostage *pHostage = GetClassPtr<CCSHostage>((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<CCSHostage>((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<CCSHostage>((CHostage *)hostages[ iCount ]->pev)->PreThink();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)pPlayer->pev);
|
||||
CBasePlayer *target = GetClassPtr<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((CBasePlayer *)pTempEntity->pev);
|
||||
|
||||
if (pTempPlayer->m_iTeam != UNASSIGNED)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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<CCSPlatTrigger>((CPlatTrigger *)NULL)->SpawnInsideTrigger(GetClassPtr<CCSFuncPlat>((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)()
|
||||
|
@ -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
|
||||
|
@ -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<CCSPlayer>((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<CCSPlayer>((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<CCSEntity>((CBaseEntity *)pevInflictor);
|
||||
|
||||
if (!Q_strcmp(STRING(temp->pev->classname), "grenade"))
|
||||
{
|
||||
CGrenade *pGrenade = GetClassPtr((CGrenade *)pevInflictor);
|
||||
CGrenade *pGrenade = GetClassPtr<CCSGrenade>((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 *>(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<CCSEntity>((CBaseEntity *)pevAttacker);
|
||||
|
||||
if (pAttacker->IsPlayer())
|
||||
{
|
||||
pAttack = GetClassPtr((CBasePlayer *)pevAttacker);
|
||||
pAttack = GetClassPtr<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSPlayer>((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<CCSSprayCan>((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<CCSBloodSplat>((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<CCSPlayer>((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<CCSPlayer>((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()
|
||||
{
|
||||
|
@ -352,7 +352,6 @@ public:
|
||||
class CBasePlayer: public CBaseMonster
|
||||
{
|
||||
public:
|
||||
CBasePlayer();
|
||||
virtual void Spawn();
|
||||
virtual void Precache();
|
||||
virtual int Save(CSave &save);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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<CCSEnvSound>((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<CCSPlayer>((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
|
||||
|
@ -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()
|
||||
|
@ -79,7 +79,6 @@ public:
|
||||
class CSoundEnt: public CBaseEntity
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void Spawn();
|
||||
virtual void Precache();
|
||||
virtual int ObjectCaps() { return FCAP_DONT_SAVE; }
|
||||
|
@ -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<CCSDelay>((CBaseDelay *)NULL);
|
||||
|
||||
MAKE_STRING_CLASS("DelayedUse", pTemp->pev);
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -36,7 +36,6 @@ class CHalfLifeTraining: public CHalfLifeMultiplay
|
||||
{
|
||||
public:
|
||||
CHalfLifeTraining();
|
||||
|
||||
virtual BOOL IsMultiplayer() { return FALSE; }
|
||||
virtual BOOL IsDeathmatch();
|
||||
virtual void InitHUD(CBasePlayer *pl);
|
||||
|
@ -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<CCSMultiManager>((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<CCSPlayer>((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<CCSFireAndDie>((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<CCSChangeLevel>((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<CCSChangeLevel>((CChangeLevel *)NULL);
|
||||
Q_strcpy(pChange->m_szMapName, "start");
|
||||
}
|
||||
else
|
||||
pChange = GetClassPtr((CChangeLevel *)VARS(pent));
|
||||
pChange = GetClassPtr<CCSChangeLevel>((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);
|
||||
|
@ -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
|
||||
|
@ -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<DLLClassWrapName>((DLLClassName *)pev);\
|
||||
}
|
||||
|
||||
#define LINK_CLASS_TO_WRAP(className, classNameWrap)\
|
||||
className::className()\
|
||||
{\
|
||||
GetClassPtrWrap<classNameWrap>(this);\
|
||||
}\
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ignore_monsters = 1,
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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<CCSPlayer>((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<CCSPlayer>((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);
|
||||
|
@ -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();
|
||||
|
@ -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<CCSSoundEnt>((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.
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)()
|
||||
{
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
class BotProfile;
|
||||
|
||||
template <class T>
|
||||
template <class T, class TWrap>
|
||||
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<TWrap>((T *)VARS(pentBot));
|
||||
pBot->Initialize(profile);
|
||||
|
||||
return pBot;
|
||||
|
@ -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];
|
||||
|
@ -91,7 +91,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <unistd.h>
|
||||
#include <typeinfo>
|
||||
|
||||
// Deail with stupid macro in kernel.h
|
||||
#undef __FUNCTION__
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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<ICSPlayer *>(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);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user