From 06b0c161452a9f8c30cabf30ab520a9f405fe025 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Tue, 31 May 2016 20:04:51 +0600 Subject: [PATCH] Refactoring API --- regamedll/dlls/bot/cs_bot.cpp | 22 +- regamedll/dlls/bot/cs_bot_chatter.cpp | 4 +- regamedll/dlls/bot/cs_bot_manager.cpp | 4 +- regamedll/dlls/bot/cs_bot_pathfind.cpp | 2 +- regamedll/dlls/bot/cs_bot_vision.cpp | 10 +- regamedll/dlls/career_tasks.cpp | 2 +- regamedll/dlls/cbase.cpp | 10 +- regamedll/dlls/cbase.h | 21 +- regamedll/dlls/client.cpp | 4 +- regamedll/dlls/combat.cpp | 2 +- regamedll/dlls/game.cpp | 5 - regamedll/dlls/game.h | 1 - regamedll/dlls/hostage/hostage_improv.cpp | 8 +- regamedll/dlls/maprules.cpp | 50 +- regamedll/dlls/multiplay_gamerules.cpp | 31 +- regamedll/dlls/observer.cpp | 16 +- regamedll/dlls/player.cpp | 29 +- regamedll/dlls/player.h | 77 +- regamedll/dlls/training_gamerules.cpp | 2 +- regamedll/dlls/triggers.cpp | 2 +- regamedll/dlls/tutor.cpp | 2 +- regamedll/dlls/tutor_cs_tutor.cpp | 6 +- regamedll/dlls/util.cpp | 10 +- regamedll/dlls/util.h | 4 +- regamedll/dlls/world.cpp | 5 - regamedll/dlls/wpn_shared/wpn_c4.cpp | 2 +- regamedll/extra/cssdk/dlls/cbase.h | 4 +- regamedll/extra/cssdk/dlls/player.h | 70 +- regamedll/extra/cssdk/dlls/regamedll_api.h | 12 +- .../extra/cssdk/dlls/regamedll_interfaces.h | 2293 ++------------- regamedll/game_shared/bot/bot_manager.cpp | 4 +- regamedll/game_shared/bot/bot_util.cpp | 46 +- regamedll/game_shared/bot/bot_util.h | 2 +- regamedll/game_shared/bot/nav_area.cpp | 4 +- regamedll/public/regamedll/regamedll_api.h | 10 +- .../public/regamedll/regamedll_interfaces.h | 2293 ++------------- regamedll/regamedll/regamedll.cpp | 1 - regamedll/regamedll/regamedll_api_impl.cpp | 4 - regamedll/regamedll/regamedll_api_impl.h | 4 +- .../regamedll/regamedll_interfaces_impl.cpp | 124 +- .../regamedll/regamedll_interfaces_impl.h | 2477 ----------------- 41 files changed, 740 insertions(+), 6939 deletions(-) diff --git a/regamedll/dlls/bot/cs_bot.cpp b/regamedll/dlls/bot/cs_bot.cpp index c1cb25fb..0123ac2b 100644 --- a/regamedll/dlls/bot/cs_bot.cpp +++ b/regamedll/dlls/bot/cs_bot.cpp @@ -14,19 +14,17 @@ int GetBotFollowCount(CBasePlayer *leader) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBaseEntity *entity = UTIL_PlayerByIndex(i); + CBasePlayer *player = UTIL_PlayerByIndex(i); - if (entity == NULL) + if (player == NULL) continue; - if (FNullEnt(entity->pev)) + if (FNullEnt(player->pev)) continue; - if (FStrEq(STRING(entity->pev->netname), "")) + if (FStrEq(STRING(player->pev->netname), "")) continue; - CBasePlayer *player = static_cast(entity); - if (!player->IsBot()) continue; @@ -632,23 +630,21 @@ CBasePlayer *CCSBot::GetImportantEnemy(bool checkVisibility) const for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBaseEntity *entity = UTIL_PlayerByIndex(i); + CBasePlayer *player = UTIL_PlayerByIndex(i); - if (entity == NULL) + if (player == NULL) continue; - if (FNullEnt(entity->pev)) + if (FNullEnt(player->pev)) continue; - if (FStrEq(STRING(entity->pev->netname), "")) + if (FStrEq(STRING(player->pev->netname), "")) continue; // is it a player? - if (!entity->IsPlayer()) + if (!player->IsPlayer()) continue; - CBasePlayer *player = static_cast(entity); - // is it alive? if (!player->IsAlive()) continue; diff --git a/regamedll/dlls/bot/cs_bot_chatter.cpp b/regamedll/dlls/bot/cs_bot_chatter.cpp index 0ba5efde..5ef6c52f 100644 --- a/regamedll/dlls/bot/cs_bot_chatter.cpp +++ b/regamedll/dlls/bot/cs_bot_chatter.cpp @@ -48,7 +48,7 @@ void BotMeme::Transmit(CCSBot *sender) const { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; @@ -1528,7 +1528,7 @@ BotStatement *BotChatterInterface::GetActiveStatement() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; diff --git a/regamedll/dlls/bot/cs_bot_manager.cpp b/regamedll/dlls/bot/cs_bot_manager.cpp index 89482a84..28b34c69 100644 --- a/regamedll/dlls/bot/cs_bot_manager.cpp +++ b/regamedll/dlls/bot/cs_bot_manager.cpp @@ -402,7 +402,7 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd) for (int iIndex = 1; iIndex <= gpGlobals->maxClients; ++iIndex) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(iIndex)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(iIndex); if (pPlayer == NULL) continue; @@ -434,7 +434,7 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd) for (int iIndex = 1; iIndex <= gpGlobals->maxClients; ++iIndex) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(iIndex)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(iIndex); if (pPlayer == NULL) continue; diff --git a/regamedll/dlls/bot/cs_bot_pathfind.cpp b/regamedll/dlls/bot/cs_bot_pathfind.cpp index 0cd57ce7..cdf32062 100644 --- a/regamedll/dlls/bot/cs_bot_pathfind.cpp +++ b/regamedll/dlls/bot/cs_bot_pathfind.cpp @@ -1083,7 +1083,7 @@ bool CCSBot::IsFriendInTheWay(const Vector *goalPos) const // check if any friends are overlapping this linear path for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; diff --git a/regamedll/dlls/bot/cs_bot_vision.cpp b/regamedll/dlls/bot/cs_bot_vision.cpp index 3c5cb842..fa3d4ddb 100644 --- a/regamedll/dlls/bot/cs_bot_vision.cpp +++ b/regamedll/dlls/bot/cs_bot_vision.cpp @@ -657,20 +657,18 @@ CBasePlayer *CCSBot::FindMostDangerousThreat() { for (i = 1; i <= gpGlobals->maxClients; ++i) { - CBaseEntity *entity = UTIL_PlayerByIndex(i); + CBasePlayer *player = UTIL_PlayerByIndex(i); - if (entity == NULL) + if (player == NULL) continue; - if (FNullEnt(entity->pev)) + if (FNullEnt(player->pev)) continue; // is it a player? - if (!entity->IsPlayer()) + if (!player->IsPlayer()) continue; - CBasePlayer *player = static_cast(entity); - // ignore self if (player->entindex() == entindex()) continue; diff --git a/regamedll/dlls/career_tasks.cpp b/regamedll/dlls/career_tasks.cpp index 1bb1011d..00911ee1 100644 --- a/regamedll/dlls/career_tasks.cpp +++ b/regamedll/dlls/career_tasks.cpp @@ -562,7 +562,7 @@ void CCareerTaskManager::HandleDeath(int team, CBasePlayer *pAttacker) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer && pPlayer->m_iTeam == enemyTeam && pPlayer->IsAlive()) ++numEnemies; diff --git a/regamedll/dlls/cbase.cpp b/regamedll/dlls/cbase.cpp index 1fbb88c8..855084b5 100644 --- a/regamedll/dlls/cbase.cpp +++ b/regamedll/dlls/cbase.cpp @@ -62,7 +62,7 @@ static DLL_FUNCTIONS gFunctionTable = static NEW_DLL_FUNCTIONS gNewDLLFunctions { &OnFreeEntPrivateData, - &GameDLLShutdown, + NULL, NULL, NULL, NULL @@ -1082,5 +1082,11 @@ void OnFreeEntPrivateData(edict_t *pEnt) pEntity->UpdateOnRemove(); RemoveEntityHashValue(pEntity->pev, STRING(pEntity->pev->classname), CLASSNAME); - Regamedll_FreeEntities(pEntity); + +#ifdef REGAMEDLL_ADD + if (pEntity->m_pEntity != nullptr) { + delete pEntity->m_pEntity; + pEntity->m_pEntity = nullptr; + } +#endif } diff --git a/regamedll/dlls/cbase.h b/regamedll/dlls/cbase.h index f66ab730..a16c07a6 100644 --- a/regamedll/dlls/cbase.h +++ b/regamedll/dlls/cbase.h @@ -199,6 +199,7 @@ class CBaseMonster; class CBasePlayerItem; class CBasePlayerWeapon; class CSquadMonster; +class CCSEntity; class CCineMonster; class CSound; @@ -364,8 +365,15 @@ public: void (CBaseEntity::*m_pfnUse)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); void (CBaseEntity::*m_pfnBlocked)(CBaseEntity *pOther); +#ifdef REGAMEDLL_ADD + CCSEntity *m_pEntity; +#endif + // We use this variables to store each ammo count. +#ifndef REGAMEDLL_ADD + // let's sacrifice this unused member, for its own needs in favor of m_pEntity int *current_ammo; +#endif float currentammo; int maxammo_buckshot; int ammo_buckshot; @@ -659,13 +667,9 @@ public: }; -#ifdef REGAMEDLL_SELF -extern class CCSEntity **g_GameEntities; -#endif - // Converts a entvars_t * to a class pointer // It will allocate the class and entity if necessary -template +template T *GetClassPtr(T *a) { entvars_t *pev = (entvars_t *)a; @@ -683,8 +687,9 @@ T *GetClassPtr(T *a) a = new(pev) T; a->pev = pev; -#ifdef REGAMEDLL_SELF - g_GameEntities[a->entindex()] = new TWrap (a); +#ifdef REGAMEDLL_ADD + a->m_pEntity = new W(); + a->m_pEntity->m_pContainingEntity = a; #endif #if defined(HOOK_GAMEDLL) && defined(_WIN32) && !defined(REGAMEDLL_UNIT_TESTS) @@ -695,9 +700,7 @@ T *GetClassPtr(T *a) return a; } -#ifdef REGAMEDLL_SELF extern CUtlVector stringsHashTable; -#endif C_DLLEXPORT int GetEntityAPI(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion); C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion); diff --git a/regamedll/dlls/client.cpp b/regamedll/dlls/client.cpp index df5767f1..b7a78f71 100644 --- a/regamedll/dlls/client.cpp +++ b/regamedll/dlls/client.cpp @@ -3023,7 +3023,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pObserver = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pObserver = UTIL_PlayerByIndex(i); if (pObserver && pObserver->IsObservingPlayer(player)) { @@ -3049,7 +3049,7 @@ void EXT_FUNC ClientCommand(edict_t *pEntity) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pObserver = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pObserver = UTIL_PlayerByIndex(i); if (pObserver && pObserver->IsObservingPlayer(player)) { diff --git a/regamedll/dlls/combat.cpp b/regamedll/dlls/combat.cpp index b8a5dba6..d643479c 100644 --- a/regamedll/dlls/combat.cpp +++ b/regamedll/dlls/combat.cpp @@ -904,7 +904,7 @@ void EXT_FUNC PlayerBlind(CBasePlayer *pPlayer, entvars_t *pevInflictor, entvars for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pObserver = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pObserver = UTIL_PlayerByIndex(i); if (!pObserver || !pObserver->IsObservingPlayer(pPlayer)) continue; diff --git a/regamedll/dlls/game.cpp b/regamedll/dlls/game.cpp index 7c6995cc..869625d1 100644 --- a/regamedll/dlls/game.cpp +++ b/regamedll/dlls/game.cpp @@ -239,8 +239,3 @@ void EXT_FUNC GameDLLInit() Tutor_RegisterCVars(); Hostage_RegisterCVars(); } - -void EXT_FUNC GameDLLShutdown() -{ - Regamedll_FreeEntities(); -} diff --git a/regamedll/dlls/game.h b/regamedll/dlls/game.h index 9dcdbb44..74c94f98 100644 --- a/regamedll/dlls/game.h +++ b/regamedll/dlls/game.h @@ -142,6 +142,5 @@ extern cvar_t roundrespawn_time; #endif void GameDLLInit(); -void GameDLLShutdown(); #endif // GAME_H diff --git a/regamedll/dlls/hostage/hostage_improv.cpp b/regamedll/dlls/hostage/hostage_improv.cpp index 19a566aa..e65ba68c 100644 --- a/regamedll/dlls/hostage/hostage_improv.cpp +++ b/regamedll/dlls/hostage/hostage_improv.cpp @@ -327,7 +327,7 @@ bool CHostageImprov::__MAKE_VHOOK(IsFriendInTheWay)(const Vector &goalPos) const // check if any CT are overlapping this linear path for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; @@ -526,7 +526,7 @@ CBasePlayer *CHostageImprov::__MAKE_VHOOK(IsAnyPlayerLookingAtMe)(int team, floa { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!IsEntityValid(player)) continue; @@ -553,7 +553,7 @@ CBasePlayer *CHostageImprov::__MAKE_VHOOK(GetClosestPlayerByTravelDistance)(int for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!IsEntityValid(player)) continue; @@ -644,7 +644,7 @@ void CHostageImprov::UpdateVision() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; diff --git a/regamedll/dlls/maprules.cpp b/regamedll/dlls/maprules.cpp index 3c2ec72a..7c356340 100644 --- a/regamedll/dlls/maprules.cpp +++ b/regamedll/dlls/maprules.cpp @@ -360,40 +360,38 @@ void CGamePlayerZone::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pC if (!CanFireForActivator(pActivator)) return; - CBaseEntity *pPlayer = NULL; - for (int i = 1; i <= gpGlobals->maxClients; ++i) { - pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBaseEntity *pPlayer = UTIL_PlayerByIndex(i); - if (pPlayer) + if (pPlayer == nullptr) + continue; + + TraceResult trace; + int hullNumber; + + hullNumber = human_hull; + if (pPlayer->pev->flags & FL_DUCKING) { - TraceResult trace; - int hullNumber; + hullNumber = head_hull; + } - hullNumber = human_hull; - if (pPlayer->pev->flags & FL_DUCKING) + UTIL_TraceModel(pPlayer->pev->origin, pPlayer->pev->origin, hullNumber, edict(), &trace); + + if (trace.fStartSolid) + { + ++playersInCount; + if (!FStringNull(m_iszInTarget)) { - hullNumber = head_hull; + FireTargets(STRING(m_iszInTarget), pPlayer, pActivator, useType, value); } - - UTIL_TraceModel(pPlayer->pev->origin, pPlayer->pev->origin, hullNumber, edict(), &trace); - - if (trace.fStartSolid) + } + else + { + ++playersOutCount; + if (!FStringNull(m_iszOutTarget)) { - ++playersInCount; - if (!FStringNull(m_iszInTarget)) - { - FireTargets(STRING(m_iszInTarget), pPlayer, pActivator, useType, value); - } - } - else - { - ++playersOutCount; - if (!FStringNull(m_iszOutTarget)) - { - FireTargets(STRING(m_iszOutTarget), pPlayer, pActivator, useType, value); - } + FireTargets(STRING(m_iszOutTarget), pPlayer, pActivator, useType, value); } } } diff --git a/regamedll/dlls/multiplay_gamerules.cpp b/regamedll/dlls/multiplay_gamerules.cpp index 99006952..8c761589 100644 --- a/regamedll/dlls/multiplay_gamerules.cpp +++ b/regamedll/dlls/multiplay_gamerules.cpp @@ -17,7 +17,7 @@ bool IsBotSpeaking() { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer == NULL || !pPlayer->IsBot()) continue; @@ -44,7 +44,7 @@ void SV_Continue_f() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer && !pPlayer->IsBot()) { @@ -85,7 +85,7 @@ void SV_Career_EndRound_f() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!player || FNullEnt(player->pev)) continue; @@ -768,7 +768,7 @@ void CHalfLifeMultiplay::__API_VHOOK(GiveC4)() { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!player || FNullEnt(player->edict())) continue; @@ -850,7 +850,7 @@ void CHalfLifeMultiplay::__API_VHOOK(GiveC4)() player->m_bHasC4 = true; player->GiveNamedItem("weapon_c4"); - player->SetBombIcon(FALSE); + player->SetBombIcon(); player->pev->body = 1; player->m_flDisplayHistory |= DHF_BOMB_RETRIEVED; @@ -1132,7 +1132,7 @@ bool CHalfLifeMultiplay::NeededPlayersCheck() { if (IsCareer()) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(gpGlobals->maxClients)); + CBasePlayer *player = UTIL_PlayerByIndex(gpGlobals->maxClients); if (!player || !player->IsBot()) { @@ -1825,7 +1825,7 @@ void CHalfLifeMultiplay::__API_VHOOK(RestartRound)() // Reset the player stats for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *plr = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *plr = UTIL_PlayerByIndex(i); if (plr && !FNullEnt(plr->pev)) plr->Reset(); @@ -2528,7 +2528,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(Think)() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer != NULL && !pPlayer->IsBot()) { @@ -2777,7 +2777,7 @@ void CHalfLifeMultiplay::CheckFreezePeriodExpired() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *plr = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *plr = UTIL_PlayerByIndex(i); if (!plr || plr->pev->flags == FL_DORMANT) { @@ -3044,7 +3044,7 @@ void CHalfLifeMultiplay::MarkLivingPlayersOnTeamAsNotReceivingMoneyNextRound(int { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!player || FNullEnt(player->pev)) continue; @@ -3082,7 +3082,7 @@ void CHalfLifeMultiplay::CareerRestart() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!player || FNullEnt(player->pev)) continue; @@ -3255,7 +3255,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(InitHUD)(CBasePlayer *pl) for (i = 1; i <= gpGlobals->maxClients; ++i) { // FIXME: Probably don't need to cast this just to read m_iDeaths - CBasePlayer *plr = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *plr = UTIL_PlayerByIndex(i); if (plr != NULL) { @@ -3297,7 +3297,7 @@ void CHalfLifeMultiplay::__MAKE_VHOOK(InitHUD)(CBasePlayer *pl) for (i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *plr = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *plr = UTIL_PlayerByIndex(i); if (plr != NULL) { @@ -4384,9 +4384,8 @@ int CountPlayers() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBaseEntity *pEnt = UTIL_PlayerByIndex(i); - - if (pEnt != NULL) + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); + if (pPlayer != NULL) { num = num + 1; } diff --git a/regamedll/dlls/observer.cpp b/regamedll/dlls/observer.cpp index e3af8e70..f21769b0 100644 --- a/regamedll/dlls/observer.cpp +++ b/regamedll/dlls/observer.cpp @@ -19,14 +19,14 @@ int __API_HOOK(GetForceCamera)(CBasePlayer *pObserver) return retVal; } -LINK_HOOK_CLASS_CHAIN(CBaseEntity *, CBasePlayer, Observer_IsValidTarget, (int iPlayerIndex, bool bSameTeam), iPlayerIndex, bSameTeam); +LINK_HOOK_CLASS_CHAIN(CBasePlayer *, CBasePlayer, Observer_IsValidTarget, (int iPlayerIndex, bool bSameTeam), iPlayerIndex, bSameTeam); -CBaseEntity *CBasePlayer::__API_HOOK(Observer_IsValidTarget)(int iPlayerIndex, bool bSameTeam) +CBasePlayer *CBasePlayer::__API_HOOK(Observer_IsValidTarget)(int iPlayerIndex, bool bSameTeam) { if (iPlayerIndex > gpGlobals->maxClients || iPlayerIndex < 1) return NULL; - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(iPlayerIndex)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(iPlayerIndex); // Don't spec observers or players who haven't picked a class yet if (!pPlayer || pPlayer == this || pPlayer->has_disconnected || pPlayer->IsObserver() || (pPlayer->pev->effects & EF_NODRAW) || pPlayer->m_iTeam == UNASSIGNED || (bSameTeam && pPlayer->m_iTeam != m_iTeam)) @@ -50,7 +50,7 @@ void UpdateClientEffects(CBasePlayer *pObserver, int oldMode) if (pObserver->m_hObserverTarget->IsPlayer()) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(pObserver->m_hObserverTarget->entindex())); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(pObserver->m_hObserverTarget->entindex()); if (pPlayer) { @@ -132,7 +132,6 @@ void CBasePlayer::Observer_FindNextPlayer(bool bReverse, const char *name) int iCurrent; int iDir; bool bForceSameTeam; - CBasePlayer *pPlayer; if (m_flNextFollowTime && m_flNextFollowTime > gpGlobals->time) return; @@ -166,8 +165,7 @@ void CBasePlayer::Observer_FindNextPlayer(bool bReverse, const char *name) if (!name) break; - pPlayer = static_cast(UTIL_PlayerByIndex(m_hObserverTarget->entindex())); - + CBasePlayer *pPlayer = UTIL_PlayerByIndex(m_hObserverTarget->entindex()); if (!Q_strcmp(name, STRING(pPlayer->pev->netname))) break; } @@ -269,7 +267,7 @@ void CBasePlayer::Observer_CheckTarget() if (m_hObserverTarget) { int iPlayerIndex = ENTINDEX(m_hObserverTarget->edict()); - CBasePlayer *target = static_cast(UTIL_PlayerByIndex(iPlayerIndex)); + CBasePlayer *target = UTIL_PlayerByIndex(iPlayerIndex); // check taget if (!target || target->pev->deadflag == DEAD_RESPAWNABLE || (target->pev->effects & EF_NODRAW)) @@ -305,7 +303,7 @@ void CBasePlayer::Observer_CheckProperties() // try to find a traget if we have no current one if (pev->iuser1 == OBS_IN_EYE && m_hObserverTarget != NULL) { - CBasePlayer *target = static_cast(UTIL_PlayerByIndex(m_hObserverTarget->entindex())); + CBasePlayer *target = UTIL_PlayerByIndex(m_hObserverTarget->entindex()); if (!target) return; diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 9d7492e9..3e814940 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -363,9 +363,9 @@ void CBasePlayer::SetPlayerModel(BOOL HasC4) char *model; #ifdef REGAMEDLL_ADD - CCSPlayer *pPlayer = CSPlayer(this); - if (*pPlayer->m_szModel != '\0') { - model = pPlayer->m_szModel; + auto& modelEx = CSPlayer()->m_szModel; + if (*modelEx != '\0') { + model = modelEx; } else #endif if (m_iTeam == CT) @@ -1052,7 +1052,7 @@ int CBasePlayer::__API_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pev { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (!pPlayer) continue; @@ -1095,7 +1095,7 @@ int CBasePlayer::__API_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pev for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (!pPlayer || pPlayer->m_hObserverTarget != this) continue; @@ -1289,7 +1289,7 @@ int CBasePlayer::__API_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pev { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (!pPlayer) continue; @@ -1332,7 +1332,7 @@ int CBasePlayer::__API_VHOOK(TakeDamage)(entvars_t *pevInflictor, entvars_t *pev for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (!pPlayer) continue; @@ -1947,7 +1947,7 @@ void CBasePlayer::__API_VHOOK(Killed)(entvars_t *pevAttacker, int iGib) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (!pPlayer) continue; @@ -1978,7 +1978,7 @@ void CBasePlayer::__API_VHOOK(Killed)(entvars_t *pevAttacker, int iGib) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pObserver = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pObserver = UTIL_PlayerByIndex(i); if (!pObserver) continue; @@ -3325,7 +3325,6 @@ void CBasePlayer::JoiningThink() if (g_pGameRules->FPlayerCanRespawn(this)) { Spawn(); - CSGameRules()->CheckWinConditions(); if (!CSGameRules()->m_fTeamCount && CSGameRules()->m_bMapHasBombTarget && !CSGameRules()->IsThereABomber() && !CSGameRules()->IsThereABomb()) @@ -4051,7 +4050,7 @@ void CBasePlayer::__API_VHOOK(AddPointsToTeam)(int score, BOOL bAllowNegativeSco for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer != NULL && i != index) { @@ -5308,7 +5307,7 @@ void CBasePlayer::__API_VHOOK(Spawn)() for (i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pObserver = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pObserver = UTIL_PlayerByIndex(i); if (pObserver && pObserver->IsObservingPlayer(this)) { @@ -5448,7 +5447,7 @@ void CBasePlayer::SetScoreboardAttributes(CBasePlayer *destination) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player != NULL && !FNullEnt(player->edict())) SetScoreboardAttributes(player); @@ -7362,7 +7361,6 @@ void CBasePlayer::DropPlayerItem(const char *pszItemName) if (pWeapon->iFlags() & ITEM_FLAG_EXHAUSTIBLE) { int iAmmoIndex = GetAmmoIndex(pWeapon->pszAmmo1()); - if (iAmmoIndex != -1) { pWeaponBox->PackAmmo(MAKE_STRING(pWeapon->pszAmmo1()), m_rgAmmo[iAmmoIndex] > 0); @@ -7371,7 +7369,6 @@ void CBasePlayer::DropPlayerItem(const char *pszItemName) } const char *modelname = GetCSModelName(pWeapon->m_iId); - if (modelname != NULL) { SET_MODEL(ENT(pWeaponBox->pev), modelname); @@ -9181,7 +9178,7 @@ void CBasePlayer::UpdateLocation(bool forceUpdate) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!player) continue; diff --git a/regamedll/dlls/player.h b/regamedll/dlls/player.h index fb8dbeff..ed42b142 100644 --- a/regamedll/dlls/player.h +++ b/regamedll/dlls/player.h @@ -157,8 +157,7 @@ enum RewardType RT_VIP_KILLED, RT_VIP_RESCUED_MYSELF }; - -typedef enum +enum PLAYER_ANIM { PLAYER_IDLE, PLAYER_WALK, @@ -171,10 +170,9 @@ typedef enum PLAYER_LARGE_FLINCH, PLAYER_RELOAD, PLAYER_HOLDBOMB +}; -} PLAYER_ANIM; - -typedef enum +enum _Menu { Menu_OFF, Menu_ChooseTeam, @@ -191,19 +189,18 @@ typedef enum Menu_Radio2, Menu_Radio3, Menu_ClientBuy +}; -} _Menu; - -typedef enum +enum TeamName { UNASSIGNED, TERRORIST, CT, SPECTATOR, -} TeamName; +}; -typedef enum +enum ModelName { MODEL_UNASSIGNED, MODEL_URBAN, @@ -216,11 +213,11 @@ typedef enum MODEL_GUERILLA, MODEL_VIP, MODEL_MILITIA, - MODEL_SPETSNAZ + MODEL_SPETSNAZ, + MODEL_AUTO +}; -} ModelName; - -typedef enum +enum JoinState { JOINED, SHOWLTEXT, @@ -229,9 +226,9 @@ typedef enum PICKINGTEAM, GETINTOGAME -} JoinState; +}; -typedef enum +enum TrackCommands { CMD_SAY = 0, CMD_SAYTEAM, @@ -243,9 +240,9 @@ typedef enum CMD_NIGHTVISION, COMMANDS_TO_TRACK, -} TrackCommands; +}; -typedef struct +struct RebuyStruct { int m_primaryWeapon; int m_primaryAmmo; @@ -257,10 +254,9 @@ typedef struct int m_defuser; int m_nightVision; int m_armor; +}; -} RebuyStruct; - -typedef enum +enum ThrowDirection { THROW_NONE, THROW_FORWARD, @@ -269,8 +265,7 @@ typedef enum THROW_BOMB, THROW_GRENADE, THROW_HITVEL_MINUS_AIRVEL - -} ThrowDirection; +}; enum sbar_data { @@ -282,6 +277,8 @@ enum sbar_data enum MusicState { SILENT, CALM, INTENSE }; +class CCSPlayer; + class CStripWeapons: public CPointEntity { public: virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value); @@ -428,8 +425,8 @@ public: public: void SpawnClientSideCorpse(); void Observer_FindNextPlayer(bool bReverse, const char *name = NULL); - CBaseEntity *Observer_IsValidTarget(int iPlayerIndex, bool bSameTeam); - CBaseEntity *Observer_IsValidTarget_(int iPlayerIndex, bool bSameTeam); + CBasePlayer *Observer_IsValidTarget(int iPlayerIndex, bool bSameTeam); + CBasePlayer *Observer_IsValidTarget_(int iPlayerIndex, bool bSameTeam); void Observer_HandleButtons(); void Observer_SetMode(int iMode); @@ -555,15 +552,7 @@ public: void GiveShield_(bool bDeploy = true); bool IsHittingShield(Vector &vecDirection, TraceResult *ptr); bool SelectSpawnSpot(const char *pEntClassName, CBaseEntity* &pSpot); - bool IsReloading() - { - CBasePlayerWeapon *weapon = static_cast(m_pActiveItem); - - if (weapon != NULL && weapon->m_fInReload) - return true; - - return false; - } + bool IsReloading() const; bool IsBlind() const { return (m_blindUntilTime > gpGlobals->time); } bool IsAutoFollowAllowed() const { return (gpGlobals->time > m_allowAutoFollowTime); } void InhibitAutoFollow(float duration) { m_allowAutoFollowTime = gpGlobals->time + duration; } @@ -603,6 +592,10 @@ public: //m_musicState = INTENSE; //m_intenseTimestamp = gpGlobals->time; } +#ifdef REGAMEDLL_ADD + CCSPlayer *CSPlayer() const; +#endif + public: enum { MaxLocationLen = 32 }; @@ -826,6 +819,22 @@ public: float m_flTimeToIgnoreTouches; }; +inline bool CBasePlayer::IsReloading() const +{ + CBasePlayerWeapon *weapon = static_cast(m_pActiveItem); + + if (weapon != NULL && weapon->m_fInReload) + return true; + + return false; +} + +#ifdef REGAMEDLL_ADD +inline CCSPlayer *CBasePlayer::CSPlayer() const { + return reinterpret_cast(this->m_pEntity); +} +#endif + extern int gEvilImpulse101; extern char g_szMapBriefingText[512]; extern entvars_t *g_pevLastInflictor; diff --git a/regamedll/dlls/training_gamerules.cpp b/regamedll/dlls/training_gamerules.cpp index 5f30a105..db51ba72 100644 --- a/regamedll/dlls/training_gamerules.cpp +++ b/regamedll/dlls/training_gamerules.cpp @@ -43,7 +43,7 @@ void CHalfLifeTraining::__MAKE_VHOOK(InitHUD)(CBasePlayer *pl) void CHalfLifeTraining::HostageDied() { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(1)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(1); if (pPlayer != NULL) { diff --git a/regamedll/dlls/triggers.cpp b/regamedll/dlls/triggers.cpp index 1f26a861..2690a278 100644 --- a/regamedll/dlls/triggers.cpp +++ b/regamedll/dlls/triggers.cpp @@ -1728,7 +1728,7 @@ void CEscapeZone::EscapeTouch(CBaseEntity *pOther) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer == NULL || FNullEnt(pPlayer->pev)) continue; diff --git a/regamedll/dlls/tutor.cpp b/regamedll/dlls/tutor.cpp index e2c16204..a8c4ad23 100644 --- a/regamedll/dlls/tutor.cpp +++ b/regamedll/dlls/tutor.cpp @@ -80,7 +80,7 @@ void MonitorTutorStatus() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer != NULL && !pPlayer->IsBot()) ++numHumans; diff --git a/regamedll/dlls/tutor_cs_tutor.cpp b/regamedll/dlls/tutor_cs_tutor.cpp index 0e8f07b0..da0607b9 100644 --- a/regamedll/dlls/tutor_cs_tutor.cpp +++ b/regamedll/dlls/tutor_cs_tutor.cpp @@ -2188,7 +2188,7 @@ void CCSTutor::GetNumPlayersAliveOnTeams(int &numT, int &numCT) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL || !player->IsAlive()) continue; @@ -2289,7 +2289,7 @@ void CCSTutor::CheckForBombViewable() for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player != NULL && player->m_bHasC4) { @@ -3016,7 +3016,7 @@ void CCSTutor::ConstructRecentDeathsList(TeamName team, char *buf, int buflen, T for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (pPlayer == NULL) continue; diff --git a/regamedll/dlls/util.cpp b/regamedll/dlls/util.cpp index 942a7e4b..a6085e47 100644 --- a/regamedll/dlls/util.cpp +++ b/regamedll/dlls/util.cpp @@ -522,14 +522,14 @@ CBaseEntity *UTIL_FindEntityGeneric(const char *szWhatever, const Vector &vecSrc return pEntity; } -CBaseEntity *EXT_FUNC UTIL_PlayerByIndex(int playerIndex) +CBasePlayer *EXT_FUNC UTIL_PlayerByIndex(int playerIndex) { - CBaseEntity *pPlayer = NULL; + CBasePlayer *pPlayer = NULL; if (playerIndex > 0 && playerIndex <= gpGlobals->maxClients) { edict_t *pPlayerEdict = INDEXENT(playerIndex); if (pPlayerEdict != NULL && !pPlayerEdict->free) - pPlayer = CBaseEntity::Instance(pPlayerEdict); + pPlayer = (CBasePlayer *)CBaseEntity::Instance(pPlayerEdict); } return pPlayer; @@ -2283,7 +2283,7 @@ char UTIL_TextureHit(TraceResult *ptr, Vector vecSrc, Vector vecEnd) NOXREF int GetPlayerTeam(int index) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(index)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(index); if (pPlayer != NULL) { return pPlayer->m_iTeam; @@ -2308,7 +2308,7 @@ bool UTIL_IsGame(const char *gameName) float_precision UTIL_GetPlayerGaitYaw(int playerIndex) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(playerIndex)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(playerIndex); if (pPlayer != NULL) { return pPlayer->m_flGaityaw; diff --git a/regamedll/dlls/util.h b/regamedll/dlls/util.h index 0a036f97..4fb9badd 100644 --- a/regamedll/dlls/util.h +++ b/regamedll/dlls/util.h @@ -158,12 +158,10 @@ extern globalvars_t *gpGlobals; #endif -#define REGAMEDLL_ALLOC_FUNC #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);\ } @@ -249,7 +247,7 @@ CBaseEntity *UTIL_FindEntityByString(CBaseEntity *pStartEntity, const char *szKe CBaseEntity *UTIL_FindEntityByClassname(CBaseEntity *pStartEntity, const char *szName); CBaseEntity *UTIL_FindEntityByTargetname(CBaseEntity *pStartEntity, const char *szName); CBaseEntity *UTIL_FindEntityGeneric(const char *szWhatever, const Vector &vecSrc, float flRadius); -CBaseEntity *UTIL_PlayerByIndex(int playerIndex); +CBasePlayer *UTIL_PlayerByIndex(int playerIndex); void UTIL_MakeVectors(const Vector &vecAngles); void UTIL_MakeAimVectors(const Vector &vecAngles); void UTIL_MakeInvVectors(const Vector &vec, globalvars_t *pgv); diff --git a/regamedll/dlls/world.cpp b/regamedll/dlls/world.cpp index 76d6661e..7e627223 100644 --- a/regamedll/dlls/world.cpp +++ b/regamedll/dlls/world.cpp @@ -410,13 +410,8 @@ void EXT_FUNC ResetGlobalState() gInitHUD = TRUE; } -#pragma push_macro("REGAMEDLL_ALLOC_FUNC") -#define REGAMEDLL_ALLOC_FUNC Regamedll_AllocEntities(gpGlobals->maxEntities); - LINK_ENTITY_TO_CLASS(worldspawn, CWorld, CCSWorld); -#pragma pop_macro("REGAMEDLL_ALLOC_FUNC") - void CWorld::__MAKE_VHOOK(Spawn)() { EmptyEntityHashTable(); diff --git a/regamedll/dlls/wpn_shared/wpn_c4.cpp b/regamedll/dlls/wpn_shared/wpn_c4.cpp index d76bd1fd..276a8633 100644 --- a/regamedll/dlls/wpn_shared/wpn_c4.cpp +++ b/regamedll/dlls/wpn_shared/wpn_c4.cpp @@ -307,7 +307,7 @@ void CC4::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T return; } - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(1)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(1); if (pPlayer != NULL) { diff --git a/regamedll/extra/cssdk/dlls/cbase.h b/regamedll/extra/cssdk/dlls/cbase.h index e5614fbb..235fec7b 100644 --- a/regamedll/extra/cssdk/dlls/cbase.h +++ b/regamedll/extra/cssdk/dlls/cbase.h @@ -37,6 +37,7 @@ class CBaseEntity; class CBaseMonster; class CBasePlayerItem; class CSquadMonster; +class CCSEntity; class CBaseEntity { public: @@ -135,8 +136,9 @@ public: EOFFSET eoffset() { return OFFSET(pev); } int entindex() { return ENTINDEX(edict()); } public: + CCSEntity *m_pEntity; + // We use this variables to store each ammo count. - int *current_ammo; float currentammo; int maxammo_buckshot; int ammo_buckshot; diff --git a/regamedll/extra/cssdk/dlls/player.h b/regamedll/extra/cssdk/dlls/player.h index 15e57ac9..7cbc492a 100644 --- a/regamedll/extra/cssdk/dlls/player.h +++ b/regamedll/extra/cssdk/dlls/player.h @@ -27,8 +27,6 @@ */ #pragma once -//#include "weapons.h" - #include "pm_materials.h" #include "hintmessage.h" #include "unisignals.h" @@ -150,7 +148,7 @@ enum RewardType RT_VIP_RESCUED_MYSELF }; -typedef enum +enum PLAYER_ANIM { PLAYER_IDLE, PLAYER_WALK, @@ -164,9 +162,9 @@ typedef enum PLAYER_RELOAD, PLAYER_HOLDBOMB -} PLAYER_ANIM; +}; -typedef enum +enum _Menu { Menu_OFF, Menu_ChooseTeam, @@ -184,18 +182,18 @@ typedef enum Menu_Radio3, Menu_ClientBuy -} _Menu; +}; -typedef enum +enum TeamName { UNASSIGNED, TERRORIST, CT, SPECTATOR, -} TeamName; +}; -typedef enum +enum ModelName { MODEL_UNASSIGNED, MODEL_URBAN, @@ -208,11 +206,12 @@ typedef enum MODEL_GUERILLA, MODEL_VIP, MODEL_MILITIA, - MODEL_SPETSNAZ + MODEL_SPETSNAZ, + MODEL_AUTO -} ModelName; +}; -typedef enum +enum JoinState { JOINED, SHOWLTEXT, @@ -221,9 +220,9 @@ typedef enum PICKINGTEAM, GETINTOGAME -} JoinState; +}; -typedef enum +enum TrackCommands { CMD_SAY = 0, CMD_SAYTEAM, @@ -235,9 +234,9 @@ typedef enum CMD_NIGHTVISION, COMMANDS_TO_TRACK, -} TrackCommands; +}; -typedef struct +struct RebuyStruct { int m_primaryWeapon; int m_primaryAmmo; @@ -250,9 +249,9 @@ typedef struct int m_nightVision; int m_armor; -} RebuyStruct; +}; -typedef enum +enum ThrowDirection { THROW_NONE, THROW_FORWARD, @@ -262,7 +261,7 @@ typedef enum THROW_GRENADE, THROW_HITVEL_MINUS_AIRVEL -} ThrowDirection; +}; enum sbar_data { @@ -272,13 +271,9 @@ enum sbar_data SBAR_END }; -typedef enum -{ - SILENT, - CALM, - INTENSE +enum MusicState { SILENT, CALM, INTENSE }; -} MusicState; +class CCSPlayer; class CStripWeapons: public CPointEntity { public: @@ -356,21 +351,14 @@ public: int IsObserver() { return pev->iuser1; } void SetWeaponAnimType(const char *szExtention) { strcpy(m_szAnimExtention, szExtention); } bool IsProtectedByShield() { return m_bOwnsShield && m_bShieldDrawn; } - bool IsReloading() - { - CBasePlayerWeapon *weapon = static_cast(m_pActiveItem); - - if (weapon != NULL && weapon->m_fInReload) - return true; - - return false; - } + bool IsReloading() const; bool IsBlind() const { return (m_blindUntilTime > gpGlobals->time); } bool IsAutoFollowAllowed() const { return (gpGlobals->time > m_allowAutoFollowTime); } void InhibitAutoFollow(float duration) { m_allowAutoFollowTime = gpGlobals->time + duration; } void AllowAutoFollow() { m_allowAutoFollowTime = 0; } void SetObserverAutoDirector(bool val) { m_bObserverAutoDirector = val; } bool CanSwitchObserverModes() const { return m_canSwitchObserverModes; } + CCSPlayer *CSPlayer() const; public: enum { MaxLocationLen = 32 }; @@ -574,3 +562,17 @@ public: EHANDLE m_hEntToIgnoreTouchesFrom; float m_flTimeToIgnoreTouches; }; + +inline bool CBasePlayer::IsReloading() const +{ + CBasePlayerWeapon *weapon = static_cast(m_pActiveItem); + + if (weapon != NULL && weapon->m_fInReload) + return true; + + return false; +} + +inline CCSPlayer *CBasePlayer::CSPlayer() const { + return reinterpret_cast(this->m_pEntity); +} diff --git a/regamedll/extra/cssdk/dlls/regamedll_api.h b/regamedll/extra/cssdk/dlls/regamedll_api.h index 226b18cd..a5e46306 100644 --- a/regamedll/extra/cssdk/dlls/regamedll_api.h +++ b/regamedll/extra/cssdk/dlls/regamedll_api.h @@ -31,7 +31,7 @@ #include "hookchains.h" #include "interface.h" -#define REGAMEDLL_API_VERSION_MAJOR 1 +#define REGAMEDLL_API_VERSION_MAJOR 2 #define REGAMEDLL_API_VERSION_MINOR 1 // CBasePlayer::Spawn hook @@ -124,8 +124,8 @@ typedef IVoidHookChainRegistryClass // CBasePlayer::Observer_IsValidTarget hook -typedef IHookChain IReGameHook_CBasePlayer_Observer_IsValidTarget; -typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget; +typedef IHookChain IReGameHook_CBasePlayer_Observer_IsValidTarget; +typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget; // CBasePlayer::SetAnimation hook typedef IVoidHookChain IReGameHook_CBasePlayer_SetAnimation; @@ -376,11 +376,7 @@ public: }; struct ReGameFuncs_t { - class CBaseEntity *(*UTIL_PlayerByIndex)(int playerIndex); - class ICSPlayer *(*CBASE_TO_CSPLAYER)(class CBaseEntity *pEntity); - class ICSEntity *(*CBASE_TO_CSENTITY)(class CBaseEntity *pEntity); - class ICSPlayer *(*INDEX_TO_CSPLAYER)(int iPlayerIndex); - class ICSEntity *(*INDEX_TO_CSENTITY)(int iEntityIndex); + class CBasePlayer *(*UTIL_PlayerByIndex)(int playerIndex); struct edict_s *(*CREATE_NAMED_ENTITY2)(string_t iClass); void (*ChangeString)(char *&dest, const char *source); diff --git a/regamedll/extra/cssdk/dlls/regamedll_interfaces.h b/regamedll/extra/cssdk/dlls/regamedll_interfaces.h index 09d2d620..888e1e20 100644 --- a/regamedll/extra/cssdk/dlls/regamedll_interfaces.h +++ b/regamedll/extra/cssdk/dlls/regamedll_interfaces.h @@ -28,2053 +28,246 @@ #pragma once -class CSave; -class Vector; -class CRestore; - -class CCSEntity; -class CCSPlayer; -class CCSMonster; -class BotProfile; -class CCSWeaponBox; -class CCSPlayerItem; -class CCSPlayerWeapon; -class CCSquadMonster; - -class ICSMonster; -class ICSquadMonster; - -enum VisiblePartTypeBot:uint8 -{ - NONE = 0x00, - CHEST = 0x01, - HEAD = 0x02, - LEFT_SIDE = 0x04, - RIGHT_SIDE = 0x08, - FEET = 0x10 -}; - -class ICSEntity { -public: - virtual ~ICSEntity() = 0; - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Activate() = 0; - virtual void SetObjectCollisionBox() = 0; - virtual int Classify() = 0; - virtual void DeathNotice(struct entvars_s *pevChild) = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int TakeHealth(float flHealth, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; - virtual void TraceBleed(float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual bool IsTriggered(CCSEntity *pActivator) = 0; - virtual ICSMonster *MyMonsterPointer() = 0; - virtual ICSquadMonster *MySquadMonsterPointer() = 0; - virtual int GetToggleState() = 0; - virtual void AddPoints(int score, bool bAllowNegativeScore) = 0; - virtual void AddPointsToTeam(int score, bool bAllowNegativeScore) = 0; - virtual bool AddPlayerItem(CCSPlayerItem *pItem) = 0; - virtual bool RemovePlayerItem(CCSPlayerItem *pItem) = 0; - virtual int GiveAmmo(int iAmount, char *szName, int iMax) = 0; - virtual float GetDelay() = 0; - virtual int IsMoving() = 0; - virtual void OverrideReset() = 0; - virtual int DamageDecal(int bitsDamageType) = 0; - virtual void SetToggleState(int state) = 0; - virtual void StartSneaking() = 0; - virtual void StopSneaking() = 0; - virtual bool OnControls(struct entvars_s *onpev) = 0; - virtual bool IsSneaking() = 0; - virtual bool IsAlive() = 0; - virtual bool IsBSPModel() = 0; - virtual bool ReflectGauss() = 0; - virtual bool HasTarget(string_t targetname) = 0; - virtual bool IsInWorld() = 0; - virtual bool IsPlayer() = 0; - virtual bool IsNetClient() = 0; - virtual const char *TeamID() = 0; - virtual ICSEntity *GetNextTarget() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType = USE_OFF, float value = 0.0f) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; - virtual ICSEntity *Respawn() = 0; - virtual void UpdateOwner() = 0; - virtual bool FBecomeProne() = 0; - virtual Vector Center() = 0; - virtual Vector EyePosition() = 0; - virtual Vector EarPosition() = 0; - virtual Vector BodyTarget(const Vector &posSrc) = 0; - virtual int Illumination() = 0; - virtual bool FVisible(CCSEntity *pEntity) = 0; - virtual bool FVisible(const Vector &vecOrigin) = 0; -public: - virtual struct entvars_s *GetEntVars() const = 0; - virtual class CBaseEntity *GetEntity() const = 0; - virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) = 0; - virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) = 0; -}; - -class ICSDelay: public ICSEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSAnimating: public ICSDelay { -public: - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void HandleAnimEvent(struct MonsterEvent_s *pEvent) = 0; -}; - -class ICSPlayerItem: public ICSAnimating { -public: - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void SetObjectCollisionBox() = 0; - virtual ICSEntity *Respawn() = 0; - virtual int AddToPlayer(CCSPlayer *pPlayer) = 0; - virtual int AddDuplicate(CCSPlayerItem *pItem) = 0; - virtual int GetItemInfo(struct ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual bool IsWeapon() = 0; - virtual bool CanHolster() = 0; - virtual void Holster(int skiplocal = 0) = 0; - virtual void UpdateItemInfo() = 0; - virtual void ItemPreFrame() = 0; - virtual void ItemPostFrame() = 0; - virtual void Drop() = 0; - virtual void Kill() = 0; - virtual void AttachToPlayer(CCSPlayer *pPlayer) = 0; - virtual int PrimaryAmmoIndex() = 0; - virtual int SecondaryAmmoIndex() = 0; - virtual int UpdateClientData(CCSPlayer *pPlayer) = 0; - virtual ICSPlayerItem *GetWeaponPtr() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; -}; - -class ICSPlayerWeapon: public ICSPlayerItem { -public: - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int AddToPlayer(CCSPlayer *pPlayer) = 0; - virtual int AddDuplicate(CCSPlayerItem *pItem) = 0; - virtual bool CanDeploy() = 0; - virtual bool IsWeapon() = 0; - virtual void Holster(int skiplocal = 0) = 0; - virtual void UpdateItemInfo() = 0; - virtual void ItemPostFrame() = 0; - virtual int PrimaryAmmoIndex() = 0; - virtual int SecondaryAmmoIndex() = 0; - virtual int UpdateClientData(CCSPlayer *pPlayer) = 0; - virtual ICSPlayerItem *GetWeaponPtr() = 0; - virtual int ExtractAmmo(CCSPlayerWeapon *pWeapon) = 0; - virtual int ExtractClipAmmo(CCSPlayerWeapon *pWeapon) = 0; - virtual int AddWeapon() = 0; - virtual bool PlayEmptySound() = 0; - virtual void ResetEmptySound() = 0; - virtual void SendWeaponAnim(int iAnim, int skiplocal = 0) = 0; - virtual bool IsUseable() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual void RetireWeapon() = 0; - virtual bool ShouldWeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSToggle: public ICSAnimating { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int GetToggleState() = 0; - virtual float GetDelay() = 0; -}; - -class ICSMonster: public ICSToggle { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int TakeHealth(float flHealth, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; - virtual bool IsAlive() = 0; - virtual float ChangeYaw(int speed) = 0; - virtual bool HasHumanGibs() = 0; - virtual bool HasAlienGibs() = 0; - virtual void FadeMonster() = 0; - virtual void GibMonster() = 0; - virtual enum Activity_s GetDeathActivity() = 0; - virtual void BecomeDead() = 0; - virtual bool ShouldFadeOnDeath() = 0; - virtual int IRelationship(CCSEntity *pTarget) = 0; - virtual void PainSound() = 0; - virtual void ResetMaxSpeed() = 0; - virtual void ReportAIState() = 0; - virtual void MonsterInitDead() = 0; - virtual void Look(int iDistance) = 0; - virtual ICSEntity *BestVisibleEnemy() = 0; - virtual bool FInViewCone(CCSEntity *pEntity) = 0; - virtual bool FInViewCone(const Vector *pOrigin) = 0; -}; - -class ICSWeaponBox: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void SetObjectCollisionBox() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSArmoury: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSPlayer: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int Classify() = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int TakeHealth(float flHealth, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual void AddPoints(int score, bool bAllowNegativeScore) = 0; - virtual void AddPointsToTeam(int score, bool bAllowNegativeScore) = 0; - virtual bool AddPlayerItem(CCSPlayerItem *pItem) = 0; - virtual bool RemovePlayerItem(CCSPlayerItem *pItem) = 0; - virtual int GiveAmmo(int iAmount, char *szName, int iMax) = 0; - virtual void StartSneaking() = 0; - virtual void StopSneaking() = 0; - virtual bool IsSneaking() = 0; - virtual bool IsAlive() = 0; - virtual bool IsPlayer() = 0; - virtual bool IsNetClient() = 0; - virtual const char *TeamID() = 0; - virtual bool FBecomeProne() = 0; - virtual Vector BodyTarget(const Vector &posSrc) = 0; - virtual int Illumination() = 0; - virtual bool ShouldFadeOnDeath() = 0; - virtual void ResetMaxSpeed() = 0; - virtual void Jump() = 0; - virtual void Duck() = 0; - virtual void PreThink() = 0; - virtual void PostThink() = 0; - virtual Vector GetGunPosition() = 0; - virtual bool IsBot() = 0; - virtual void UpdateClientData() = 0; - virtual void ImpulseCommands() = 0; - virtual void RoundRespawn() = 0; - virtual Vector GetAutoaimVector(float flDelta) = 0; - virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha) = 0; - virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) = 0; -public: - virtual bool IsConnected() const = 0; - - virtual void SetAnimation(PLAYER_ANIM playerAnim) = 0; - virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true) = 0; - virtual void GiveNamedItem(const char *pszName) = 0; - virtual void GiveNamedItemEx(const char *pszName) = 0; - virtual void GiveDefaultItems() = 0; - virtual void GiveShield(bool bDeploy = true) = 0; - virtual void DropShield(bool bDeploy = true) = 0; - virtual void DropPlayerItem(const char *pszItemName) = 0; - virtual void RemoveShield() = 0; - virtual void RemoveAllItems(bool bRemoveSuit) = 0; - virtual void SetPlayerModel(bool bHasC4) = 0; - virtual void SetPlayerModelEx(const char *modelName) = 0; - virtual void SetNewPlayerModel(const char *modelName) = 0; -}; - -class IAPI_Bot: public ICSPlayer { -public: - virtual void Spawn() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual void Think() = 0; - virtual bool IsBot() = 0; - virtual Vector GetAutoaimVector(float flDelta) = 0; - virtual void OnTouchingWeapon(CCSWeaponBox *box) = 0; - virtual bool Initialize(const BotProfile *profile) = 0; - virtual void SpawnBot() = 0; - virtual void Upkeep() = 0; - virtual void Update() = 0; - virtual void Run() = 0; - virtual void Walk() = 0; - virtual void Crouch() = 0; - virtual void StandUp() = 0; - virtual void MoveForward() = 0; - virtual void MoveBackward() = 0; - virtual void StrafeLeft() = 0; - virtual void StrafeRight() = 0; - virtual bool Jump(bool mustJump = false) = 0; - virtual void ClearMovement() = 0; - virtual void UseEnvironment() = 0; - virtual void PrimaryAttack() = 0; - virtual void ClearPrimaryAttack() = 0; - virtual void TogglePrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void OnEvent(enum GameEventType event, CCSEntity *entity = NULL, CCSEntity *other = NULL) = 0; - virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; - virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; - virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; - virtual bool IsPlayerFacingMe(CCSPlayer *other) const = 0; - virtual bool IsPlayerLookingAtMe(CCSPlayer *other) const = 0; - virtual void ExecuteCommand() = 0; - virtual void SetModel(const char *modelName) = 0; -}; - -class IAPI_CSBot: public IAPI_Bot { -public: - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual void RoundRespawn() = 0; - virtual void Blind(float duration, float holdTime, float fadeTime, int alpha = 255) = 0; - virtual void OnTouchingWeapon(CCSWeaponBox *box) = 0; - virtual bool Initialize(const BotProfile *profile) = 0; - virtual void SpawnBot() = 0; - virtual void Upkeep() = 0; - virtual void Update() = 0; - virtual void Walk() = 0; - virtual bool Jump(bool mustJump = false) = 0; - virtual void OnEvent(enum GameEventType event, CCSEntity *entity = NULL, CCSEntity *other = NULL) = 0; - virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; - virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; - virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; -}; - -class ICSShield: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSDeadHEV: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Classify() = 0; -}; - -class ICSSprayCan: public ICSEntity { -public: - virtual void Think() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSBloodSplat: public ICSEntity { -public: -}; - -class ICSWorld: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSDecal: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSCorpse: public ICSEntity { -public: - virtual int ObjectCaps() = 0; -}; - -class ICSGrenade: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void BounceSound() = 0; -}; - -class ICSAirtank: public ICSGrenade { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; -}; - -class ICSPlayerAmmo: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; - virtual ICSEntity *Respawn() = 0; -}; - -class ICS9MMAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICSBuckShotAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS556NatoAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS556NatoBoxAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS762NatoAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS45ACPAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS50AEAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS338MagnumAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS57MMAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS357SIGAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICSFuncWall: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncWallToggle: public ICSFuncWall { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncConveyor: public ICSFuncWall { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncIllusionary: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSFuncMonsterClip: public ICSFuncWall { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncRotating: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSPendulum: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSPointEntity: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSStripWeapons: public ICSPointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSInfoIntermission: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Think() = 0; -}; - -class ICSRevertSaved: public ICSPointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvGlobal: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSMultiSource: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool IsTriggered(CCSEntity *pActivator) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSButton: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSRotButton: public ICSButton { -public: - virtual void Spawn() = 0; -}; - -class ICSMomentaryRotButton: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvSpark: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSButtonTarget: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSDoor: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void SetToggleState(int state) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSRotDoor: public ICSDoor { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual void SetToggleState(int state) = 0; -}; - -class ICSMomentaryDoor: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGib: public ICSEntity { -public: - virtual int ObjectCaps() = 0; -}; - -class ICSBubbling: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBeam: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual Vector Center() = 0; -}; - -class ICSLightning: public ICSBeam { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; -}; - -class ICSLaser: public ICSBeam { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGlow: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Think() = 0; -}; - -class ICSSprite: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBombGlow: public ICSSprite { -public: - virtual void Spawn() = 0; - virtual void Think() = 0; -}; - -class ICSGibShooter: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual ICSGib *CreateGib() = 0; -}; - -class ICSEnvShooter: public ICSGibShooter { -public: - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual ICSGib *CreateGib() = 0; -}; - - -class ICSTestEffect: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBlood: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSShake: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFade: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - - -class ICSMessage: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvFunnel: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvBeverage: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSItemSoda: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; -}; - -class ICSShower: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSEnvExplosion: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBreakable: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int DamageDecal(int bitsDamageType) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSPushable: public ICSBreakable { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncTank: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool OnControls(struct entvars_s *pevTest) = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; - virtual Vector UpdateTargetPosition(CCSEntity *pTarget) = 0; -}; - -class ICSFuncTankGun: public ICSFuncTank { -public: - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankLaser: public ICSFuncTank { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; - virtual void Think() = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankRocket: public ICSFuncTank { -public: - virtual void Precache() = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankMortar: public ICSFuncTank { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankControls: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSRecharge: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSCycler: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual bool IsAlive() = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGenericCycler: public ICSCycler { -public: - virtual void Spawn() = 0; -}; - -class ICSCyclerProbe: public ICSCycler { -public: - virtual void Spawn() = 0; -}; - -class ICSCyclerSprite: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSWeaponCycler: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual int GetItemInfo(struct ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal = 0) = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; -}; - -class ICSWreckage: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Think() = 0; -}; - -class ICSWorldItem: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSItem: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual ICSEntity *Respawn() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSHealthKit: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSWallHealth: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSItemSuit: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemBattery: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemAntidote: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemSecurity: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemLongJump: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemKevlar: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemAssaultSuit: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemThighPack: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSGrenCatch: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSFuncWeaponCheck: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSHostage: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual int Classify() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int BloodColor() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSLight: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvLight: public ICSLight { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSRuleEntity: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSRulePointEntity: public ICSRuleEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSRuleBrushEntity: public ICSRuleEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSGameScore: public ICSRulePointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameEnd: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameText: public ICSRulePointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameTeamMaster: public ICSRulePointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int ObjectCaps() = 0; - virtual bool IsTriggered(CCSEntity *pActivator) = 0; - virtual const char *TeamID() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameTeamSet: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerZone: public ICSRuleBrushEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerHurt: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameCounter: public ICSRulePointEntity { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameCounterSet: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerEquip: public ICSRulePointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerTeam: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncMortarField: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSMortar: public ICSGrenade { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; -}; - -class ICSMapInfo: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSPathCorner: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual float GetDelay() = 0; -}; - -class ICSPathTrack: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncTrackTrain: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void OverrideReset() = 0; - virtual bool OnControls(struct entvars_s *pev) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSFuncVehicleControls: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSFuncVehicle: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int Classify() = 0; - virtual void OverrideReset() = 0; - virtual bool OnControls(struct entvars_s *pev) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSPlatTrain: public ICSToggle { -public: - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool IsTogglePlat() = 0; -}; - -class ICSFuncPlat: public ICSPlatTrain { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Blocked(CCSEntity *pOther) = 0; - virtual void GoUp() = 0; - virtual void GoDown() = 0; - virtual void HitTop() = 0; - virtual void HitBottom() = 0; -}; - -class ICSPlatTrigger: public ICSEntity { -public: - virtual int ObjectCaps() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSFuncPlatRot: public ICSFuncPlat { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void GoUp() = 0; - virtual void GoDown() = 0; - virtual void HitTop() = 0; - virtual void HitBottom() = 0; -}; - -class ICSFuncTrain: public ICSPlatTrain { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; - virtual void OverrideReset() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSFuncTrainControls: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSFuncTrackChange: public ICSFuncPlatRot { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void OverrideReset() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual bool IsTogglePlat() = 0; - virtual void GoUp() = 0; - virtual void GoDown() = 0; - virtual void HitTop() = 0; - virtual void HitBottom() = 0; - virtual void UpdateAutoTargets(int toggleState) = 0; -}; - -class ICSFuncTrackAuto: public ICSFuncTrackChange { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void UpdateAutoTargets(int toggleState) = 0; -}; - -class ICSGunTarget: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Activate() = 0; - virtual int Classify() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int BloodColor() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual Vector BodyTarget(const Vector &posSrc) = 0; -}; - -class ICSAmbientGeneric: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSEnvSound: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Think() = 0; -}; - -class ICSSpeaker: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSSoundEnt: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; -}; - -class ICSUSP: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSMP5N: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSG552: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSAK47: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSAUG: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSAWP: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSC4: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSDEAGLE: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; - virtual bool IsPistol() = 0; -}; - -class ICSFlashbang: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; - virtual bool IsPistol() = 0; -}; - -class ICSG3SG1: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSGLOCK18: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSHEGrenade: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSKnife: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSM249: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSM3: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSM4A1: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSMAC10: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSP228: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; - virtual bool IsPistol() = 0; -}; - -class ICSP90: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSCOUT: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSmokeGrenade: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSTMP: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSXM1014: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSELITE: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSFiveSeven: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSUMP45: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSG550: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSGalil: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSFamas: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSNullEntity: public ICSEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSDMStart: public ICSPointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual bool IsTriggered(CCSEntity *pEntity) = 0; -}; - -class ICSFrictionModifier: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSAutoTrigger: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; -}; - -class ICSTriggerRelay: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSMultiManager: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool HasTarget(string_t targetname) = 0; -}; - -class ICSRenderFxManager: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTrigger: public ICSToggle { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSTriggerHurt: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerMonsterJump: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSTriggerCDAudio: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTargetCDAudio: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTriggerMultiple: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerOnce: public ICSTriggerMultiple { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerCounter: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerVolume: public ICSPointEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSFireAndDie: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; -}; - -class ICSChangeLevel: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSLadder: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSTriggerPush: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSTriggerTeleport: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSBuyZone: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSBombTarget: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSHostageRescue: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSEscapeZone: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSVIP_SafetyZone: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerSave: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerEndSection: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSTriggerGravity: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerChangeTarget: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTriggerCamera: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSWeather: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSClientFog: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; +class CBaseEntity; +class CBasePlayer; + +// Implementation wrapper +class CCSEntity { +public: + virtual ~CCSEntity() {} + virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker); + virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand); +public: + CBaseEntity *m_pContainingEntity; +}; + +class CCSDelay: public CCSEntity {}; +class CCSAnimating: public CCSDelay {}; +class CCSPlayerItem: public CCSAnimating {}; +class CCSToggle: public CCSAnimating {}; +class CCSMonster: public CCSToggle {}; +class CCSWeaponBox: public CCSEntity {}; +class CCSArmoury: public CCSEntity {}; + +#pragma warning(disable:4351) // new behavior: elements of array 'CCSPlayer::m_szModel' will be default initialized +class CCSPlayer: public CCSMonster { +public: + CCSPlayer() : m_szModel() {} + + virtual bool IsConnected() const; + virtual void SetAnimation(PLAYER_ANIM playerAnim); + virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true); + virtual void GiveNamedItem(const char *pszName); + virtual void GiveNamedItemEx(const char *pszName); + virtual void GiveDefaultItems(); + virtual void GiveShield(bool bDeploy = true); + virtual void DropShield(bool bDeploy = true); + virtual void DropPlayerItem(const char *pszItemName); + virtual void RemoveShield(); + virtual void RemoveAllItems(bool bRemoveSuit); + virtual void SetPlayerModel(bool bHasC4); + virtual void SetPlayerModelEx(const char *modelName); + virtual void SetNewPlayerModel(const char *modelName); + + CBasePlayer *BasePlayer() const; +public: + char m_szModel[32]; +}; + +class CAPI_Bot: public CCSPlayer {}; +class CAPI_CSBot: public CAPI_Bot {}; +class CCSShield: public CCSEntity {}; +class CCSDeadHEV: public CCSMonster {}; +class CCSSprayCan: public CCSEntity {}; +class CCSBloodSplat: public CCSEntity {}; +class CCSPlayerWeapon: public CCSPlayerItem {}; +class CCSWorld: public CCSEntity {}; +class CCSDecal: public CCSEntity {}; +class CCSCorpse: public CCSEntity {}; +class CCSGrenade: public CCSMonster {}; +class CCSAirtank: public CCSGrenade {}; +class CCSPlayerAmmo: public CCSEntity {}; +class CCS9MMAmmo: public CCSPlayerAmmo {}; +class CCSBuckShotAmmo: public CCSPlayerAmmo {}; +class CCS556NatoAmmo: public CCSPlayerAmmo {}; +class CCS556NatoBoxAmmo: public CCSPlayerAmmo {}; +class CCS762NatoAmmo: public CCSPlayerAmmo {}; +class CCS45ACPAmmo: public CCSPlayerAmmo {}; +class CCS50AEAmmo: public CCSPlayerAmmo {}; +class CCS338MagnumAmmo: public CCSPlayerAmmo {}; +class CCS57MMAmmo: public CCSPlayerAmmo {}; +class CCS357SIGAmmo: public CCSPlayerAmmo {}; +class CCSFuncWall: public CCSEntity {}; +class CCSFuncWallToggle: public CCSFuncWall {}; +class CCSFuncConveyor: public CCSFuncWall {}; +class CCSFuncIllusionary: public CCSToggle {}; +class CCSFuncMonsterClip: public CCSFuncWall {}; +class CCSFuncRotating: public CCSEntity {}; +class CCSPendulum: public CCSEntity {}; +class CCSPointEntity: public CCSEntity {}; +class CCSStripWeapons: public CCSPointEntity {}; +class CCSInfoIntermission: public CCSPointEntity {}; +class CCSRevertSaved: public CCSPointEntity {}; +class CCSEnvGlobal: public CCSPointEntity {}; +class CCSMultiSource: public CCSPointEntity {}; +class CCSButton: public CCSToggle {}; +class CCSRotButton: public CCSButton {}; +class CCSMomentaryRotButton: public CCSToggle {}; +class CCSEnvSpark: public CCSEntity {}; +class CCSButtonTarget: public CCSEntity {}; +class CCSDoor: public CCSToggle {}; +class CCSRotDoor: public CCSDoor {}; +class CCSMomentaryDoor: public CCSToggle {}; +class CCSGib: public CCSEntity {}; +class CCSBubbling: public CCSEntity {}; +class CCSBeam: public CCSEntity {}; +class CCSLightning: public CCSBeam {}; +class CCSLaser: public CCSBeam {}; +class CCSGlow: public CCSPointEntity {}; +class CCSSprite: public CCSPointEntity {}; +class CCSBombGlow: public CCSSprite {}; +class CCSGibShooter: public CCSDelay {}; +class CCSEnvShooter: public CCSGibShooter {}; +class CCSTestEffect: public CCSDelay {}; +class CCSBlood: public CCSPointEntity {}; +class CCSShake: public CCSPointEntity {}; +class CCSFade: public CCSPointEntity {}; +class CCSMessage: public CCSPointEntity {}; +class CCSEnvFunnel: public CCSDelay {}; +class CCSEnvBeverage: public CCSDelay {}; +class CCSItemSoda: public CCSEntity {}; +class CCSShower: public CCSEntity {}; +class CCSEnvExplosion: public CCSMonster {}; +class CCSBreakable: public CCSDelay {}; +class CCSPushable: public CCSBreakable {}; +class CCSFuncTank: public CCSEntity {}; +class CCSFuncTankGun: public CCSFuncTank {}; +class CCSFuncTankLaser: public CCSFuncTank {}; +class CCSFuncTankRocket: public CCSFuncTank {}; +class CCSFuncTankMortar: public CCSFuncTank {}; +class CCSFuncTankControls: public CCSEntity {}; +class CCSRecharge: public CCSToggle {}; +class CCSCycler: public CCSMonster {}; +class CCSGenericCycler: public CCSCycler {}; +class CCSCyclerProbe: public CCSCycler {}; +class CCSCyclerSprite: public CCSEntity {}; +class CCSWeaponCycler: public CCSPlayerWeapon {}; +class CCSWreckage: public CCSMonster {}; +class CCSWorldItem: public CCSEntity {}; +class CCSItem: public CCSEntity {}; +class CCSHealthKit: public CCSItem {}; +class CCSWallHealth: public CCSToggle {}; +class CCSItemSuit: public CCSItem {}; +class CCSItemBattery: public CCSItem {}; +class CCSItemAntidote: public CCSItem {}; +class CCSItemSecurity: public CCSItem {}; +class CCSItemLongJump: public CCSItem {}; +class CCSItemKevlar: public CCSItem {}; +class CCSItemAssaultSuit: public CCSItem {}; +class CCSItemThighPack: public CCSItem {}; +class CCSGrenCatch: public CCSEntity {}; +class CCSFuncWeaponCheck: public CCSEntity {}; +class CCSHostage: public CCSMonster {}; +class CCSLight: public CCSPointEntity {}; +class CCSEnvLight: public CCSLight {}; +class CCSRuleEntity: public CCSEntity {}; +class CCSRulePointEntity: public CCSRuleEntity {}; +class CCSRuleBrushEntity: public CCSRuleEntity {}; +class CCSGameScore: public CCSRulePointEntity {}; +class CCSGameEnd: public CCSRulePointEntity {}; +class CCSGameText: public CCSRulePointEntity {}; +class CCSGameTeamMaster: public CCSRulePointEntity {}; +class CCSGameTeamSet: public CCSRulePointEntity {}; +class CCSGamePlayerZone: public CCSRuleBrushEntity {}; +class CCSGamePlayerHurt: public CCSRulePointEntity {}; +class CCSGameCounter: public CCSRulePointEntity {}; +class CCSGameCounterSet: public CCSRulePointEntity {}; +class CCSGamePlayerEquip: public CCSRulePointEntity {}; +class CCSGamePlayerTeam: public CCSRulePointEntity {}; +class CCSFuncMortarField: public CCSToggle {}; +class CCSMortar: public CCSGrenade {}; +class CCSMapInfo: public CCSPointEntity {}; +class CCSPathCorner: public CCSPointEntity {}; +class CCSPathTrack: public CCSPointEntity {}; +class CCSFuncTrackTrain: public CCSEntity {}; +class CCSFuncVehicleControls: public CCSEntity {}; +class CCSFuncVehicle: public CCSEntity {}; +class CCSPlatTrain: public CCSToggle {}; +class CCSFuncPlat: public CCSPlatTrain {}; +class CCSPlatTrigger: public CCSEntity {}; +class CCSFuncPlatRot: public CCSFuncPlat {}; +class CCSFuncTrain: public CCSPlatTrain {}; +class CCSFuncTrainControls: public CCSEntity {}; +class CCSFuncTrackChange: public CCSFuncPlatRot {}; +class CCSFuncTrackAuto: public CCSFuncTrackChange {}; +class CCSGunTarget: public CCSMonster {}; +class CCSAmbientGeneric: public CCSEntity {}; +class CCSEnvSound: public CCSPointEntity {}; +class CCSSpeaker: public CCSEntity {}; +class CCSSoundEnt: public CCSEntity {}; +class CCSUSP: public CCSPlayerWeapon {}; +class CCSMP5N: public CCSPlayerWeapon {}; +class CCSSG552: public CCSPlayerWeapon {}; +class CCSAK47: public CCSPlayerWeapon {}; +class CCSAUG: public CCSPlayerWeapon {}; +class CCSAWP: public CCSPlayerWeapon {}; +class CCSC4: public CCSPlayerWeapon {}; +class CCSDEAGLE: public CCSPlayerWeapon {}; +class CCSFlashbang: public CCSPlayerWeapon {}; +class CCSG3SG1: public CCSPlayerWeapon {}; +class CCSGLOCK18: public CCSPlayerWeapon {}; +class CCSHEGrenade: public CCSPlayerWeapon {}; +class CCSKnife: public CCSPlayerWeapon {}; +class CCSM249: public CCSPlayerWeapon {}; +class CCSM3: public CCSPlayerWeapon {}; +class CCSM4A1: public CCSPlayerWeapon {}; +class CCSMAC10: public CCSPlayerWeapon {}; +class CCSP228: public CCSPlayerWeapon {}; +class CCSP90: public CCSPlayerWeapon {}; +class CCSSCOUT: public CCSPlayerWeapon {}; +class CCSSmokeGrenade: public CCSPlayerWeapon {}; +class CCSTMP: public CCSPlayerWeapon {}; +class CCSXM1014: public CCSPlayerWeapon {}; +class CCSELITE: public CCSPlayerWeapon {}; +class CCSFiveSeven: public CCSPlayerWeapon {}; +class CCSUMP45: public CCSPlayerWeapon {}; +class CCSSG550: public CCSPlayerWeapon {}; +class CCSGalil: public CCSPlayerWeapon {}; +class CCSFamas: public CCSPlayerWeapon {}; +class CCSNullEntity: public CCSEntity {}; +class CCSDMStart: public CCSPointEntity {}; +class CCSFrictionModifier: public CCSEntity {}; +class CCSAutoTrigger: public CCSDelay {}; +class CCSTriggerRelay: public CCSDelay {}; +class CCSMultiManager: public CCSToggle {}; +class CCSRenderFxManager: public CCSEntity {}; +class CCSTrigger: public CCSToggle {}; +class CCSTriggerHurt: public CCSTrigger {}; +class CCSTriggerMonsterJump: public CCSTrigger {}; +class CCSTriggerCDAudio: public CCSTrigger {}; +class CCSTargetCDAudio: public CCSPointEntity {}; +class CCSTriggerMultiple: public CCSTrigger {}; +class CCSTriggerOnce: public CCSTriggerMultiple {}; +class CCSTriggerCounter: public CCSTrigger {}; +class CCSTriggerVolume: public CCSPointEntity {}; +class CCSFireAndDie: public CCSDelay {}; +class CCSChangeLevel: public CCSTrigger {}; +class CCSLadder: public CCSTrigger {}; +class CCSTriggerPush: public CCSTrigger {}; +class CCSTriggerTeleport: public CCSTrigger {}; +class CCSBuyZone: public CCSTrigger {}; +class CCSBombTarget: public CCSTrigger {}; +class CCSHostageRescue: public CCSTrigger {}; +class CCSEscapeZone: public CCSTrigger {}; +class CCSVIP_SafetyZone: public CCSTrigger {}; +class CCSTriggerSave: public CCSTrigger {}; +class CCSTriggerEndSection: public CCSTrigger {}; +class CCSTriggerGravity: public CCSTrigger {}; +class CCSTriggerChangeTarget: public CCSDelay {}; +class CCSTriggerCamera: public CCSDelay {}; +class CCSWeather: public CCSTrigger {}; +class CCSClientFog: public CCSEntity {}; + +inline CBasePlayer *CCSPlayer::BasePlayer() const { + return reinterpret_cast(this->m_pContainingEntity); +} diff --git a/regamedll/game_shared/bot/bot_manager.cpp b/regamedll/game_shared/bot/bot_manager.cpp index cbd52540..14231770 100644 --- a/regamedll/game_shared/bot/bot_manager.cpp +++ b/regamedll/game_shared/bot/bot_manager.cpp @@ -193,7 +193,7 @@ void CBotManager::__MAKE_VHOOK(StartFrame)() // Process each active bot for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(i); if (!pPlayer) continue; @@ -222,7 +222,7 @@ void CBotManager::__MAKE_VHOOK(OnEvent)(GameEventType event, CBaseEntity *entity // propogate event to all bots for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; diff --git a/regamedll/game_shared/bot/bot_util.cpp b/regamedll/game_shared/bot/bot_util.cpp index 64c32218..82f50417 100644 --- a/regamedll/game_shared/bot/bot_util.cpp +++ b/regamedll/game_shared/bot/bot_util.cpp @@ -75,19 +75,17 @@ int UTIL_ActivePlayersInGame() int iCount = 0; for (int iIndex = 1; iIndex <= gpGlobals->maxClients; ++iIndex) { - CBaseEntity *entity = UTIL_PlayerByIndex(iIndex); + CBasePlayer *player = UTIL_PlayerByIndex(iIndex); - if (entity == NULL) + if (player == NULL) continue; - if (FNullEnt(entity->pev)) + if (FNullEnt(player->pev)) continue; - if (FStrEq(STRING(entity->pev->netname), "")) + if (FStrEq(STRING(player->pev->netname), "")) continue; - CBasePlayer *player = static_cast(entity); - // ignore spectators if (player->m_iTeam != TERRORIST && player->m_iTeam != CT) continue; @@ -107,19 +105,17 @@ int UTIL_HumansInGame(bool ignoreSpectators) for (int iIndex = 1; iIndex <= gpGlobals->maxClients; ++iIndex) { - CBaseEntity *entity = UTIL_PlayerByIndex(iIndex); + CBasePlayer *player = UTIL_PlayerByIndex(iIndex); - if (entity == NULL) + if (player == NULL) continue; - if (FNullEnt(entity->pev)) + if (FNullEnt(player->pev)) continue; - if (FStrEq(STRING(entity->pev->netname), "")) + if (FStrEq(STRING(player->pev->netname), "")) continue; - CBasePlayer *player = static_cast(entity); - if (player->IsBot()) continue; @@ -140,19 +136,17 @@ int UTIL_HumansOnTeam(int teamID, bool isAlive) int iCount = 0; for (int iIndex = 1; iIndex <= gpGlobals->maxClients; ++iIndex) { - CBaseEntity *entity = UTIL_PlayerByIndex(iIndex); + CBasePlayer *player = UTIL_PlayerByIndex(iIndex); - if (entity == NULL) + if (player == NULL) continue; - if (FNullEnt(entity->pev)) + if (FNullEnt(player->pev)) continue; - if (FStrEq(STRING(entity->pev->netname), "")) + if (FStrEq(STRING(player->pev->netname), "")) continue; - CBasePlayer *player = static_cast(entity); - if (player->IsBot()) continue; @@ -174,7 +168,7 @@ int UTIL_BotsInGame() for (int iIndex = 1; iIndex <= gpGlobals->maxClients; ++iIndex) { - CBasePlayer *pPlayer = static_cast(UTIL_PlayerByIndex(iIndex)); + CBasePlayer *pPlayer = UTIL_PlayerByIndex(iIndex); if (pPlayer == NULL) continue; @@ -201,7 +195,7 @@ bool UTIL_KickBotFromTeam(TeamName kickTeam) // try to kick a dead bot first for (i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; @@ -227,7 +221,7 @@ bool UTIL_KickBotFromTeam(TeamName kickTeam) // no dead bots, kick any bot on the given team for (i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; @@ -258,7 +252,7 @@ bool UTIL_IsTeamAllBots(int team) int botCount = 0; for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; @@ -290,7 +284,7 @@ extern CBasePlayer *UTIL_GetClosestPlayer(const Vector *pos, float *distance) for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!IsEntityValid(player)) continue; @@ -321,7 +315,7 @@ extern CBasePlayer *UTIL_GetClosestPlayer(const Vector *pos, int team, float *di for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!IsEntityValid(player)) continue; @@ -373,7 +367,7 @@ bool UTIL_IsVisibleToTeam(const Vector &spot, int team, float maxRange) { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == NULL) continue; @@ -406,7 +400,7 @@ bool UTIL_IsVisibleToTeam(const Vector &spot, int team, float maxRange) CBasePlayer *UTIL_GetLocalPlayer() { if (!IS_DEDICATED_SERVER()) - return static_cast(UTIL_PlayerByIndex(1)); + return UTIL_PlayerByIndex(1); return NULL; } diff --git a/regamedll/game_shared/bot/bot_util.h b/regamedll/game_shared/bot/bot_util.h index 4911faed..9072f25d 100644 --- a/regamedll/game_shared/bot/bot_util.h +++ b/regamedll/game_shared/bot/bot_util.h @@ -154,7 +154,7 @@ bool ForEachPlayer(Functor &func) { for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (!IsEntityValid((CBaseEntity *)player)) continue; diff --git a/regamedll/game_shared/bot/nav_area.cpp b/regamedll/game_shared/bot/nav_area.cpp index 9b6439e9..f3c537cb 100644 --- a/regamedll/game_shared/bot/nav_area.cpp +++ b/regamedll/game_shared/bot/nav_area.cpp @@ -3277,7 +3277,7 @@ bool IsCrossingLineOfFire(const Vector &start, const Vector &finish, CBaseEntity { for (int p = 1; p <= gpGlobals->maxClients; ++p) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(p)); + CBasePlayer *player = UTIL_PlayerByIndex(p); if (!IsEntityValid(player)) continue; @@ -3424,7 +3424,7 @@ int CNavArea::GetPlayerCount(int teamID, CBasePlayer *ignore) const for (int i = 1; i <= gpGlobals->maxClients; ++i) { - CBasePlayer *player = static_cast(UTIL_PlayerByIndex(i)); + CBasePlayer *player = UTIL_PlayerByIndex(i); if (player == ignore) continue; diff --git a/regamedll/public/regamedll/regamedll_api.h b/regamedll/public/regamedll/regamedll_api.h index 858b61d8..a5e46306 100644 --- a/regamedll/public/regamedll/regamedll_api.h +++ b/regamedll/public/regamedll/regamedll_api.h @@ -124,8 +124,8 @@ typedef IVoidHookChainRegistryClass // CBasePlayer::Observer_IsValidTarget hook -typedef IHookChain IReGameHook_CBasePlayer_Observer_IsValidTarget; -typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget; +typedef IHookChain IReGameHook_CBasePlayer_Observer_IsValidTarget; +typedef IHookChainRegistryClass IReGameHookRegistry_CBasePlayer_Observer_IsValidTarget; // CBasePlayer::SetAnimation hook typedef IVoidHookChain IReGameHook_CBasePlayer_SetAnimation; @@ -376,11 +376,7 @@ public: }; struct ReGameFuncs_t { - class CBaseEntity *(*UTIL_PlayerByIndex)(int playerIndex); - class ICSPlayer *(*CBASE_TO_CSPLAYER)(class CBaseEntity *pEntity); - class ICSEntity *(*CBASE_TO_CSENTITY)(class CBaseEntity *pEntity); - class ICSPlayer *(*INDEX_TO_CSPLAYER)(int iPlayerIndex); - class ICSEntity *(*INDEX_TO_CSENTITY)(int iEntityIndex); + class CBasePlayer *(*UTIL_PlayerByIndex)(int playerIndex); struct edict_s *(*CREATE_NAMED_ENTITY2)(string_t iClass); void (*ChangeString)(char *&dest, const char *source); diff --git a/regamedll/public/regamedll/regamedll_interfaces.h b/regamedll/public/regamedll/regamedll_interfaces.h index 09d2d620..888e1e20 100644 --- a/regamedll/public/regamedll/regamedll_interfaces.h +++ b/regamedll/public/regamedll/regamedll_interfaces.h @@ -28,2053 +28,246 @@ #pragma once -class CSave; -class Vector; -class CRestore; - -class CCSEntity; -class CCSPlayer; -class CCSMonster; -class BotProfile; -class CCSWeaponBox; -class CCSPlayerItem; -class CCSPlayerWeapon; -class CCSquadMonster; - -class ICSMonster; -class ICSquadMonster; - -enum VisiblePartTypeBot:uint8 -{ - NONE = 0x00, - CHEST = 0x01, - HEAD = 0x02, - LEFT_SIDE = 0x04, - RIGHT_SIDE = 0x08, - FEET = 0x10 -}; - -class ICSEntity { -public: - virtual ~ICSEntity() = 0; - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Activate() = 0; - virtual void SetObjectCollisionBox() = 0; - virtual int Classify() = 0; - virtual void DeathNotice(struct entvars_s *pevChild) = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int TakeHealth(float flHealth, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; - virtual void TraceBleed(float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual bool IsTriggered(CCSEntity *pActivator) = 0; - virtual ICSMonster *MyMonsterPointer() = 0; - virtual ICSquadMonster *MySquadMonsterPointer() = 0; - virtual int GetToggleState() = 0; - virtual void AddPoints(int score, bool bAllowNegativeScore) = 0; - virtual void AddPointsToTeam(int score, bool bAllowNegativeScore) = 0; - virtual bool AddPlayerItem(CCSPlayerItem *pItem) = 0; - virtual bool RemovePlayerItem(CCSPlayerItem *pItem) = 0; - virtual int GiveAmmo(int iAmount, char *szName, int iMax) = 0; - virtual float GetDelay() = 0; - virtual int IsMoving() = 0; - virtual void OverrideReset() = 0; - virtual int DamageDecal(int bitsDamageType) = 0; - virtual void SetToggleState(int state) = 0; - virtual void StartSneaking() = 0; - virtual void StopSneaking() = 0; - virtual bool OnControls(struct entvars_s *onpev) = 0; - virtual bool IsSneaking() = 0; - virtual bool IsAlive() = 0; - virtual bool IsBSPModel() = 0; - virtual bool ReflectGauss() = 0; - virtual bool HasTarget(string_t targetname) = 0; - virtual bool IsInWorld() = 0; - virtual bool IsPlayer() = 0; - virtual bool IsNetClient() = 0; - virtual const char *TeamID() = 0; - virtual ICSEntity *GetNextTarget() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType = USE_OFF, float value = 0.0f) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; - virtual ICSEntity *Respawn() = 0; - virtual void UpdateOwner() = 0; - virtual bool FBecomeProne() = 0; - virtual Vector Center() = 0; - virtual Vector EyePosition() = 0; - virtual Vector EarPosition() = 0; - virtual Vector BodyTarget(const Vector &posSrc) = 0; - virtual int Illumination() = 0; - virtual bool FVisible(CCSEntity *pEntity) = 0; - virtual bool FVisible(const Vector &vecOrigin) = 0; -public: - virtual struct entvars_s *GetEntVars() const = 0; - virtual class CBaseEntity *GetEntity() const = 0; - virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) = 0; - virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) = 0; -}; - -class ICSDelay: public ICSEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSAnimating: public ICSDelay { -public: - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void HandleAnimEvent(struct MonsterEvent_s *pEvent) = 0; -}; - -class ICSPlayerItem: public ICSAnimating { -public: - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void SetObjectCollisionBox() = 0; - virtual ICSEntity *Respawn() = 0; - virtual int AddToPlayer(CCSPlayer *pPlayer) = 0; - virtual int AddDuplicate(CCSPlayerItem *pItem) = 0; - virtual int GetItemInfo(struct ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual bool IsWeapon() = 0; - virtual bool CanHolster() = 0; - virtual void Holster(int skiplocal = 0) = 0; - virtual void UpdateItemInfo() = 0; - virtual void ItemPreFrame() = 0; - virtual void ItemPostFrame() = 0; - virtual void Drop() = 0; - virtual void Kill() = 0; - virtual void AttachToPlayer(CCSPlayer *pPlayer) = 0; - virtual int PrimaryAmmoIndex() = 0; - virtual int SecondaryAmmoIndex() = 0; - virtual int UpdateClientData(CCSPlayer *pPlayer) = 0; - virtual ICSPlayerItem *GetWeaponPtr() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; -}; - -class ICSPlayerWeapon: public ICSPlayerItem { -public: - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int AddToPlayer(CCSPlayer *pPlayer) = 0; - virtual int AddDuplicate(CCSPlayerItem *pItem) = 0; - virtual bool CanDeploy() = 0; - virtual bool IsWeapon() = 0; - virtual void Holster(int skiplocal = 0) = 0; - virtual void UpdateItemInfo() = 0; - virtual void ItemPostFrame() = 0; - virtual int PrimaryAmmoIndex() = 0; - virtual int SecondaryAmmoIndex() = 0; - virtual int UpdateClientData(CCSPlayer *pPlayer) = 0; - virtual ICSPlayerItem *GetWeaponPtr() = 0; - virtual int ExtractAmmo(CCSPlayerWeapon *pWeapon) = 0; - virtual int ExtractClipAmmo(CCSPlayerWeapon *pWeapon) = 0; - virtual int AddWeapon() = 0; - virtual bool PlayEmptySound() = 0; - virtual void ResetEmptySound() = 0; - virtual void SendWeaponAnim(int iAnim, int skiplocal = 0) = 0; - virtual bool IsUseable() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual void RetireWeapon() = 0; - virtual bool ShouldWeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSToggle: public ICSAnimating { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int GetToggleState() = 0; - virtual float GetDelay() = 0; -}; - -class ICSMonster: public ICSToggle { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int TakeHealth(float flHealth, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; - virtual bool IsAlive() = 0; - virtual float ChangeYaw(int speed) = 0; - virtual bool HasHumanGibs() = 0; - virtual bool HasAlienGibs() = 0; - virtual void FadeMonster() = 0; - virtual void GibMonster() = 0; - virtual enum Activity_s GetDeathActivity() = 0; - virtual void BecomeDead() = 0; - virtual bool ShouldFadeOnDeath() = 0; - virtual int IRelationship(CCSEntity *pTarget) = 0; - virtual void PainSound() = 0; - virtual void ResetMaxSpeed() = 0; - virtual void ReportAIState() = 0; - virtual void MonsterInitDead() = 0; - virtual void Look(int iDistance) = 0; - virtual ICSEntity *BestVisibleEnemy() = 0; - virtual bool FInViewCone(CCSEntity *pEntity) = 0; - virtual bool FInViewCone(const Vector *pOrigin) = 0; -}; - -class ICSWeaponBox: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void SetObjectCollisionBox() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSArmoury: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSPlayer: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int Classify() = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int TakeHealth(float flHealth, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual void AddPoints(int score, bool bAllowNegativeScore) = 0; - virtual void AddPointsToTeam(int score, bool bAllowNegativeScore) = 0; - virtual bool AddPlayerItem(CCSPlayerItem *pItem) = 0; - virtual bool RemovePlayerItem(CCSPlayerItem *pItem) = 0; - virtual int GiveAmmo(int iAmount, char *szName, int iMax) = 0; - virtual void StartSneaking() = 0; - virtual void StopSneaking() = 0; - virtual bool IsSneaking() = 0; - virtual bool IsAlive() = 0; - virtual bool IsPlayer() = 0; - virtual bool IsNetClient() = 0; - virtual const char *TeamID() = 0; - virtual bool FBecomeProne() = 0; - virtual Vector BodyTarget(const Vector &posSrc) = 0; - virtual int Illumination() = 0; - virtual bool ShouldFadeOnDeath() = 0; - virtual void ResetMaxSpeed() = 0; - virtual void Jump() = 0; - virtual void Duck() = 0; - virtual void PreThink() = 0; - virtual void PostThink() = 0; - virtual Vector GetGunPosition() = 0; - virtual bool IsBot() = 0; - virtual void UpdateClientData() = 0; - virtual void ImpulseCommands() = 0; - virtual void RoundRespawn() = 0; - virtual Vector GetAutoaimVector(float flDelta) = 0; - virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha) = 0; - virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) = 0; -public: - virtual bool IsConnected() const = 0; - - virtual void SetAnimation(PLAYER_ANIM playerAnim) = 0; - virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true) = 0; - virtual void GiveNamedItem(const char *pszName) = 0; - virtual void GiveNamedItemEx(const char *pszName) = 0; - virtual void GiveDefaultItems() = 0; - virtual void GiveShield(bool bDeploy = true) = 0; - virtual void DropShield(bool bDeploy = true) = 0; - virtual void DropPlayerItem(const char *pszItemName) = 0; - virtual void RemoveShield() = 0; - virtual void RemoveAllItems(bool bRemoveSuit) = 0; - virtual void SetPlayerModel(bool bHasC4) = 0; - virtual void SetPlayerModelEx(const char *modelName) = 0; - virtual void SetNewPlayerModel(const char *modelName) = 0; -}; - -class IAPI_Bot: public ICSPlayer { -public: - virtual void Spawn() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual void Think() = 0; - virtual bool IsBot() = 0; - virtual Vector GetAutoaimVector(float flDelta) = 0; - virtual void OnTouchingWeapon(CCSWeaponBox *box) = 0; - virtual bool Initialize(const BotProfile *profile) = 0; - virtual void SpawnBot() = 0; - virtual void Upkeep() = 0; - virtual void Update() = 0; - virtual void Run() = 0; - virtual void Walk() = 0; - virtual void Crouch() = 0; - virtual void StandUp() = 0; - virtual void MoveForward() = 0; - virtual void MoveBackward() = 0; - virtual void StrafeLeft() = 0; - virtual void StrafeRight() = 0; - virtual bool Jump(bool mustJump = false) = 0; - virtual void ClearMovement() = 0; - virtual void UseEnvironment() = 0; - virtual void PrimaryAttack() = 0; - virtual void ClearPrimaryAttack() = 0; - virtual void TogglePrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void OnEvent(enum GameEventType event, CCSEntity *entity = NULL, CCSEntity *other = NULL) = 0; - virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; - virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; - virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; - virtual bool IsPlayerFacingMe(CCSPlayer *other) const = 0; - virtual bool IsPlayerLookingAtMe(CCSPlayer *other) const = 0; - virtual void ExecuteCommand() = 0; - virtual void SetModel(const char *modelName) = 0; -}; - -class IAPI_CSBot: public IAPI_Bot { -public: - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual void RoundRespawn() = 0; - virtual void Blind(float duration, float holdTime, float fadeTime, int alpha = 255) = 0; - virtual void OnTouchingWeapon(CCSWeaponBox *box) = 0; - virtual bool Initialize(const BotProfile *profile) = 0; - virtual void SpawnBot() = 0; - virtual void Upkeep() = 0; - virtual void Update() = 0; - virtual void Walk() = 0; - virtual bool Jump(bool mustJump = false) = 0; - virtual void OnEvent(enum GameEventType event, CCSEntity *entity = NULL, CCSEntity *other = NULL) = 0; - virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; - virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; - virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; -}; - -class ICSShield: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSDeadHEV: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Classify() = 0; -}; - -class ICSSprayCan: public ICSEntity { -public: - virtual void Think() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSBloodSplat: public ICSEntity { -public: -}; - -class ICSWorld: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSDecal: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSCorpse: public ICSEntity { -public: - virtual int ObjectCaps() = 0; -}; - -class ICSGrenade: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void BounceSound() = 0; -}; - -class ICSAirtank: public ICSGrenade { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Killed(struct entvars_s *pevAttacker, int iGib) = 0; - virtual int BloodColor() = 0; -}; - -class ICSPlayerAmmo: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; - virtual ICSEntity *Respawn() = 0; -}; - -class ICS9MMAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICSBuckShotAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS556NatoAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS556NatoBoxAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS762NatoAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS45ACPAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS50AEAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS338MagnumAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS57MMAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICS357SIGAmmo: public ICSPlayerAmmo { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool AddAmmo(CCSEntity *pOther) = 0; -}; - -class ICSFuncWall: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncWallToggle: public ICSFuncWall { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncConveyor: public ICSFuncWall { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncIllusionary: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSFuncMonsterClip: public ICSFuncWall { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncRotating: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSPendulum: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSPointEntity: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSStripWeapons: public ICSPointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSInfoIntermission: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Think() = 0; -}; - -class ICSRevertSaved: public ICSPointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvGlobal: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSMultiSource: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool IsTriggered(CCSEntity *pActivator) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSButton: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSRotButton: public ICSButton { -public: - virtual void Spawn() = 0; -}; - -class ICSMomentaryRotButton: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvSpark: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSButtonTarget: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSDoor: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void SetToggleState(int state) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSRotDoor: public ICSDoor { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual void SetToggleState(int state) = 0; -}; - -class ICSMomentaryDoor: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGib: public ICSEntity { -public: - virtual int ObjectCaps() = 0; -}; - -class ICSBubbling: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBeam: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual Vector Center() = 0; -}; - -class ICSLightning: public ICSBeam { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; -}; - -class ICSLaser: public ICSBeam { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGlow: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Think() = 0; -}; - -class ICSSprite: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBombGlow: public ICSSprite { -public: - virtual void Spawn() = 0; - virtual void Think() = 0; -}; - -class ICSGibShooter: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual ICSGib *CreateGib() = 0; -}; - -class ICSEnvShooter: public ICSGibShooter { -public: - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual ICSGib *CreateGib() = 0; -}; - - -class ICSTestEffect: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBlood: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSShake: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFade: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - - -class ICSMessage: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvFunnel: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvBeverage: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSItemSoda: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; -}; - -class ICSShower: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSEnvExplosion: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSBreakable: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void TraceAttack(struct entvars_s *pevAttacker, float flDamage, Vector &vecDir, struct TraceResult *ptr, int bitsDamageType) = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int DamageDecal(int bitsDamageType) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSPushable: public ICSBreakable { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncTank: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool OnControls(struct entvars_s *pevTest) = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; - virtual Vector UpdateTargetPosition(CCSEntity *pTarget) = 0; -}; - -class ICSFuncTankGun: public ICSFuncTank { -public: - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankLaser: public ICSFuncTank { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; - virtual void Think() = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankRocket: public ICSFuncTank { -public: - virtual void Precache() = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankMortar: public ICSFuncTank { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Fire(const Vector &barrelEnd, const Vector &forward, struct entvars_s *pevAttacker) = 0; -}; - -class ICSFuncTankControls: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSRecharge: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSCycler: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual bool IsAlive() = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGenericCycler: public ICSCycler { -public: - virtual void Spawn() = 0; -}; - -class ICSCyclerProbe: public ICSCycler { -public: - virtual void Spawn() = 0; -}; - -class ICSCyclerSprite: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSWeaponCycler: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual int GetItemInfo(struct ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal = 0) = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; -}; - -class ICSWreckage: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Think() = 0; -}; - -class ICSWorldItem: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSItem: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual ICSEntity *Respawn() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSHealthKit: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSWallHealth: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSItemSuit: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemBattery: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemAntidote: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemSecurity: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemLongJump: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemKevlar: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemAssaultSuit: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSItemThighPack: public ICSItem { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual bool MyTouch(CCSPlayer *pPlayer) = 0; -}; - -class ICSGrenCatch: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSFuncWeaponCheck: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSHostage: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual int Classify() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int BloodColor() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSLight: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSEnvLight: public ICSLight { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSRuleEntity: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSRulePointEntity: public ICSRuleEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSRuleBrushEntity: public ICSRuleEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSGameScore: public ICSRulePointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameEnd: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameText: public ICSRulePointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameTeamMaster: public ICSRulePointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int ObjectCaps() = 0; - virtual bool IsTriggered(CCSEntity *pActivator) = 0; - virtual const char *TeamID() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameTeamSet: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerZone: public ICSRuleBrushEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerHurt: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameCounter: public ICSRulePointEntity { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGameCounterSet: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerEquip: public ICSRulePointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSGamePlayerTeam: public ICSRulePointEntity { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncMortarField: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSMortar: public ICSGrenade { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; -}; - -class ICSMapInfo: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSPathCorner: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual float GetDelay() = 0; -}; - -class ICSPathTrack: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSFuncTrackTrain: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void OverrideReset() = 0; - virtual bool OnControls(struct entvars_s *pev) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSFuncVehicleControls: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSFuncVehicle: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual int Classify() = 0; - virtual void OverrideReset() = 0; - virtual bool OnControls(struct entvars_s *pev) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSPlatTrain: public ICSToggle { -public: - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool IsTogglePlat() = 0; -}; - -class ICSFuncPlat: public ICSPlatTrain { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Blocked(CCSEntity *pOther) = 0; - virtual void GoUp() = 0; - virtual void GoDown() = 0; - virtual void HitTop() = 0; - virtual void HitBottom() = 0; -}; - -class ICSPlatTrigger: public ICSEntity { -public: - virtual int ObjectCaps() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSFuncPlatRot: public ICSFuncPlat { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void GoUp() = 0; - virtual void GoDown() = 0; - virtual void HitTop() = 0; - virtual void HitBottom() = 0; -}; - -class ICSFuncTrain: public ICSPlatTrain { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Activate() = 0; - virtual void OverrideReset() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void Blocked(CCSEntity *pOther) = 0; -}; - -class ICSFuncTrainControls: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSFuncTrackChange: public ICSFuncPlatRot { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void OverrideReset() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual bool IsTogglePlat() = 0; - virtual void GoUp() = 0; - virtual void GoDown() = 0; - virtual void HitTop() = 0; - virtual void HitBottom() = 0; - virtual void UpdateAutoTargets(int toggleState) = 0; -}; - -class ICSFuncTrackAuto: public ICSFuncTrackChange { -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual void UpdateAutoTargets(int toggleState) = 0; -}; - -class ICSGunTarget: public ICSMonster { -public: - virtual void Spawn() = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Activate() = 0; - virtual int Classify() = 0; - virtual int TakeDamage(struct entvars_s *pevInflictor, struct entvars_s *pevAttacker, float flDamage, int bitsDamageType) = 0; - virtual int BloodColor() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual Vector BodyTarget(const Vector &posSrc) = 0; -}; - -class ICSAmbientGeneric: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSEnvSound: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual void Think() = 0; -}; - -class ICSSpeaker: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSSoundEnt: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; -}; - -class ICSUSP: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSMP5N: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSG552: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSAK47: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSAUG: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSAWP: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSC4: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSDEAGLE: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; - virtual bool IsPistol() = 0; -}; - -class ICSFlashbang: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; - virtual bool IsPistol() = 0; -}; - -class ICSG3SG1: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSGLOCK18: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSHEGrenade: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSKnife: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSM249: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSM3: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSM4A1: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSMAC10: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSP228: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; - virtual bool IsPistol() = 0; -}; - -class ICSP90: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSCOUT: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSmokeGrenade: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool CanDeploy() = 0; - virtual bool CanDrop() = 0; - virtual bool Deploy() = 0; - virtual void Holster(int skiplocal) = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSTMP: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSXM1014: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSELITE: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSFiveSeven: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSUMP45: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSSG550: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSGalil: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSFamas: public ICSPlayerWeapon { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int GetItemInfo(ItemInfo *p) = 0; - virtual bool Deploy() = 0; - virtual float GetMaxSpeed() = 0; - virtual int iItemSlot() = 0; - virtual void PrimaryAttack() = 0; - virtual void SecondaryAttack() = 0; - virtual void Reload() = 0; - virtual void WeaponIdle() = 0; - virtual bool UseDecrement() = 0; -}; - -class ICSNullEntity: public ICSEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSDMStart: public ICSPointEntity { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual bool IsTriggered(CCSEntity *pEntity) = 0; -}; - -class ICSFrictionModifier: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSAutoTrigger: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; -}; - -class ICSTriggerRelay: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSMultiManager: public ICSToggle { -public: - virtual void Spawn() = 0; - virtual void Restart() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual bool HasTarget(string_t targetname) = 0; -}; - -class ICSRenderFxManager: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTrigger: public ICSToggle { -public: - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int ObjectCaps() = 0; -}; - -class ICSTriggerHurt: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerMonsterJump: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void Think() = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSTriggerCDAudio: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void Touch(CCSEntity *pOther) = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTargetCDAudio: public ICSPointEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Think() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTriggerMultiple: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerOnce: public ICSTriggerMultiple { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerCounter: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerVolume: public ICSPointEntity { -public: - virtual void Spawn() = 0; -}; - -class ICSFireAndDie: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual int ObjectCaps() = 0; - virtual void Think() = 0; -}; - -class ICSChangeLevel: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; -}; - -class ICSLadder: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void Precache() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSTriggerPush: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual void Touch(CCSEntity *pOther) = 0; -}; - -class ICSTriggerTeleport: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSBuyZone: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSBombTarget: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSHostageRescue: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSEscapeZone: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSVIP_SafetyZone: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerSave: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerEndSection: public ICSTrigger { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; - -class ICSTriggerGravity: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSTriggerChangeTarget: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSTriggerCamera: public ICSDelay { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; - virtual int Save(CSave &save) = 0; - virtual int Restore(CRestore &restore) = 0; - virtual int ObjectCaps() = 0; - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) = 0; -}; - -class ICSWeather: public ICSTrigger { -public: - virtual void Spawn() = 0; -}; - -class ICSClientFog: public ICSEntity { -public: - virtual void Spawn() = 0; - virtual void KeyValue(struct KeyValueData_s *pkvd) = 0; -}; +class CBaseEntity; +class CBasePlayer; + +// Implementation wrapper +class CCSEntity { +public: + virtual ~CCSEntity() {} + virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker); + virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand); +public: + CBaseEntity *m_pContainingEntity; +}; + +class CCSDelay: public CCSEntity {}; +class CCSAnimating: public CCSDelay {}; +class CCSPlayerItem: public CCSAnimating {}; +class CCSToggle: public CCSAnimating {}; +class CCSMonster: public CCSToggle {}; +class CCSWeaponBox: public CCSEntity {}; +class CCSArmoury: public CCSEntity {}; + +#pragma warning(disable:4351) // new behavior: elements of array 'CCSPlayer::m_szModel' will be default initialized +class CCSPlayer: public CCSMonster { +public: + CCSPlayer() : m_szModel() {} + + virtual bool IsConnected() const; + virtual void SetAnimation(PLAYER_ANIM playerAnim); + virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true); + virtual void GiveNamedItem(const char *pszName); + virtual void GiveNamedItemEx(const char *pszName); + virtual void GiveDefaultItems(); + virtual void GiveShield(bool bDeploy = true); + virtual void DropShield(bool bDeploy = true); + virtual void DropPlayerItem(const char *pszItemName); + virtual void RemoveShield(); + virtual void RemoveAllItems(bool bRemoveSuit); + virtual void SetPlayerModel(bool bHasC4); + virtual void SetPlayerModelEx(const char *modelName); + virtual void SetNewPlayerModel(const char *modelName); + + CBasePlayer *BasePlayer() const; +public: + char m_szModel[32]; +}; + +class CAPI_Bot: public CCSPlayer {}; +class CAPI_CSBot: public CAPI_Bot {}; +class CCSShield: public CCSEntity {}; +class CCSDeadHEV: public CCSMonster {}; +class CCSSprayCan: public CCSEntity {}; +class CCSBloodSplat: public CCSEntity {}; +class CCSPlayerWeapon: public CCSPlayerItem {}; +class CCSWorld: public CCSEntity {}; +class CCSDecal: public CCSEntity {}; +class CCSCorpse: public CCSEntity {}; +class CCSGrenade: public CCSMonster {}; +class CCSAirtank: public CCSGrenade {}; +class CCSPlayerAmmo: public CCSEntity {}; +class CCS9MMAmmo: public CCSPlayerAmmo {}; +class CCSBuckShotAmmo: public CCSPlayerAmmo {}; +class CCS556NatoAmmo: public CCSPlayerAmmo {}; +class CCS556NatoBoxAmmo: public CCSPlayerAmmo {}; +class CCS762NatoAmmo: public CCSPlayerAmmo {}; +class CCS45ACPAmmo: public CCSPlayerAmmo {}; +class CCS50AEAmmo: public CCSPlayerAmmo {}; +class CCS338MagnumAmmo: public CCSPlayerAmmo {}; +class CCS57MMAmmo: public CCSPlayerAmmo {}; +class CCS357SIGAmmo: public CCSPlayerAmmo {}; +class CCSFuncWall: public CCSEntity {}; +class CCSFuncWallToggle: public CCSFuncWall {}; +class CCSFuncConveyor: public CCSFuncWall {}; +class CCSFuncIllusionary: public CCSToggle {}; +class CCSFuncMonsterClip: public CCSFuncWall {}; +class CCSFuncRotating: public CCSEntity {}; +class CCSPendulum: public CCSEntity {}; +class CCSPointEntity: public CCSEntity {}; +class CCSStripWeapons: public CCSPointEntity {}; +class CCSInfoIntermission: public CCSPointEntity {}; +class CCSRevertSaved: public CCSPointEntity {}; +class CCSEnvGlobal: public CCSPointEntity {}; +class CCSMultiSource: public CCSPointEntity {}; +class CCSButton: public CCSToggle {}; +class CCSRotButton: public CCSButton {}; +class CCSMomentaryRotButton: public CCSToggle {}; +class CCSEnvSpark: public CCSEntity {}; +class CCSButtonTarget: public CCSEntity {}; +class CCSDoor: public CCSToggle {}; +class CCSRotDoor: public CCSDoor {}; +class CCSMomentaryDoor: public CCSToggle {}; +class CCSGib: public CCSEntity {}; +class CCSBubbling: public CCSEntity {}; +class CCSBeam: public CCSEntity {}; +class CCSLightning: public CCSBeam {}; +class CCSLaser: public CCSBeam {}; +class CCSGlow: public CCSPointEntity {}; +class CCSSprite: public CCSPointEntity {}; +class CCSBombGlow: public CCSSprite {}; +class CCSGibShooter: public CCSDelay {}; +class CCSEnvShooter: public CCSGibShooter {}; +class CCSTestEffect: public CCSDelay {}; +class CCSBlood: public CCSPointEntity {}; +class CCSShake: public CCSPointEntity {}; +class CCSFade: public CCSPointEntity {}; +class CCSMessage: public CCSPointEntity {}; +class CCSEnvFunnel: public CCSDelay {}; +class CCSEnvBeverage: public CCSDelay {}; +class CCSItemSoda: public CCSEntity {}; +class CCSShower: public CCSEntity {}; +class CCSEnvExplosion: public CCSMonster {}; +class CCSBreakable: public CCSDelay {}; +class CCSPushable: public CCSBreakable {}; +class CCSFuncTank: public CCSEntity {}; +class CCSFuncTankGun: public CCSFuncTank {}; +class CCSFuncTankLaser: public CCSFuncTank {}; +class CCSFuncTankRocket: public CCSFuncTank {}; +class CCSFuncTankMortar: public CCSFuncTank {}; +class CCSFuncTankControls: public CCSEntity {}; +class CCSRecharge: public CCSToggle {}; +class CCSCycler: public CCSMonster {}; +class CCSGenericCycler: public CCSCycler {}; +class CCSCyclerProbe: public CCSCycler {}; +class CCSCyclerSprite: public CCSEntity {}; +class CCSWeaponCycler: public CCSPlayerWeapon {}; +class CCSWreckage: public CCSMonster {}; +class CCSWorldItem: public CCSEntity {}; +class CCSItem: public CCSEntity {}; +class CCSHealthKit: public CCSItem {}; +class CCSWallHealth: public CCSToggle {}; +class CCSItemSuit: public CCSItem {}; +class CCSItemBattery: public CCSItem {}; +class CCSItemAntidote: public CCSItem {}; +class CCSItemSecurity: public CCSItem {}; +class CCSItemLongJump: public CCSItem {}; +class CCSItemKevlar: public CCSItem {}; +class CCSItemAssaultSuit: public CCSItem {}; +class CCSItemThighPack: public CCSItem {}; +class CCSGrenCatch: public CCSEntity {}; +class CCSFuncWeaponCheck: public CCSEntity {}; +class CCSHostage: public CCSMonster {}; +class CCSLight: public CCSPointEntity {}; +class CCSEnvLight: public CCSLight {}; +class CCSRuleEntity: public CCSEntity {}; +class CCSRulePointEntity: public CCSRuleEntity {}; +class CCSRuleBrushEntity: public CCSRuleEntity {}; +class CCSGameScore: public CCSRulePointEntity {}; +class CCSGameEnd: public CCSRulePointEntity {}; +class CCSGameText: public CCSRulePointEntity {}; +class CCSGameTeamMaster: public CCSRulePointEntity {}; +class CCSGameTeamSet: public CCSRulePointEntity {}; +class CCSGamePlayerZone: public CCSRuleBrushEntity {}; +class CCSGamePlayerHurt: public CCSRulePointEntity {}; +class CCSGameCounter: public CCSRulePointEntity {}; +class CCSGameCounterSet: public CCSRulePointEntity {}; +class CCSGamePlayerEquip: public CCSRulePointEntity {}; +class CCSGamePlayerTeam: public CCSRulePointEntity {}; +class CCSFuncMortarField: public CCSToggle {}; +class CCSMortar: public CCSGrenade {}; +class CCSMapInfo: public CCSPointEntity {}; +class CCSPathCorner: public CCSPointEntity {}; +class CCSPathTrack: public CCSPointEntity {}; +class CCSFuncTrackTrain: public CCSEntity {}; +class CCSFuncVehicleControls: public CCSEntity {}; +class CCSFuncVehicle: public CCSEntity {}; +class CCSPlatTrain: public CCSToggle {}; +class CCSFuncPlat: public CCSPlatTrain {}; +class CCSPlatTrigger: public CCSEntity {}; +class CCSFuncPlatRot: public CCSFuncPlat {}; +class CCSFuncTrain: public CCSPlatTrain {}; +class CCSFuncTrainControls: public CCSEntity {}; +class CCSFuncTrackChange: public CCSFuncPlatRot {}; +class CCSFuncTrackAuto: public CCSFuncTrackChange {}; +class CCSGunTarget: public CCSMonster {}; +class CCSAmbientGeneric: public CCSEntity {}; +class CCSEnvSound: public CCSPointEntity {}; +class CCSSpeaker: public CCSEntity {}; +class CCSSoundEnt: public CCSEntity {}; +class CCSUSP: public CCSPlayerWeapon {}; +class CCSMP5N: public CCSPlayerWeapon {}; +class CCSSG552: public CCSPlayerWeapon {}; +class CCSAK47: public CCSPlayerWeapon {}; +class CCSAUG: public CCSPlayerWeapon {}; +class CCSAWP: public CCSPlayerWeapon {}; +class CCSC4: public CCSPlayerWeapon {}; +class CCSDEAGLE: public CCSPlayerWeapon {}; +class CCSFlashbang: public CCSPlayerWeapon {}; +class CCSG3SG1: public CCSPlayerWeapon {}; +class CCSGLOCK18: public CCSPlayerWeapon {}; +class CCSHEGrenade: public CCSPlayerWeapon {}; +class CCSKnife: public CCSPlayerWeapon {}; +class CCSM249: public CCSPlayerWeapon {}; +class CCSM3: public CCSPlayerWeapon {}; +class CCSM4A1: public CCSPlayerWeapon {}; +class CCSMAC10: public CCSPlayerWeapon {}; +class CCSP228: public CCSPlayerWeapon {}; +class CCSP90: public CCSPlayerWeapon {}; +class CCSSCOUT: public CCSPlayerWeapon {}; +class CCSSmokeGrenade: public CCSPlayerWeapon {}; +class CCSTMP: public CCSPlayerWeapon {}; +class CCSXM1014: public CCSPlayerWeapon {}; +class CCSELITE: public CCSPlayerWeapon {}; +class CCSFiveSeven: public CCSPlayerWeapon {}; +class CCSUMP45: public CCSPlayerWeapon {}; +class CCSSG550: public CCSPlayerWeapon {}; +class CCSGalil: public CCSPlayerWeapon {}; +class CCSFamas: public CCSPlayerWeapon {}; +class CCSNullEntity: public CCSEntity {}; +class CCSDMStart: public CCSPointEntity {}; +class CCSFrictionModifier: public CCSEntity {}; +class CCSAutoTrigger: public CCSDelay {}; +class CCSTriggerRelay: public CCSDelay {}; +class CCSMultiManager: public CCSToggle {}; +class CCSRenderFxManager: public CCSEntity {}; +class CCSTrigger: public CCSToggle {}; +class CCSTriggerHurt: public CCSTrigger {}; +class CCSTriggerMonsterJump: public CCSTrigger {}; +class CCSTriggerCDAudio: public CCSTrigger {}; +class CCSTargetCDAudio: public CCSPointEntity {}; +class CCSTriggerMultiple: public CCSTrigger {}; +class CCSTriggerOnce: public CCSTriggerMultiple {}; +class CCSTriggerCounter: public CCSTrigger {}; +class CCSTriggerVolume: public CCSPointEntity {}; +class CCSFireAndDie: public CCSDelay {}; +class CCSChangeLevel: public CCSTrigger {}; +class CCSLadder: public CCSTrigger {}; +class CCSTriggerPush: public CCSTrigger {}; +class CCSTriggerTeleport: public CCSTrigger {}; +class CCSBuyZone: public CCSTrigger {}; +class CCSBombTarget: public CCSTrigger {}; +class CCSHostageRescue: public CCSTrigger {}; +class CCSEscapeZone: public CCSTrigger {}; +class CCSVIP_SafetyZone: public CCSTrigger {}; +class CCSTriggerSave: public CCSTrigger {}; +class CCSTriggerEndSection: public CCSTrigger {}; +class CCSTriggerGravity: public CCSTrigger {}; +class CCSTriggerChangeTarget: public CCSDelay {}; +class CCSTriggerCamera: public CCSDelay {}; +class CCSWeather: public CCSTrigger {}; +class CCSClientFog: public CCSEntity {}; + +inline CBasePlayer *CCSPlayer::BasePlayer() const { + return reinterpret_cast(this->m_pContainingEntity); +} diff --git a/regamedll/regamedll/regamedll.cpp b/regamedll/regamedll/regamedll.cpp index 009b1d50..92d9923b 100644 --- a/regamedll/regamedll/regamedll.cpp +++ b/regamedll/regamedll/regamedll.cpp @@ -5,5 +5,4 @@ void Regamedll_Game_Init() g_bIsCzeroGame = UTIL_IsGame("czero"); g_bAllowedCSBot = UTIL_AreBotsAllowed(); // determine whether bots can be used or not g_bHostageImprov = UTIL_AreHostagesImprov(); // determine whether hostage improv can be used or not - } diff --git a/regamedll/regamedll/regamedll_api_impl.cpp b/regamedll/regamedll/regamedll_api_impl.cpp index b01d3c88..0a0749e2 100644 --- a/regamedll/regamedll/regamedll_api_impl.cpp +++ b/regamedll/regamedll/regamedll_api_impl.cpp @@ -31,10 +31,6 @@ CReGameHookchains g_ReGameHookchains; ReGameFuncs_t g_ReGameApiFuncs = { &UTIL_PlayerByIndex, - &CBASE_TO_CSPLAYER, - &CBASE_TO_CSENTITY, - &INDEX_TO_CSPLAYER, - &INDEX_TO_CSENTITY, &CREATE_NAMED_ENTITY, &Regamedll_ChangeString_api, diff --git a/regamedll/regamedll/regamedll_api_impl.h b/regamedll/regamedll/regamedll_api_impl.h index 0daa2036..24fac46b 100644 --- a/regamedll/regamedll/regamedll_api_impl.h +++ b/regamedll/regamedll/regamedll_api_impl.h @@ -121,8 +121,8 @@ typedef IVoidHookChainRegistryClassImpl C // CBasePlayer::Observer_IsValidTarget hook -typedef IHookChainClassImpl CReGameHook_CBasePlayer_Observer_IsValidTarget; -typedef IHookChainRegistryClassImpl CReGameHookRegistry_CBasePlayer_Observer_IsValidTarget; +typedef IHookChainClassImpl CReGameHook_CBasePlayer_Observer_IsValidTarget; +typedef IHookChainRegistryClassImpl CReGameHookRegistry_CBasePlayer_Observer_IsValidTarget; // CBasePlayer::SetAnimation hook typedef IVoidHookChainClassImpl CReGameHook_CBasePlayer_SetAnimation; diff --git a/regamedll/regamedll/regamedll_interfaces_impl.cpp b/regamedll/regamedll/regamedll_interfaces_impl.cpp index e1a8708a..d9ad2d89 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.cpp +++ b/regamedll/regamedll/regamedll_interfaces_impl.cpp @@ -28,109 +28,25 @@ #include "precompiled.h" -CCSEntity **g_GameEntities = NULL; -bool g_bInitialized = false; +void CCSEntity::FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) { + m_pContainingEntity->FireBullets(iShots, vecSrc, vecDirShooting, vecSpread, flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker); +}; -ICSEntity::~ICSEntity() {} +Vector CCSEntity::FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) { + return m_pContainingEntity->FireBullets3(vecSrc, vecDirShooting, vecSpread, flDistance, iPenetration, iBulletType, iDamage, flRangeModifier, pevAttacker, bPistol, shared_rand); +}; -void Regamedll_AllocEntities(int maxEdicts) -{ - if (g_bInitialized) - return; - - g_bInitialized = true; - 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_ent", [](){ - Regamedll_MonitorEntities(); - }); -#endif -} - -void Regamedll_FreeEntities(CBaseEntity *pEntity) -{ - if (pEntity == NULL) - { - for (int i = 0; i < gpGlobals->maxEntities; ++i) - { - delete g_GameEntities[i]; - g_GameEntities[i] = NULL; - } - - Q_free(g_GameEntities); - g_GameEntities = NULL; - g_bInitialized = false; - return; - } - - int index = pEntity->entindex(); - if (index < 0 || index > gpGlobals->maxEntities) - return; - - 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() -{ - int nCount = 0; - for (int i = 0; i < gpGlobals->maxEntities; ++i) - { - if (g_GameEntities[i] == NULL) - continue; - - ++nCount; - } - - CONSOLE_ECHO(__FUNCTION__":: nCount: (%d) (%d)\n", nCount, gpGlobals->maxEntities); -} - -ICSPlayer *EXT_FUNC CBASE_TO_CSPLAYER(CBaseEntity *pEntity) -{ - if (pEntity == NULL) - return NULL; - - int index = pEntity->entindex(); - if (index < 1 || index > gpGlobals->maxClients) - { - return NULL; - //regamedll_syserror(__FUNCTION__": Invalid player index %d", index); - } - - return reinterpret_cast(g_GameEntities[index]); -} - -ICSPlayer *EXT_FUNC INDEX_TO_CSPLAYER(int iPlayerIndex) -{ - CBaseEntity *pEntity = UTIL_PlayerByIndex(iPlayerIndex); - return CBASE_TO_CSPLAYER(pEntity); -} - -ICSEntity *EXT_FUNC CBASE_TO_CSENTITY(CBaseEntity *pEntity) -{ - if (pEntity == NULL) - return NULL; - - int index = pEntity->entindex(); - if (index < 0 || index > gpGlobals->maxEntities) - { - return NULL; - //regamedll_syserror(__FUNCTION__": Invalid entity index %d", index); - } - - return g_GameEntities[index]; -} - -ICSEntity *EXT_FUNC INDEX_TO_CSENTITY(int iEntityIndex) -{ - CBaseEntity *pEntity = CBaseEntity::Instance(INDEXENT(iEntityIndex)); - return CBASE_TO_CSENTITY(pEntity); -} +bool CCSPlayer::IsConnected() const { return m_pContainingEntity->has_disconnected == false; } +void CCSPlayer::SetAnimation(PLAYER_ANIM playerAnim) { BasePlayer()->SetAnimation(playerAnim); } +void CCSPlayer::AddAccount(int amount, RewardType type, bool bTrackChange) { BasePlayer()->AddAccount(amount, type, bTrackChange); } +void CCSPlayer::GiveNamedItem(const char *pszName) { BasePlayer()->GiveNamedItem(pszName); } +void CCSPlayer::GiveNamedItemEx(const char *pszName) { BasePlayer()->GiveNamedItemEx(pszName); } +void CCSPlayer::GiveDefaultItems() { BasePlayer()->GiveDefaultItems(); } +void CCSPlayer::GiveShield(bool bDeploy) { BasePlayer()->GiveShield(bDeploy); } +void CCSPlayer::DropShield(bool bDeploy) { BasePlayer()->DropShield(bDeploy); } +void CCSPlayer::DropPlayerItem(const char *pszItemName) { BasePlayer()->DropPlayerItem(pszItemName); } +void CCSPlayer::RemoveShield() { BasePlayer()->RemoveShield(); } +void CCSPlayer::RemoveAllItems(bool bRemoveSuit) { BasePlayer()->RemoveAllItems(bRemoveSuit ? TRUE : FALSE); } +void CCSPlayer::SetPlayerModel(bool bHasC4) { BasePlayer()->SetPlayerModel(bHasC4 ? TRUE : FALSE); } +void CCSPlayer::SetPlayerModelEx(const char *modelName) { strncpy(m_szModel, modelName, sizeof(m_szModel) - 1); m_szModel[sizeof(m_szModel) - 1] = '\0'; }; +void CCSPlayer::SetNewPlayerModel(const char *modelName) { BasePlayer()->SetNewPlayerModel(modelName); } diff --git a/regamedll/regamedll/regamedll_interfaces_impl.h b/regamedll/regamedll/regamedll_interfaces_impl.h index 7b9dce59..b999abf2 100644 --- a/regamedll/regamedll/regamedll_interfaces_impl.h +++ b/regamedll/regamedll/regamedll_interfaces_impl.h @@ -30,18 +30,6 @@ #include "maintypes.h" #include "regamedll_interfaces.h" -class CCSEntity; -class CCSPlayer; -class CCSMonster; -class CBaseEntity; -class CCSquadMonster; - -extern CCSEntity **g_GameEntities; -extern ICSEntity *CBASE_TO_CSENTITY(CBaseEntity *pEntity); -extern ICSPlayer *CBASE_TO_CSPLAYER(CBaseEntity *pEntity); -extern ICSPlayer *INDEX_TO_CSPLAYER(int iPlayerIndex); -extern ICSEntity *INDEX_TO_CSENTITY(int iEntityIndex); - #define __API_VHOOK(fname)\ fname##_ @@ -108,2468 +96,3 @@ extern ICSEntity *INDEX_TO_CSENTITY(int iEntityIndex); } #endif - -// Implementation interfaces -class CCSEntity: public ICSEntity { -public: - CBaseEntity *m_pEntity; - CCSEntity(CBaseEntity *pEntity) : m_pEntity(pEntity) {} -public: - virtual ~CCSEntity() {} - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Activate() { m_pEntity->Activate(); } - virtual void SetObjectCollisionBox() { m_pEntity->SetObjectCollisionBox(); } - virtual int Classify() { return m_pEntity->Classify(); } - virtual void DeathNotice(entvars_t *pevChild) { m_pEntity->DeathNotice(pevChild); } - virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector &vecDir, TraceResult *ptr, int bitsDamageType) { m_pEntity->TraceAttack(pevAttacker, flDamage, vecDir, ptr, bitsDamageType); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int TakeHealth(float flHealth, int bitsDamageType) { return m_pEntity->TakeHealth(flHealth, bitsDamageType); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual int BloodColor() { return m_pEntity->BloodColor(); } - virtual void TraceBleed(float flDamage, Vector &vecDir, TraceResult *ptr, int bitsDamageType) { m_pEntity->TraceBleed(flDamage, vecDir, ptr, bitsDamageType); } - virtual bool IsTriggered(CCSEntity *pActivator) { return m_pEntity->IsTriggered(pActivator->m_pEntity) ? true : false; } - virtual ICSMonster *MyMonsterPointer() { return reinterpret_cast(CBASE_TO_CSENTITY(m_pEntity->MyMonsterPointer())); } - virtual ICSquadMonster *MySquadMonsterPointer() { return (ICSquadMonster *)m_pEntity->MySquadMonsterPointer(); } - virtual int GetToggleState() { return m_pEntity->GetToggleState(); } - virtual void AddPoints(int score, bool bAllowNegativeScore) { m_pEntity->AddPoints(score, bAllowNegativeScore ? TRUE : FALSE); } - virtual void AddPointsToTeam(int score, bool bAllowNegativeScore) { m_pEntity->AddPointsToTeam(score, bAllowNegativeScore ? TRUE : FALSE); } - virtual bool AddPlayerItem(CCSPlayerItem *pItem) { return m_pEntity->AddPlayerItem((CBasePlayerItem *)((CCSEntity *)pItem)->m_pEntity) ? true : false; } - virtual bool RemovePlayerItem(CCSPlayerItem *pItem) { return m_pEntity->RemovePlayerItem((CBasePlayerItem *)((CCSEntity *)pItem)->m_pEntity) ? true : false; } - virtual int GiveAmmo(int iAmount, char *szName, int iMax) { return m_pEntity->GiveAmmo(iAmount, szName, iMax); } - virtual float GetDelay() { return m_pEntity->GetDelay(); } - virtual int IsMoving() { return m_pEntity->IsMoving(); } - virtual void OverrideReset() { m_pEntity->OverrideReset(); } - virtual int DamageDecal(int bitsDamageType) { return m_pEntity->DamageDecal(bitsDamageType); } - virtual void SetToggleState(int state) { m_pEntity->SetToggleState(state); } - virtual void StartSneaking() { m_pEntity->StartSneaking(); } - virtual void StopSneaking() { m_pEntity->StopSneaking(); } - virtual bool OnControls(entvars_t *onpev) { return m_pEntity->OnControls(onpev) ? true : false; } - virtual bool IsSneaking() { return m_pEntity->IsSneaking() ? true : false; } - virtual bool IsAlive() { return m_pEntity->IsAlive() ? true : false; } - virtual bool IsBSPModel() { return m_pEntity->IsBSPModel() ? true : false; } - virtual bool ReflectGauss() { return m_pEntity->ReflectGauss() ? true : false; } - virtual bool HasTarget(string_t targetname) { return m_pEntity->HasTarget(targetname) ? true : false; } - virtual bool IsInWorld() { return m_pEntity->IsInWorld() ? true : false; } - virtual bool IsPlayer() { return m_pEntity->IsPlayer() ? true : false; } - virtual bool IsNetClient() { return m_pEntity->IsNetClient() ? true : false; } - virtual const char *TeamID() { return m_pEntity->TeamID(); } - virtual ICSEntity *GetNextTarget() { return CBASE_TO_CSENTITY(m_pEntity->GetNextTarget()); } - virtual void Think() { m_pEntity->Think(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } - virtual ICSEntity *Respawn() { return CBASE_TO_CSENTITY(m_pEntity->Respawn()); } - virtual void UpdateOwner() { m_pEntity->UpdateOwner(); } - virtual bool FBecomeProne() { return m_pEntity->FBecomeProne() ? true : false; } - virtual Vector Center() { return m_pEntity->Center(); } - virtual Vector EyePosition() { return m_pEntity->EyePosition(); } - virtual Vector EarPosition() { return m_pEntity->EarPosition(); } - virtual Vector BodyTarget(const Vector &posSrc) { return m_pEntity->BodyTarget(posSrc); } - virtual int Illumination() { return m_pEntity->Illumination(); } - virtual bool FVisible(CCSEntity *pEntity) { return m_pEntity->FVisible(pEntity->m_pEntity) ? true : false; } - virtual bool FVisible(const Vector &vecOrigin) { return m_pEntity->FVisible(vecOrigin) ? true : false; } -public: - virtual entvars_t *GetEntVars() const { return m_pEntity->pev; } - virtual CBaseEntity *GetEntity() const { return m_pEntity; } - virtual void FireBullets(int iShots, Vector &vecSrc, Vector &vecDirShooting, Vector &vecSpread, float flDistance, int iBulletType, int iTracerFreq, int iDamage, entvars_t *pevAttacker) { m_pEntity->FireBullets(iShots, vecSrc, vecDirShooting, vecSpread, flDistance, iBulletType, iTracerFreq, iDamage, pevAttacker); }; - virtual Vector FireBullets3(Vector &vecSrc, Vector &vecDirShooting, float vecSpread, float flDistance, int iPenetration, int iBulletType, int iDamage, float flRangeModifier, entvars_t *pevAttacker, bool bPistol, int shared_rand) { return m_pEntity->FireBullets3(vecSrc, vecDirShooting, vecSpread, flDistance, iPenetration, iBulletType, iDamage, flRangeModifier, pevAttacker, bPistol, shared_rand); }; -}; - -class CCSDelay: public CCSEntity { -public: - CCSDelay(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } -}; - -class CCSAnimating: public CCSDelay { -public: - CCSAnimating(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void HandleAnimEvent(MonsterEvent_t *pEvent) { return ((CBaseAnimating *)m_pEntity)->HandleAnimEvent(pEvent); } -}; - -class CCSPlayerItem: public CCSAnimating { -public: - CCSPlayerItem(CBaseEntity *pEntity) : CCSAnimating(pEntity) {} -public: - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void SetObjectCollisionBox() { m_pEntity->SetObjectCollisionBox(); } - virtual ICSEntity *Respawn() { return CBASE_TO_CSENTITY(m_pEntity->Respawn()); } - virtual int AddToPlayer(CCSPlayer *pPlayer) { return ((CBasePlayerItem *)m_pEntity)->AddToPlayer((CBasePlayer *)((CCSEntity *)pPlayer)->m_pEntity); } - virtual int AddDuplicate(CCSPlayerItem *pItem) { return ((CBasePlayerItem *)m_pEntity)->AddDuplicate((CBasePlayerItem *)pItem->m_pEntity); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } - virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual bool IsWeapon() { return ((CBasePlayerItem *)m_pEntity)->IsWeapon() ? true : false; } - virtual bool CanHolster() { return ((CBasePlayerItem *)m_pEntity)->CanHolster() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } - virtual void UpdateItemInfo() { ((CBasePlayerItem *)m_pEntity)->UpdateItemInfo(); } - virtual void ItemPreFrame() { ((CBasePlayerItem *)m_pEntity)->ItemPreFrame(); } - virtual void ItemPostFrame() { ((CBasePlayerItem *)m_pEntity)->ItemPostFrame(); } - virtual void Drop() { ((CBasePlayerItem *)m_pEntity)->Drop(); } - virtual void Kill() { ((CBasePlayerItem *)m_pEntity)->Kill(); } - virtual void AttachToPlayer(CCSPlayer *pPlayer) { ((CBasePlayerItem *)m_pEntity)->AttachToPlayer((CBasePlayer *)((CCSEntity *)pPlayer)->m_pEntity); } - virtual int PrimaryAmmoIndex() { ((CBasePlayerItem *)m_pEntity)->PrimaryAmmoIndex(); } - virtual int SecondaryAmmoIndex() { ((CBasePlayerItem *)m_pEntity)->SecondaryAmmoIndex(); } - virtual int UpdateClientData(CCSPlayer *pPlayer) { ((CBasePlayerItem *)m_pEntity)->UpdateClientData((CBasePlayer *)((CCSEntity *)pPlayer)->m_pEntity); } - virtual ICSPlayerItem *GetWeaponPtr() { ((CBasePlayerItem *)m_pEntity)->GetWeaponPtr(); } - virtual float GetMaxSpeed() { ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } -}; - -class CCSToggle: public CCSAnimating { -public: - CCSToggle(CBaseEntity *pEntity) : CCSAnimating(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int GetToggleState() { return m_pEntity->GetToggleState(); } - virtual float GetDelay() { return m_pEntity->GetDelay(); } -}; - -class CCSMonster: public CCSToggle { -public: - CCSMonster(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector &vecDir, TraceResult *ptr, int bitsDamageType) { m_pEntity->TraceAttack(pevAttacker, flDamage, vecDir, ptr, bitsDamageType); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int TakeHealth(float flHealth, int bitsDamageType) { return m_pEntity->TakeHealth(flHealth, bitsDamageType); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual int BloodColor() { return m_pEntity->BloodColor(); } - virtual bool IsAlive() { return m_pEntity->IsAlive() ? true : false; } - virtual float ChangeYaw(int speed) { return ((CBaseMonster *)m_pEntity)->ChangeYaw(speed); } - virtual bool HasHumanGibs() { return ((CBaseMonster *)m_pEntity)->HasHumanGibs() ? true : false; } - virtual bool HasAlienGibs() { return ((CBaseMonster *)m_pEntity)->HasAlienGibs() ? true : false; } - virtual void FadeMonster() { ((CBaseMonster *)m_pEntity)->FadeMonster(); } - virtual void GibMonster() { ((CBaseMonster *)m_pEntity)->GibMonster(); } - virtual Activity GetDeathActivity() { return ((CBaseMonster *)m_pEntity)->GetDeathActivity(); } - virtual void BecomeDead() { ((CBaseMonster *)m_pEntity)->BecomeDead(); } - virtual bool ShouldFadeOnDeath() { return ((CBaseMonster *)m_pEntity)->ShouldFadeOnDeath() ? true : false; } - virtual int IRelationship(CCSEntity *pTarget) { return ((CBaseMonster *)m_pEntity)->IRelationship(pTarget->m_pEntity); } - virtual void PainSound() { ((CBaseMonster *)m_pEntity)->PainSound(); } - virtual void ResetMaxSpeed() { ((CBaseMonster *)m_pEntity)->ResetMaxSpeed(); } - virtual void ReportAIState() { ((CBaseMonster *)m_pEntity)->ReportAIState(); } - virtual void MonsterInitDead() { ((CBaseMonster *)m_pEntity)->MonsterInitDead(); } - virtual void Look(int iDistance) { ((CBaseMonster *)m_pEntity)->Look(iDistance); } - virtual ICSEntity *BestVisibleEnemy() { return CBASE_TO_CSENTITY(((CBaseMonster *)m_pEntity)->BestVisibleEnemy()); } - virtual bool FInViewCone(CCSEntity *pEntity) { return ((CBaseMonster *)m_pEntity)->FInViewCone(pEntity->m_pEntity) ? true : false; } - virtual bool FInViewCone(const Vector *pOrigin) { return ((CBaseMonster *)m_pEntity)->FInViewCone(pOrigin) ? true : false; } -}; - -class CCSWeaponBox: public CCSEntity { -public: - CCSWeaponBox(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void SetObjectCollisionBox() { m_pEntity->SetObjectCollisionBox(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSArmoury: public CCSEntity { -public: - CCSArmoury(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -#pragma warning(disable:4351) // new behavior: elements of array will be default initialized - -class CCSPlayer: public CCSMonster { -public: - char m_szModel[32]; - CCSPlayer(CBaseEntity *pEntity) : CCSMonster(pEntity), m_szModel() {} - - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int Classify() { return m_pEntity->Classify(); } - virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector &vecDir, TraceResult *ptr, int bitsDamageType) { m_pEntity->TraceAttack(pevAttacker, flDamage, vecDir, ptr, bitsDamageType); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int TakeHealth(float flHealth, int bitsDamageType) { return m_pEntity->TakeHealth(flHealth, bitsDamageType); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual void AddPoints(int score, bool bAllowNegativeScore) { m_pEntity->AddPoints(score, bAllowNegativeScore ? TRUE : FALSE); } - virtual void AddPointsToTeam(int score, bool bAllowNegativeScore) { m_pEntity->AddPointsToTeam(score, bAllowNegativeScore ? TRUE : FALSE); } - virtual bool AddPlayerItem(CCSPlayerItem *pItem) { return m_pEntity->AddPlayerItem((CBasePlayerItem *)pItem->m_pEntity) ? true : false; } - virtual bool RemovePlayerItem(CCSPlayerItem *pItem) { return m_pEntity->RemovePlayerItem((CBasePlayerItem *)pItem->m_pEntity) ? true : false; } - virtual int GiveAmmo(int iAmount, char *szName, int iMax) { return m_pEntity->GiveAmmo(iAmount, szName, iMax); } - virtual void StartSneaking() { m_pEntity->StartSneaking(); } - virtual void StopSneaking() { m_pEntity->StopSneaking(); } - virtual bool IsSneaking() { return m_pEntity->IsSneaking() ? true : false; } - virtual bool IsAlive() { return m_pEntity->IsAlive() ? true : false; } - virtual bool IsPlayer() { return m_pEntity->IsPlayer() ? true : false; } - virtual bool IsNetClient() { return m_pEntity->IsNetClient() ? true : false; } - virtual const char *TeamID() { return m_pEntity->TeamID(); } - virtual bool FBecomeProne() { return m_pEntity->FBecomeProne() ? true : false; } - virtual Vector BodyTarget(const Vector &posSrc) { return m_pEntity->BodyTarget(posSrc); } - virtual int Illumination() { return m_pEntity->Illumination(); } - virtual bool ShouldFadeOnDeath() { return ((CBasePlayer *)m_pEntity)->ShouldFadeOnDeath() ? true : false; } - virtual void ResetMaxSpeed() { ((CBasePlayer *)m_pEntity)->ResetMaxSpeed(); } - virtual void Jump() { ((CBasePlayer *)m_pEntity)->Jump(); } - virtual void Duck() { ((CBasePlayer *)m_pEntity)->Duck(); } - virtual void PreThink() { ((CBasePlayer *)m_pEntity)->PreThink(); } - virtual void PostThink() { ((CBasePlayer *)m_pEntity)->PostThink(); } - virtual Vector GetGunPosition() { ((CBasePlayer *)m_pEntity)->GetGunPosition(); } - virtual bool IsBot() { return ((CBasePlayer *)m_pEntity)->IsBot() ? true : false; } - virtual void UpdateClientData() { ((CBasePlayer *)m_pEntity)->UpdateClientData(); } - virtual void ImpulseCommands() { ((CBasePlayer *)m_pEntity)->ImpulseCommands(); } - virtual void RoundRespawn() { ((CBasePlayer *)m_pEntity)->RoundRespawn(); } - virtual Vector GetAutoaimVector(float flDelta) { ((CBasePlayer *)m_pEntity)->GetAutoaimVector(flDelta); } - virtual void Blind(float flUntilTime, float flHoldTime, float flFadeTime, int iAlpha) { ((CBasePlayer *)m_pEntity)->Blind(flUntilTime, flHoldTime, flFadeTime, iAlpha); } - virtual void OnTouchingWeapon(CCSWeaponBox *pWeapon) { ((CBasePlayer *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)pWeapon->m_pEntity); } -public: - virtual bool IsConnected() const { return m_pEntity->has_disconnected == false; } - - virtual void SetAnimation(PLAYER_ANIM playerAnim) { ((CBasePlayer *)m_pEntity)->SetAnimation(playerAnim); } - virtual void AddAccount(int amount, RewardType type = RT_NONE, bool bTrackChange = true) { ((CBasePlayer *)m_pEntity)->AddAccount(amount, type, bTrackChange); } - virtual void GiveNamedItem(const char *pszName) { ((CBasePlayer *)m_pEntity)->GiveNamedItem(pszName); } - virtual void GiveNamedItemEx(const char *pszName) { ((CBasePlayer *)m_pEntity)->GiveNamedItemEx(pszName); } - virtual void GiveDefaultItems() { ((CBasePlayer *)m_pEntity)->GiveDefaultItems(); } - virtual void GiveShield(bool bDeploy = true) { ((CBasePlayer *)m_pEntity)->GiveShield(bDeploy); } - virtual void DropShield(bool bDeploy = true) { ((CBasePlayer *)m_pEntity)->DropShield(bDeploy); } - virtual void DropPlayerItem(const char *pszItemName) { ((CBasePlayer *)m_pEntity)->DropPlayerItem(pszItemName); } - virtual void RemoveShield() { ((CBasePlayer *)m_pEntity)->RemoveShield(); } - virtual void RemoveAllItems(bool bRemoveSuit) { ((CBasePlayer *)m_pEntity)->RemoveAllItems(bRemoveSuit ? TRUE : FALSE); } - virtual void SetPlayerModel(bool bHasC4) { ((CBasePlayer *)m_pEntity)->SetPlayerModel(bHasC4 ? TRUE : FALSE); } - virtual void SetPlayerModelEx(const char *modelName) { strncpy(m_szModel, modelName, sizeof(m_szModel) - 1); m_szModel[sizeof(m_szModel) - 1] = '\0'; }; - virtual void SetNewPlayerModel(const char *modelName) { ((CBasePlayer *)m_pEntity)->SetNewPlayerModel(modelName); } -}; - -class CAPI_Bot: public CCSPlayer { -public: - CAPI_Bot(CBaseEntity *pEntity) : CCSPlayer(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual void Think() { m_pEntity->Think(); } - virtual bool IsBot() { return ((CBot *)m_pEntity)->IsBot() ? true : false; } - virtual Vector GetAutoaimVector(float flDelta) { return ((CBot *)m_pEntity)->GetAutoaimVector(flDelta); } - virtual void OnTouchingWeapon(CCSWeaponBox *box) { ((CBot *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)box->m_pEntity); } - virtual bool Initialize(const BotProfile *profile) { ((CBot *)m_pEntity)->Initialize(profile); } - virtual void SpawnBot() = 0; - virtual void Upkeep() = 0; - virtual void Update() = 0; - virtual void Run() { ((CBot *)m_pEntity)->Run(); } - virtual void Walk() { ((CBot *)m_pEntity)->Walk(); } - virtual void Crouch() { ((CBot *)m_pEntity)->Crouch(); } - virtual void StandUp() { ((CBot *)m_pEntity)->StandUp(); } - virtual void MoveForward() { ((CBot *)m_pEntity)->MoveForward(); } - virtual void MoveBackward() { ((CBot *)m_pEntity)->MoveBackward(); } - virtual void StrafeLeft() { ((CBot *)m_pEntity)->StrafeLeft(); } - virtual void StrafeRight() { ((CBot *)m_pEntity)->StrafeRight(); } - virtual bool Jump(bool mustJump) { return ((CBot *)m_pEntity)->Jump(mustJump); } - virtual void ClearMovement() { ((CBot *)m_pEntity)->ClearMovement(); } - virtual void UseEnvironment() { ((CBot *)m_pEntity)->UseEnvironment(); } - virtual void PrimaryAttack() { ((CBot *)m_pEntity)->PrimaryAttack(); } - virtual void ClearPrimaryAttack() { ((CBot *)m_pEntity)->ClearPrimaryAttack(); } - virtual void TogglePrimaryAttack() { ((CBot *)m_pEntity)->TogglePrimaryAttack(); } - virtual void SecondaryAttack() { ((CBot *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBot *)m_pEntity)->Reload(); } - virtual void OnEvent(GameEventType event, CCSEntity *entity, CCSEntity *other) { ((CBot *)m_pEntity)->OnEvent(event, entity->m_pEntity, other->m_pEntity); } - virtual bool IsVisible(const Vector *pos, bool testFOV = false) const = 0; - virtual bool IsVisible(CCSPlayer *player, bool testFOV = false, unsigned char *visParts = NULL) const = 0; - virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const = 0; - virtual bool IsPlayerFacingMe(CCSPlayer *other) const { return ((CBot *)m_pEntity)->IsPlayerFacingMe((CBasePlayer *)other->m_pEntity); } - virtual bool IsPlayerLookingAtMe(CCSPlayer *other) const { return ((CBot *)m_pEntity)->IsPlayerLookingAtMe((CBasePlayer *)other->m_pEntity); } - virtual void ExecuteCommand() { ((CBot *)m_pEntity)->ExecuteCommand(); } - virtual void SetModel(const char *modelName) { ((CBot *)m_pEntity)->SetModel(modelName); } -}; - -class CAPI_CSBot: public CAPI_Bot { -public: - CAPI_CSBot(CBaseEntity *pEntity) : CAPI_Bot(pEntity) {} -public: - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual void RoundRespawn() { ((CCSBot *)m_pEntity)->RoundRespawn(); } - virtual void Blind(float duration, float holdTime, float fadeTime, int alpha) { ((CCSBot *)m_pEntity)->Blind(duration, holdTime, fadeTime, alpha); } - virtual void OnTouchingWeapon(CCSWeaponBox *box) { ((CCSBot *)m_pEntity)->OnTouchingWeapon((CWeaponBox *)box->m_pEntity); } - virtual bool Initialize(const BotProfile *profile) { return ((CCSBot *)m_pEntity)->Initialize(profile); } - virtual void SpawnBot() { ((CCSBot *)m_pEntity)->SpawnBot(); } - virtual void Upkeep() { ((CCSBot *)m_pEntity)->Upkeep(); } - virtual void Update() { ((CCSBot *)m_pEntity)->Update(); } - virtual void Walk() { ((CCSBot *)m_pEntity)->Walk(); } - virtual bool Jump(bool mustJump) { return ((CCSBot *)m_pEntity)->Jump(); } - virtual void OnEvent(GameEventType event, CCSEntity *entity, CCSEntity *other) { ((CCSBot *)m_pEntity)->OnEvent(event, entity->m_pEntity, other->m_pEntity); } - virtual bool IsVisible(const Vector *pos, bool testFOV) const { return ((CCSBot *)m_pEntity)->IsVisible(pos, testFOV); } - virtual bool IsVisible(CCSPlayer *player, bool testFOV, unsigned char *visParts) const { return ((CCSBot *)m_pEntity)->IsVisible((CBasePlayer *)player->m_pEntity, testFOV, visParts); } - virtual bool IsEnemyPartVisible(VisiblePartTypeBot part) const { return ((CCSBot *)m_pEntity)->IsEnemyPartVisible((CBot::VisiblePartType)part); } -}; - -class CCSShield: public CCSEntity { -public: - CCSShield(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSDeadHEV: public CCSMonster { -public: - CCSDeadHEV(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Classify() { return m_pEntity->Classify(); } -}; - -class CCSSprayCan: public CCSEntity { -public: - CCSSprayCan(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Think() { m_pEntity->Think(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSBloodSplat: public CCSEntity { -public: - CCSBloodSplat(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -}; - -class CCSPlayerWeapon: public CCSPlayerItem { -public: - CCSPlayerWeapon(CBaseEntity *pEntity) : CCSPlayerItem(pEntity) {} -public: - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int AddToPlayer(CCSPlayer *pPlayer) { return ((CBasePlayerWeapon *)m_pEntity)->AddToPlayer((CBasePlayer *)pPlayer->m_pEntity); } - virtual int AddDuplicate(CCSPlayerItem *pItem) { return ((CBasePlayerWeapon *)m_pEntity)->AddDuplicate((CBasePlayerItem *)pItem->m_pEntity); } - virtual bool CanDeploy() { return ((CBasePlayerWeapon *)m_pEntity)->CanDeploy() ? true : false; } - virtual bool IsWeapon() { return ((CBasePlayerWeapon *)m_pEntity)->IsWeapon() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerWeapon *)m_pEntity)->Holster(skiplocal); } - virtual void UpdateItemInfo() { ((CBasePlayerWeapon *)m_pEntity)->UpdateItemInfo(); } - virtual void ItemPostFrame() { ((CBasePlayerWeapon *)m_pEntity)->ItemPostFrame(); } - virtual int PrimaryAmmoIndex() { return ((CBasePlayerWeapon *)m_pEntity)->PrimaryAmmoIndex(); } - virtual int SecondaryAmmoIndex() { return ((CBasePlayerWeapon *)m_pEntity)->SecondaryAmmoIndex(); } - virtual int UpdateClientData(CCSPlayer *pPlayer) { return ((CBasePlayerWeapon *)m_pEntity)->UpdateClientData((CBasePlayer *)pPlayer->m_pEntity); } - virtual ICSPlayerItem *GetWeaponPtr() { return reinterpret_cast(CBASE_TO_CSENTITY(((CBasePlayerWeapon *)m_pEntity)->GetWeaponPtr())); } - virtual int ExtractAmmo(CCSPlayerWeapon *pWeapon) { return ((CBasePlayerWeapon *)m_pEntity)->ExtractAmmo((CBasePlayerWeapon *)pWeapon->m_pEntity); } - virtual int ExtractClipAmmo(CCSPlayerWeapon *pWeapon) { return ((CBasePlayerWeapon *)m_pEntity)->ExtractClipAmmo((CBasePlayerWeapon *)pWeapon->m_pEntity); } - virtual int AddWeapon() { return ((CBasePlayerWeapon *)m_pEntity)->AddWeapon(); } - virtual bool PlayEmptySound() { return ((CBasePlayerWeapon *)m_pEntity)->PlayEmptySound() ? true : false; } - virtual void ResetEmptySound() { ((CBasePlayerWeapon *)m_pEntity)->ResetEmptySound(); } - virtual void SendWeaponAnim(int iAnim, int skiplocal) { ((CBasePlayerWeapon *)m_pEntity)->SendWeaponAnim(iAnim, skiplocal); } - virtual bool IsUseable() { return ((CBasePlayerWeapon *)m_pEntity)->IsUseable() ? true : false; } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual void RetireWeapon() { ((CBasePlayerWeapon *)m_pEntity)->RetireWeapon(); } - virtual bool ShouldWeaponIdle() { return ((CBasePlayerWeapon *)m_pEntity)->ShouldWeaponIdle() ? true : false; } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSWorld: public CCSEntity { -public: - CCSWorld(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSDecal: public CCSEntity { -public: - CCSDecal(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSCorpse: public CCSEntity { -public: - CCSCorpse(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSGrenade: public CCSMonster { -public: - CCSGrenade(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual int BloodColor() { return m_pEntity->BloodColor(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void BounceSound() { ((CGrenade *)m_pEntity)->BounceSound(); } -}; - -class CCSAirtank: public CCSGrenade { -public: - CCSAirtank(CBaseEntity *pEntity) : CCSGrenade(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Killed(entvars_t *pevAttacker, int iGib) { m_pEntity->Killed(pevAttacker, iGib); } - virtual int BloodColor() { return m_pEntity->BloodColor(); } -}; - -class CCSPlayerAmmo: public CCSEntity { -public: - CCSPlayerAmmo(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((CBasePlayerAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } - virtual ICSEntity *Respawn() { return CBASE_TO_CSENTITY(m_pEntity->Respawn()); } -}; - -class CCS9MMAmmo: public CCSPlayerAmmo { -public: - CCS9MMAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C9MMAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCSBuckShotAmmo: public CCSPlayerAmmo { -public: - CCSBuckShotAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((CBuckShotAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS556NatoAmmo: public CCSPlayerAmmo { -public: - CCS556NatoAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C556NatoAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS556NatoBoxAmmo: public CCSPlayerAmmo { -public: - CCS556NatoBoxAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C556NatoBoxAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS762NatoAmmo: public CCSPlayerAmmo { -public: - CCS762NatoAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C762NatoAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS45ACPAmmo: public CCSPlayerAmmo { -public: - CCS45ACPAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C45ACPAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS50AEAmmo: public CCSPlayerAmmo { -public: - CCS50AEAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C50AEAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS338MagnumAmmo: public CCSPlayerAmmo { -public: - CCS338MagnumAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C338MagnumAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS57MMAmmo: public CCSPlayerAmmo { -public: - CCS57MMAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C57MMAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCS357SIGAmmo: public CCSPlayerAmmo { -public: - CCS357SIGAmmo(CBaseEntity *pEntity) : CCSPlayerAmmo(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool AddAmmo(CCSEntity *pOther) { return ((C357SIGAmmo *)m_pEntity)->AddAmmo(pOther->m_pEntity) ? true : false; } -}; - -class CCSFuncWall: public CCSEntity { -public: - CCSFuncWall(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncWallToggle: public CCSFuncWall { -public: - CCSFuncWallToggle(CBaseEntity *pEntity) : CCSFuncWall(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncConveyor: public CCSFuncWall { -public: - CCSFuncConveyor(CBaseEntity *pEntity) : CCSFuncWall(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncIllusionary: public CCSToggle { -public: - CCSFuncIllusionary(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSFuncMonsterClip: public CCSFuncWall { -public: - CCSFuncMonsterClip(CBaseEntity *pEntity) : CCSFuncWall(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncRotating: public CCSEntity { -public: - CCSFuncRotating(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } -}; - -class CCSPendulum: public CCSEntity { -public: - CCSPendulum(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } -}; - -class CCSPointEntity: public CCSEntity { -public: - CCSPointEntity(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSStripWeapons: public CCSPointEntity { -public: - CCSStripWeapons(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSInfoIntermission: public CCSPointEntity { -public: - CCSInfoIntermission(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSRevertSaved: public CCSPointEntity { -public: - CCSRevertSaved(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSEnvGlobal: public CCSPointEntity { -public: - CCSEnvGlobal(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSMultiSource: public CCSPointEntity { -public: - CCSMultiSource(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual bool IsTriggered(CCSEntity *pActivator) { return m_pEntity->IsTriggered(pActivator->m_pEntity) ? true : false; } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSButton: public CCSToggle { -public: - CCSButton(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSRotButton: public CCSButton { -public: - CCSRotButton(CBaseEntity *pEntity) : CCSButton(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSMomentaryRotButton: public CCSToggle { -public: - CCSMomentaryRotButton(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSEnvSpark: public CCSEntity { -public: - CCSEnvSpark(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } -}; - -class CCSButtonTarget: public CCSEntity { -public: - CCSButtonTarget(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSDoor: public CCSToggle { -public: - CCSDoor(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { return m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void SetToggleState(int state) { m_pEntity->SetToggleState(state); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } -}; - -class CCSRotDoor: public CCSDoor { -public: - CCSRotDoor(CBaseEntity *pEntity) : CCSDoor(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void SetToggleState(int state) { m_pEntity->SetToggleState(state); } -}; - -class CCSMomentaryDoor: public CCSToggle { -public: - CCSMomentaryDoor(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { return m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGib: public CCSEntity { -public: - CCSGib(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSBubbling: public CCSEntity { -public: - CCSBubbling(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSBeam: public CCSEntity { -public: - CCSBeam(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual Vector Center() { return m_pEntity->Center(); } -}; - -class CCSLightning: public CCSBeam { -public: - CCSLightning(CBaseEntity *pEntity) : CCSBeam(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Activate() { m_pEntity->Activate(); } -}; - -class CCSLaser: public CCSBeam { -public: - CCSLaser(CBaseEntity *pEntity) : CCSBeam(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGlow: public CCSPointEntity { -public: - CCSGlow(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSSprite: public CCSPointEntity { -public: - CCSSprite(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSBombGlow: public CCSSprite { -public: - CCSBombGlow(CBaseEntity *pEntity) : CCSSprite(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSGibShooter: public CCSDelay { -public: - CCSGibShooter(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual ICSGib *CreateGib() { CBASE_TO_CSENTITY(((CGibShooter *)m_pEntity)->CreateGib()); } -}; - -class CCSEnvShooter: public CCSGibShooter { -public: - CCSEnvShooter(CBaseEntity *pEntity) : CCSGibShooter(pEntity) {} -public: - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual ICSGib *CreateGib() { CBASE_TO_CSENTITY(((CEnvShooter *)m_pEntity)->CreateGib()); } -}; - -class CCSTestEffect: public CCSDelay { -public: - CCSTestEffect(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSBlood: public CCSPointEntity { -public: - CCSBlood(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSShake: public CCSPointEntity { -public: - CCSShake(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFade: public CCSPointEntity { -public: - CCSFade(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSMessage: public CCSPointEntity { -public: - CCSMessage(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSEnvFunnel: public CCSDelay { -public: - CCSEnvFunnel(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSEnvBeverage: public CCSDelay { -public: - CCSEnvBeverage(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSItemSoda: public CCSEntity { -public: - CCSItemSoda(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } -}; - -class CCSShower: public CCSEntity { -public: - CCSShower(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Think() { m_pEntity->Think(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSEnvExplosion: public CCSMonster { -public: - CCSEnvExplosion(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSBreakable: public CCSDelay { -public: - CCSBreakable(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void TraceAttack(entvars_t *pevAttacker, float flDamage, Vector &vecDir, TraceResult *ptr, int bitsDamageType) { m_pEntity->TraceAttack(pevAttacker, flDamage, vecDir, ptr, bitsDamageType); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int DamageDecal(int bitsDamageType) { return m_pEntity->DamageDecal(bitsDamageType); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSPushable: public CCSBreakable { -public: - CCSPushable(CBaseEntity *pEntity) : CCSBreakable(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncTank: public CCSEntity { -public: - CCSFuncTank(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual bool OnControls(entvars_t *pevTest) { return m_pEntity->OnControls(pevTest) ? true : false; } - virtual void Think() { m_pEntity->Think(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { ((CFuncTank *)m_pEntity)->Fire(barrelEnd, forward, pevAttacker); } - virtual Vector UpdateTargetPosition(CCSEntity *pTarget) { return ((CFuncTank *)m_pEntity)->UpdateTargetPosition(pTarget->m_pEntity); } -}; - -class CCSFuncTankGun: public CCSFuncTank { -public: - CCSFuncTankGun(CBaseEntity *pEntity) : CCSFuncTank(pEntity) {} -public: - virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { ((CFuncTankGun *)m_pEntity)->Fire(barrelEnd, forward, pevAttacker); } -}; - -class CCSFuncTankLaser: public CCSFuncTank { -public: - CCSFuncTankLaser(CBaseEntity *pEntity) : CCSFuncTank(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Activate() { m_pEntity->Activate(); } - virtual void Think() { m_pEntity->Think(); } - virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { ((CFuncTankLaser *)m_pEntity)->Fire(barrelEnd, forward, pevAttacker); } -}; - -class CCSFuncTankRocket: public CCSFuncTank { -public: - CCSFuncTankRocket(CBaseEntity *pEntity) : CCSFuncTank(pEntity) {} -public: - virtual void Precache() { m_pEntity->Precache(); } - virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { ((CFuncTankRocket *)m_pEntity)->Fire(barrelEnd, forward, pevAttacker); } -}; - -class CCSFuncTankMortar: public CCSFuncTank { -public: - CCSFuncTankMortar(CBaseEntity *pEntity) : CCSFuncTank(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Fire(const Vector &barrelEnd, const Vector &forward, entvars_t *pevAttacker) { ((CFuncTankMortar *)m_pEntity)->Fire(barrelEnd, forward, pevAttacker); } -}; - -class CCSFuncTankControls: public CCSEntity { -public: - CCSFuncTankControls(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Think() { m_pEntity->Think(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSRecharge: public CCSToggle { -public: - CCSRecharge(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSCycler: public CCSMonster { -public: - CCSCycler(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual bool IsAlive() { return m_pEntity->IsAlive() ? true : false; } - virtual void Think() { m_pEntity->Think(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGenericCycler: public CCSCycler { -public: - CCSGenericCycler(CBaseEntity *pEntity) : CCSCycler(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSCyclerProbe: public CCSCycler { -public: - CCSCyclerProbe(CBaseEntity *pEntity) : CCSCycler(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSCyclerSprite: public CCSEntity { -public: - CCSCyclerSprite(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual void Think() { m_pEntity->Think(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSWeaponCycler: public CCSPlayerWeapon { -public: - CCSWeaponCycler(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CWeaponCycler *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CWeaponCycler *)m_pEntity)->Deploy() ? true : false; } - virtual void Holster(int skiplocal) { ((CWeaponCycler *)m_pEntity)->Holster(skiplocal); } - virtual int iItemSlot() { return ((CWeaponCycler *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CWeaponCycler *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CWeaponCycler *)m_pEntity)->SecondaryAttack(); } -}; - -class CCSWreckage: public CCSMonster { -public: - CCSWreckage(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSWorldItem: public CCSEntity { -public: - CCSWorldItem(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSItem: public CCSEntity { -public: - CCSItem(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual ICSEntity *Respawn() { return CBASE_TO_CSENTITY(m_pEntity->Respawn()); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItem *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSHealthKit: public CCSItem { -public: - CCSHealthKit(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CHealthKit *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSWallHealth: public CCSToggle { -public: - CCSWallHealth(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - - - - - -class CCSItemSuit: public CCSItem { -public: - CCSItemSuit(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemSuit *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - - - - - -class CCSItemBattery: public CCSItem { -public: - CCSItemBattery(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemBattery *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSItemAntidote: public CCSItem { -public: - CCSItemAntidote(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemAntidote *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSItemSecurity: public CCSItem { -public: - CCSItemSecurity(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemSecurity *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSItemLongJump: public CCSItem { -public: - CCSItemLongJump(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemLongJump *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSItemKevlar: public CCSItem { -public: - CCSItemKevlar(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemKevlar *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSItemAssaultSuit: public CCSItem { -public: - CCSItemAssaultSuit(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemAssaultSuit *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSItemThighPack: public CCSItem { -public: - CCSItemThighPack(CBaseEntity *pEntity) : CCSItem(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual bool MyTouch(CCSPlayer *pPlayer) { return ((CItemThighPack *)m_pEntity)->MyTouch((CBasePlayer *)pPlayer->m_pEntity) ? true : false; } -}; - -class CCSGrenCatch: public CCSEntity { -public: - CCSGrenCatch(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Think() { m_pEntity->Think(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSFuncWeaponCheck: public CCSEntity { -public: - CCSFuncWeaponCheck(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSHostage: public CCSMonster { -public: - CCSHostage(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int Classify() { return m_pEntity->Classify(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int BloodColor() { return m_pEntity->BloodColor(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSLight: public CCSPointEntity { -public: - CCSLight(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSEnvLight: public CCSLight { -public: - CCSEnvLight(CBaseEntity *pEntity) : CCSLight(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSRuleEntity: public CCSEntity { -public: - CCSRuleEntity(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } -}; - -class CCSRulePointEntity: public CCSRuleEntity { -public: - CCSRulePointEntity(CBaseEntity *pEntity) : CCSRuleEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSRuleBrushEntity: public CCSRuleEntity { -public: - CCSRuleBrushEntity(CBaseEntity *pEntity) : CCSRuleEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSGameScore: public CCSRulePointEntity { -public: - CCSGameScore(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGameEnd: public CCSRulePointEntity { -public: - CCSGameEnd(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGameText: public CCSRulePointEntity { -public: - CCSGameText(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGameTeamMaster: public CCSRulePointEntity { -public: - CCSGameTeamMaster(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int ObjectCaps() { m_pEntity->ObjectCaps(); } - virtual bool IsTriggered(CCSEntity *pActivator) { return m_pEntity->IsTriggered(pActivator->m_pEntity) ? true : false; } - virtual const char *TeamID() { return m_pEntity->TeamID(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGameTeamSet: public CCSRulePointEntity { -public: - CCSGameTeamSet(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGamePlayerZone: public CCSRuleBrushEntity { -public: - CCSGamePlayerZone(CBaseEntity *pEntity) : CCSRuleBrushEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGamePlayerHurt: public CCSRulePointEntity { -public: - CCSGamePlayerHurt(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGameCounter: public CCSRulePointEntity { -public: - CCSGameCounter(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGameCounterSet: public CCSRulePointEntity { -public: - CCSGameCounterSet(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGamePlayerEquip: public CCSRulePointEntity { -public: - CCSGamePlayerEquip(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSGamePlayerTeam: public CCSRulePointEntity { -public: - CCSGamePlayerTeam(CBaseEntity *pEntity) : CCSRulePointEntity(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncMortarField: public CCSToggle { -public: - CCSFuncMortarField(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSMortar: public CCSGrenade { -public: - CCSMortar(CBaseEntity *pEntity) : CCSGrenade(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } -}; - -class CCSMapInfo: public CCSPointEntity { -public: - CCSMapInfo(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSPathCorner: public CCSPointEntity { -public: - CCSPathCorner(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual float GetDelay() { return m_pEntity->GetDelay(); } -}; - -class CCSPathTrack: public CCSPointEntity { -public: - CCSPathTrack(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Activate() { m_pEntity->Activate(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSFuncTrackTrain: public CCSEntity { -public: - CCSFuncTrackTrain(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void OverrideReset() { m_pEntity->OverrideReset(); } - virtual bool OnControls(entvars_t *pev) { return m_pEntity->OnControls(pev) ? true : false; } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } -}; - -class CCSFuncVehicleControls: public CCSEntity { -public: - CCSFuncVehicleControls(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSFuncVehicle: public CCSEntity { -public: - CCSFuncVehicle(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual int Classify() { return m_pEntity->Classify(); } - virtual void OverrideReset() { m_pEntity->OverrideReset(); } - virtual bool OnControls(entvars_t *pev) { return m_pEntity->OnControls(pev) ? true : false; } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } -}; - -class CCSPlatTrain: public CCSToggle { -public: - CCSPlatTrain(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual bool IsTogglePlat() { return ((CBasePlatTrain *)m_pEntity)->IsTogglePlat() ? true : false; } -}; - -class CCSFuncPlat: public CCSPlatTrain { -public: - CCSFuncPlat(CBaseEntity *pEntity) : CCSPlatTrain(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } - virtual void GoUp() { ((CFuncPlat *)m_pEntity)->GoUp(); } - virtual void GoDown() { ((CFuncPlat *)m_pEntity)->GoDown(); } - virtual void HitTop() { ((CFuncPlat *)m_pEntity)->HitTop(); } - virtual void HitBottom() { ((CFuncPlat *)m_pEntity)->HitBottom(); } -}; - -class CCSPlatTrigger: public CCSEntity { -public: - CCSPlatTrigger(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSFuncPlatRot: public CCSFuncPlat { -public: - CCSFuncPlatRot(CBaseEntity *pEntity) : CCSFuncPlat(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void GoUp() { ((CFuncPlatRot *)m_pEntity)->GoUp(); } - virtual void GoDown() { ((CFuncPlatRot *)m_pEntity)->GoDown(); } - virtual void HitTop() { ((CFuncPlatRot *)m_pEntity)->HitTop(); } - virtual void HitBottom() { ((CFuncPlatRot *)m_pEntity)->HitBottom(); } -}; - -class CCSFuncTrain: public CCSPlatTrain { -public: - CCSFuncTrain(CBaseEntity *pEntity) : CCSPlatTrain(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Activate() { m_pEntity->Activate(); } - virtual void OverrideReset() { m_pEntity->OverrideReset(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void Blocked(CCSEntity *pOther) { m_pEntity->Blocked(pOther->m_pEntity); } -}; - -class CCSFuncTrainControls: public CCSEntity { -public: - CCSFuncTrainControls(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSFuncTrackChange: public CCSFuncPlatRot { -public: - CCSFuncTrackChange(CBaseEntity *pEntity) : CCSFuncPlatRot(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void OverrideReset() { m_pEntity->OverrideReset(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual bool IsTogglePlat() { return ((CFuncTrackChange *)m_pEntity)->IsTogglePlat() ? true : false; } - virtual void GoUp() { ((CFuncTrackChange *)m_pEntity)->GoUp(); } - virtual void GoDown() { ((CFuncTrackChange *)m_pEntity)->GoDown(); } - virtual void HitTop() { ((CFuncTrackChange *)m_pEntity)->HitTop(); } - virtual void HitBottom() { ((CFuncTrackChange *)m_pEntity)->HitBottom(); } - virtual void UpdateAutoTargets(int toggleState) { ((CFuncTrackChange *)m_pEntity)->UpdateAutoTargets(toggleState); } -}; - -class CCSFuncTrackAuto: public CCSFuncTrackChange { -public: - CCSFuncTrackAuto(CBaseEntity *pEntity) : CCSFuncTrackChange(pEntity) {} -public: - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual void UpdateAutoTargets(int toggleState) { ((CFuncTrackAuto *)m_pEntity)->UpdateAutoTargets(toggleState); } -}; - -class CCSGunTarget: public CCSMonster { -public: - CCSGunTarget(CBaseEntity *pEntity) : CCSMonster(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Activate() { m_pEntity->Activate(); } - virtual int Classify() { return m_pEntity->Classify(); } - virtual int TakeDamage(entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType) { return m_pEntity->TakeDamage(pevInflictor, pevAttacker, flDamage, bitsDamageType); } - virtual int BloodColor() { return m_pEntity->BloodColor(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual Vector BodyTarget(const Vector &posSrc) { return m_pEntity->BodyTarget(posSrc); } -}; - -class CCSAmbientGeneric: public CCSEntity { -public: - CCSAmbientGeneric(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSEnvSound: public CCSPointEntity { -public: - CCSEnvSound(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSSpeaker: public CCSEntity { -public: - CCSSpeaker(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSSoundEnt: public CCSEntity { -public: - CCSSoundEnt(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSUSP: public CCSPlayerWeapon { -public: - CCSUSP(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSMP5N: public CCSPlayerWeapon { -public: - CCSMP5N(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSSG552: public CCSPlayerWeapon { -public: - CCSSG552(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSAK47: public CCSPlayerWeapon { -public: - CCSAK47(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSAUG: public CCSPlayerWeapon { -public: - CCSAUG(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSAWP: public CCSPlayerWeapon { -public: - CCSAWP(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSC4: public CCSPlayerWeapon { -public: - CCSC4(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSDEAGLE: public CCSPlayerWeapon { -public: - CCSDEAGLE(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } - virtual bool IsPistol() { return ((CDEAGLE *)m_pEntity)->IsPistol() ? true : false; } -}; - -class CCSFlashbang: public CCSPlayerWeapon { -public: - CCSFlashbang(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } - virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } - virtual bool IsPistol() { return ((CFlashbang *)m_pEntity)->IsPistol() ? true : false; } -}; - -class CCSG3SG1: public CCSPlayerWeapon { -public: - CCSG3SG1(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSGLOCK18: public CCSPlayerWeapon { -public: - CCSGLOCK18(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSHEGrenade: public CCSPlayerWeapon { -public: - CCSHEGrenade(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } - virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSKnife: public CCSPlayerWeapon { -public: - CCSKnife(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool CanDrop() { return ((CBasePlayerWeapon *)m_pEntity)->CanDrop() ? true : false; } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSM249: public CCSPlayerWeapon { -public: - CCSM249(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSM3: public CCSPlayerWeapon { -public: - CCSM3(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSM4A1: public CCSPlayerWeapon { -public: - CCSM4A1(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSMAC10: public CCSPlayerWeapon { -public: - CCSMAC10(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSP228: public CCSPlayerWeapon { -public: - CCSP228(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } - virtual bool IsPistol() { return ((CP228 *)m_pEntity)->IsPistol() ? true : false; } -}; - -class CCSP90: public CCSPlayerWeapon { -public: - CCSP90(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSSCOUT: public CCSPlayerWeapon { -public: - CCSSCOUT(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSSmokeGrenade: public CCSPlayerWeapon { -public: - CCSSmokeGrenade(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool CanDeploy() { return ((CBasePlayerItem *)m_pEntity)->CanDeploy() ? true : false; } - virtual bool CanDrop() { return ((CBasePlayerItem *)m_pEntity)->CanDrop() ? true : false; } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual void Holster(int skiplocal) { ((CBasePlayerItem *)m_pEntity)->Holster(skiplocal); } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSTMP: public CCSPlayerWeapon { -public: - CCSTMP(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSXM1014: public CCSPlayerWeapon { -public: - CCSXM1014(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSELITE: public CCSPlayerWeapon { -public: - CCSELITE(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSFiveSeven: public CCSPlayerWeapon { -public: - CCSFiveSeven(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSUMP45: public CCSPlayerWeapon { -public: - CCSUMP45(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSSG550: public CCSPlayerWeapon { -public: - CCSSG550(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSGalil: public CCSPlayerWeapon { -public: - CCSGalil(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSFamas: public CCSPlayerWeapon { -public: - CCSFamas(CBaseEntity *pEntity) : CCSPlayerWeapon(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int GetItemInfo(ItemInfo *p) { return ((CBasePlayerItem *)m_pEntity)->GetItemInfo(p); } - virtual bool Deploy() { return ((CBasePlayerItem *)m_pEntity)->Deploy() ? true : false; } - virtual float GetMaxSpeed() { return ((CBasePlayerItem *)m_pEntity)->GetMaxSpeed(); } - virtual int iItemSlot() { return ((CBasePlayerItem *)m_pEntity)->iItemSlot(); } - virtual void PrimaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->PrimaryAttack(); } - virtual void SecondaryAttack() { ((CBasePlayerWeapon *)m_pEntity)->SecondaryAttack(); } - virtual void Reload() { ((CBasePlayerWeapon *)m_pEntity)->Reload(); } - virtual void WeaponIdle() { ((CBasePlayerWeapon *)m_pEntity)->WeaponIdle(); } - virtual bool UseDecrement() { return ((CBasePlayerWeapon *)m_pEntity)->UseDecrement() ? true : false; } -}; - -class CCSNullEntity: public CCSEntity { -public: - CCSNullEntity(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSDMStart: public CCSPointEntity { -public: - CCSDMStart(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual bool IsTriggered(CCSEntity *pEntity) { return m_pEntity->IsTriggered(pEntity->m_pEntity) ? true : false; } -}; - -class CCSFrictionModifier: public CCSEntity { -public: - CCSFrictionModifier(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSAutoTrigger: public CCSDelay { -public: - CCSAutoTrigger(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSTriggerRelay: public CCSDelay { -public: - CCSTriggerRelay(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSMultiManager: public CCSToggle { -public: - CCSMultiManager(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Restart() { m_pEntity->Restart(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual bool HasTarget(string_t targetname) { m_pEntity->HasTarget(targetname) ? true : false; } -}; - -class CCSRenderFxManager: public CCSEntity { -public: - CCSRenderFxManager(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSTrigger: public CCSToggle { -public: - CCSTrigger(CBaseEntity *pEntity) : CCSToggle(pEntity) {} -public: - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } -}; - -class CCSTriggerHurt: public CCSTrigger { -public: - CCSTriggerHurt(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerMonsterJump: public CCSTrigger { -public: - CCSTriggerMonsterJump(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Think() { m_pEntity->Think(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSTriggerCDAudio: public CCSTrigger { -public: - CCSTriggerCDAudio(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSTargetCDAudio: public CCSPointEntity { -public: - CCSTargetCDAudio(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Think() { m_pEntity->Think(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSTriggerMultiple: public CCSTrigger { -public: - CCSTriggerMultiple(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerOnce: public CCSTriggerMultiple { -public: - CCSTriggerOnce(CBaseEntity *pEntity) : CCSTriggerMultiple(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerCounter: public CCSTrigger { -public: - CCSTriggerCounter(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerVolume: public CCSPointEntity { -public: - CCSTriggerVolume(CBaseEntity *pEntity) : CCSPointEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSFireAndDie: public CCSDelay { -public: - CCSFireAndDie(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Think() { m_pEntity->Think(); } -}; - -class CCSChangeLevel: public CCSTrigger { -public: - CCSChangeLevel(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } -}; - -class CCSLadder: public CCSTrigger { -public: - CCSLadder(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void Precache() { m_pEntity->Precache(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSTriggerPush: public CCSTrigger { -public: - CCSTriggerPush(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual void Touch(CCSEntity *pOther) { m_pEntity->Touch(pOther->m_pEntity); } -}; - -class CCSTriggerTeleport: public CCSTrigger { -public: - CCSTriggerTeleport(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSBuyZone: public CCSTrigger { -public: - CCSBuyZone(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSBombTarget: public CCSTrigger { -public: - CCSBombTarget(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSHostageRescue: public CCSTrigger { -public: - CCSHostageRescue(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSEscapeZone: public CCSTrigger { -public: - CCSEscapeZone(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSVIP_SafetyZone: public CCSTrigger { -public: - CCSVIP_SafetyZone(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerSave: public CCSTrigger { -public: - CCSTriggerSave(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerEndSection: public CCSTrigger { -public: - CCSTriggerEndSection(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -class CCSTriggerGravity: public CCSTrigger { -public: - CCSTriggerGravity(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSTriggerChangeTarget: public CCSDelay { -public: - CCSTriggerChangeTarget(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSTriggerCamera: public CCSDelay { -public: - CCSTriggerCamera(CBaseEntity *pEntity) : CCSDelay(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } - virtual int Save(CSave &save) { return m_pEntity->Save(save); } - virtual int Restore(CRestore &restore) { return m_pEntity->Restore(restore); } - virtual int ObjectCaps() { return m_pEntity->ObjectCaps(); } - virtual void Use(CCSEntity *pActivator, CCSEntity *pCaller, USE_TYPE useType, float value) { m_pEntity->Use(pActivator->m_pEntity, pCaller->m_pEntity, useType, value); } -}; - -class CCSWeather: public CCSTrigger { -public: - CCSWeather(CBaseEntity *pEntity) : CCSTrigger(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } -}; - -class CCSClientFog: public CCSEntity { -public: - CCSClientFog(CBaseEntity *pEntity) : CCSEntity(pEntity) {} -public: - virtual void Spawn() { m_pEntity->Spawn(); } - virtual void KeyValue(KeyValueData *pkvd) { m_pEntity->KeyValue(pkvd); } -}; - -template -inline T *Regamedll_InitializeEntities(CBaseEntity *a) -{ - int index = a->entindex(); - g_GameEntities[index] = new T (a); - return reinterpret_cast(g_GameEntities[index]); -} - -template -inline T *CBASE_TO_CSENTITY(CBaseEntity *a) -{ - return reinterpret_cast(CBASE_TO_CSENTITY(a)); -} - -inline CCSPlayer *CSPlayer(int iPlayerNum) { return reinterpret_cast(g_GameEntities[iPlayerNum]); } -inline CCSPlayer *CSPlayer(const edict_t *pEdict) { return CSPlayer(ENTINDEX(pEdict)); } -inline CCSPlayer *CSPlayer(CBasePlayer *pPlayer) { return CSPlayer(pPlayer->entindex()); } - -inline CCSEntity *CSEntity(int iEntityNum) { return reinterpret_cast(g_GameEntities[iEntityNum]); } -inline CCSEntity *CSEntity(const edict_t *pEdict) { return CSEntity(ENTINDEX(pEdict)); } -inline CCSEntity *CSEntity(CBaseEntity *pEntity) { return CSEntity(pEntity->entindex()); } - -extern void Regamedll_AllocEntities(int maxEdicts); -extern void Regamedll_FreeEntities(CBaseEntity *pEntity = NULL); -extern void Regamedll_MonitorEntities();