mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-03-03 09:15:23 +03:00
Added EXT_FUNC for virtual functions
This commit is contained in:
parent
bd08ec6939
commit
70dc948091
@ -12,7 +12,7 @@ TYPEDESCRIPTION CAirtank::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAirtank, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CAirtank, m_SaveData)[1];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -57,21 +57,22 @@ public:
|
||||
int Save_(CSave &save);
|
||||
int Restore_(CRestore &restore);
|
||||
void Killed_(entvars_t *pevAttacker, int iGib);
|
||||
int BloodColor_(void)
|
||||
{
|
||||
return BloodColor();
|
||||
}
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
private:
|
||||
int m_state;
|
||||
|
||||
};
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
||||
// linked objects
|
||||
C_DLLEXPORT void item_airtank(entvars_t *pev);
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
#endif // AIRTANK_H
|
||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CBaseAnimating::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseAnimating, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseAnimating, m_SaveData)[5];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -28,8 +28,8 @@ TYPEDESCRIPTION CPendulum::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncRotating, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPendulum, m_SaveData)[8];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncRotating, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CPendulum, m_SaveData)[8];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -209,7 +209,7 @@ public:
|
||||
void RampPitchVol(int fUp);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
public:
|
||||
float m_flFanFriction;
|
||||
@ -254,7 +254,7 @@ public:
|
||||
// this touch func makes the pendulum a rope
|
||||
void EXPORT RopeTouch(CBaseEntity *pOther);
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[8];
|
||||
|
||||
public:
|
||||
float m_accel; // Acceleration
|
||||
|
@ -468,13 +468,11 @@ NOBODY const Vector *FindNearbyRetreatSpot(CCSBot *me, float maxRange)
|
||||
}
|
||||
|
||||
/* <2eaa1d> ../cstrike/dlls/bot/cs_bot.cpp:1116 */
|
||||
NOBODY float CCSBot::GetRangeToFarthestEscortedHostage(void)
|
||||
float CCSBot::GetRangeToFarthestEscortedHostage(void)
|
||||
{
|
||||
// {
|
||||
// class FarthestHostage away; // 1118
|
||||
// ForEachHostage<FarthestHostage>(const class CHostageManager *const this,
|
||||
// class FarthestHostage &func); // 1120
|
||||
// }
|
||||
FarthestHostage away(this);
|
||||
g_pHostages->ForEachHostage(away);
|
||||
return away.m_farRange;
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
@ -1247,7 +1247,7 @@ public:
|
||||
if (IsSpotOccupied(m_me, spot->GetPosition()))
|
||||
{
|
||||
// player is in hiding spot
|
||||
/// @todo Check if player is moving or sitting still
|
||||
// TODO: Check if player is moving or sitting still
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1283,21 +1283,34 @@ private:
|
||||
class FarthestHostage
|
||||
{
|
||||
public:
|
||||
FarthestHostage(CCSBot *me)//, float range)
|
||||
FarthestHostage(const CCSBot *me)
|
||||
{
|
||||
m_me = me;
|
||||
//m_farRange = range;
|
||||
m_farRange = -1.0;
|
||||
}
|
||||
bool operator()(CHostage *hostage)
|
||||
{
|
||||
//TODO: untested
|
||||
if (hostage->pev->takedamage != DAMAGE_YES)
|
||||
return true;
|
||||
|
||||
if (!hostage->IsFollowing(m_me))
|
||||
return false;
|
||||
if (hostage->m_improv != NULL)
|
||||
{
|
||||
if (!hostage->IsFollowingSomeone() || m_me != hostage->GetLeader())
|
||||
return true;
|
||||
}
|
||||
else if (!hostage->IsFollowing(m_me))
|
||||
return true;
|
||||
|
||||
float range = (hostage->Center() - m_me->pev->origin).Length();
|
||||
|
||||
if (range > m_farRange)
|
||||
{
|
||||
m_farRange = range;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
private:
|
||||
|
||||
const CCSBot *m_me;
|
||||
float m_farRange;
|
||||
|
||||
|
@ -123,7 +123,7 @@ void CCSBotManager::__MAKE_VHOOK(RestartRound)(void)
|
||||
m_bombDefuser = NULL;
|
||||
m_earliestBombPlantTimestamp = gpGlobals->time + RANDOM_FLOAT(10, 30);
|
||||
|
||||
IMPLEMENT_ARRAY(m_editCmd) = EDIT_NONE;
|
||||
IMPL(m_editCmd) = EDIT_NONE;
|
||||
|
||||
ResetRadioMessageTimestamps();
|
||||
m_lastSeenEnemyTimestamp = -9999.9f;
|
||||
@ -209,7 +209,7 @@ NOBODY bool CCSBotManager::IsOnOffense(CBasePlayer *player) const
|
||||
void CCSBotManager::__MAKE_VHOOK(ServerActivate)(void)
|
||||
{
|
||||
DestroyNavigationMap();
|
||||
IMPLEMENT_ARRAY(m_isMapDataLoaded) = false;
|
||||
IMPL(m_isMapDataLoaded) = false;
|
||||
|
||||
m_zoneCount = 0;
|
||||
m_gameScenario = SCENARIO_DEATHMATCH;
|
||||
@ -217,8 +217,8 @@ void CCSBotManager::__MAKE_VHOOK(ServerActivate)(void)
|
||||
ValidateMapData();
|
||||
RestartRound();
|
||||
|
||||
IMPLEMENT_ARRAY(m_isLearningMap) = false;
|
||||
IMPLEMENT_ARRAY(m_isAnalysisRequested) = false;
|
||||
IMPL(m_isLearningMap) = false;
|
||||
IMPL(m_isAnalysisRequested) = false;
|
||||
|
||||
m_bServerActive = true;
|
||||
AddServerCommands();
|
||||
@ -480,59 +480,59 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_delete"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_DELETE;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_DELETE;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_split"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLIT;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLIT;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_merge"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MERGE;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_MERGE;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_mark"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_begin_area"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_BEGIN_AREA;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_BEGIN_AREA;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_end_area"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_END_AREA;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_END_AREA;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_connect"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_CONNECT;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_CONNECT;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_disconnect"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_DISCONNECT;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_DISCONNECT;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_splice"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLICE;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_SPLICE;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_crouch"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_CROUCH;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_CROUCH;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_jump"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_JUMP;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_JUMP;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_precise"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_PRECISE;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_PRECISE;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_no_jump"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_NO_JUMP;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_ATTRIB_NO_JUMP;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_analyze"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_isAnalysisRequested) = true;
|
||||
IMPL_CLASS(CCSBotManager, m_isAnalysisRequested) = true;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_strip"))
|
||||
{
|
||||
@ -611,19 +611,19 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_toggle_place_mode"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_MODE;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_MODE;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_place_floodfill"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_FLOODFILL;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_FLOODFILL;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_place_pick"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_PICK;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_PLACE_PICK;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_toggle_place_painting"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_PAINTING;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_TOGGLE_PLACE_PAINTING;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_goto_mark"))
|
||||
{
|
||||
@ -683,23 +683,23 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_mark_unnamed"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK_UNNAMED;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_MARK_UNNAMED;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_warp"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_WARP_TO_MARK;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_WARP_TO_MARK;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_corner_select"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_SELECT_CORNER;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_SELECT_CORNER;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_corner_raise"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_RAISE_CORNER;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_RAISE_CORNER;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_corner_lower"))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CCSBotManager, m_editCmd) = EDIT_LOWER_CORNER;
|
||||
IMPL_CLASS(CCSBotManager, m_editCmd) = EDIT_LOWER_CORNER;
|
||||
}
|
||||
else if (FStrEq(pcmd, "bot_nav_check_consistency"))
|
||||
{
|
||||
@ -716,7 +716,7 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
||||
/* <36c3c2> ../cstrike/dlls/bot/cs_bot_manager.cpp:903 */
|
||||
NOBODY bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromConsole)
|
||||
{
|
||||
if (IMPLEMENT_ARRAY(m_isLearningMap) || ENG_CHECK_PARM("-nobots", NULL))
|
||||
if (IMPL(m_isLearningMap) || ENG_CHECK_PARM("-nobots", NULL))
|
||||
return false;
|
||||
|
||||
const BotProfile *profile = NULL;
|
||||
@ -815,12 +815,12 @@ NOBODY void CCSBotManager::MonitorBotCVars(void)
|
||||
/* <36b780> ../cstrike/dlls/bot/cs_bot_manager.cpp:1109 */
|
||||
void CCSBotManager::ValidateMapData(void)
|
||||
{
|
||||
if (IMPLEMENT_ARRAY(m_isMapDataLoaded) || !UTIL_IsGame("czero"))
|
||||
if (IMPL(m_isMapDataLoaded) || !UTIL_IsGame("czero"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IMPLEMENT_ARRAY(m_isMapDataLoaded) = true;
|
||||
IMPL(m_isMapDataLoaded) = true;
|
||||
|
||||
if (LoadNavigationMap())
|
||||
{
|
||||
|
@ -149,23 +149,23 @@ public:
|
||||
void ValidateMapData(void);
|
||||
bool IsLearningMap(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(m_isLearningMap);
|
||||
return IMPL(m_isLearningMap);
|
||||
}
|
||||
void SetLearningMapFlag(void)
|
||||
{
|
||||
IMPLEMENT_ARRAY(m_isLearningMap) = true;
|
||||
IMPL(m_isLearningMap) = true;
|
||||
}
|
||||
bool IsAnalysisRequested(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(m_isAnalysisRequested);
|
||||
return IMPL(m_isAnalysisRequested);
|
||||
}
|
||||
void RequestAnalysis(void)
|
||||
{
|
||||
IMPLEMENT_ARRAY(m_isAnalysisRequested) = true;
|
||||
IMPL(m_isAnalysisRequested) = true;
|
||||
}
|
||||
void AckAnalysisRequest(void)
|
||||
{
|
||||
IMPLEMENT_ARRAY(m_isAnalysisRequested) = false;
|
||||
IMPL(m_isAnalysisRequested) = false;
|
||||
}
|
||||
static BotDifficultyType GetDifficultyLevel(void)
|
||||
{
|
||||
@ -394,10 +394,10 @@ private:
|
||||
#else
|
||||
public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
static float IMPLEMENT_ARRAY(m_flNextCVarCheck);
|
||||
static bool IMPLEMENT_ARRAY(m_isMapDataLoaded);
|
||||
static bool IMPLEMENT_ARRAY(m_isLearningMap);
|
||||
static bool IMPLEMENT_ARRAY(m_isAnalysisRequested);
|
||||
static float IMPL(m_flNextCVarCheck);
|
||||
static bool IMPL(m_isMapDataLoaded);
|
||||
static bool IMPL(m_isLearningMap);
|
||||
static bool IMPL(m_isAnalysisRequested);
|
||||
#ifdef HOOK_GAMEDLL
|
||||
private:
|
||||
#endif // HOOK_GAMEDLL
|
||||
@ -422,7 +422,7 @@ private:
|
||||
#else
|
||||
public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
static NavEditCmdType IMPLEMENT_ARRAY(m_editCmd);
|
||||
static NavEditCmdType IMPL(m_editCmd);
|
||||
#ifdef HOOK_GAMEDLL
|
||||
private:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -52,11 +52,11 @@ TYPEDESCRIPTION CEnvSpark::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvGlobal, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMultiSource, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseButton, m_SaveData)[8];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMomentaryRotButton, m_SaveData)[6];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvSpark, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CEnvGlobal, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CMultiSource, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseButton, m_SaveData)[8];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CMomentaryRotButton, m_SaveData)[6];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CEnvSpark, m_SaveData)[1];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
|
||||
public:
|
||||
string_t m_globalstate;
|
||||
@ -144,7 +144,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[6];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[6];
|
||||
|
||||
public:
|
||||
int m_lastUsed;
|
||||
@ -182,7 +182,7 @@ public:
|
||||
void EXPORT SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
public:
|
||||
float m_flDelay;
|
||||
|
@ -56,7 +56,6 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
|
||||
static CCareerTask *NewTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete);
|
||||
|
||||
void OnWeaponKill(int weaponId, int weaponClassId, bool headshot, bool killerHasShield, CBasePlayer *pAttacker, CBasePlayer *pVictim);
|
||||
|
@ -7,61 +7,61 @@
|
||||
|
||||
static DLL_FUNCTIONS gFunctionTable =
|
||||
{
|
||||
GameDLLInit,
|
||||
DispatchSpawn,
|
||||
DispatchThink,
|
||||
DispatchUse,
|
||||
DispatchTouch,
|
||||
DispatchBlocked,
|
||||
DispatchKeyValue,
|
||||
DispatchSave,
|
||||
DispatchRestore,
|
||||
DispatchObjectCollsionBox,
|
||||
SaveWriteFields,
|
||||
SaveReadFields,
|
||||
SaveGlobalState,
|
||||
RestoreGlobalState,
|
||||
ResetGlobalState,
|
||||
ClientConnect,
|
||||
ClientDisconnect,
|
||||
ClientKill,
|
||||
ClientPutInServer,
|
||||
ClientCommand,
|
||||
ClientUserInfoChanged,
|
||||
ServerActivate,
|
||||
ServerDeactivate,
|
||||
PlayerPreThink,
|
||||
PlayerPostThink,
|
||||
StartFrame,
|
||||
ParmsNewLevel,
|
||||
ParmsChangeLevel,
|
||||
GetGameDescription,
|
||||
PlayerCustomization,
|
||||
SpectatorConnect,
|
||||
SpectatorDisconnect,
|
||||
SpectatorThink,
|
||||
Sys_Error,
|
||||
PM_Move,
|
||||
PM_Init,
|
||||
PM_FindTextureType,
|
||||
SetupVisibility,
|
||||
UpdateClientData,
|
||||
AddToFullPack,
|
||||
CreateBaseline,
|
||||
RegisterEncoders,
|
||||
GetWeaponData,
|
||||
CmdStart,
|
||||
CmdEnd,
|
||||
ConnectionlessPacket,
|
||||
GetHullBounds,
|
||||
CreateInstancedBaselines,
|
||||
InconsistentFile,
|
||||
AllowLagCompensation
|
||||
&GameDLLInit,
|
||||
&DispatchSpawn,
|
||||
&DispatchThink,
|
||||
&DispatchUse,
|
||||
&DispatchTouch,
|
||||
&DispatchBlocked,
|
||||
&DispatchKeyValue,
|
||||
&DispatchSave,
|
||||
&DispatchRestore,
|
||||
&DispatchObjectCollsionBox,
|
||||
&SaveWriteFields,
|
||||
&SaveReadFields,
|
||||
&SaveGlobalState,
|
||||
&RestoreGlobalState,
|
||||
&ResetGlobalState,
|
||||
&ClientConnect,
|
||||
&ClientDisconnect,
|
||||
&ClientKill,
|
||||
&ClientPutInServer,
|
||||
&ClientCommand,
|
||||
&ClientUserInfoChanged,
|
||||
&ServerActivate,
|
||||
&ServerDeactivate,
|
||||
&PlayerPreThink,
|
||||
&PlayerPostThink,
|
||||
&StartFrame,
|
||||
&ParmsNewLevel,
|
||||
&ParmsChangeLevel,
|
||||
&GetGameDescription,
|
||||
&PlayerCustomization,
|
||||
&SpectatorConnect,
|
||||
&SpectatorDisconnect,
|
||||
&SpectatorThink,
|
||||
&Sys_Error,
|
||||
&PM_Move,
|
||||
&PM_Init,
|
||||
&PM_FindTextureType,
|
||||
&SetupVisibility,
|
||||
&UpdateClientData,
|
||||
&AddToFullPack,
|
||||
&CreateBaseline,
|
||||
&RegisterEncoders,
|
||||
&GetWeaponData,
|
||||
&CmdStart,
|
||||
&CmdEnd,
|
||||
&ConnectionlessPacket,
|
||||
&GetHullBounds,
|
||||
&CreateInstancedBaselines,
|
||||
&InconsistentFile,
|
||||
&AllowLagCompensation
|
||||
};
|
||||
|
||||
static NEW_DLL_FUNCTIONS gNewDLLFunctions
|
||||
{
|
||||
OnFreeEntPrivateData,
|
||||
&OnFreeEntPrivateData,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
@ -83,7 +83,7 @@ BOOL gTouchDisabled = FALSE;
|
||||
|
||||
DLL_FUNCTIONS gFunctionTable;
|
||||
NEW_DLL_FUNCTIONS gNewDLLFunctions;
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseEntity, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseEntity, m_SaveData)[5];
|
||||
|
||||
CMemoryPool hashItemMemPool;
|
||||
BOOL gTouchDisabled;
|
||||
@ -428,7 +428,7 @@ C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pFunctionTable, int *inter
|
||||
}
|
||||
|
||||
/* <30ab0> ../cstrike/dlls/cbase.cpp:498 */
|
||||
int DispatchSpawn(edict_t *pent)
|
||||
int EXT_FUNC DispatchSpawn(edict_t *pent)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||
|
||||
@ -489,7 +489,7 @@ int DispatchSpawn(edict_t *pent)
|
||||
}
|
||||
|
||||
/* <2e8a0> ../cstrike/dlls/cbase.cpp:549 */
|
||||
void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd)
|
||||
void EXT_FUNC DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd)
|
||||
{
|
||||
if (!pkvd || !pentKeyvalue)
|
||||
return;
|
||||
@ -514,7 +514,7 @@ void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd)
|
||||
// while it builds the graph
|
||||
|
||||
/* <2e7db> ../cstrike/dlls/cbase.cpp:574 */
|
||||
void DispatchTouch(edict_t *pentTouched, edict_t *pentOther)
|
||||
void EXT_FUNC DispatchTouch(edict_t *pentTouched, edict_t *pentOther)
|
||||
{
|
||||
if (gTouchDisabled)
|
||||
return;
|
||||
@ -527,7 +527,7 @@ void DispatchTouch(edict_t *pentTouched, edict_t *pentOther)
|
||||
}
|
||||
|
||||
/* <2fa9b> ../cstrike/dlls/cbase.cpp:587 */
|
||||
void DispatchUse(edict_t *pentUsed, edict_t *pentOther)
|
||||
void EXT_FUNC DispatchUse(edict_t *pentUsed, edict_t *pentOther)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pentUsed);
|
||||
CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther);
|
||||
@ -539,7 +539,7 @@ void DispatchUse(edict_t *pentUsed, edict_t *pentOther)
|
||||
}
|
||||
|
||||
/* <2fb2f> ../cstrike/dlls/cbase.cpp:596 */
|
||||
void DispatchThink(edict_t *pent)
|
||||
void EXT_FUNC DispatchThink(edict_t *pent)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||
|
||||
@ -555,7 +555,7 @@ void DispatchThink(edict_t *pent)
|
||||
}
|
||||
|
||||
/* <2fb89> ../cstrike/dlls/cbase.cpp:612 */
|
||||
void DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther)
|
||||
void EXT_FUNC DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pentBlocked);
|
||||
CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther);
|
||||
@ -567,7 +567,7 @@ void DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther)
|
||||
}
|
||||
|
||||
/* <2ff56> ../cstrike/dlls/cbase.cpp:621 */
|
||||
void DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData)
|
||||
void EXT_FUNC DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||
|
||||
@ -627,7 +627,7 @@ CBaseEntity *FindGlobalEntity(string_t classname, string_t globalname)
|
||||
}
|
||||
|
||||
/* <3179c> ../cstrike/dlls/cbase.cpp:673 */
|
||||
int DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity)
|
||||
int EXT_FUNC DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||
|
||||
@ -742,7 +742,7 @@ int DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity)
|
||||
}
|
||||
|
||||
/* <2fdcd> ../cstrike/dlls/cbase.cpp:776 */
|
||||
void DispatchObjectCollsionBox(edict_t *pent)
|
||||
void EXT_FUNC DispatchObjectCollsionBox(edict_t *pent)
|
||||
{
|
||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||
|
||||
@ -756,14 +756,14 @@ void DispatchObjectCollsionBox(edict_t *pent)
|
||||
}
|
||||
|
||||
/* <2fe94> ../cstrike/dlls/cbase.cpp:788 */
|
||||
void SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount)
|
||||
void EXT_FUNC SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount)
|
||||
{
|
||||
CSave saveHelper(pSaveData);
|
||||
saveHelper.WriteFields(pname, pBaseData, pFields, fieldCount);
|
||||
}
|
||||
|
||||
/* <30047> ../cstrike/dlls/cbase.cpp:795 */
|
||||
void SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount)
|
||||
void EXT_FUNC SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount)
|
||||
{
|
||||
CRestore restoreHelper(pSaveData);
|
||||
restoreHelper.ReadFields(pname, pBaseData, pFields, fieldCount);
|
||||
@ -922,7 +922,7 @@ int CBaseEntity::__MAKE_VHOOK(Save)(CSave &save)
|
||||
{
|
||||
if (save.WriteEntVars("ENTVARS", pev))
|
||||
{
|
||||
return save.WriteFields("BASE", this, IMPLEMENT_ARRAY(m_SaveData), ARRAYSIZE(IMPLEMENT_ARRAY(m_SaveData)));
|
||||
return save.WriteFields("BASE", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData)));
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -937,7 +937,7 @@ int CBaseEntity::__MAKE_VHOOK(Restore)(CRestore &restore)
|
||||
|
||||
if (status)
|
||||
{
|
||||
status = restore.ReadFields("BASE", this, IMPLEMENT_ARRAY(m_SaveData), ARRAYSIZE(IMPLEMENT_ARRAY(m_SaveData)));
|
||||
status = restore.ReadFields("BASE", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData)));
|
||||
}
|
||||
|
||||
if (pev->modelindex != 0 && !FStringNull(pev->model))
|
||||
|
@ -177,10 +177,10 @@
|
||||
#define MS_MAX_TARGETS 32
|
||||
|
||||
#ifdef _WIN32
|
||||
#define C_EXPORT _declspec(dllexport)
|
||||
#define EXPORT _declspec(dllexport)
|
||||
#else
|
||||
#define C_EXPORT
|
||||
#endif
|
||||
#define EXPORT /**/
|
||||
#endif // _WIN32
|
||||
|
||||
enum hash_types_e
|
||||
{
|
||||
@ -230,16 +230,6 @@ typedef enum
|
||||
|
||||
} TRAIN_CODE;
|
||||
|
||||
// Things that toggle (buttons/triggers/doors) need this
|
||||
typedef enum
|
||||
{
|
||||
TS_AT_TOP,
|
||||
TS_AT_BOTTOM,
|
||||
TS_GOING_UP,
|
||||
TS_GOING_DOWN,
|
||||
|
||||
} TOGGLE_STATE;
|
||||
|
||||
class CGrenade;
|
||||
class CBaseEntity;
|
||||
class CBaseMonster;
|
||||
@ -566,7 +556,7 @@ public:
|
||||
CBaseEntity *m_pGoalEnt;
|
||||
CBaseEntity *m_pLink;
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
void (CBaseEntity::*m_pfnThink)(void);
|
||||
//int m_pfnThink_Flag;
|
||||
@ -669,7 +659,7 @@ public:
|
||||
void EXPORT Register(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||
|
||||
EHANDLE m_rgEntities[MS_MAX_TARGETS];
|
||||
int m_rgTriggered[MS_MAX_TARGETS];
|
||||
@ -698,7 +688,7 @@ public:
|
||||
void SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value);
|
||||
void EXPORT DelayThink(void);
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
float m_flDelay;
|
||||
int m_iszKillTarget;
|
||||
@ -742,7 +732,7 @@ public:
|
||||
int ExtractBbox(int sequence, float *mins, float *maxs);
|
||||
void SetSequenceBox(void);
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
float m_flFrameRate;
|
||||
float m_flGroundSpeed;
|
||||
@ -788,7 +778,7 @@ public:
|
||||
static float AxisDelta(int flags, const Vector &angle1, const Vector &angle2);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[19];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[19];
|
||||
|
||||
TOGGLE_STATE m_toggle_state;
|
||||
float m_flActivateFinished;
|
||||
@ -870,7 +860,7 @@ public:
|
||||
BUTTON_CODE ButtonResponseToTouch(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[8];
|
||||
|
||||
BOOL m_fStayPushed;
|
||||
BOOL m_fRotating;
|
||||
|
@ -75,7 +75,7 @@ int g_serveractive;
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
PLAYERPVSSTATUS g_PVSStatus[32];
|
||||
PLAYERPVSSTATUS g_PVSStatus[MAX_CLIENTS];
|
||||
unsigned short m_usResetDecals;
|
||||
unsigned short g_iShadowSprite;
|
||||
|
||||
@ -154,13 +154,13 @@ void BlinkAccount(CBasePlayer *player, int numBlinks)
|
||||
}
|
||||
|
||||
/* <47efd> ../cstrike/dlls/client.cpp:236 */
|
||||
BOOL ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char *szRejectReason)
|
||||
BOOL EXT_FUNC ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char *szRejectReason)
|
||||
{
|
||||
return g_pGameRules->ClientConnected(pEntity, pszName, pszAddress, szRejectReason);
|
||||
}
|
||||
|
||||
/* <47f5b> ../cstrike/dlls/client.cpp:255 */
|
||||
void ClientDisconnect(edict_t *pEntity)
|
||||
void EXT_FUNC ClientDisconnect(edict_t *pEntity)
|
||||
{
|
||||
CBasePlayer *pPlayer = (CBasePlayer *)CBaseEntity::Instance(pEntity);
|
||||
|
||||
@ -216,7 +216,7 @@ void respawn(entvars_t *pev, BOOL fCopyCorpse)
|
||||
// Suicide...
|
||||
|
||||
/* <48013> ../cstrike/dlls/client.cpp:347 */
|
||||
void ClientKill(edict_t *pEntity)
|
||||
void EXT_FUNC ClientKill(edict_t *pEntity)
|
||||
{
|
||||
entvars_t *pev = &pEntity->v;
|
||||
CHalfLifeMultiplay *mp = g_pGameRules;
|
||||
@ -496,7 +496,7 @@ void CheckStartMoney(void)
|
||||
}
|
||||
|
||||
/* <4c084> ../cstrike/dlls/client.cpp:661 */
|
||||
void ClientPutInServer(edict_t *pEntity)
|
||||
void EXT_FUNC ClientPutInServer(edict_t *pEntity)
|
||||
{
|
||||
entvars_t *pev = &pEntity->v;
|
||||
CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev);
|
||||
@ -2898,7 +2898,7 @@ BOOL HandleRadioAliasCommands(CBasePlayer *pPlayer, const char *pszCommand)
|
||||
// Use CMD_ARGV, CMD_ARGV, and CMD_ARGC to get pointers the character string command.
|
||||
|
||||
/* <4c6c1> ../cstrike/dlls/client.cpp:3234 */
|
||||
void ClientCommand(edict_t *pEntity)
|
||||
void EXT_FUNC ClientCommand(edict_t *pEntity)
|
||||
{
|
||||
const char *pcmd = CMD_ARGV_(0);
|
||||
const char *pstr = NULL;
|
||||
@ -3854,7 +3854,7 @@ void ClientCommand(edict_t *pEntity)
|
||||
}
|
||||
|
||||
/* <4b959> ../cstrike/dlls/client.cpp:4282 */
|
||||
void ClientUserInfoChanged(edict_t *pEntity, char *infobuffer)
|
||||
void EXT_FUNC ClientUserInfoChanged(edict_t *pEntity, char *infobuffer)
|
||||
{
|
||||
// Is the client spawned yet?
|
||||
if (!pEntity->pvPrivateData)
|
||||
@ -3919,7 +3919,7 @@ void ClientUserInfoChanged(edict_t *pEntity, char *infobuffer)
|
||||
}
|
||||
|
||||
/* <4a378> ../cstrike/dlls/client.cpp:4362 */
|
||||
void ServerDeactivate(void)
|
||||
void EXT_FUNC ServerDeactivate(void)
|
||||
{
|
||||
// It's possible that the engine will call this function more times than is necessary
|
||||
// Therefore, only run it one time for each call to ServerActivate
|
||||
@ -3946,7 +3946,7 @@ void ServerDeactivate(void)
|
||||
}
|
||||
|
||||
/* <4a392> ../cstrike/dlls/client.cpp:4400 */
|
||||
void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||
void EXT_FUNC ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||
{
|
||||
int i;
|
||||
CBaseEntity *pClass;
|
||||
@ -4000,7 +4000,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||
}
|
||||
|
||||
/* <4a404> ../cstrike/dlls/client.cpp:4459 */
|
||||
void PlayerPreThink(edict_t *pEntity)
|
||||
void EXT_FUNC PlayerPreThink(edict_t *pEntity)
|
||||
{
|
||||
entvars_t *pev = &pEntity->v;
|
||||
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
||||
@ -4012,7 +4012,7 @@ void PlayerPreThink(edict_t *pEntity)
|
||||
}
|
||||
|
||||
/* <4a47c> ../cstrike/dlls/client.cpp:4475 */
|
||||
void PlayerPostThink(edict_t *pEntity)
|
||||
void EXT_FUNC PlayerPostThink(edict_t *pEntity)
|
||||
{
|
||||
entvars_t *pev = &pEntity->v;
|
||||
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
||||
@ -4024,13 +4024,13 @@ void PlayerPostThink(edict_t *pEntity)
|
||||
}
|
||||
|
||||
/* <4a4f4> ../cstrike/dlls/client.cpp:4486 */
|
||||
void ParmsNewLevel(void)
|
||||
void EXT_FUNC ParmsNewLevel(void)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/* <4a50d> ../cstrike/dlls/client.cpp:4491 */
|
||||
void ParmsChangeLevel(void)
|
||||
void EXT_FUNC ParmsChangeLevel(void)
|
||||
{
|
||||
// retrieve the pointer to the save data
|
||||
SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData;
|
||||
@ -4042,7 +4042,7 @@ void ParmsChangeLevel(void)
|
||||
}
|
||||
|
||||
/* <4a548> ../cstrike/dlls/client.cpp:4504 */
|
||||
void StartFrame(void)
|
||||
void EXT_FUNC StartFrame(void)
|
||||
{
|
||||
if (g_pGameRules != NULL)
|
||||
{
|
||||
@ -4495,7 +4495,7 @@ void ClientPrecache(void)
|
||||
}
|
||||
|
||||
/* <4a6e5> ../cstrike/dlls/client.cpp:4996 */
|
||||
const char *GetGameDescription(void)
|
||||
const char *EXT_FUNC GetGameDescription(void)
|
||||
{
|
||||
if (UTIL_IsGame("czero"))
|
||||
return "Condition Zero";
|
||||
@ -4504,13 +4504,13 @@ const char *GetGameDescription(void)
|
||||
}
|
||||
|
||||
/* <4a703> ../cstrike/dlls/client.cpp:5022 */
|
||||
void Sys_Error(const char *error_string)
|
||||
void EXT_FUNC Sys_Error(const char *error_string)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/* <4a731> ../cstrike/dlls/client.cpp:5039 */
|
||||
void PlayerCustomization(edict_t *pEntity, customization_t *pCust)
|
||||
void EXT_FUNC PlayerCustomization(edict_t *pEntity, customization_t *pCust)
|
||||
{
|
||||
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
||||
|
||||
@ -4542,7 +4542,7 @@ void PlayerCustomization(edict_t *pEntity, customization_t *pCust)
|
||||
}
|
||||
|
||||
/* <4a7b9> ../cstrike/dlls/client.cpp:5079 */
|
||||
void SpectatorConnect(edict_t *pEntity)
|
||||
void EXT_FUNC SpectatorConnect(edict_t *pEntity)
|
||||
{
|
||||
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
||||
|
||||
@ -4553,7 +4553,7 @@ void SpectatorConnect(edict_t *pEntity)
|
||||
}
|
||||
|
||||
/* <4a83d> ../cstrike/dlls/client.cpp:5095 */
|
||||
void SpectatorDisconnect(edict_t *pEntity)
|
||||
void EXT_FUNC SpectatorDisconnect(edict_t *pEntity)
|
||||
{
|
||||
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
||||
|
||||
@ -4564,7 +4564,7 @@ void SpectatorDisconnect(edict_t *pEntity)
|
||||
}
|
||||
|
||||
/* <4a8b5> ../cstrike/dlls/client.cpp:5111 */
|
||||
void SpectatorThink(edict_t *pEntity)
|
||||
void EXT_FUNC SpectatorThink(edict_t *pEntity)
|
||||
{
|
||||
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
||||
|
||||
@ -4575,7 +4575,7 @@ void SpectatorThink(edict_t *pEntity)
|
||||
}
|
||||
|
||||
/* <4a92d> ../cstrike/dlls/client.cpp:5160 */
|
||||
void SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas)
|
||||
void EXT_FUNC SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas)
|
||||
{
|
||||
edict_t *pView = pClient;
|
||||
|
||||
@ -4673,7 +4673,7 @@ bool CheckEntityRecentlyInPVS(int clientnum, int entitynum, float currenttime)
|
||||
}
|
||||
|
||||
/* <4ac57> ../cstrike/dlls/client.cpp:5312 */
|
||||
int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet)
|
||||
int EXT_FUNC AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet)
|
||||
{
|
||||
if ((ent->v.effects & EF_NODRAW) == EF_NODRAW && ent != host)
|
||||
return 0;
|
||||
@ -4813,7 +4813,7 @@ int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *ho
|
||||
// Creates baselines used for network encoding, especially for player data since players are not spawned until connect time.
|
||||
|
||||
/* <4aef3> ../cstrike/dlls/client.cpp:5516 */
|
||||
void CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, Vector player_mins, Vector player_maxs)
|
||||
void EXT_FUNC CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, Vector player_mins, Vector player_maxs)
|
||||
{
|
||||
baseline->origin = entity->v.origin;
|
||||
baseline->angles = entity->v.angles;
|
||||
@ -5035,7 +5035,7 @@ void Custom_Encode(struct delta_s *pFields, const unsigned char *from, const uns
|
||||
}
|
||||
|
||||
/* <4b08a> ../cstrike/dlls/client.cpp:5811 */
|
||||
void RegisterEncoders(void)
|
||||
void EXT_FUNC RegisterEncoders(void)
|
||||
{
|
||||
DELTA_ADDENCODER("Entity_Encode", Entity_Encode);
|
||||
DELTA_ADDENCODER("Custom_Encode", Custom_Encode);
|
||||
@ -5043,7 +5043,7 @@ void RegisterEncoders(void)
|
||||
}
|
||||
|
||||
/* <4b0a4> ../cstrike/dlls/client.cpp:5818 */
|
||||
int GetWeaponData(edict_s *player, struct weapon_data_s *info)
|
||||
int EXT_FUNC GetWeaponData(edict_s *player, struct weapon_data_s *info)
|
||||
{
|
||||
entvars_t *pev = &player->v;
|
||||
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
||||
@ -5098,7 +5098,7 @@ int GetWeaponData(edict_s *player, struct weapon_data_s *info)
|
||||
}
|
||||
|
||||
/* <4b1fd> ../cstrike/dlls/client.cpp:5889 */
|
||||
void UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd)
|
||||
void EXT_FUNC UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientdata_s *cd)
|
||||
{
|
||||
if (!ent || !ent->pvPrivateData)
|
||||
{
|
||||
@ -5219,7 +5219,7 @@ void UpdateClientData(const struct edict_s *ent, int sendweapons, struct clientd
|
||||
}
|
||||
|
||||
/* <4b3ee> ../cstrike/dlls/client.cpp:6050 */
|
||||
void CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed)
|
||||
void EXT_FUNC CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed)
|
||||
{
|
||||
entvars_t *pev = (entvars_t *)&player->v;
|
||||
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
||||
@ -5238,7 +5238,7 @@ void CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int r
|
||||
}
|
||||
|
||||
/* <4b4eb> ../cstrike/dlls/client.cpp:6074 */
|
||||
void CmdEnd(const edict_t *player)
|
||||
void EXT_FUNC CmdEnd(const edict_t *player)
|
||||
{
|
||||
entvars_t *pev = (entvars_t *)&player->v;
|
||||
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
||||
@ -5254,7 +5254,7 @@ void CmdEnd(const edict_t *player)
|
||||
}
|
||||
|
||||
/* <4b644> ../cstrike/dlls/client.cpp:6101 */
|
||||
int ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size)
|
||||
int EXT_FUNC ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size)
|
||||
{
|
||||
// Parse stuff from args
|
||||
int max_buffer_size = *response_buffer_size;
|
||||
@ -5269,7 +5269,7 @@ int ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char
|
||||
}
|
||||
|
||||
/* <4b6c2> ../cstrike/dlls/client.cpp:6122 */
|
||||
int GetHullBounds(int hullnumber, float *mins, float *maxs)
|
||||
int EXT_FUNC GetHullBounds(int hullnumber, float *mins, float *maxs)
|
||||
{
|
||||
return hullnumber < 3;
|
||||
}
|
||||
@ -5278,7 +5278,7 @@ int GetHullBounds(int hullnumber, float *mins, float *maxs)
|
||||
// to be created during play ( e.g., grenades, ammo packs, projectiles, corpses, etc. )
|
||||
|
||||
/* <4b733> ../cstrike/dlls/client.cpp:6156 */
|
||||
void CreateInstancedBaselines(void)
|
||||
void EXT_FUNC CreateInstancedBaselines(void)
|
||||
{
|
||||
int iret = 0;
|
||||
entity_state_t state;
|
||||
@ -5293,7 +5293,7 @@ void CreateInstancedBaselines(void)
|
||||
}
|
||||
|
||||
/* <4b77c> ../cstrike/dlls/client.cpp:6179 */
|
||||
int InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message)
|
||||
int EXT_FUNC InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message)
|
||||
{
|
||||
// Server doesn't care?
|
||||
if (CVAR_GET_FLOAT("mp_consistency") != 1)
|
||||
@ -5313,7 +5313,7 @@ int InconsistentFile(const edict_t *player, const char *filename, char *disconne
|
||||
// if you want.
|
||||
|
||||
/* <4b7cf> ../cstrike/dlls/client.cpp:6204 */
|
||||
int AllowLagCompensation(void)
|
||||
int EXT_FUNC AllowLagCompensation(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ void CBaseMonster::__MAKE_VHOOK(GibMonster)(void)
|
||||
// anim to play.
|
||||
|
||||
/* <5f65e> ../cstrike/dlls/combat.cpp:355 */
|
||||
NOXREF Activity CBaseMonster::__MAKE_VHOOK(GetDeathActivity)(void)
|
||||
Activity CBaseMonster::__MAKE_VHOOK(GetDeathActivity)(void)
|
||||
{
|
||||
Activity deathActivity;
|
||||
BOOL fTriedDirection;
|
||||
|
@ -23,8 +23,8 @@ TYPEDESCRIPTION CMomentaryDoor::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseDoor, m_SaveData)[7];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMomentaryDoor, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseDoor, m_SaveData)[7];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CMomentaryDoor, m_SaveData)[1];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[7];
|
||||
|
||||
public:
|
||||
// used to selectivly override defaults
|
||||
@ -157,7 +157,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
public:
|
||||
BYTE m_bMoveSnd; // sound a door makes while moving
|
||||
|
@ -61,12 +61,12 @@ TYPEDESCRIPTION CGibShooter::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBubbling, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLightning, m_SaveData)[13];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLaser, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGlow, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CSprite, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGibShooter, m_SaveData)[7];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBubbling, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CLightning, m_SaveData)[13];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CLaser, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGlow, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CSprite, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGibShooter, m_SaveData)[7];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
void EXPORT AnimateUntilDead(void);
|
||||
static CSprite *SpriteCreate(const char *pSpriteName, const Vector &origin, BOOL animate);
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
private:
|
||||
|
||||
@ -356,7 +356,7 @@ public:
|
||||
void EXPORT StrikeThink(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
|
||||
public:
|
||||
CSprite *m_pSprite;
|
||||
@ -395,7 +395,7 @@ public:
|
||||
void EXPORT FizzThink(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
|
||||
public:
|
||||
int m_density;
|
||||
@ -447,7 +447,7 @@ public:
|
||||
void BeamUpdateVars(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[13];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[13];
|
||||
|
||||
public:
|
||||
int m_active;
|
||||
@ -486,7 +486,7 @@ public:
|
||||
|
||||
void Animate(float frames);
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
public:
|
||||
float m_lastTime;
|
||||
@ -542,7 +542,7 @@ public:
|
||||
public:
|
||||
void EXPORT ShootThink(void);
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[7];
|
||||
|
||||
public:
|
||||
int m_iGibs;
|
||||
|
@ -13,7 +13,7 @@ TYPEDESCRIPTION CEnvExplosion::m_SaveData[] =
|
||||
|
||||
#else // HOOK_GAMEDLL
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvExplosion, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CEnvExplosion, m_SaveData)[2];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
void EXPORT Smoke(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
public:
|
||||
int m_iMagnitude;
|
||||
|
@ -32,11 +32,11 @@
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//#pragma warning(disable:4244) // int or float down-conversion
|
||||
//#pragma warning(disable:4305) // int or float data truncation
|
||||
//#pragma warning(disable:4201) // nameless struct/union
|
||||
//#pragma warning(disable:4514) // unreferenced inline function removed
|
||||
//#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
#pragma warning(disable:4244) // int or float down-conversion
|
||||
#pragma warning(disable:4305) // int or float data truncation
|
||||
#pragma warning(disable:4201) // nameless struct/union
|
||||
#pragma warning(disable:4514) // unreferenced inline function removed
|
||||
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||
|
||||
#include "archtypes.h"
|
||||
|
||||
|
@ -116,8 +116,8 @@ const char *(*CBreakable::ppSoundsGlass)[3];
|
||||
|
||||
char *(*CPushable::pm_soundNames)[3];
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBreakable, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPushable, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBreakable, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CPushable, m_SaveData)[2];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -152,7 +152,7 @@ public:
|
||||
static const char *pSoundsConcrete[3];
|
||||
static const char *pSpawnObjects[32];
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
public:
|
||||
Materials m_Material;
|
||||
@ -213,7 +213,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
public:
|
||||
static char *m_soundNames[3];
|
||||
|
@ -57,9 +57,9 @@ static Vector gTankSpread[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTank, m_SaveData)[26];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTankLaser, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTankControls, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncTank, m_SaveData)[26];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncTankLaser, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncTankControls, m_SaveData)[1];
|
||||
Vector gTankSpread[5];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
@ -131,7 +131,7 @@ public:
|
||||
void ControllerPostFrame(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[26];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[26];
|
||||
|
||||
protected:
|
||||
CBasePlayer *m_pController;
|
||||
@ -209,7 +209,7 @@ public:
|
||||
CLaser *GetLaser(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
private:
|
||||
CLaser *m_pLaser;
|
||||
@ -274,7 +274,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
public:
|
||||
CFuncTank *m_pTank;
|
||||
|
@ -404,7 +404,7 @@ cvar_t sk_scientist_heal3;
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
/* <9c900> ../cstrike/dlls/game.cpp:500 */
|
||||
void GameDLLInit(void)
|
||||
void EXT_FUNC GameDLLInit(void)
|
||||
{
|
||||
g_psv_gravity = CVAR_GET_POINTER("sv_gravity");
|
||||
g_psv_aim = CVAR_GET_POINTER("sv_aim");
|
||||
|
@ -26,7 +26,7 @@ TYPEDESCRIPTION CGrenade::m_SaveData[] =
|
||||
|
||||
#else // HOOK_GAMEDLL
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGrenade, m_SaveData)[15];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGrenade, m_SaveData)[15];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CRecharge::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRecharge, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CRecharge, m_SaveData)[5];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
void EXPORT Recharge(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
float m_flNextCharge;
|
||||
int m_iReactivate;
|
||||
|
@ -24,9 +24,9 @@ TYPEDESCRIPTION CWreckage::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CCycler, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CCyclerSprite, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWreckage, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CCycler, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CCyclerSprite, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CWreckage, m_SaveData)[1];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
int m_animate;
|
||||
|
||||
@ -142,7 +142,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
|
||||
int m_animate;
|
||||
float m_lastTime;
|
||||
@ -212,7 +212,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
int m_flStartTime;
|
||||
|
||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CWallHealth::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWallHealth, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CWallHealth, m_SaveData)[5];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
void EXPORT Off(void);
|
||||
void EXPORT Recharge(void);
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
public:
|
||||
float m_flNextCharge;
|
||||
|
@ -810,7 +810,7 @@ void CHostage::GiveCTTouchBonus(CBasePlayer *pPlayer)
|
||||
/* <45bf69> ../cstrike/dlls/hostage/hostage.cpp:869 */
|
||||
int CHostage::__MAKE_VHOOK(ObjectCaps)(void)
|
||||
{
|
||||
return CBaseMonster::ObjectCaps() | FCAP_MUST_SPAWN | FCAP_ONOFF_USE;
|
||||
return (CBaseMonster::ObjectCaps() | FCAP_MUST_SPAWN | FCAP_ONOFF_USE);
|
||||
}
|
||||
|
||||
/* <45c0e3> ../cstrike/dlls/hostage/hostage.cpp:876 */
|
||||
|
@ -320,26 +320,22 @@ public:
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool ForEachHostage(T &func)
|
||||
bool ForEachHostage(T &func) const
|
||||
{
|
||||
UNTESTED
|
||||
|
||||
for (int i = 0; i < m_hostageCount; i++)
|
||||
{
|
||||
CHostage *pHostage = m_hostage[ i ];
|
||||
|
||||
if (pHostage->deadflag != DEAD_NO || pHostage->takedamage != DAMAGE_YES)
|
||||
if (pHostage->pev->deadflag == DEAD_DEAD)
|
||||
continue;
|
||||
|
||||
if (!pHostage->m_improv)
|
||||
break;
|
||||
|
||||
if (func(pHostage))
|
||||
return true;
|
||||
}
|
||||
if (func(pHostage) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
CHostage *m_hostage[ MAX_HOSTAGES ];
|
||||
int m_hostageCount;
|
||||
|
@ -13,7 +13,7 @@ TYPEDESCRIPTION CLight::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLight, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CLight, m_SaveData)[2];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
private:
|
||||
int m_iStyle;
|
||||
|
@ -27,9 +27,9 @@ TYPEDESCRIPTION CGamePlayerZone::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRuleEntity, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGameText, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGamePlayerZone, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CRuleEntity, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGameText, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGamePlayerZone, m_SaveData)[4];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
void SetMaster(int iszMaster)
|
||||
{
|
||||
@ -216,7 +216,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
private:
|
||||
hudtextparms_t m_textParms;
|
||||
@ -321,7 +321,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||
|
||||
private:
|
||||
string_t m_iszInTarget;
|
||||
|
@ -17,7 +17,7 @@ TYPEDESCRIPTION CFuncMortarField::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncMortarField, m_SaveData)[6];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncMortarField, m_SaveData)[6];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
void EXPORT FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[6];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[6];
|
||||
|
||||
public:
|
||||
int m_iszXController;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "precompiled.h"
|
||||
|
||||
/* <11c190> ../cstrike/dlls/observer.cpp:36 */
|
||||
int GetForceCamera(void)
|
||||
int GetForceCamera_api(CBasePlayer *pObserver)
|
||||
{
|
||||
int retVal;
|
||||
|
||||
@ -18,19 +17,30 @@ int GetForceCamera(void)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/* <11c190> ../cstrike/dlls/observer.cpp:36 */
|
||||
int GetForceCamera(CBasePlayer *pObserver)
|
||||
{
|
||||
return g_ReGameHookchains.m_GetForceCamera.callChain(GetForceCamera_api, pObserver);
|
||||
}
|
||||
|
||||
CBasePlayer *Observer_IsValidTarget_api(CBasePlayer *pPlayer, CBasePlayer *pEntity, int iPlayerIndex, bool bSameTeam)
|
||||
{
|
||||
// Don't spec observers or players who haven't picked a class yet
|
||||
if (!pEntity || pEntity == pPlayer || pEntity->has_disconnected || pEntity->IsObserver() || (pEntity->pev->effects & EF_NODRAW) || pEntity->m_iTeam == UNASSIGNED || (bSameTeam && pEntity->m_iTeam != pPlayer->m_iTeam))
|
||||
return NULL;
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
|
||||
/* <11c4fa> ../cstrike/dlls/observer.cpp:49 */
|
||||
CBaseEntity *CBasePlayer::Observer_IsValidTarget(int iPlayerIndex, bool bSameTeam)
|
||||
{
|
||||
if (iPlayerIndex > gpGlobals->maxClients || iPlayerIndex < 1)
|
||||
return NULL;
|
||||
|
||||
CBaseEntity *pEnt = UTIL_PlayerByIndex(iPlayerIndex);
|
||||
CBasePlayer *pEnt = (CBasePlayer *)UTIL_PlayerByIndex(iPlayerIndex);
|
||||
|
||||
// Don't spec observers or players who haven't picked a class yet
|
||||
if (!pEnt || pEnt == this || pEnt->has_disconnected || ((CBasePlayer *)pEnt)->IsObserver() || (pEnt->pev->effects & EF_NODRAW) || ((CBasePlayer *)pEnt)->m_iTeam == UNASSIGNED || (bSameTeam && ((CBasePlayer *)pEnt)->m_iTeam != m_iTeam))
|
||||
return NULL;
|
||||
|
||||
return pEnt;
|
||||
return g_ReGameHookchains.m_Observer_IsValidTarget.callChain(Observer_IsValidTarget_api, this, pEnt, iPlayerIndex, bSameTeam);
|
||||
}
|
||||
|
||||
/* <11c2c7> ../cstrike/dlls/observer.cpp:82 */
|
||||
@ -147,7 +157,7 @@ void CBasePlayer::Observer_FindNextPlayer(bool bReverse, const char *name)
|
||||
|
||||
iDir = bReverse ? -1 : 1;
|
||||
|
||||
bForceSameTeam = (GetForceCamera() != CAMERA_MODE_SPEC_ANYONE && m_iTeam != SPECTATOR);
|
||||
bForceSameTeam = (GetForceCamera(this) != CAMERA_MODE_SPEC_ANYONE && m_iTeam != SPECTATOR);
|
||||
|
||||
do
|
||||
{
|
||||
@ -441,7 +451,7 @@ void CBasePlayer::Observer_SetMode(int iMode)
|
||||
if (iMode == pev->iuser1)
|
||||
return;
|
||||
|
||||
_forcecamera = GetForceCamera();
|
||||
_forcecamera = GetForceCamera(this);
|
||||
|
||||
// is valid mode ?
|
||||
if (iMode < OBS_CHASE_LOCKED || iMode > OBS_MAP_CHASE)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#define CAMERA_MODE_SPEC_ONLY_TEAM 1
|
||||
#define CAMERA_MODE_SPEC_ONLY_FRIST_PERSON 2
|
||||
|
||||
int GetForceCamera(void);
|
||||
int GetForceCamera(CBasePlayer *pObserver);
|
||||
void UpdateClientEffects(CBasePlayer *pObserver, int oldMode);
|
||||
|
||||
#endif // OBSERVER_H
|
||||
|
@ -21,8 +21,8 @@ TYPEDESCRIPTION CPathTrack::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPathCorner, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPathTrack, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CPathCorner, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CPathTrack, m_SaveData)[5];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
private:
|
||||
float m_flWait;
|
||||
|
@ -61,12 +61,12 @@ TYPEDESCRIPTION CGunTarget::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlatTrain, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncPlatRot, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTrain, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTrackTrain, m_SaveData)[12];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTrackChange, m_SaveData)[9];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGunTarget, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBasePlatTrain, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncPlatRot, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncTrain, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncTrackTrain, m_SaveData)[12];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncTrackChange, m_SaveData)[9];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGunTarget, m_SaveData)[1];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
|
||||
public:
|
||||
BYTE m_bMoveSnd;
|
||||
@ -171,7 +171,7 @@ public:
|
||||
void RotMove(Vector &destAngle, float time);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
public:
|
||||
Vector m_end;
|
||||
@ -214,7 +214,7 @@ public:
|
||||
void EXPORT Next(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
|
||||
public:
|
||||
Vector m_vStartPosition;
|
||||
@ -308,7 +308,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[9];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[9];
|
||||
|
||||
public:
|
||||
CPathTrack *m_trackTop;
|
||||
@ -350,7 +350,7 @@ public:
|
||||
virtual int Restore(CRestore &restore);
|
||||
virtual int ObjectCaps(void)
|
||||
{
|
||||
return CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION;
|
||||
return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
||||
}
|
||||
virtual void Activate(void);
|
||||
virtual int Classify(void)
|
||||
@ -386,7 +386,7 @@ public:
|
||||
void Stop(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
private:
|
||||
BOOL m_on;
|
||||
|
@ -275,8 +275,8 @@ int gmsgShowTimer;
|
||||
BOOL gInitHUD;
|
||||
cvar_t *sv_aim;
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRevertSaved, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData)[40];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CRevertSaved, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBasePlayer, m_playerSaveData)[40];
|
||||
WeaponStruct g_weaponStruct[ MAX_WEAPONS ];
|
||||
char *(*CDeadHEV::pm_szPoses)[4];
|
||||
|
||||
@ -395,7 +395,7 @@ void WriteSigonMessages(void)
|
||||
{
|
||||
for (int i = 0; i < MAX_WEAPONS; i++)
|
||||
{
|
||||
ItemInfo &II = IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[i];
|
||||
ItemInfo &II = IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[i];
|
||||
|
||||
if (!II.iId)
|
||||
continue;
|
||||
@ -1520,7 +1520,7 @@ void packPlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo)
|
||||
|
||||
if (packAmmo)
|
||||
{
|
||||
pWeaponBox->PackAmmo(MAKE_STRING(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]);
|
||||
pWeaponBox->PackAmmo(MAKE_STRING(IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[pItem->m_iId].pszAmmo1), pPlayer->m_rgAmmo[pItem->PrimaryAmmoIndex()]);
|
||||
}
|
||||
SET_MODEL(ENT(pWeaponBox->pev), modelName);
|
||||
}
|
||||
@ -5587,7 +5587,7 @@ int CBasePlayer::__MAKE_VHOOK(Save)(CSave &save)
|
||||
if (!CBaseMonster::Save(save))
|
||||
return 0;
|
||||
|
||||
return save.WriteFields("PLAYER", this, IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData)));
|
||||
return save.WriteFields("PLAYER", this, IMPL_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPL_CLASS(CBasePlayer, m_playerSaveData)));
|
||||
}
|
||||
|
||||
/* <153355> ../cstrike/dlls/player.cpp:6685 */
|
||||
@ -5622,7 +5622,7 @@ int CBasePlayer::__MAKE_VHOOK(Restore)(CRestore &restore)
|
||||
if (!CBaseMonster::Restore(restore))
|
||||
return 0;
|
||||
|
||||
int status = restore.ReadFields("PLAYER", this, IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData)));
|
||||
int status = restore.ReadFields("PLAYER", this, IMPL_CLASS(CBasePlayer, m_playerSaveData), ARRAYSIZE(IMPL_CLASS(CBasePlayer, m_playerSaveData)));
|
||||
SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData;
|
||||
|
||||
// landmark isn't present.
|
||||
@ -6622,10 +6622,10 @@ int CBasePlayer::GetAmmoIndex(const char *psz)
|
||||
|
||||
for (int i = 1; i < MAX_AMMO_SLOTS; i++)
|
||||
{
|
||||
if (!IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName)
|
||||
if (!IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName)
|
||||
continue;
|
||||
|
||||
if (!Q_stricmp(psz, IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName))
|
||||
if (!Q_stricmp(psz, IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
|
@ -758,7 +758,6 @@ public:
|
||||
//m_musicState = INTENSE;
|
||||
//m_intenseTimestamp = gpGlobals->time;
|
||||
}
|
||||
|
||||
public:
|
||||
enum { MaxLocationLen = 32 };
|
||||
|
||||
@ -913,7 +912,7 @@ public:
|
||||
float m_flNextDecalTime;
|
||||
char m_szTeamName[ TEAM_NAME_LENGTH ];
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_playerSaveData)[40];
|
||||
static TYPEDESCRIPTION IMPL(m_playerSaveData)[40];
|
||||
|
||||
/*protected:*/
|
||||
int m_modelIndexPlayer;
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
public:
|
||||
float m_messageTime;
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define IMPLEMENT_ARRAY(var)\
|
||||
var
|
||||
|
||||
#define IMPL_CLASS IMPLEMENT_ARRAY_CLASS
|
||||
#define IMPLEMENT_ARRAY_CLASS(baseClass,var)\
|
||||
baseClass::var
|
||||
|
||||
@ -49,6 +50,7 @@
|
||||
#define IMPLEMENT_ARRAY(var)\
|
||||
(*p##var)
|
||||
|
||||
#define IMPL_CLASS IMPLEMENT_ARRAY_CLASS
|
||||
#define IMPLEMENT_ARRAY_CLASS(baseClass,var)\
|
||||
(*baseClass::p##var)
|
||||
|
||||
|
@ -69,9 +69,9 @@ dynpitchvol_t rgdpvpreset[CDPVPRESETMAX];
|
||||
int fSentencesInit;
|
||||
int gcallsentences;
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAmbientGeneric, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvSound, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CSpeaker, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CAmbientGeneric, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CEnvSound, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CSpeaker, m_SaveData)[1];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
void InitModulationParms(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||
|
||||
float m_flAttenuation; // attenuation value
|
||||
dynpitchvol_t m_dpv;
|
||||
@ -170,7 +170,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
float m_flRadius;
|
||||
float m_flRoomtype;
|
||||
@ -205,7 +205,7 @@ public:
|
||||
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||
void EXPORT SpeakerThink(void);
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
int m_preset; // preset number
|
||||
|
||||
|
@ -38,8 +38,8 @@ TYPEDESCRIPTION CBaseToggle::m_SaveData[] =
|
||||
|
||||
#else // HOOK_GAMEDLL
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseDelay, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseToggle, m_SaveData)[19];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseDelay, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseToggle, m_SaveData)[19];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -26,8 +26,8 @@ TYPEDESCRIPTION CBaseGrenCatch::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncWeaponCheck, m_SaveData)[6];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseGrenCatch, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncWeaponCheck, m_SaveData)[6];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBaseGrenCatch, m_SaveData)[5];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
|
@ -106,7 +106,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
int m_NeedGrenadeType;
|
||||
string_t sTriggerOnGrenade;
|
||||
@ -137,7 +137,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[6];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[6];
|
||||
|
||||
private:
|
||||
string_t sTriggerWithItems;
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
CPathTrack *GetPrevious(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
float m_length;
|
||||
string_t m_altName;
|
||||
@ -150,7 +150,7 @@ public:
|
||||
static CFuncTrackTrain *Instance(edict_t *pent);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[12];
|
||||
|
||||
CPathTrack *m_ppath;
|
||||
float m_length;
|
||||
@ -234,7 +234,7 @@ public:
|
||||
static CFuncVehicle *Instance(edict_t *pent);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[12];
|
||||
|
||||
CPathTrack *m_ppath;
|
||||
float m_length;
|
||||
|
@ -68,13 +68,13 @@ FILE_GLOBAL char st_szNextSpot[cchMapNameMost];
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFrictionModifier, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAutoTrigger, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CTriggerRelay, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMultiManager, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CChangeLevel, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CTriggerChangeTarget, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CTriggerCamera, m_SaveData)[13];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFrictionModifier, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CAutoTrigger, m_SaveData)[2];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CTriggerRelay, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CMultiManager, m_SaveData)[5];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CChangeLevel, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CTriggerChangeTarget, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CTriggerCamera, m_SaveData)[13];
|
||||
|
||||
char st_szNextMap[cchMapNameMost];
|
||||
char st_szNextSpot[cchMapNameMost];
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
void EXPORT ChangeFriction(CBaseEntity *pOther);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
float m_frictionFraction;
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||
|
||||
int m_globalstate;
|
||||
USE_TYPE triggerType;
|
||||
@ -161,7 +161,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
USE_TYPE triggerType;
|
||||
|
||||
@ -231,7 +231,7 @@ private:
|
||||
CMultiManager *Clone(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||
|
||||
int m_cTargets;//312
|
||||
int m_index;
|
||||
@ -526,7 +526,7 @@ public:
|
||||
static int InTransitionVolume(CBaseEntity *pEntity, char *pVolumeName);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||
|
||||
char m_szMapName[ cchMapNameMost ]; // trigger_changelevel only: next map
|
||||
char m_szLandmarkName[ cchMapNameMost ]; // trigger_changelevel only: landmark on next map
|
||||
@ -747,7 +747,7 @@ public:
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||
|
||||
private:
|
||||
int m_iszNewTarget;
|
||||
@ -783,7 +783,7 @@ public:
|
||||
void Move(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[13];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[13];
|
||||
|
||||
EHANDLE m_hPlayer;
|
||||
EHANDLE m_hTarget;
|
||||
|
@ -553,7 +553,7 @@ CBaseEntity *UTIL_FindEntityGeneric(const char *szWhatever, const Vector &vecSrc
|
||||
}
|
||||
|
||||
/* <1ad347> ../cstrike/dlls/util.cpp:711 */
|
||||
CBaseEntity *UTIL_PlayerByIndex(int playerIndex)
|
||||
CBaseEntity *EXT_FUNC UTIL_PlayerByIndex(int playerIndex)
|
||||
{
|
||||
CBaseEntity *pPlayer = NULL;
|
||||
if (playerIndex > 0 && playerIndex <= gpGlobals->maxClients)
|
||||
@ -1343,10 +1343,6 @@ void UTIL_StringToVector(float *pVector, const char *pString)
|
||||
|
||||
Q_strcpy(tempString, pString);
|
||||
|
||||
#ifdef GAMEDLL_FIXES
|
||||
tempString[127] = 0;
|
||||
#endif // GAMEDLL_FIXES
|
||||
|
||||
pstr = tempString;
|
||||
pfront = tempString;
|
||||
|
||||
@ -1698,7 +1694,7 @@ extern "C"
|
||||
return num;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
|
||||
/* <1b04b5> ../cstrike/dlls/util.cpp:1971 */
|
||||
unsigned int CSaveRestoreBuffer::HashString(const char *pszToken)
|
||||
@ -1726,12 +1722,13 @@ unsigned short CSaveRestoreBuffer::TokenHash(const char *pszToken)
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
ALERT(at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* <1b06a5> ../cstrike/dlls/util.cpp:2020 */
|
||||
NOXREF void CSave::WriteData(const char *pname, int size, const char *pdata)
|
||||
void CSave::WriteData(const char *pname, int size, const char *pdata)
|
||||
{
|
||||
BufferField(pname, size, pdata);
|
||||
}
|
||||
@ -1743,19 +1740,19 @@ NOXREF void CSave::WriteShort(const char *pname, const short *data, int count)
|
||||
}
|
||||
|
||||
/* <1b0a7b> ../cstrike/dlls/util.cpp:2032 */
|
||||
NOXREF void CSave::WriteInt(const char *pname, const int *data, int count)
|
||||
void CSave::WriteInt(const char *pname, const int *data, int count)
|
||||
{
|
||||
BufferField(pname, sizeof(int) * count, (const char *)data);
|
||||
}
|
||||
|
||||
/* <1b0c77> ../cstrike/dlls/util.cpp:2038 */
|
||||
NOXREF void CSave::WriteFloat(const char *pname, const float *data, int count)
|
||||
void CSave::WriteFloat(const char *pname, const float *data, int count)
|
||||
{
|
||||
BufferField(pname, sizeof(float) * count, (const char *)data);
|
||||
}
|
||||
|
||||
/* <1b0ea5> ../cstrike/dlls/util.cpp:2044 */
|
||||
NOXREF void CSave::WriteTime(const char *pname, const float *data, int count)
|
||||
void CSave::WriteTime(const char *pname, const float *data, int count)
|
||||
{
|
||||
int i;
|
||||
BufferHeader(pname, sizeof(float) * count);
|
||||
@ -1779,7 +1776,7 @@ NOXREF void CSave::WriteString(const char *pname, const char *pdata)
|
||||
}
|
||||
|
||||
/* <1b121f> ../cstrike/dlls/util.cpp:2076 */
|
||||
NOXREF void CSave::WriteString(const char *pname, const int *stringId, int count)
|
||||
void CSave::WriteString(const char *pname, const int *stringId, int count)
|
||||
{
|
||||
int i;
|
||||
int size = 0;
|
||||
@ -1796,13 +1793,13 @@ NOXREF void CSave::WriteString(const char *pname, const int *stringId, int count
|
||||
}
|
||||
|
||||
/* <1b1480> ../cstrike/dlls/util.cpp:2099 */
|
||||
NOXREF void CSave::WriteVector(const char *pname, const Vector &value)
|
||||
void CSave::WriteVector(const char *pname, const Vector &value)
|
||||
{
|
||||
WriteVector(pname, &value.x, 1);
|
||||
}
|
||||
|
||||
/* <1b1630> ../cstrike/dlls/util.cpp:2105 */
|
||||
NOXREF void CSave::WriteVector(const char *pname, const float *value, int count)
|
||||
void CSave::WriteVector(const char *pname, const float *value, int count)
|
||||
{
|
||||
BufferHeader(pname, sizeof(float) * 3 * count);
|
||||
BufferData((const char *)value, sizeof(float) * 3 * count);
|
||||
@ -1820,7 +1817,7 @@ NOXREF void CSave::WritePositionVector(const char *pname, const Vector &value)
|
||||
}
|
||||
|
||||
/* <1b1bde> ../cstrike/dlls/util.cpp:2126 */
|
||||
NOXREF void CSave::WritePositionVector(const char *pname, const float *value, int count)
|
||||
void CSave::WritePositionVector(const char *pname, const float *value, int count)
|
||||
{
|
||||
BufferHeader(pname, sizeof(float) * 3 * count);
|
||||
for (int i = 0; i < count; i++)
|
||||
@ -1836,7 +1833,7 @@ NOXREF void CSave::WritePositionVector(const char *pname, const float *value, in
|
||||
}
|
||||
|
||||
/* <1b2ca4> ../cstrike/dlls/util.cpp:2145 */
|
||||
NOXREF void CSave::WriteFunction(const char *pname, void **data, int count)
|
||||
void CSave::WriteFunction(const char *pname, void **data, int count)
|
||||
{
|
||||
const char *functionName = NAME_FOR_FUNCTION((uint32)*data);
|
||||
|
||||
@ -2009,7 +2006,7 @@ NOXREF void CSave::BufferString(char *pdata, int len)
|
||||
}
|
||||
|
||||
/* <1b3f5d> ../cstrike/dlls/util.cpp:2333 */
|
||||
NOXREF int CSave::DataEmpty(const char *pdata, int size)
|
||||
int CSave::DataEmpty(const char *pdata, int size)
|
||||
{
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
@ -2264,7 +2261,7 @@ int CRestore::ReadFields(const char *pname, void *pBaseData, TYPEDESCRIPTION *pF
|
||||
}
|
||||
|
||||
/* <1b46b1> ../cstrike/dlls/util.cpp:2595 */
|
||||
NOXREF void CRestore::BufferReadHeader(HEADER *pheader)
|
||||
void CRestore::BufferReadHeader(HEADER *pheader)
|
||||
{
|
||||
pheader->size = ReadShort();
|
||||
pheader->token = ReadShort();
|
||||
@ -2274,7 +2271,7 @@ NOXREF void CRestore::BufferReadHeader(HEADER *pheader)
|
||||
}
|
||||
|
||||
/* <1b4654> ../cstrike/dlls/util.cpp:2605 */
|
||||
NOXREF short CRestore::ReadShort(void)
|
||||
short CRestore::ReadShort(void)
|
||||
{
|
||||
short tmp = 0;
|
||||
BufferReadBytes((char *)&tmp, sizeof(short));
|
||||
@ -2282,7 +2279,7 @@ NOXREF short CRestore::ReadShort(void)
|
||||
}
|
||||
|
||||
/* <1b45f5> ../cstrike/dlls/util.cpp:2614 */
|
||||
NOXREF int CRestore::ReadInt(void)
|
||||
int CRestore::ReadInt(void)
|
||||
{
|
||||
int tmp = 0;
|
||||
BufferReadBytes((char *)&tmp, sizeof(int));
|
||||
@ -2306,7 +2303,7 @@ NOXREF char *CRestore::ReadNamedString(const char *pName)
|
||||
}
|
||||
|
||||
/* <1b453a> ../cstrike/dlls/util.cpp:2644 */
|
||||
NOXREF char *CRestore::BufferPointer(void)
|
||||
char *CRestore::BufferPointer(void)
|
||||
{
|
||||
if (!m_pdata)
|
||||
return NULL;
|
||||
@ -2335,7 +2332,7 @@ void CRestore::BufferReadBytes(char *pOutput, int size)
|
||||
}
|
||||
|
||||
/* <1b5092> ../cstrike/dlls/util.cpp:2673 */
|
||||
NOXREF void CRestore::BufferSkipBytes(int bytes)
|
||||
void CRestore::BufferSkipBytes(int bytes)
|
||||
{
|
||||
BufferReadBytes(NULL, bytes);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ extern globalvars_t *gpGlobals;
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
#define LINK_ENTITY_TO_CLASS(mapClassName, DLLClassName)\
|
||||
C_DLLEXPORT void mapClassName(entvars_t *pev);\
|
||||
C_DLLEXPORT void EXT_FUNC mapClassName(entvars_t *pev);\
|
||||
void mapClassName(entvars_t *pev)\
|
||||
{\
|
||||
GetClassPtr((DLLClassName *)pev);\
|
||||
@ -204,6 +204,16 @@ typedef enum
|
||||
|
||||
} MONSTERSTATE;
|
||||
|
||||
// Things that toggle (buttons/triggers/doors) need this
|
||||
typedef enum
|
||||
{
|
||||
TS_AT_TOP,
|
||||
TS_AT_BOTTOM,
|
||||
TS_GOING_UP,
|
||||
TS_GOING_DOWN,
|
||||
|
||||
} TOGGLE_STATE;
|
||||
|
||||
typedef struct hudtextparms_s
|
||||
{
|
||||
float x;
|
||||
|
@ -121,8 +121,8 @@ public:
|
||||
float_precision flLen = Length();
|
||||
if (flLen > 0.0)
|
||||
{
|
||||
x /= (vec_t)flLen;
|
||||
y /= (vec_t)flLen;
|
||||
x = (vec_t)(1 / flLen * x);
|
||||
y = (vec_t)(1 / flLen * y);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ TYPEDESCRIPTION CFuncVehicle::m_SaveData[] =
|
||||
|
||||
#else
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncVehicle, m_SaveData)[12];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CFuncVehicle, m_SaveData)[12];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
@ -960,30 +960,12 @@ void CFuncVehicle::__MAKE_VHOOK(Precache)(void)
|
||||
|
||||
switch (m_sounds)
|
||||
{
|
||||
case 1:
|
||||
PRECACHE_SOUND("plats/vehicle1.wav");
|
||||
pev->noise = MAKE_STRING("plats/vehicle1.wav");
|
||||
break;
|
||||
case 2:
|
||||
PRECACHE_SOUND("plats/vehicle2.wav");
|
||||
pev->noise = MAKE_STRING("plats/vehicle2.wav");
|
||||
break;
|
||||
case 3:
|
||||
PRECACHE_SOUND("plats/vehicle3.wav");
|
||||
pev->noise = MAKE_STRING("plats/vehicle3.wav");
|
||||
break;
|
||||
case 4:
|
||||
PRECACHE_SOUND("plats/vehicle4.wav");
|
||||
pev->noise = MAKE_STRING("plats/vehicle4.wav");
|
||||
break;
|
||||
case 5:
|
||||
PRECACHE_SOUND("plats/vehicle6.wav");
|
||||
pev->noise = MAKE_STRING("plats/vehicle6.wav");
|
||||
break;
|
||||
case 6:
|
||||
PRECACHE_SOUND("plats/vehicle7.wav");
|
||||
pev->noise = MAKE_STRING("plats/vehicle7.wav");
|
||||
break;
|
||||
case 1: PRECACHE_SOUND("plats/vehicle1.wav");pev->noise = MAKE_STRING("plats/vehicle1.wav"); break;
|
||||
case 2: PRECACHE_SOUND("plats/vehicle2.wav");pev->noise = MAKE_STRING("plats/vehicle2.wav"); break;
|
||||
case 3: PRECACHE_SOUND("plats/vehicle3.wav");pev->noise = MAKE_STRING("plats/vehicle3.wav"); break;
|
||||
case 4: PRECACHE_SOUND("plats/vehicle4.wav");pev->noise = MAKE_STRING("plats/vehicle4.wav"); break;
|
||||
case 5: PRECACHE_SOUND("plats/vehicle6.wav");pev->noise = MAKE_STRING("plats/vehicle6.wav"); break;
|
||||
case 6: PRECACHE_SOUND("plats/vehicle7.wav");pev->noise = MAKE_STRING("plats/vehicle7.wav"); break;
|
||||
}
|
||||
|
||||
PRECACHE_SOUND("plats/vehicle_brake1.wav");
|
||||
|
@ -38,12 +38,12 @@ const char *g_pModelNameLaser = "sprites/laserbeam.spr";
|
||||
|
||||
#else // HOOK_GAMEDLL
|
||||
|
||||
ItemInfo IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[32];
|
||||
AmmoInfo IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[32];
|
||||
ItemInfo IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[32];
|
||||
AmmoInfo IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[32];
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlayerWeapon, m_SaveData)[7];
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWeaponBox, m_SaveData)[4];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBasePlayerItem, m_SaveData)[3];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CBasePlayerWeapon, m_SaveData)[7];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CWeaponBox, m_SaveData)[4];
|
||||
|
||||
const char *g_pModelNameLaser;
|
||||
|
||||
@ -80,7 +80,7 @@ int MaxAmmoCarry(int iszName)
|
||||
{
|
||||
for (int i = 0; i < MAX_WEAPONS; i++)
|
||||
{
|
||||
ItemInfo *info = &IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[ i ];
|
||||
ItemInfo *info = &IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[ i ];
|
||||
|
||||
if (info->pszAmmo1 && !Q_strcmp(STRING(iszName), info->pszAmmo1))
|
||||
{
|
||||
@ -231,10 +231,10 @@ void AddAmmoNameToAmmoRegistry(const char *szAmmoname)
|
||||
// make sure it's not already in the registry
|
||||
for (int i = 0; i < MAX_AMMO_SLOTS; i++)
|
||||
{
|
||||
if (!IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName)
|
||||
if (!IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName)
|
||||
continue;
|
||||
|
||||
if (!Q_stricmp(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName, szAmmoname))
|
||||
if (!Q_stricmp(IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ i ].pszName, szAmmoname))
|
||||
{
|
||||
// ammo already in registry, just quite
|
||||
return;
|
||||
@ -249,10 +249,10 @@ void AddAmmoNameToAmmoRegistry(const char *szAmmoname)
|
||||
giAmmoIndex = 0;
|
||||
}
|
||||
|
||||
IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ giAmmoIndex ].pszName = szAmmoname;
|
||||
IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ giAmmoIndex ].pszName = szAmmoname;
|
||||
|
||||
// yes, this info is redundant
|
||||
IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ giAmmoIndex ].iId = giAmmoIndex;
|
||||
IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ giAmmoIndex ].iId = giAmmoIndex;
|
||||
}
|
||||
|
||||
// Precaches the weapon and queues the weapon info for sending to clients
|
||||
@ -278,7 +278,7 @@ void UTIL_PrecacheOtherWeapon(const char *szClassname)
|
||||
pEntity->Precache();
|
||||
if (((CBasePlayerItem *)pEntity)->GetItemInfo(&II))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[ II.iId ] = II;
|
||||
IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[ II.iId ] = II;
|
||||
|
||||
if (II.pszAmmo1 != NULL && *II.pszAmmo1 != '\0')
|
||||
{
|
||||
@ -317,7 +317,7 @@ NOXREF void UTIL_PrecacheOtherWeapon2(const char *szClassname)
|
||||
|
||||
if (((CBasePlayerItem *)pEntity)->GetItemInfo(&II))
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[ II.iId ] = II;
|
||||
IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[ II.iId ] = II;
|
||||
|
||||
if (II.pszAmmo1 != NULL && *II.pszAmmo1 != '\0')
|
||||
{
|
||||
@ -339,8 +339,8 @@ NOXREF void UTIL_PrecacheOtherWeapon2(const char *szClassname)
|
||||
/* <1d3191> ../cstrike/dlls/weapons.cpp:345 */
|
||||
void W_Precache(void)
|
||||
{
|
||||
Q_memset(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray), 0, ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)));
|
||||
Q_memset(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray), 0, ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)));
|
||||
Q_memset(IMPL_CLASS(CBasePlayerItem, ItemInfoArray), 0, ARRAYSIZE(IMPL_CLASS(CBasePlayerItem, ItemInfoArray)));
|
||||
Q_memset(IMPL_CLASS(CBasePlayerItem, AmmoInfoArray), 0, ARRAYSIZE(IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)));
|
||||
giAmmoIndex = 0;
|
||||
|
||||
// custom items...
|
||||
|
@ -234,7 +234,7 @@ public:
|
||||
void EXPORT C4Think(void);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[15];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[15];
|
||||
|
||||
bool m_bStartDefuse;
|
||||
bool m_bIsC4;
|
||||
@ -301,14 +301,11 @@ public:
|
||||
return TRUE;
|
||||
}
|
||||
virtual void Holster(int skiplocal = 0);
|
||||
|
||||
virtual void UpdateItemInfo(void) {}
|
||||
virtual void ItemPreFrame(void) {}
|
||||
virtual void ItemPostFrame(void) {}
|
||||
|
||||
virtual void Drop(void);
|
||||
virtual void Kill(void);
|
||||
|
||||
virtual void AttachToPlayer(CBasePlayer *pPlayer);
|
||||
virtual int PrimaryAmmoIndex(void)
|
||||
{
|
||||
@ -361,45 +358,45 @@ public:
|
||||
public:
|
||||
inline int iItemPosition(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iPosition;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].iPosition;
|
||||
}
|
||||
inline const char *pszAmmo1(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].pszAmmo1;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].pszAmmo1;
|
||||
}
|
||||
inline int iMaxAmmo1(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iMaxAmmo1;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].iMaxAmmo1;
|
||||
}
|
||||
inline const char *pszAmmo2(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].pszAmmo2;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].pszAmmo2;
|
||||
}
|
||||
inline int iMaxAmmo2(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iMaxAmmo2;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].iMaxAmmo2;
|
||||
}
|
||||
inline const char *pszName(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].pszName;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].pszName;
|
||||
}
|
||||
inline int iMaxClip(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iMaxClip;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].iMaxClip;
|
||||
}
|
||||
inline int iWeight(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iWeight;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].iWeight;
|
||||
}
|
||||
inline int iFlags(void)
|
||||
{
|
||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iFlags;
|
||||
return IMPL(ItemInfoArray)[ m_iId ].iFlags;
|
||||
}
|
||||
public:
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
||||
static ItemInfo IMPLEMENT_ARRAY(ItemInfoArray)[32];
|
||||
static AmmoInfo IMPLEMENT_ARRAY(AmmoInfoArray)[32];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||
static ItemInfo IMPL(ItemInfoArray)[32];
|
||||
static AmmoInfo IMPL(AmmoInfoArray)[32];
|
||||
|
||||
CBasePlayer *m_pPlayer;
|
||||
CBasePlayerItem *m_pNext;
|
||||
@ -501,7 +498,7 @@ public:
|
||||
bool ShieldSecondaryFire(int iUpAnim, int iDownAnim);
|
||||
|
||||
public:
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[7];
|
||||
|
||||
int m_iPlayEmptySound;
|
||||
int m_fFireOnEmpty;
|
||||
@ -601,7 +598,7 @@ public:
|
||||
BOOL PackAmmo(int iszName, int iCount);
|
||||
public:
|
||||
|
||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
||||
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||
|
||||
CBasePlayerItem *m_rgpPlayerItems[ MAX_ITEM_TYPES ];
|
||||
int m_rgiszAmmo[ MAX_AMMO_SLOTS ];
|
||||
@ -633,7 +630,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -676,7 +677,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 250.0f;
|
||||
return MP5N_MAX_SPEED;
|
||||
}
|
||||
int iItemSlot(void)
|
||||
{
|
||||
@ -685,9 +686,13 @@ public:
|
||||
virtual void PrimaryAttack(void);
|
||||
virtual void Reload(void);
|
||||
virtual void WeaponIdle(void);
|
||||
BOOL UseDecrement(void)
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -733,7 +738,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -772,7 +781,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 221.0f;
|
||||
return AK47_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -784,7 +793,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -822,7 +835,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 240.0f;
|
||||
return AUG_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -834,7 +847,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -933,7 +950,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -945,6 +966,7 @@ public:
|
||||
int GetItemInfo_(ItemInfo *p);
|
||||
BOOL Deploy_(void);
|
||||
void Holster_(int skiplocal);
|
||||
float GetMaxSpeed_(void);
|
||||
void PrimaryAttack_(void);
|
||||
void WeaponIdle_(void);
|
||||
|
||||
@ -981,7 +1003,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -1039,7 +1065,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -1091,7 +1121,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1141,7 +1175,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -1197,7 +1235,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1249,7 +1291,11 @@ public:
|
||||
virtual void SecondaryAttack(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual void WeaponIdle(void);
|
||||
|
||||
@ -1296,7 +1342,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 220.0f;
|
||||
return M249_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1305,9 +1351,13 @@ public:
|
||||
virtual void PrimaryAttack(void);
|
||||
virtual void Reload(void);
|
||||
virtual void WeaponIdle(void);
|
||||
BOOL UseDecrement(void)
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1344,7 +1394,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 230.0f;
|
||||
return M3_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1355,7 +1405,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1398,7 +1452,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1437,7 +1495,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 250.0f;
|
||||
return MAC10_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1448,7 +1506,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1497,7 +1559,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -1548,7 +1614,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1595,7 +1665,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1650,7 +1724,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1687,7 +1765,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 250.0f;
|
||||
return TMP_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1698,7 +1776,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1735,7 +1817,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 240.0f;
|
||||
return XM1014_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1746,7 +1828,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1780,7 +1866,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 250.0f;
|
||||
return ELITE_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1791,7 +1877,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -1842,7 +1932,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
virtual BOOL IsPistol(void)
|
||||
{
|
||||
@ -1885,7 +1979,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 250.0f;
|
||||
return UMP45_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1896,7 +1990,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1942,7 +2040,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -1980,7 +2082,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 240.0f;
|
||||
return GALIL_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -1992,7 +2094,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
@ -2030,7 +2136,7 @@ public:
|
||||
virtual BOOL Deploy(void);
|
||||
virtual float GetMaxSpeed(void)
|
||||
{
|
||||
return 240.0f;
|
||||
return FAMAS_MAX_SPEED;
|
||||
}
|
||||
virtual int iItemSlot(void)
|
||||
{
|
||||
@ -2042,7 +2148,11 @@ public:
|
||||
virtual void WeaponIdle(void);
|
||||
virtual BOOL UseDecrement(void)
|
||||
{
|
||||
#ifdef CLIENT_WEAPONS
|
||||
return TRUE;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
|
@ -71,7 +71,7 @@ TYPEDESCRIPTION gGlobalEntitySaveData[] =
|
||||
|
||||
DLL_DECALLIST gDecals[42];
|
||||
|
||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGlobalState, m_SaveData)[1];
|
||||
TYPEDESCRIPTION IMPL_CLASS(CGlobalState, m_SaveData)[1];
|
||||
TYPEDESCRIPTION gGlobalEntitySaveData[3];
|
||||
|
||||
#endif // HOOK_GAMEDLL
|
||||
@ -324,7 +324,7 @@ int CGlobalState::Save(CSave &save)
|
||||
int i;
|
||||
globalentity_t *pEntity;
|
||||
|
||||
if (!save.WriteFields("GLOBAL", this, IMPLEMENT_ARRAY(m_SaveData), ARRAYSIZE(IMPLEMENT_ARRAY(m_SaveData))))
|
||||
if (!save.WriteFields("GLOBAL", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData))))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -351,7 +351,7 @@ int CGlobalState::Restore(CRestore &restore)
|
||||
|
||||
ClearStates();
|
||||
|
||||
if (!restore.ReadFields("GLOBAL", this, IMPLEMENT_ARRAY(m_SaveData), ARRAYSIZE(IMPLEMENT_ARRAY(m_SaveData))))
|
||||
if (!restore.ReadFields("GLOBAL", this, IMPL(m_SaveData), ARRAYSIZE(IMPL(m_SaveData))))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -403,21 +403,21 @@ void CGlobalState::ClearStates(void)
|
||||
}
|
||||
|
||||
/* <1dbc13> ../cstrike/dlls/world.cpp:466 */
|
||||
void SaveGlobalState(SAVERESTOREDATA *pSaveData)
|
||||
void EXT_FUNC SaveGlobalState(SAVERESTOREDATA *pSaveData)
|
||||
{
|
||||
CSave saveHelper(pSaveData);
|
||||
gGlobalState.Save(saveHelper);
|
||||
}
|
||||
|
||||
/* <1dbcde> ../cstrike/dlls/world.cpp:473 */
|
||||
void RestoreGlobalState(SAVERESTOREDATA *pSaveData)
|
||||
void EXT_FUNC RestoreGlobalState(SAVERESTOREDATA *pSaveData)
|
||||
{
|
||||
CRestore restoreHelper(pSaveData);
|
||||
gGlobalState.Restore(restoreHelper);
|
||||
}
|
||||
|
||||
/* <1dbe72> ../cstrike/dlls/world.cpp:480 */
|
||||
void ResetGlobalState(void)
|
||||
void EXT_FUNC ResetGlobalState(void)
|
||||
{
|
||||
gGlobalState.ClearStates();
|
||||
|
||||
|
@ -336,7 +336,7 @@ void CC4::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
|
||||
}
|
||||
|
||||
/* <2463cc> ../cstrike/dlls/weapons.h:732 */
|
||||
float CC4::GetMaxSpeed(void)
|
||||
float CC4::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||
{
|
||||
return C4_MAX_SPEED;
|
||||
}
|
||||
@ -378,6 +378,11 @@ void CC4::Holster(int skiplocal)
|
||||
Holster_(skiplocal);
|
||||
}
|
||||
|
||||
float CC4::GetMaxSpeed(void)
|
||||
{
|
||||
return GetMaxSpeed_();
|
||||
}
|
||||
|
||||
void CC4::PrimaryAttack(void)
|
||||
{
|
||||
PrimaryAttack_();
|
||||
|
@ -111,6 +111,7 @@ typedef struct incomingtransfer_s
|
||||
#define Q_snprintf _snprintf
|
||||
#define Q_atoi atoi
|
||||
#define Q_atof atof
|
||||
#define Q_memmove memmove
|
||||
//#define Q_strtoull strtoull
|
||||
//#define Q_FileNameCmp FileNameCmp
|
||||
#define Q_vsnprintf _vsnprintf
|
||||
|
@ -35,48 +35,54 @@
|
||||
enum GameEventType
|
||||
{
|
||||
EVENT_INVALID = 0,
|
||||
EVENT_WEAPON_FIRED,
|
||||
EVENT_WEAPON_FIRED_ON_EMPTY,
|
||||
EVENT_WEAPON_RELOADED,
|
||||
EVENT_HE_GRENADE_EXPLODED,
|
||||
EVENT_FLASHBANG_GRENADE_EXPLODED,
|
||||
EVENT_SMOKE_GRENADE_EXPLODED,
|
||||
EVENT_WEAPON_FIRED, // tell bots the player is attack (argumens: 1 = attacker, 2 = NULL)
|
||||
EVENT_WEAPON_FIRED_ON_EMPTY, // tell bots the player is attack without clip ammo (argumens: 1 = attacker, 2 = NULL)
|
||||
EVENT_WEAPON_RELOADED, // tell bots the player is reloading his weapon (argumens: 1 = reloader, 2 = NULL)
|
||||
|
||||
EVENT_HE_GRENADE_EXPLODED, // tell bots the HE grenade is exploded (argumens: 1 = grenade thrower, 2 = NULL)
|
||||
EVENT_FLASHBANG_GRENADE_EXPLODED, // tell bots the flashbang grenade is exploded (argumens: 1 = grenade thrower, 2 = explosion origin)
|
||||
EVENT_SMOKE_GRENADE_EXPLODED, // tell bots the smoke grenade is exploded (argumens: 1 = grenade thrower, 2 = NULL)
|
||||
EVENT_GRENADE_BOUNCED,
|
||||
|
||||
EVENT_BEING_SHOT_AT,
|
||||
EVENT_PLAYER_BLINDED_BY_FLASHBANG,
|
||||
EVENT_PLAYER_FOOTSTEP,
|
||||
EVENT_PLAYER_JUMPED,
|
||||
EVENT_PLAYER_DIED,
|
||||
EVENT_PLAYER_LANDED_FROM_HEIGHT,
|
||||
EVENT_PLAYER_TOOK_DAMAGE,
|
||||
EVENT_HOSTAGE_DAMAGED,
|
||||
EVENT_HOSTAGE_KILLED,
|
||||
EVENT_DOOR,
|
||||
EVENT_BREAK_GLASS,
|
||||
EVENT_BREAK_WOOD,
|
||||
EVENT_BREAK_METAL,
|
||||
EVENT_BREAK_FLESH,
|
||||
EVENT_BREAK_CONCRETE,
|
||||
EVENT_BOMB_PLANTED,
|
||||
EVENT_BOMB_DROPPED,
|
||||
EVENT_BOMB_PICKED_UP,
|
||||
EVENT_BOMB_BEEP,
|
||||
EVENT_BOMB_DEFUSING,
|
||||
EVENT_BOMB_DEFUSE_ABORTED,
|
||||
EVENT_BOMB_DEFUSED,
|
||||
EVENT_BOMB_EXPLODED,
|
||||
EVENT_HOSTAGE_USED,
|
||||
EVENT_HOSTAGE_RESCUED,
|
||||
EVENT_ALL_HOSTAGES_RESCUED,
|
||||
EVENT_VIP_ESCAPED,
|
||||
EVENT_VIP_ASSASSINATED,
|
||||
EVENT_TERRORISTS_WIN,
|
||||
EVENT_CTS_WIN,
|
||||
EVENT_ROUND_DRAW,
|
||||
EVENT_ROUND_WIN,
|
||||
EVENT_ROUND_LOSS,
|
||||
EVENT_ROUND_START,
|
||||
EVENT_PLAYER_SPAWNED,
|
||||
EVENT_PLAYER_BLINDED_BY_FLASHBANG, // tell bots the player is flashed (argumens: 1 = flashed player, 2 = NULL)
|
||||
EVENT_PLAYER_FOOTSTEP, // tell bots the player is running (argumens: 1 = runner, 2 = NULL)
|
||||
EVENT_PLAYER_JUMPED, // tell bots the player is jumped (argumens: 1 = jumper, 2 = NULL)
|
||||
EVENT_PLAYER_DIED, // tell bots the player is killed (argumens: 1 = victim, 2 = killer)
|
||||
EVENT_PLAYER_LANDED_FROM_HEIGHT, // tell bots the player is fell with some damage (argumens: 1 = felled player, 2 = NULL)
|
||||
EVENT_PLAYER_TOOK_DAMAGE, // tell bots the player is take damage (argumens: 1 = victim, 2 = attacker)
|
||||
EVENT_HOSTAGE_DAMAGED, // tell bots the player has injured a hostage (argumens: 1 = hostage, 2 = injurer)
|
||||
EVENT_HOSTAGE_KILLED, // tell bots the player has killed a hostage (argumens: 1 = hostage, 2 = killer)
|
||||
|
||||
EVENT_DOOR, // tell bots the door is moving (argumens: 1 = door, 2 = NULL)
|
||||
EVENT_BREAK_GLASS, // tell bots the glass has break (argumens: 1 = glass, 2 = NULL)
|
||||
EVENT_BREAK_WOOD, // tell bots the wood has break (argumens: 1 = wood, 2 = NULL)
|
||||
EVENT_BREAK_METAL, // tell bots the metal/computer has break (argumens: 1 = metal/computer, 2 = NULL)
|
||||
EVENT_BREAK_FLESH, // tell bots the flesh has break (argumens: 1 = flesh, 2 = NULL)
|
||||
EVENT_BREAK_CONCRETE, // tell bots the concrete has break (argumens: 1 = concrete, 2 = NULL)
|
||||
|
||||
EVENT_BOMB_PLANTED, // tell bots the bomb has been planted (argumens: 1 = planter, 2 = NULL)
|
||||
EVENT_BOMB_DROPPED, // tell bots the bomb has been dropped (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_BOMB_PICKED_UP, // let the bots hear the bomb pickup (argumens: 1 = player that pickup c4, 2 = NULL)
|
||||
EVENT_BOMB_BEEP, // let the bots hear the bomb beeping (argumens: 1 = c4, 2 = NULL)
|
||||
EVENT_BOMB_DEFUSING, // tell the bots someone has started defusing (argumens: 1 = defuser, 2 = NULL)
|
||||
EVENT_BOMB_DEFUSE_ABORTED, // tell the bots someone has aborted defusing (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_BOMB_DEFUSED, // tell the bots the bomb is defused (argumens: 1 = defuser, 2 = NULL)
|
||||
EVENT_BOMB_EXPLODED, // let the bots hear the bomb exploding (argumens: 1 = NULL, 2 = NULL)
|
||||
|
||||
EVENT_HOSTAGE_USED, // tell bots the hostage is used (argumens: 1 = user, 2 = NULL)
|
||||
EVENT_HOSTAGE_RESCUED, // tell bots the hostage is rescued (argumens: 1 = rescuer (CBasePlayer *), 2 = hostage (CHostage *))
|
||||
EVENT_ALL_HOSTAGES_RESCUED, // tell bots the all hostages are rescued (argumens: 1 = NULL, 2 = NULL)
|
||||
|
||||
EVENT_VIP_ESCAPED, // tell bots the VIP is escaped (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_VIP_ASSASSINATED, // tell bots the VIP is assassinated (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_TERRORISTS_WIN, // tell bots the terrorists won the round (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_CTS_WIN, // tell bots the CTs won the round (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_ROUND_DRAW, // tell bots the round was a draw (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_ROUND_WIN, // tell carreer the round was a win (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_ROUND_LOSS, // tell carreer the round was a loss (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_ROUND_START, // tell bots the round was started (when freeze period is expired) (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_PLAYER_SPAWNED, // tell bots the player is spawned (argumens: 1 = spawned player, 2 = NULL)
|
||||
EVENT_CLIENT_CORPSE_SPAWNED,
|
||||
EVENT_BUY_TIME_START,
|
||||
EVENT_PLAYER_LEFT_BUY_ZONE,
|
||||
@ -98,6 +104,7 @@ enum GameEventType
|
||||
EVENT_TUTOR_NEED_TO_BUY_DEFUSE_KIT,
|
||||
EVENT_TUTOR_NEED_TO_BUY_GRENADE,
|
||||
EVENT_CAREER_TASK_DONE,
|
||||
|
||||
EVENT_START_RADIO_1,
|
||||
EVENT_RADIO_COVER_ME,
|
||||
EVENT_RADIO_YOU_TAKE_THE_POINT,
|
||||
@ -123,12 +130,13 @@ enum GameEventType
|
||||
EVENT_RADIO_NEGATIVE,
|
||||
EVENT_RADIO_ENEMY_DOWN,
|
||||
EVENT_END_RADIO,
|
||||
EVENT_NEW_MATCH,
|
||||
EVENT_PLAYER_CHANGED_TEAM,
|
||||
EVENT_BULLET_IMPACT,
|
||||
EVENT_GAME_COMMENCE,
|
||||
EVENT_WEAPON_ZOOMED,
|
||||
EVENT_HOSTAGE_CALLED_FOR_HELP,
|
||||
|
||||
EVENT_NEW_MATCH, // tell bots the game is new (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_PLAYER_CHANGED_TEAM, // tell bots the player is switch his team (also called from ClientPutInServer()) (argumens: 1 = switcher, 2 = NULL)
|
||||
EVENT_BULLET_IMPACT, // tell bots the player is shoot at wall (argumens: 1 = shooter, 2 = shoot trace end position)
|
||||
EVENT_GAME_COMMENCE, // tell bots the game is commencing (argumens: 1 = NULL, 2 = NULL)
|
||||
EVENT_WEAPON_ZOOMED, // tell bots the player is switch weapon zoom (argumens: 1 = zoom switcher, 2 = NULL)
|
||||
EVENT_HOSTAGE_CALLED_FOR_HELP, // tell bots the hostage is talking (argumens: 1 = listener, 2 = NULL)
|
||||
NUM_GAME_EVENTS,
|
||||
};
|
||||
|
||||
|
@ -228,7 +228,7 @@ void CBot::__MAKE_VHOOK(ExecuteCommand)(void)
|
||||
}
|
||||
|
||||
/* <4900fa> ../game_shared/bot/bot.cpp:362 */
|
||||
NOXREF void CBot::ResetCommand(void)
|
||||
void CBot::ResetCommand(void)
|
||||
{
|
||||
m_forwardSpeed = 0.0f;
|
||||
m_strafeSpeed = 0.0f;
|
||||
@ -237,7 +237,7 @@ NOXREF void CBot::ResetCommand(void)
|
||||
}
|
||||
|
||||
/* <49011b> ../game_shared/bot/bot.cpp:372 */
|
||||
NOXREF byte CBot::ThrottledMsec(void) const
|
||||
byte CBot::ThrottledMsec(void) const
|
||||
{
|
||||
int iNewMsec;
|
||||
|
||||
|
@ -282,8 +282,8 @@ protected:
|
||||
const BotProfile *m_profile;
|
||||
private:
|
||||
|
||||
NOXREF void ResetCommand(void);
|
||||
NOXREF byte ThrottledMsec(void) const;
|
||||
void ResetCommand(void);
|
||||
byte ThrottledMsec(void) const;
|
||||
|
||||
// returns current movement speed (for walk/run)
|
||||
float GetMoveSpeed(void);
|
||||
|
@ -332,7 +332,7 @@ NOBODY bool UTIL_IsTeamAllBots(int team)
|
||||
NOBODY /*extern*/ CBasePlayer *UTIL_GetClosestPlayer(const Vector *pos, int team, float *distance)
|
||||
{
|
||||
CBasePlayer *closePlayer = NULL;
|
||||
float closeDistSq = 999999999999.9f;
|
||||
float closeDistSq = 1.0e12f; // 999999999999.9f
|
||||
|
||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||
{
|
||||
|
@ -211,9 +211,7 @@ inline bool IsIntersecting2D(const Vector &startA, const Vector &endA, const Vec
|
||||
// If functor returns false, stop iteration and return false.
|
||||
|
||||
/* <4700e1> ../game_shared/bot/bot_util.h:294 */
|
||||
template <
|
||||
typename Functor
|
||||
>
|
||||
template <typename Functor>
|
||||
bool ForEachPlayer(Functor &func)
|
||||
{
|
||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||
@ -228,6 +226,7 @@ bool ForEachPlayer(Functor &func)
|
||||
if (func(player) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -62,18 +62,18 @@ FILE_GLOBAL int BlockedIDCount = 0;
|
||||
|
||||
#else // HOOK_GAMEDLL
|
||||
|
||||
unsigned int IMPLEMENT_ARRAY_CLASS(CNavArea, m_nextID);
|
||||
unsigned int IMPLEMENT_ARRAY_CLASS(CNavArea, m_masterMarker);
|
||||
unsigned int IMPL_CLASS(CNavArea, m_nextID);
|
||||
unsigned int IMPL_CLASS(CNavArea, m_masterMarker);
|
||||
|
||||
unsigned int IMPLEMENT_ARRAY_CLASS(HidingSpot, m_nextID);
|
||||
unsigned int IMPLEMENT_ARRAY_CLASS(HidingSpot, m_masterMarker);
|
||||
unsigned int IMPL_CLASS(HidingSpot, m_nextID);
|
||||
unsigned int IMPL_CLASS(HidingSpot, m_masterMarker);
|
||||
|
||||
NavLadderList TheNavLadderList;
|
||||
HidingSpotList TheHidingSpotList;
|
||||
NavAreaList TheNavAreaList;
|
||||
CNavAreaGrid TheNavAreaGrid;
|
||||
CNavArea *IMPLEMENT_ARRAY_CLASS(CNavArea, m_openList);
|
||||
bool IMPLEMENT_ARRAY_CLASS(CNavArea, m_isReset);
|
||||
CNavArea *IMPL_CLASS(CNavArea, m_openList);
|
||||
bool IMPL_CLASS(CNavArea, m_isReset);
|
||||
|
||||
float lastDrawTimestamp;
|
||||
NavAreaList goodSizedAreaList;
|
||||
@ -121,7 +121,7 @@ void DestroyHidingSpots(void)
|
||||
area->m_hidingSpotList.clear();
|
||||
}
|
||||
|
||||
IMPLEMENT_ARRAY_CLASS(HidingSpot, m_nextID) = 0;
|
||||
IMPL_CLASS(HidingSpot, m_nextID) = 0;
|
||||
|
||||
// free all the HidingSpots
|
||||
for (HidingSpotList::iterator iter = TheHidingSpotList.begin(); iter != TheHidingSpotList.end(); iter++)
|
||||
@ -314,9 +314,7 @@ CNavArea::~CNavArea(void)
|
||||
{
|
||||
// if we are resetting the system, don't bother cleaning up - all areas are being destroyed
|
||||
if (IMPL(m_isReset))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// tell the other areas we are going away
|
||||
NavAreaList::iterator iter;
|
||||
@ -621,7 +619,7 @@ bool CNavArea::SplitEdit(bool splitAlongX, float splitEdge, CNavArea **outAlpha,
|
||||
|
||||
// Return true if given area is connected in given direction
|
||||
// if dir == NUM_DIRECTIONS, check all directions (direction is unknown)
|
||||
// @todo Formalize "asymmetric" flag on connections
|
||||
// TODO: Formalize "asymmetric" flag on connections
|
||||
|
||||
/* <4c7708> ../game_shared/bot/nav_area.cpp:615 */
|
||||
bool CNavArea::IsConnected(const CNavArea *area, NavDirType dir) const
|
||||
@ -676,7 +674,7 @@ bool CNavArea::IsConnected(const CNavArea *area, NavDirType dir) const
|
||||
}
|
||||
|
||||
// Compute change in height from this area to given area
|
||||
// @todo This is approximate for now
|
||||
// TODO: This is approximate for now
|
||||
|
||||
/* <4c89fd> ../game_shared/bot/nav_area.cpp:674 */
|
||||
float CNavArea::ComputeHeightChange(const CNavArea *area)
|
||||
@ -993,7 +991,7 @@ void DestroyLadders(void)
|
||||
/* <4d6733> ../game_shared/bot/nav_area.cpp:994 */
|
||||
void DestroyNavigationMap(void)
|
||||
{
|
||||
IMPLEMENT_ARRAY_CLASS(CNavArea, m_isReset) = true;
|
||||
IMPL_CLASS(CNavArea, m_isReset) = true;
|
||||
|
||||
// remove each element of the list and delete them
|
||||
while (!TheNavAreaList.empty())
|
||||
@ -1003,8 +1001,7 @@ void DestroyNavigationMap(void)
|
||||
delete area;
|
||||
}
|
||||
|
||||
//TheNavAreaList.clear();
|
||||
IMPLEMENT_ARRAY_CLASS(CNavArea, m_isReset) = false;
|
||||
IMPL_CLASS(CNavArea, m_isReset) = false;
|
||||
|
||||
// destroy ladder representations
|
||||
DestroyLadders();
|
||||
@ -1014,13 +1011,13 @@ void DestroyNavigationMap(void)
|
||||
|
||||
// destroy navigation nodes created during map learning
|
||||
CNavNode *node, *next;
|
||||
for (node = IMPLEMENT_ARRAY_CLASS(CNavNode, m_list); node; node = next)
|
||||
for (node = IMPL_CLASS(CNavNode, m_list); node; node = next)
|
||||
{
|
||||
next = node->m_next;
|
||||
delete node;
|
||||
}
|
||||
|
||||
IMPLEMENT_ARRAY_CLASS(CNavNode, m_list) = NULL;
|
||||
IMPL_CLASS(CNavNode, m_list) = NULL;
|
||||
|
||||
// reset the grid
|
||||
TheNavAreaGrid.Reset();
|
||||
@ -1193,13 +1190,13 @@ void ConnectGeneratedAreas(void)
|
||||
|
||||
// south edge - this edge's nodes are actually part of adjacent areas
|
||||
// move one node north, and scan west to east
|
||||
/// @todo This allows one-node-wide areas - do we want this?
|
||||
// TODO: This allows one-node-wide areas - do we want this?
|
||||
node = area->m_node[ SOUTH_WEST ];
|
||||
node = node->GetConnectedNode(NORTH);
|
||||
if (node)
|
||||
{
|
||||
CNavNode *end = area->m_node[ SOUTH_EAST ]->GetConnectedNode(NORTH);
|
||||
/// @todo Figure out why cs_backalley gets a NULL node in here...
|
||||
// TODO: Figure out why cs_backalley gets a NULL node in here...
|
||||
for (; node && node != end; node = node->GetConnectedNode(EAST))
|
||||
{
|
||||
CNavNode *adj = node->GetConnectedNode(SOUTH);
|
||||
@ -1603,7 +1600,7 @@ int BuildArea(CNavNode *node, int width, int height)
|
||||
|
||||
if (!nwNode || !neNode || !seNode || !swNode)
|
||||
{
|
||||
CONSOLE_ECHO("ERROR: BuildArea - NULL node.\n");
|
||||
CONSOLE_ECHO("ERROR: BuildArea - NULL node. (%p)(%p)(%p)(%p)\n", nwNode, neNode, seNode, swNode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -2636,7 +2633,7 @@ void CNavArea::AddToOpenList(void)
|
||||
}
|
||||
|
||||
// A smaller value has been found, update this area on the open list
|
||||
// @todo "bubbling" does unnecessary work, since the order of all other nodes will be unchanged - only this node is altered
|
||||
// TODO: "bubbling" does unnecessary work, since the order of all other nodes will be unchanged - only this node is altered
|
||||
|
||||
/* <4cbd73> ../game_shared/bot/nav_area.cpp:2685 */
|
||||
void CNavArea::UpdateOnOpenList(void)
|
||||
@ -2671,7 +2668,7 @@ void CNavArea::RemoveFromOpenList(void)
|
||||
if (m_prevOpen)
|
||||
m_prevOpen->m_nextOpen = m_nextOpen;
|
||||
else
|
||||
IMPLEMENT_ARRAY(m_openList) = m_nextOpen;
|
||||
IMPL(m_openList) = m_nextOpen;
|
||||
|
||||
if (m_nextOpen)
|
||||
m_nextOpen->m_prevOpen = m_prevOpen;
|
||||
@ -3361,7 +3358,7 @@ public:
|
||||
if (IsSpotOccupied(m_me, spot->GetPosition()))
|
||||
{
|
||||
// player is in hiding spot
|
||||
/// @todo Check if player is moving or sitting still
|
||||
// TODO: Check if player is moving or sitting still
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -3404,7 +3401,7 @@ public:
|
||||
|
||||
// Do a breadth-first search to find a nearby hiding spot and return it.
|
||||
// Don't pick a hiding spot that a Player is currently occupying.
|
||||
// @todo Clean up this mess
|
||||
// TODO: Clean up this mess
|
||||
|
||||
/* <4d1806> ../game_shared/bot/nav_area.cpp:3477 */
|
||||
const Vector *FindNearbyHidingSpot(CBaseEntity *me, const Vector *pos, CNavArea *startArea, float maxRange, bool isSniper, bool useNearest)
|
||||
@ -3617,7 +3614,7 @@ const Vector *FindNearbyRetreatSpot(CBaseEntity *me, const Vector *start, CNavAr
|
||||
}
|
||||
|
||||
// Return number of players with given teamID in this area (teamID == 0 means any/all)
|
||||
// @todo Keep pointers to contained Players to make this a zero-time query
|
||||
// TODO: Keep pointers to contained Players to make this a zero-time query
|
||||
|
||||
/* <4ce934> ../game_shared/bot/nav_area.cpp:3707 */
|
||||
int CNavArea::GetPlayerCount(int teamID, CBasePlayer *ignore) const
|
||||
@ -4642,7 +4639,7 @@ public:
|
||||
|
||||
// Can we see this area?
|
||||
// For now, if we can see any corner, we can see the area
|
||||
// @todo Need to check LOS to more than the corners for large and/or long areas
|
||||
// TODO: Need to check LOS to more than the corners for large and/or long areas
|
||||
|
||||
/* <4c4182> ../game_shared/bot/nav_area.cpp:4791 */
|
||||
inline bool IsAreaVisible(const Vector *pos, const CNavArea *area)
|
||||
@ -4673,8 +4670,6 @@ inline bool IsAreaVisible(const Vector *pos, const CNavArea *area)
|
||||
/* <4cf54c> ../game_shared/bot/nav_area.cpp:4817 */
|
||||
void CNavArea::ComputeApproachAreas(void)
|
||||
{
|
||||
_LOG_TRACE
|
||||
|
||||
m_approachCount = 0;
|
||||
|
||||
if (cv_bot_quicksave.value > 0.0f)
|
||||
|
@ -892,7 +892,7 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
|
||||
|
||||
if (ladderUp)
|
||||
{
|
||||
ladder = *ladderIter;
|
||||
ladder = (*ladderIter);
|
||||
if (ladder->m_isDangling)
|
||||
{
|
||||
++ladderIter;
|
||||
|
@ -165,13 +165,9 @@ void CNavArea::Save(FILE *fp) const
|
||||
fprintf(fp, "v %f %f %f\n", m_extent.lo.x, m_extent.hi.y, m_swZ);
|
||||
|
||||
static int base = 1;
|
||||
fprintf(fp, "\n\ng %04dArea%s%s%s%s\n",
|
||||
m_id,
|
||||
(GetAttributes() & NAV_CROUCH) ? "CROUCH" : "",
|
||||
(GetAttributes() & NAV_JUMP) ? "JUMP" : "",
|
||||
(GetAttributes() & NAV_PRECISE) ? "PRECISE" : "",
|
||||
(GetAttributes() & NAV_NO_JUMP) ? "NO_JUMP" : ""
|
||||
);
|
||||
fprintf(fp, "\n\ng %04dArea%s%s%s%s\n", m_id,
|
||||
(GetAttributes() & NAV_CROUCH) ? "CROUCH" : "", (GetAttributes() & NAV_JUMP) ? "JUMP" : "",
|
||||
(GetAttributes() & NAV_PRECISE) ? "PRECISE" : "", (GetAttributes() & NAV_NO_JUMP) ? "NO_JUMP" : "");
|
||||
|
||||
fprintf(fp, "f %d %d %d %d\n\n", base, base + 1, base + 2, base + 3);
|
||||
base += 4;
|
||||
@ -209,9 +205,7 @@ NOBODY void CNavArea::Save(int fd, unsigned int version)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Store hiding spots for this area
|
||||
//
|
||||
unsigned char count;
|
||||
if (m_hidingSpotList.size() > 255)
|
||||
{
|
||||
@ -238,10 +232,7 @@ NOBODY void CNavArea::Save(int fd, unsigned int version)
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Save the approach areas for this area
|
||||
//
|
||||
|
||||
// save number of approach areas
|
||||
Q_write(fd, &m_approachCount, sizeof(unsigned char));
|
||||
if (cv_bot_debug.value > 0.0f)
|
||||
@ -274,9 +265,7 @@ NOBODY void CNavArea::Save(int fd, unsigned int version)
|
||||
Q_write(fd, &type, sizeof(unsigned char));
|
||||
}
|
||||
|
||||
//
|
||||
// Save encounter spots for this area
|
||||
//
|
||||
{
|
||||
// save number of encounter paths for this area
|
||||
unsigned int count = m_spotEncounterList.size();
|
||||
@ -350,8 +339,8 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
||||
file->Read(&m_id, sizeof(unsigned int));
|
||||
|
||||
// update nextID to avoid collisions
|
||||
if (m_id >= IMPLEMENT_ARRAY(m_nextID))
|
||||
IMPLEMENT_ARRAY(m_nextID) = m_id + 1;
|
||||
if (m_id >= IMPL(m_nextID))
|
||||
IMPL(m_nextID) = m_id + 1;
|
||||
|
||||
// load attribute flags
|
||||
file->Read(&m_attributeFlags, sizeof(unsigned char));
|
||||
@ -384,10 +373,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Load hiding spots
|
||||
//
|
||||
|
||||
// load number of hiding spots
|
||||
unsigned char hidingSpotCount;
|
||||
file->Read(&hidingSpotCount, sizeof(unsigned char));
|
||||
@ -420,9 +406,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Load number of approach areas
|
||||
//
|
||||
file->Read(&m_approachCount, sizeof(unsigned char));
|
||||
|
||||
// load approach area info (IDs)
|
||||
@ -440,9 +424,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
||||
m_approach[a].hereToNextHow = (NavTraverseType)type;
|
||||
}
|
||||
|
||||
//
|
||||
// Load encounter paths for this area
|
||||
//
|
||||
unsigned int count;
|
||||
file->Read(&count, sizeof(unsigned int));
|
||||
|
||||
@ -511,9 +493,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
||||
if (version < 5)
|
||||
return;
|
||||
|
||||
//
|
||||
// Load Place data
|
||||
//
|
||||
PlaceDirectory::EntryType entry;
|
||||
file->Read(&entry, sizeof(entry));
|
||||
|
||||
@ -616,7 +596,7 @@ NOBODY NavErrorType CNavArea::PostLoad(void)
|
||||
}
|
||||
|
||||
// build overlap list
|
||||
/// @todo Optimize this
|
||||
// TODO: Optimize this
|
||||
for (NavAreaList::iterator oiter = TheNavAreaList.begin(); oiter != TheNavAreaList.end(); ++oiter)
|
||||
{
|
||||
CNavArea *area = *oiter;
|
||||
@ -658,9 +638,7 @@ NOBODY bool SaveNavigationMap(const char *filename)
|
||||
if (filename == NULL)
|
||||
return false;
|
||||
|
||||
//
|
||||
// Store the NAV file
|
||||
//
|
||||
COM_FixSlashes(const_cast<char *>(filename));
|
||||
|
||||
#ifdef WIN32
|
||||
@ -697,9 +675,7 @@ NOBODY bool SaveNavigationMap(const char *filename)
|
||||
|
||||
Q_write(fd, &bspSize, sizeof(unsigned int));
|
||||
|
||||
//
|
||||
// Build a directory of the Places in this map
|
||||
//
|
||||
placeDirectory.Reset();
|
||||
|
||||
NavAreaList::iterator it;
|
||||
@ -716,10 +692,7 @@ NOBODY bool SaveNavigationMap(const char *filename)
|
||||
|
||||
placeDirectory.Save(fd);
|
||||
|
||||
//
|
||||
// Store navigation areas
|
||||
//
|
||||
|
||||
// store number of areas
|
||||
unsigned int count = TheNavAreaList.size();
|
||||
Q_write(fd, &count, sizeof(unsigned int));
|
||||
@ -902,7 +875,7 @@ NOBODY NavErrorType __declspec(naked) LoadNavigationMap(void)
|
||||
DestroyNavigationMap();
|
||||
placeDirectory.Reset();
|
||||
|
||||
IMPLEMENT_ARRAY_CLASS(CNavArea, m_nextID) = 1;
|
||||
IMPL_CLASS(CNavArea, m_nextID) = 1;
|
||||
|
||||
SteamFile navFile(filename);
|
||||
|
||||
@ -1015,9 +988,7 @@ NOBODY NavErrorType __declspec(naked) LoadNavigationMap(void)
|
||||
LoadLocationFile(filename);
|
||||
}
|
||||
|
||||
//
|
||||
// Set up all the ladders
|
||||
//
|
||||
BuildLadders();
|
||||
|
||||
return NAV_OK;
|
||||
|
@ -16,8 +16,8 @@ unsigned int CNavNode::m_listLength = 0;
|
||||
|
||||
//NavDirType Opposite[ NUM_DIRECTIONS ];
|
||||
|
||||
CNavNode *IMPLEMENT_ARRAY_CLASS(CNavNode, m_list);
|
||||
unsigned int IMPLEMENT_ARRAY_CLASS(CNavNode, m_listLength);
|
||||
CNavNode *IMPL_CLASS(CNavNode, m_list);
|
||||
unsigned int IMPL_CLASS(CNavNode, m_listLength);
|
||||
|
||||
//Extent NodeMapExtent;
|
||||
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
BOOL IsBiLinked(NavDirType dir) const; // node is bidirectionally linked to another node in the given direction
|
||||
BOOL IsClosedCell(void) const; // node is the NW corner of a bi-linked quad of nodes
|
||||
|
||||
// @todo Should pass in area that is covering
|
||||
// TODO: Should pass in area that is covering
|
||||
void Cover(void)
|
||||
{
|
||||
m_isCovered = true;
|
||||
|
@ -91,9 +91,7 @@ public:
|
||||
void Optimize(void);
|
||||
|
||||
// Compute shortest path from 'start' to 'goal' via A* algorithm
|
||||
template<
|
||||
typename CostFunctor
|
||||
>
|
||||
template<typename CostFunctor>
|
||||
bool Compute(const Vector *start, const Vector *goal, CostFunctor &costFunc)
|
||||
{
|
||||
Invalidate();
|
||||
@ -209,7 +207,7 @@ public:
|
||||
return m_isStuck ? m_stuckTimer.GetElapsedTime() : 0.0f;
|
||||
}
|
||||
|
||||
/*private:*/
|
||||
private:
|
||||
bool m_isStuck; // if true, we are stuck
|
||||
Vector m_stuckSpot; // the location where we became stuck
|
||||
IntervalTimer m_stuckTimer; // how long we have been stuck
|
||||
|
@ -33,9 +33,7 @@
|
||||
#endif
|
||||
|
||||
// Encapsulation of a finite-state-machine state
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
template<typename T>
|
||||
/* <5c4388> ../game_shared/bot/simple_state_machine.h:21 */
|
||||
class SimpleState
|
||||
{
|
||||
@ -65,10 +63,7 @@ private:
|
||||
};
|
||||
|
||||
// Encapsulation of a finite state machine
|
||||
template<
|
||||
typename T,
|
||||
typename S
|
||||
>
|
||||
template<typename T, typename S>
|
||||
/* <5c4bab> ../game_shared/bot/simple_state_machine.h:68 */
|
||||
class SimpleStateMachine
|
||||
{
|
||||
|
@ -715,6 +715,13 @@ bool HIDDEN GetAddress(Module *module, Address *addr, size_t baseOffset)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if HOOK_GAMEDLL
|
||||
void *addr_orig;
|
||||
char patchByte[5];
|
||||
char patchByteOriginal[5];
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
bool HIDDEN HookFunction(Module *module, FunctionHook *hook)
|
||||
{
|
||||
if (hook->originalAddress == NULL)
|
||||
@ -725,8 +732,15 @@ bool HIDDEN HookFunction(Module *module, FunctionHook *hook)
|
||||
*(size_t *)&patch[1] = hook->handlerFunc - hook->originalAddress - 5;
|
||||
patch[0] = 0xE9;
|
||||
|
||||
#if 0
|
||||
if (strcmp(hook->symbolName,"_ZNK9BotPhrase12GetSpeakableEiPf")==0)
|
||||
#if HOOK_GAMEDLL
|
||||
//static DWORD oldProtection;
|
||||
///VirtualProtect(addr_orig,5,PAGE_EXECUTE_READWRITE,&oldProtection);
|
||||
//memcpy(addr_orig,patchByteOriginal,5);
|
||||
//pWeaponUSP(a);
|
||||
//int seedad = pUTIL_SharedRandomLong(seed,low,high);
|
||||
//memcpy(addr_orig,patchByte,5);
|
||||
|
||||
if (strcmp(hook->symbolName,"_ZNK14CHostageImprov16IsFriendInTheWayEv")==0)
|
||||
{
|
||||
addr_orig = (void *)hook->originalAddress;
|
||||
|
||||
|
@ -152,4 +152,10 @@ void HIDDEN GetAddressVtableByClassname(const char *szClassName, const int iOffs
|
||||
|
||||
#endif // _WIN32 && REGAMEDLL_UNIT_TESTS
|
||||
|
||||
#ifdef HOOK_GAMEDLL
|
||||
extern void *addr_orig;
|
||||
extern char patchByte[5];
|
||||
extern char patchByteOriginal[5];
|
||||
#endif // HOOK_GAMEDLL
|
||||
|
||||
#endif // _MEMORY_H
|
||||
|
@ -149,6 +149,9 @@
|
||||
|
||||
#define STDCALL __stdcall
|
||||
#define HIDDEN
|
||||
#define NOINLINE __declspec(noinline)
|
||||
#define ALIGN16 __declspec(align(16))
|
||||
#define FORCE_STACK_ALIGN
|
||||
|
||||
// Attributes to specify an "exported" function, visible from outside the
|
||||
// DLL.
|
||||
@ -187,6 +190,9 @@
|
||||
#define CDECL __attribute__ ((cdecl))
|
||||
#define STDCALL __attribute__ ((stdcall))
|
||||
#define HIDDEN __attribute__((visibility("hidden")))
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
#define ALIGN16 __attribute__((aligned(16)))
|
||||
#define FORCE_STACK_ALIGN __attribute__((force_align_arg_pointer))
|
||||
|
||||
#undef DLLEXPORT
|
||||
#define DLLEXPORT __attribute__((visibility("default")))
|
||||
@ -230,7 +236,9 @@
|
||||
static const bool __isLinux = true;
|
||||
#endif
|
||||
|
||||
#define EXT_FUNC /*FORCE_STACK_ALIGN*/
|
||||
|
||||
extern void regamedll_log(const char *fmt, ...);
|
||||
extern void regamedll_syserror(const char *fmt, ...);
|
||||
extern void __declspec(noreturn) regamedll_syserror(const char *fmt, ...);
|
||||
|
||||
#endif // OSCONFIG_H
|
||||
|
@ -643,17 +643,8 @@
|
||||
<ClCompile Include="..\public\interface.cpp" />
|
||||
<ClCompile Include="..\public\MemPool.cpp" />
|
||||
<ClCompile Include="..\public\tier0\dbg.cpp" />
|
||||
<ClCompile Include="..\public\tier0\platform_linux.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Play|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Play|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP Play|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\public\tier0\platform_win32.cpp" />
|
||||
<ClCompile Include="..\public\utlsymbol.cpp" />
|
||||
<ClCompile Include="..\regamedll\hookchains_impl.cpp" />
|
||||
<ClCompile Include="..\regamedll\mem.cpp" />
|
||||
<ClCompile Include="..\regamedll\platform.cpp" />
|
||||
<ClCompile Include="..\regamedll\precompiled.cpp">
|
||||
@ -673,6 +664,8 @@
|
||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">precompiled.h</PrecompiledHeaderFile>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\regamedll\RegameDLLRuntimeConfig.cpp" />
|
||||
<ClCompile Include="..\regamedll\regamedll_api_impl.cpp" />
|
||||
<ClCompile Include="..\regamedll\regamedll_interfaces_impl.cpp" />
|
||||
<ClCompile Include="..\regamedll\sse_mathfun.cpp" />
|
||||
<ClCompile Include="..\testsuite\demoplayer.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
|
||||
@ -881,6 +874,9 @@
|
||||
<ClInclude Include="..\public\interface.h" />
|
||||
<ClInclude Include="..\public\MemPool.h" />
|
||||
<ClInclude Include="..\public\protected_things.h" />
|
||||
<ClInclude Include="..\public\regamedll\hookchains.h" />
|
||||
<ClInclude Include="..\public\regamedll\regamedll_api.h" />
|
||||
<ClInclude Include="..\public\regamedll\regamedll_interfaces.h" />
|
||||
<ClInclude Include="..\public\steam\isteamapps.h" />
|
||||
<ClInclude Include="..\public\steam\isteambilling.h" />
|
||||
<ClInclude Include="..\public\steam\isteamclient.h" />
|
||||
@ -904,21 +900,19 @@
|
||||
<ClInclude Include="..\public\steam\steam_api.h" />
|
||||
<ClInclude Include="..\public\steam\steam_gameserver.h" />
|
||||
<ClInclude Include="..\public\tier0\dbg.h" />
|
||||
<ClInclude Include="..\public\tier0\fasttimer.h" />
|
||||
<ClInclude Include="..\public\tier0\mem.h" />
|
||||
<ClInclude Include="..\public\tier0\memalloc.h" />
|
||||
<ClInclude Include="..\public\tier0\memdbgoff.h" />
|
||||
<ClInclude Include="..\public\tier0\memdbgon.h" />
|
||||
<ClInclude Include="..\public\tier0\platform.h" />
|
||||
<ClInclude Include="..\public\utlmemory.h" />
|
||||
<ClInclude Include="..\public\utlrbtree.h" />
|
||||
<ClInclude Include="..\public\utlsymbol.h" />
|
||||
<ClInclude Include="..\public\utlvector.h" />
|
||||
<ClInclude Include="..\regamedll\dlls.h" />
|
||||
<ClInclude Include="..\regamedll\hookchains_impl.h" />
|
||||
<ClInclude Include="..\regamedll\mem.h" />
|
||||
<ClInclude Include="..\regamedll\platform.h" />
|
||||
<ClInclude Include="..\regamedll\precompiled.h" />
|
||||
<ClInclude Include="..\regamedll\RegameDLLRuntimeConfig.h" />
|
||||
<ClInclude Include="..\regamedll\regamedll_api_impl.h" />
|
||||
<ClInclude Include="..\regamedll\regamedll_interfaces_impl.h" />
|
||||
<ClInclude Include="..\regamedll\sse_mathfun.h" />
|
||||
<ClInclude Include="..\testsuite\demoplayer.h" />
|
||||
<ClInclude Include="..\testsuite\funccalls.h" />
|
||||
@ -1097,11 +1091,11 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -1134,11 +1128,11 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -1170,11 +1164,11 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>CSTRIKE;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CSTRIKE;REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -1206,11 +1200,11 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>REGAMEDLL_SELF;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_DEBUG;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -1242,11 +1236,11 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>REGAMEDLL_FIXES;DEDICATED;REGAMEDLL_SELF;HOOK_GAMEDLL;_BUILD_FROM_IDE;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_ITERATOR_DEBUG_LEVEL=0;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>REGAMEDLL_SELF;REGAMEDLL_FIXES;DEDICATED;REGAMEDLL_SELF;HOOK_GAMEDLL;_BUILD_FROM_IDE;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;_ITERATOR_DEBUG_LEVEL=0;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
|
||||
@ -1278,13 +1272,13 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_SELF;REGAMEDLL_FIXES;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
@ -1317,13 +1311,13 @@
|
||||
<Message>Setup version from SVN revision</Message>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)\..\;$(ProjectDir)\..\hookers\;$(ProjectDir)\..\common;$(ProjectDir)\..\dlls;$(ProjectDir)\..\engine;$(ProjectDir)\..\public;$(ProjectDir)\..\public\regamedll;$(ProjectDir)\..\pm_shared;$(ProjectDir)\..\regamedll\;$(ProjectDir)\..\testsuite\;$(VCInstallDir)UnitTest\include;$(SolutionDir)..\dep\bzip2\include\;$(SolutionDir)..\dep\cppunitlite\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HOOK_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>REGAMEDLL_SELF;HOOK_GAMEDLL;REGAMEDLL_CHECKS;CLIENT_WEAPONS;USE_BREAKPAD_HANDLER;DEDICATED;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
|
@ -40,9 +40,6 @@
|
||||
<Filter Include="dlls">
|
||||
<UniqueIdentifier>{73fb61d4-c4ca-4159-8967-0e98666e1d4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="public\tier0">
|
||||
<UniqueIdentifier>{57885e8e-0086-47a7-8dc8-7706a51e1067}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="game_shared">
|
||||
<UniqueIdentifier>{1d2d9bb7-4ba0-4fe6-a0d9-6fae9f96ec3c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@ -82,6 +79,12 @@
|
||||
<Filter Include="hookers\stl">
|
||||
<UniqueIdentifier>{e0c6021c-de51-464f-b971-89942190e545}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="public\regamedll">
|
||||
<UniqueIdentifier>{8f5a4004-ab6b-4802-a23b-091948576ad0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="public\tier0">
|
||||
<UniqueIdentifier>{00d15c50-66d7-4210-9239-e8cd8fb9f052}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\hookers\memory.cpp">
|
||||
@ -99,15 +102,6 @@
|
||||
<ClCompile Include="..\regamedll\precompiled.cpp">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\public\tier0\dbg.cpp">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\public\tier0\platform_linux.cpp">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\public\tier0\platform_win32.cpp">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\dlls\h_export.cpp">
|
||||
<Filter>dlls</Filter>
|
||||
</ClCompile>
|
||||
@ -564,6 +558,18 @@
|
||||
<ClCompile Include="..\dlls\lights.cpp">
|
||||
<Filter>dlls</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\regamedll\hookchains_impl.cpp">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\regamedll\regamedll_api_impl.cpp">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\regamedll\regamedll_interfaces_impl.cpp">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\public\tier0\dbg.cpp">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\hookers\memory.h">
|
||||
@ -668,27 +674,6 @@
|
||||
<ClInclude Include="..\dlls\weapons.h">
|
||||
<Filter>dlls</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\dbg.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\fasttimer.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\mem.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\memalloc.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\memdbgoff.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\memdbgon.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\platform.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\regamedll\platform.h">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClInclude>
|
||||
@ -1127,6 +1112,30 @@
|
||||
<ClInclude Include="..\hookers\stl\use_ansi.h">
|
||||
<Filter>hookers\stl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\regamedll\hookchains_impl.h">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\regamedll\regamedll_api_impl.h">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\regamedll\regamedll_interfaces_impl.h">
|
||||
<Filter>regamedll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\regamedll\hookchains.h">
|
||||
<Filter>public\regamedll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\regamedll\regamedll_api.h">
|
||||
<Filter>public\regamedll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\regamedll\regamedll_interfaces.h">
|
||||
<Filter>public\regamedll</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\dbg.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\tier0\platform.h">
|
||||
<Filter>public\tier0</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\linux\appversion.sh">
|
||||
|
@ -155,7 +155,7 @@ void PM_InitTextureTypes(void)
|
||||
}
|
||||
|
||||
/* <2cc7c5> ../cstrike/pm_shared/pm_shared.c:283 */
|
||||
char PM_FindTextureType(char *name)
|
||||
char EXT_FUNC PM_FindTextureType(char *name)
|
||||
{
|
||||
int left, right, pivot;
|
||||
int val;
|
||||
@ -506,13 +506,13 @@ void PM_UpdateStepSound(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (pmove->flags & FL_DUCKING || fLadder)
|
||||
if ((pmove->flags & FL_DUCKING) || fLadder)
|
||||
{
|
||||
pmove->flTimeStepSound += 100; // slower step time if ducking
|
||||
|
||||
// play the sound
|
||||
// 35% volume if ducking
|
||||
if (pmove->flags & FL_DUCKING && pmove->flDuckTime < 950.0)
|
||||
if ((pmove->flags & FL_DUCKING) && pmove->flDuckTime < 950.0)
|
||||
{
|
||||
fvol *= 0.35;
|
||||
}
|
||||
@ -3159,7 +3159,7 @@ void PM_CreateStuckTable(void)
|
||||
// and client. This will ensure that prediction behaves appropriately.
|
||||
|
||||
/* <2ce182> ../cstrike/pm_shared/pm_shared.c:3596 */
|
||||
void PM_Move(struct playermove_s *ppmove, int server)
|
||||
void EXT_FUNC PM_Move(struct playermove_s *ppmove, int server)
|
||||
{
|
||||
assert(pm_shared_initialized);
|
||||
|
||||
@ -3201,7 +3201,7 @@ NOXREF int PM_GetPhysEntInfo(int ent)
|
||||
}
|
||||
|
||||
/* <2ce21b> ../cstrike/pm_shared/pm_shared.c:3638 */
|
||||
void PM_Init(struct playermove_s *ppmove)
|
||||
void EXT_FUNC PM_Init(struct playermove_s *ppmove)
|
||||
{
|
||||
assert(!pm_shared_initialized);
|
||||
|
||||
|
69
regamedll/public/regamedll/hookchains.h
Normal file
69
regamedll/public/regamedll/hookchains.h
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
template<typename t_ret, typename ...t_args>
|
||||
class IHookChain {
|
||||
protected:
|
||||
virtual ~IHookChain() {}
|
||||
|
||||
public:
|
||||
virtual t_ret callNext(t_args... args) = 0;
|
||||
virtual t_ret callOriginal(t_args... args) = 0;
|
||||
};
|
||||
|
||||
template<typename ...t_args>
|
||||
class IVoidHookChain
|
||||
{
|
||||
protected:
|
||||
virtual ~IVoidHookChain() {}
|
||||
|
||||
public:
|
||||
virtual void callNext(t_args... args) = 0;
|
||||
virtual void callOriginal(t_args... args) = 0;
|
||||
};
|
||||
|
||||
// Hook chain registry(for hooks [un]registration)
|
||||
template<typename t_ret, typename ...t_args>
|
||||
class IHookChainRegistry {
|
||||
public:
|
||||
typedef t_ret(*hookfunc_t)(IHookChain<t_ret, t_args...>*, t_args...);
|
||||
|
||||
virtual void registerHook(hookfunc_t hook) = 0;
|
||||
virtual void unregisterHook(hookfunc_t hook) = 0;
|
||||
};
|
||||
|
||||
// Hook chain registry(for hooks [un]registration)
|
||||
template<typename ...t_args>
|
||||
class IVoidHookChainRegistry {
|
||||
public:
|
||||
typedef void(*hookfunc_t)(IVoidHookChain<t_args...>*, t_args...);
|
||||
|
||||
virtual void registerHook(hookfunc_t hook) = 0;
|
||||
virtual void unregisterHook(hookfunc_t hook) = 0;
|
||||
};
|
68
regamedll/public/regamedll/regamedll_api.h
Normal file
68
regamedll/public/regamedll/regamedll_api.h
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
#include "archtypes.h"
|
||||
#include "regamedll_interfaces.h"
|
||||
#include "hookchains.h"
|
||||
#include "interface.h"
|
||||
|
||||
#define REGAMEDLL_API_VERSION_MAJOR 1
|
||||
#define REGAMEDLL_API_VERSION_MINOR 0
|
||||
|
||||
// Observer_IsValidTarget hook
|
||||
typedef IHookChain<class CBasePlayer *, class CBasePlayer *, class CBasePlayer *, int, bool> IReGameHook_Observer_IsValidTarget;
|
||||
typedef IHookChainRegistry<class CBasePlayer *, class CBasePlayer *, class CBasePlayer *, int, bool> IReGameHookRegistry_Observer_IsValidTarget;
|
||||
|
||||
// GetForceCamera hook
|
||||
typedef IHookChain<int, class CBasePlayer *> IReGameHook_GetForceCamera;
|
||||
typedef IHookChainRegistry<int, class CBasePlayer *> IReGameHookRegistry_GetForceCamera;
|
||||
|
||||
class IReGameHookchains {
|
||||
public:
|
||||
virtual ~IReGameHookchains() { }
|
||||
|
||||
virtual IReGameHookRegistry_Observer_IsValidTarget* Observer_IsValidTarget() = 0;
|
||||
virtual IReGameHookRegistry_GetForceCamera* GetForceCamera() = 0;
|
||||
};
|
||||
|
||||
struct ReGameFuncs_t {
|
||||
class CBaseEntity *(*UTIL_PlayerByIndex)(int playerIndex);
|
||||
};
|
||||
|
||||
class IReGameApi {
|
||||
public:
|
||||
virtual ~IReGameApi() { }
|
||||
|
||||
virtual int GetMajorVersion() = 0;
|
||||
virtual int GetMinorVersion() = 0;
|
||||
virtual const ReGameFuncs_t* GetFuncs() = 0;
|
||||
virtual IReGameHookchains* GetHookchains() = 0;
|
||||
|
||||
};
|
||||
|
||||
#define VREHLDS_HLDS_API_VERSION "VRE_GAMEDLL_API_VERSION001"
|
28
regamedll/public/regamedll/regamedll_interfaces.h
Normal file
28
regamedll/public/regamedll/regamedll_interfaces.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* In addition, as a special exception, the author gives permission to
|
||||
* link the code of this program with the Half-Life Game Engine ("HL
|
||||
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
|
||||
* L.L.C ("Valve"). You must obey the GNU General Public License in all
|
||||
* respects for all of the code used other than the HL Engine and MODs
|
||||
* from Valve. If you modify this file, you may extend this exception
|
||||
* to your version of the file, but you are not obligated to do so. If
|
||||
* you do not wish to do so, delete this exception statement from your
|
||||
* version.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
@ -1,424 +0,0 @@
|
||||
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef FASTTIMER_H
|
||||
#define FASTTIMER_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "osconfig.h"
|
||||
#include "tier0/platform.h"
|
||||
|
||||
|
||||
PLATFORM_INTERFACE __int64 g_ClockSpeed;
|
||||
PLATFORM_INTERFACE unsigned long g_dwClockSpeed;
|
||||
|
||||
PLATFORM_INTERFACE double g_ClockSpeedMicrosecondsMultiplier;
|
||||
PLATFORM_INTERFACE double g_ClockSpeedMillisecondsMultiplier;
|
||||
PLATFORM_INTERFACE double g_ClockSpeedSecondsMultiplier;
|
||||
|
||||
|
||||
|
||||
class CCycleCount
|
||||
{
|
||||
friend class CFastTimer;
|
||||
|
||||
|
||||
public:
|
||||
CCycleCount();
|
||||
|
||||
void Sample(); // Sample the clock. This takes about 34 clocks to execute (or 26,000 calls per millisecond on a P900).
|
||||
|
||||
void Init(); // Set to zero.
|
||||
void Init(float initTimeMsec);
|
||||
bool IsLessThan(CCycleCount const &other) const; // Compare two counts.
|
||||
|
||||
// Convert to other time representations. These functions are slow, so it's preferable to call them
|
||||
// during display rather than inside a timing block.
|
||||
unsigned long GetCycles() const;
|
||||
|
||||
unsigned long GetMicroseconds() const;
|
||||
double GetMicrosecondsF() const;
|
||||
|
||||
unsigned long GetMilliseconds() const;
|
||||
double GetMillisecondsF() const;
|
||||
|
||||
double GetSeconds() const;
|
||||
|
||||
CCycleCount& operator+=(CCycleCount const &other);
|
||||
|
||||
// dest = rSrc1 + rSrc2
|
||||
static void Add(CCycleCount const &rSrc1, CCycleCount const &rSrc2, CCycleCount &dest); // Add two samples together.
|
||||
|
||||
// dest = rSrc1 - rSrc2
|
||||
static void Sub(CCycleCount const &rSrc1, CCycleCount const &rSrc2, CCycleCount &dest); // Add two samples together.
|
||||
|
||||
|
||||
__int64 m_Int64;
|
||||
};
|
||||
|
||||
class CClockSpeedInit
|
||||
{
|
||||
public:
|
||||
CClockSpeedInit()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
static void Init()
|
||||
{
|
||||
const CPUInformation& pi = GetCPUInformation();
|
||||
|
||||
g_ClockSpeed = pi.m_Speed;
|
||||
g_dwClockSpeed = (unsigned long)g_ClockSpeed;
|
||||
|
||||
g_ClockSpeedMicrosecondsMultiplier = 1000000.0 / (double)g_ClockSpeed;
|
||||
g_ClockSpeedMillisecondsMultiplier = 1000.0 / (double)g_ClockSpeed;
|
||||
g_ClockSpeedSecondsMultiplier = 1.0f / (double)g_ClockSpeed;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class CFastTimer
|
||||
{
|
||||
public:
|
||||
// These functions are fast to call and should be called from your sampling code.
|
||||
void Start();
|
||||
void End();
|
||||
|
||||
const CCycleCount & GetDuration() const; // Get the elapsed time between Start and End calls.
|
||||
CCycleCount GetDurationInProgress() const; // Call without ending. Not that cheap.
|
||||
|
||||
// Return number of cycles per second on this processor.
|
||||
static inline unsigned long GetClockSpeed();
|
||||
|
||||
private:
|
||||
|
||||
CCycleCount m_Duration;
|
||||
};
|
||||
|
||||
|
||||
// This is a helper class that times whatever block of code it's in
|
||||
class CTimeScope
|
||||
{
|
||||
public:
|
||||
CTimeScope(CFastTimer *pTimer);
|
||||
~CTimeScope();
|
||||
|
||||
private:
|
||||
CFastTimer *m_pTimer;
|
||||
};
|
||||
|
||||
inline CTimeScope::CTimeScope(CFastTimer *pTotal)
|
||||
{
|
||||
m_pTimer = pTotal;
|
||||
m_pTimer->Start();
|
||||
}
|
||||
|
||||
inline CTimeScope::~CTimeScope()
|
||||
{
|
||||
m_pTimer->End();
|
||||
}
|
||||
|
||||
// This is a helper class that times whatever block of code it's in and
|
||||
// adds the total (int microseconds) to a global counter.
|
||||
class CTimeAdder
|
||||
{
|
||||
public:
|
||||
CTimeAdder(CCycleCount *pTotal);
|
||||
~CTimeAdder();
|
||||
|
||||
void End();
|
||||
|
||||
private:
|
||||
CCycleCount *m_pTotal;
|
||||
CFastTimer m_Timer;
|
||||
};
|
||||
|
||||
inline CTimeAdder::CTimeAdder(CCycleCount *pTotal)
|
||||
{
|
||||
m_pTotal = pTotal;
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
inline CTimeAdder::~CTimeAdder()
|
||||
{
|
||||
End();
|
||||
}
|
||||
|
||||
inline void CTimeAdder::End()
|
||||
{
|
||||
if (m_pTotal)
|
||||
{
|
||||
m_Timer.End();
|
||||
*m_pTotal += m_Timer.GetDuration();
|
||||
m_pTotal = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Simple tool to support timing a block of code, and reporting the results on
|
||||
// program exit
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
#define PROFILE_SCOPE(name) \
|
||||
class C##name##ACC : public CAverageCycleCounter \
|
||||
{ \
|
||||
public: \
|
||||
~C##name##ACC() \
|
||||
{ \
|
||||
Msg("%-48s: %6.3f avg (%8.1f total, %7.3f peak, %5d iters)\n", \
|
||||
#name, \
|
||||
GetAverageMilliseconds(), \
|
||||
GetTotalMilliseconds(), \
|
||||
GetPeakMilliseconds(), \
|
||||
GetIters() ); \
|
||||
} \
|
||||
}; \
|
||||
static C##name##ACC name##_ACC; \
|
||||
CAverageTimeMarker name##_ATM( &name##_ACC )
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
class CAverageCycleCounter
|
||||
{
|
||||
public:
|
||||
CAverageCycleCounter();
|
||||
|
||||
void Init();
|
||||
void MarkIter(const CCycleCount &duration);
|
||||
|
||||
unsigned GetIters() const;
|
||||
|
||||
double GetAverageMilliseconds() const;
|
||||
double GetTotalMilliseconds() const;
|
||||
double GetPeakMilliseconds() const;
|
||||
|
||||
private:
|
||||
unsigned m_nIters;
|
||||
CCycleCount m_Total;
|
||||
CCycleCount m_Peak;
|
||||
bool m_fReport;
|
||||
const char *m_pszName;
|
||||
};
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
class CAverageTimeMarker
|
||||
{
|
||||
public:
|
||||
CAverageTimeMarker(CAverageCycleCounter *pCounter);
|
||||
~CAverageTimeMarker();
|
||||
|
||||
private:
|
||||
CAverageCycleCounter *m_pCounter;
|
||||
CFastTimer m_Timer;
|
||||
};
|
||||
// -------------------------------------------------------------------------- //
|
||||
// CCycleCount inlines.
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
inline CCycleCount::CCycleCount()
|
||||
{
|
||||
m_Int64 = 0;
|
||||
}
|
||||
|
||||
inline void CCycleCount::Init()
|
||||
{
|
||||
m_Int64 = 0;
|
||||
}
|
||||
|
||||
inline void CCycleCount::Init(float initTimeMsec)
|
||||
{
|
||||
if (g_ClockSpeedMillisecondsMultiplier > 0)
|
||||
m_Int64 = initTimeMsec / g_ClockSpeedMillisecondsMultiplier;
|
||||
else
|
||||
m_Int64 = 0;
|
||||
}
|
||||
|
||||
inline void CCycleCount::Sample()
|
||||
{
|
||||
unsigned long* pSample = (unsigned long *)&m_Int64;
|
||||
__asm
|
||||
{
|
||||
// force the cpu to synchronize the instruction queue
|
||||
// NJS: CPUID can really impact performance in tight loops.
|
||||
//cpuid
|
||||
//cpuid
|
||||
//cpuid
|
||||
mov ecx, pSample
|
||||
rdtsc
|
||||
mov[ecx], eax
|
||||
mov[ecx + 4], edx
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline CCycleCount& CCycleCount::operator+=(CCycleCount const &other)
|
||||
{
|
||||
m_Int64 += other.m_Int64;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
inline void CCycleCount::Add(CCycleCount const &rSrc1, CCycleCount const &rSrc2, CCycleCount &dest)
|
||||
{
|
||||
dest.m_Int64 = rSrc1.m_Int64 + rSrc2.m_Int64;
|
||||
}
|
||||
|
||||
inline void CCycleCount::Sub(CCycleCount const &rSrc1, CCycleCount const &rSrc2, CCycleCount &dest)
|
||||
{
|
||||
dest.m_Int64 = rSrc1.m_Int64 - rSrc2.m_Int64;
|
||||
}
|
||||
|
||||
inline bool CCycleCount::IsLessThan(CCycleCount const &other) const
|
||||
{
|
||||
return m_Int64 < other.m_Int64;
|
||||
}
|
||||
|
||||
|
||||
inline unsigned long CCycleCount::GetCycles() const
|
||||
{
|
||||
return (unsigned long)m_Int64;
|
||||
}
|
||||
|
||||
|
||||
inline unsigned long CCycleCount::GetMicroseconds() const
|
||||
{
|
||||
return (unsigned long)((m_Int64 * 1000000) / g_ClockSpeed);
|
||||
}
|
||||
|
||||
|
||||
inline double CCycleCount::GetMicrosecondsF() const
|
||||
{
|
||||
return (double)(m_Int64 * g_ClockSpeedMicrosecondsMultiplier);
|
||||
}
|
||||
|
||||
|
||||
inline unsigned long CCycleCount::GetMilliseconds() const
|
||||
{
|
||||
return (unsigned long)((m_Int64 * 1000) / g_ClockSpeed);
|
||||
}
|
||||
|
||||
|
||||
inline double CCycleCount::GetMillisecondsF() const
|
||||
{
|
||||
return (double)(m_Int64 * g_ClockSpeedMillisecondsMultiplier);
|
||||
}
|
||||
|
||||
|
||||
inline double CCycleCount::GetSeconds() const
|
||||
{
|
||||
return (double)(m_Int64 * g_ClockSpeedSecondsMultiplier);
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// CFastTimer inlines.
|
||||
// -------------------------------------------------------------------------- //
|
||||
inline void CFastTimer::Start()
|
||||
{
|
||||
m_Duration.Sample();
|
||||
}
|
||||
|
||||
|
||||
inline void CFastTimer::End()
|
||||
{
|
||||
CCycleCount cnt;
|
||||
cnt.Sample();
|
||||
m_Duration.m_Int64 = cnt.m_Int64 - m_Duration.m_Int64;
|
||||
}
|
||||
|
||||
inline CCycleCount CFastTimer::GetDurationInProgress() const
|
||||
{
|
||||
CCycleCount cnt;
|
||||
cnt.Sample();
|
||||
|
||||
CCycleCount result;
|
||||
result.m_Int64 = cnt.m_Int64 - m_Duration.m_Int64;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
inline unsigned long CFastTimer::GetClockSpeed()
|
||||
{
|
||||
return g_dwClockSpeed;
|
||||
}
|
||||
|
||||
|
||||
inline CCycleCount const& CFastTimer::GetDuration() const
|
||||
{
|
||||
return m_Duration;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// CAverageCycleCounter inlines
|
||||
|
||||
inline CAverageCycleCounter::CAverageCycleCounter()
|
||||
: m_nIters(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline void CAverageCycleCounter::Init()
|
||||
{
|
||||
m_Total.Init();
|
||||
m_Peak.Init();
|
||||
m_nIters = 0;
|
||||
}
|
||||
|
||||
inline void CAverageCycleCounter::MarkIter(const CCycleCount &duration)
|
||||
{
|
||||
++m_nIters;
|
||||
m_Total += duration;
|
||||
if (m_Peak.IsLessThan(duration))
|
||||
m_Peak = duration;
|
||||
}
|
||||
|
||||
inline unsigned CAverageCycleCounter::GetIters() const
|
||||
{
|
||||
return m_nIters;
|
||||
}
|
||||
|
||||
inline double CAverageCycleCounter::GetAverageMilliseconds() const
|
||||
{
|
||||
if (m_nIters)
|
||||
return (m_Total.GetMillisecondsF() / (double)m_nIters);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline double CAverageCycleCounter::GetTotalMilliseconds() const
|
||||
{
|
||||
return m_Total.GetMillisecondsF();
|
||||
}
|
||||
|
||||
inline double CAverageCycleCounter::GetPeakMilliseconds() const
|
||||
{
|
||||
return m_Peak.GetMillisecondsF();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
inline CAverageTimeMarker::CAverageTimeMarker(CAverageCycleCounter *pCounter)
|
||||
{
|
||||
m_pCounter = pCounter;
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
inline CAverageTimeMarker::~CAverageTimeMarker()
|
||||
{
|
||||
m_Timer.End();
|
||||
m_pCounter->MarkIter(m_Timer.GetDuration());
|
||||
}
|
||||
|
||||
|
||||
#endif // FASTTIMER_H
|
@ -1,37 +0,0 @@
|
||||
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: Memory allocation!
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef TIER0_MEM_H
|
||||
#define TIER0_MEM_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "osconfig.h"
|
||||
#include <stddef.h>
|
||||
#include "tier0/platform.h"
|
||||
|
||||
#ifdef TIER0_DLL_EXPORT
|
||||
# define MEM_INTERFACE DLL_EXPORT
|
||||
#else
|
||||
# define MEM_INTERFACE DLL_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DLL-exported methods for particular kinds of memory
|
||||
//-----------------------------------------------------------------------------
|
||||
MEM_INTERFACE void *MemAllocScratch(int nMemSize);
|
||||
MEM_INTERFACE void MemFreeScratch();
|
||||
|
||||
#ifdef __linux__
|
||||
MEM_INTERFACE void ZeroMemory(void *mem, size_t length);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* TIER0_MEM_H */
|
@ -1,77 +0,0 @@
|
||||
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: This header should never be used directly from leaf code!!!
|
||||
// Instead, just add the file memoverride.cpp into your project and all this
|
||||
// will automagically be used
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifndef TIER0_MEMALLOC_H
|
||||
#define TIER0_MEMALLOC_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "osconfig.h"
|
||||
#include <stddef.h>
|
||||
#include "tier0/mem.h"
|
||||
|
||||
struct _CrtMemState;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// NOTE! This should never be called directly from leaf code
|
||||
// Just use new,delete,malloc,free etc. They will call into this eventually
|
||||
//-----------------------------------------------------------------------------
|
||||
class IMemAlloc
|
||||
{
|
||||
public:
|
||||
// Release versions
|
||||
virtual void *Alloc(size_t nSize) = 0;
|
||||
virtual void *Realloc(void *pMem, size_t nSize) = 0;
|
||||
virtual void Free(void *pMem) = 0;
|
||||
virtual void *Expand(void *pMem, size_t nSize) = 0;
|
||||
|
||||
// Debug versions
|
||||
virtual void *Alloc(size_t nSize, const char *pFileName, int nLine) = 0;
|
||||
virtual void *Realloc(void *pMem, size_t nSize, const char *pFileName, int nLine) = 0;
|
||||
virtual void Free(void *pMem, const char *pFileName, int nLine) = 0;
|
||||
virtual void *Expand(void *pMem, size_t nSize, const char *pFileName, int nLine) = 0;
|
||||
|
||||
// Returns size of a particular allocation
|
||||
virtual size_t GetSize(void *pMem) = 0;
|
||||
|
||||
// Force file + line information for an allocation
|
||||
virtual void PushAllocDbgInfo(const char *pFileName, int nLine) = 0;
|
||||
virtual void PopAllocDbgInfo() = 0;
|
||||
|
||||
// FIXME: Remove when we have our own allocator
|
||||
// these methods of the Crt debug code is used in our codebase currently
|
||||
virtual long CrtSetBreakAlloc(long lNewBreakAlloc) = 0;
|
||||
virtual int CrtSetReportMode(int nReportType, int nReportMode) = 0;
|
||||
virtual int CrtIsValidHeapPointer(const void *pMem) = 0;
|
||||
virtual int CrtCheckMemory(void) = 0;
|
||||
virtual int CrtSetDbgFlag(int nNewFlag) = 0;
|
||||
virtual void CrtMemCheckpoint(_CrtMemState *pState) = 0;
|
||||
|
||||
// FIXME: Make a better stats interface
|
||||
virtual void DumpStats() = 0;
|
||||
|
||||
// FIXME: Remove when we have our own allocator
|
||||
virtual void* CrtSetReportFile(int nRptType, void* hFile) = 0;
|
||||
virtual void* CrtSetReportHook(void* pfnNewHook) = 0;
|
||||
virtual int CrtDbgReport(int nRptType, const char * szFile,
|
||||
int nLine, const char * szModule, const char * pMsg) = 0;
|
||||
|
||||
virtual int heapchk() = 0;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Singleton interface
|
||||
//-----------------------------------------------------------------------------
|
||||
IMemAlloc *g_pMemAlloc;
|
||||
|
||||
|
||||
#endif /* TIER0_MEMALLOC_H */
|
@ -1,21 +0,0 @@
|
||||
//========= Copyright © 1996-2003, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: This header, which must be the final line of a .h file,
|
||||
// causes all crt methods to stop using debugging versions of the memory allocators.
|
||||
// NOTE: Use memdbgon.h to re-enable memory debugging.
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#ifdef MEM_DEBUG_ON
|
||||
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#undef calloc
|
||||
#undef free
|
||||
#undef _expand
|
||||
#undef _msize
|
||||
#undef new
|
||||
#undef MEM_DEBUG_ON
|
||||
|
||||
#endif
|
@ -1,93 +0,0 @@
|
||||
//========= Copyright © 1996-2003, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: This header, which must be the final include in a .cpp (or .h) file,
|
||||
// causes all crt methods to use debugging versions of the memory allocators.
|
||||
// NOTE: Use memdbgoff.h to disable memory debugging.
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
// SPECIAL NOTE! This file must *not* use include guards; we need to be able
|
||||
// to include this potentially multiple times (since we can deactivate debugging
|
||||
// by including memdbgoff.h)
|
||||
|
||||
// SPECIAL NOTE #2: This must be the final include in a .cpp or .h file!!!
|
||||
#include "osconfig.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
#include <tchar.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <crtdbg.h>
|
||||
|
||||
#include "tier0/memdbgoff.h"
|
||||
|
||||
#define MEM_DEBUG_ON 1
|
||||
|
||||
#undef malloc
|
||||
#undef realloc
|
||||
#undef calloc
|
||||
#undef _expand
|
||||
#undef free
|
||||
#undef _msize
|
||||
|
||||
#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#define free(p) _free_dbg(p, _NORMAL_BLOCK)
|
||||
#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK)
|
||||
#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
|
||||
|
||||
#if defined(__AFX_H__) && defined(DEBUG_NEW)
|
||||
#define new DEBUG_NEW
|
||||
#else
|
||||
#undef new
|
||||
#define MEMALL_DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
|
||||
#define new MEMALL_DEBUG_NEW
|
||||
#endif
|
||||
|
||||
#undef _strdup
|
||||
#undef strdup
|
||||
#undef _wcsdup
|
||||
#undef wcsup
|
||||
|
||||
#define _strdup(s) strdup_dbg(s, __FILE__, __LINE__)
|
||||
#define strdup(s) strdup_dbg(s, __FILE__, __LINE__)
|
||||
#define _wcsdup(s) wcsdup_dbg(s, __FILE__, __LINE__)
|
||||
#define wcsdup(s) wcsdup_dbg(s, __FILE__, __LINE__)
|
||||
|
||||
// Make sure we don't define strdup twice
|
||||
#ifndef MEM_DBG_DEFINED_STRDUP
|
||||
#define MEM_DBG_DEFINED_STRDUP 1
|
||||
|
||||
inline char *strdup_dbg(const char *pString, const char *pFileName, unsigned nLine)
|
||||
{
|
||||
char *pMemory;
|
||||
|
||||
if (!pString)
|
||||
return NULL;
|
||||
|
||||
if ((pMemory = (char *)_malloc_dbg(strlen(pString) + 1, _NORMAL_BLOCK, pFileName, nLine)) != NULL)
|
||||
return strcpy(pMemory, pString);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline wchar_t *wcsdup_dbg(const wchar_t *pString, const char *pFileName, unsigned nLine)
|
||||
{
|
||||
wchar_t *pMemory;
|
||||
|
||||
if (!pString)
|
||||
return NULL;
|
||||
|
||||
if ((pMemory = (wchar_t *)_malloc_dbg((wcslen(pString) + 1) * sizeof(wchar_t), _NORMAL_BLOCK, pFileName, nLine)) != NULL)
|
||||
return wcscpy(pMemory, pString);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif // DBMEM_DEFINED_STRDUP
|
||||
|
||||
#endif // _DEBUG
|
@ -1,66 +0,0 @@
|
||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "tier0/platform.h"
|
||||
#include "tier0/memalloc.h"
|
||||
#include "tier0/dbg.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
double Plat_FloatTime()
|
||||
{
|
||||
struct timeval tp;
|
||||
static int secbase = 0;
|
||||
|
||||
gettimeofday(&tp, NULL);
|
||||
|
||||
if (!secbase)
|
||||
{
|
||||
secbase = tp.tv_sec;
|
||||
return (tp.tv_usec / 1000000.0);
|
||||
}
|
||||
|
||||
return ((tp.tv_sec - secbase) + tp.tv_usec / 1000000.0);
|
||||
}
|
||||
|
||||
unsigned long Plat_MSTime()
|
||||
{
|
||||
struct timeval tp;
|
||||
static int secbase = 0;
|
||||
|
||||
gettimeofday(&tp, NULL);
|
||||
|
||||
if (!secbase)
|
||||
{
|
||||
secbase = tp.tv_sec;
|
||||
return (tp.tv_usec / 1000000.0);
|
||||
}
|
||||
|
||||
return (unsigned long)((tp.tv_sec - secbase) + tp.tv_usec / 1000000.0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool vtune(bool resume)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------------------------------- //
|
||||
// Memory stuff.
|
||||
// -------------------------------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
void Plat_SetThreadName(unsigned long dwThreadID, const char *pName)
|
||||
{
|
||||
Assert("Plat_SetThreadName not implemented");
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
#include "precompiled.h"
|
||||
#include "tier0/platform.h"
|
||||
#include "tier0/memalloc.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
static LARGE_INTEGER g_PerformanceFrequency;
|
||||
static LARGE_INTEGER g_MSPerformanceFrequency;
|
||||
static LARGE_INTEGER g_ClockStart;
|
||||
|
||||
static void InitTime()
|
||||
{
|
||||
if (!g_PerformanceFrequency.QuadPart)
|
||||
{
|
||||
QueryPerformanceFrequency(&g_PerformanceFrequency);
|
||||
g_MSPerformanceFrequency.QuadPart = g_PerformanceFrequency.QuadPart / 1000;
|
||||
QueryPerformanceCounter(&g_ClockStart);
|
||||
}
|
||||
}
|
||||
|
||||
double Plat_FloatTime()
|
||||
{
|
||||
InitTime();
|
||||
|
||||
LARGE_INTEGER CurrentTime;
|
||||
|
||||
QueryPerformanceCounter(&CurrentTime);
|
||||
|
||||
double fRawSeconds = (double)(CurrentTime.QuadPart - g_ClockStart.QuadPart) / (double)(g_PerformanceFrequency.QuadPart);
|
||||
|
||||
return fRawSeconds;
|
||||
}
|
||||
|
||||
unsigned long Plat_MSTime()
|
||||
{
|
||||
InitTime();
|
||||
|
||||
LARGE_INTEGER CurrentTime;
|
||||
|
||||
QueryPerformanceCounter(&CurrentTime);
|
||||
|
||||
return (unsigned long)((CurrentTime.QuadPart - g_ClockStart.QuadPart) / g_MSPerformanceFrequency.QuadPart);
|
||||
}
|
||||
|
||||
bool vtune(bool resume)
|
||||
{
|
||||
static bool bInitialized = false;
|
||||
static void(__cdecl *VTResume)(void) = NULL;
|
||||
static void(__cdecl *VTPause) (void) = NULL;
|
||||
|
||||
// Grab the Pause and Resume function pointers from the VTune DLL the first time through:
|
||||
if (!bInitialized)
|
||||
{
|
||||
bInitialized = true;
|
||||
|
||||
HINSTANCE pVTuneDLL = LoadLibrary("vtuneapi.dll");
|
||||
|
||||
if (pVTuneDLL)
|
||||
{
|
||||
VTResume = (void(__cdecl *)())GetProcAddress(pVTuneDLL, "VTResume");
|
||||
VTPause = (void(__cdecl *)())GetProcAddress(pVTuneDLL, "VTPause");
|
||||
}
|
||||
}
|
||||
|
||||
// Call the appropriate function, as indicated by the argument:
|
||||
if (resume && VTResume)
|
||||
{
|
||||
VTResume();
|
||||
return true;
|
||||
|
||||
}
|
||||
else if (!resume && VTPause)
|
||||
{
|
||||
VTPause();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
@ -1,454 +0,0 @@
|
||||
//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========
|
||||
//
|
||||
// The copyright to the contents herein is the property of Valve, L.L.C.
|
||||
// The contents may be used and/or copied only with the written permission of
|
||||
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in
|
||||
// the agreement/contract under which the contents have been supplied.
|
||||
//
|
||||
// $Header: $
|
||||
// $NoKeywords: $
|
||||
//
|
||||
// The main debug library interfaces
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifndef DBG_H
|
||||
#define DBG_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "osconfig.h"
|
||||
#include "basetypes.h"
|
||||
#include "tier0/platform.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// dll export stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifdef TIER0_DLL_EXPORT
|
||||
#define DBG_INTERFACE DLL_EXPORT
|
||||
#define DBG_OVERLOAD DLL_GLOBAL_EXPORT
|
||||
#define DBG_CLASS DLL_CLASS_EXPORT
|
||||
#else
|
||||
#define DBG_INTERFACE DLL_IMPORT
|
||||
#define DBG_OVERLOAD DLL_GLOBAL_IMPORT
|
||||
#define DBG_CLASS DLL_CLASS_IMPORT
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Usage model for the Dbg library
|
||||
//
|
||||
// 1. Spew.
|
||||
//
|
||||
// Spew can be used in a static and a dynamic mode. The static
|
||||
// mode allows us to display assertions and other messages either only
|
||||
// in debug builds, or in non-release builds. The dynamic mode allows us to
|
||||
// turn on and off certain spew messages while the application is running.
|
||||
//
|
||||
// Static Spew messages:
|
||||
//
|
||||
// Assertions are used to detect and warn about invalid states
|
||||
// Spews are used to display a particular status/warning message.
|
||||
//
|
||||
// To use an assertion, use
|
||||
//
|
||||
// Assert( (f == 5) );
|
||||
// AssertMsg( (f == 5), ("F needs to be %d here!\n", 5) );
|
||||
// AssertFunc( (f == 5), BadFunc() );
|
||||
// AssertEquals( f, 5 );
|
||||
// AssertFloatEquals( f, 5.0f, 1e-3 );
|
||||
//
|
||||
// The first will simply report that an assertion failed on a particular
|
||||
// code file and line. The second version will display a print-f formatted message
|
||||
// along with the file and line, the third will display a generic message and
|
||||
// will also cause the function BadFunc to be executed, and the last two
|
||||
// will report an error if f is not equal to 5 (the last one asserts within
|
||||
// a particular tolerance).
|
||||
//
|
||||
// To use a warning, use
|
||||
//
|
||||
// Warning("Oh I feel so %s all over\n", "yummy");
|
||||
//
|
||||
// Warning will do its magic in only Debug builds. To perform spew in *all*
|
||||
// builds, use RelWarning.
|
||||
//
|
||||
// Three other spew types, Msg, Log, and Error, are compiled into all builds.
|
||||
// These error types do *not* need two sets of parenthesis.
|
||||
//
|
||||
// Msg( "Isn't this exciting %d?", 5 );
|
||||
// Error( "I'm just thrilled" );
|
||||
//
|
||||
// Dynamic Spew messages
|
||||
//
|
||||
// It is possible to dynamically turn spew on and off. Dynamic spew is
|
||||
// identified by a spew group and priority level. To turn spew on for a
|
||||
// particular spew group, use SpewActivate( "group", level ). This will
|
||||
// cause all spew in that particular group with priority levels <= the
|
||||
// level specified in the SpewActivate function to be printed. Use DSpew
|
||||
// to perform the spew:
|
||||
//
|
||||
// DWarning( "group", level, "Oh I feel even yummier!\n" );
|
||||
//
|
||||
// Priority level 0 means that the spew will *always* be printed, and group
|
||||
// '*' is the default spew group. If a DWarning is encountered using a group
|
||||
// whose priority has not been set, it will use the priority of the default
|
||||
// group. The priority of the default group is initially set to 0.
|
||||
//
|
||||
// Spew output
|
||||
//
|
||||
// The output of the spew system can be redirected to an externally-supplied
|
||||
// function which is responsible for outputting the spew. By default, the
|
||||
// spew is simply printed using printf.
|
||||
//
|
||||
// To redirect spew output, call SpewOutput.
|
||||
//
|
||||
// SpewOutputFunc( OutputFunc );
|
||||
//
|
||||
// This will cause OutputFunc to be called every time a spew message is
|
||||
// generated. OutputFunc will be passed a spew type and a message to print.
|
||||
// It must return a value indicating whether the debugger should be invoked,
|
||||
// whether the program should continue running, or whether the program
|
||||
// should abort.
|
||||
//
|
||||
// 2. Code activation
|
||||
//
|
||||
// To cause code to be run only in debug builds, use DBG_CODE:
|
||||
// An example is below.
|
||||
//
|
||||
// DBG_CODE(
|
||||
// {
|
||||
// int x = 5;
|
||||
// ++x;
|
||||
// }
|
||||
// );
|
||||
//
|
||||
// Code can be activated based on the dynamic spew groups also. Use
|
||||
//
|
||||
// DBG_DCODE( "group", level,
|
||||
// { int x = 5; ++x; }
|
||||
// );
|
||||
//
|
||||
// 3. Breaking into the debugger.
|
||||
//
|
||||
// To cause an unconditional break into the debugger in debug builds only, use DBG_BREAK
|
||||
//
|
||||
// DBG_BREAK();
|
||||
//
|
||||
// You can force a break in any build (release or debug) using
|
||||
//
|
||||
// DebuggerBreak();
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/* Various types of spew messages */
|
||||
// I'm sure you're asking yourself why SPEW_ instead of DBG_ ?
|
||||
// It's because DBG_ is used all over the place in windows.h
|
||||
// For example, DBG_CONTINUE is defined. Feh.
|
||||
enum SpewType_t
|
||||
{
|
||||
SPEW_MESSAGE = 0,
|
||||
SPEW_WARNING,
|
||||
SPEW_ASSERT,
|
||||
SPEW_ERROR,
|
||||
SPEW_LOG,
|
||||
|
||||
SPEW_TYPE_COUNT
|
||||
};
|
||||
|
||||
enum SpewRetval_t
|
||||
{
|
||||
SPEW_DEBUGGER = 0,
|
||||
SPEW_CONTINUE,
|
||||
SPEW_ABORT
|
||||
};
|
||||
|
||||
/* type of externally defined function used to display debug spew */
|
||||
typedef SpewRetval_t(*SpewOutputFunc_t)(SpewType_t spewType, char const *pMsg);
|
||||
|
||||
/* Used to redirect spew output */
|
||||
void SpewOutputFunc(SpewOutputFunc_t func);
|
||||
|
||||
/* Used ot get the current spew output function */
|
||||
SpewOutputFunc_t GetSpewOutputFunc(void);
|
||||
|
||||
/* Used to manage spew groups and subgroups */
|
||||
void SpewActivate(char const* pGroupName, int level);
|
||||
bool IsSpewActive(char const* pGroupName, int level);
|
||||
|
||||
/* Used to display messages, should never be called directly. */
|
||||
void _SpewInfo(SpewType_t type, char const* pFile, int line);
|
||||
SpewRetval_t _SpewMessage(char const* pMsg, ...);
|
||||
SpewRetval_t _DSpewMessage(char const *pGroupName, int level, char const* pMsg, ...);
|
||||
|
||||
/* Used to define macros, never use these directly. */
|
||||
#define _Assert( _exp ) do { \
|
||||
if (!(_exp)) \
|
||||
{ \
|
||||
_SpewInfo( SPEW_ASSERT, __FILE__, __LINE__ ); \
|
||||
if (_SpewMessage("Assertion Failed: " #_exp) == SPEW_DEBUGGER) \
|
||||
{ \
|
||||
DebuggerBreak(); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define _AssertMsg( _exp, _msg ) do { \
|
||||
if (!(_exp)) \
|
||||
{ \
|
||||
_SpewInfo( SPEW_ASSERT, __FILE__, __LINE__ ); \
|
||||
if (_SpewMessage(_msg) == SPEW_DEBUGGER) \
|
||||
{ \
|
||||
DebuggerBreak(); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define _AssertFunc( _exp, _f ) do { \
|
||||
if (!(_exp)) \
|
||||
{ \
|
||||
_SpewInfo( SPEW_ASSERT, __FILE__, __LINE__ ); \
|
||||
SpewRetval_t ret = _SpewMessage("Assertion Failed!" #_exp); \
|
||||
_f; \
|
||||
if (ret == SPEW_DEBUGGER) \
|
||||
{ \
|
||||
DebuggerBreak(); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define _AssertEquals( _exp, _expectedValue ) \
|
||||
do { \
|
||||
if ((_exp) != (_expectedValue)) \
|
||||
{ \
|
||||
_SpewInfo( SPEW_ASSERT, __FILE__, __LINE__ ); \
|
||||
SpewRetval_t ret = _SpewMessage("Expected %d but got %d!", (_expectedValue), (_exp)); \
|
||||
if (ret == SPEW_DEBUGGER) \
|
||||
{ \
|
||||
DebuggerBreak(); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define _AssertFloatEquals( _exp, _expectedValue, _tol ) \
|
||||
do { \
|
||||
if (fabs((_exp) - (_expectedValue)) > (_tol)) \
|
||||
{ \
|
||||
_SpewInfo( SPEW_ASSERT, __FILE__, __LINE__ ); \
|
||||
SpewRetval_t ret = _SpewMessage("Expected %f but got %f!", (_expectedValue), (_exp)); \
|
||||
if (ret == SPEW_DEBUGGER) \
|
||||
{ \
|
||||
DebuggerBreak(); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Spew macros... */
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
#define Assert( _exp ) _Assert( _exp )
|
||||
#define AssertMsg( _exp, _msg ) _AssertMsg( _exp, _msg )
|
||||
#define AssertFunc( _exp, _f ) _AssertFunc( _exp, _f )
|
||||
#define AssertEquals( _exp, _expectedValue ) _AssertEquals( _exp, _expectedValue )
|
||||
#define AssertFloatEquals( _exp, _expectedValue, _tol ) _AssertFloatEquals( _exp, _expectedValue, _tol )
|
||||
#define Verify( _exp ) _Assert( _exp )
|
||||
|
||||
#define AssertMsg1( _exp, _msg, a1 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1 ) )
|
||||
#define AssertMsg2( _exp, _msg, a1, a2 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2 ) )
|
||||
#define AssertMsg3( _exp, _msg, a1, a2, a3 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3 ) )
|
||||
#define AssertMsg4( _exp, _msg, a1, a2, a3, a4 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4 ) )
|
||||
#define AssertMsg5( _exp, _msg, a1, a2, a3, a4, a5 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4, a5 ) )
|
||||
#define AssertMsg6( _exp, _msg, a1, a2, a3, a4, a5, a6 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4, a5, a6 ) )
|
||||
#define AssertMsg6( _exp, _msg, a1, a2, a3, a4, a5, a6 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4, a5, a6 ) )
|
||||
#define AssertMsg7( _exp, _msg, a1, a2, a3, a4, a5, a6, a7 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4, a5, a6, a7 ) )
|
||||
#define AssertMsg8( _exp, _msg, a1, a2, a3, a4, a5, a6, a7, a8 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4, a5, a6, a7, a8 ) )
|
||||
#define AssertMsg9( _exp, _msg, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) _AssertMsg( _exp, CDbgFmtMsg( _msg, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) )
|
||||
|
||||
|
||||
#else /* Not _DEBUG */
|
||||
|
||||
#define Assert( _exp ) ((void)0)
|
||||
#define AssertMsg( _exp, _msg ) ((void)0)
|
||||
#define AssertFunc( _exp, _f ) ((void)0)
|
||||
#define AssertEquals( _exp, _expectedValue ) ((void)0)
|
||||
#define AssertFloatEquals( _exp, _expectedValue, _tol ) ((void)0)
|
||||
#define Verify( _exp ) (_exp)
|
||||
|
||||
#define AssertMsg1( _exp, _msg, a1 ) ((void)0)
|
||||
#define AssertMsg2( _exp, _msg, a1, a2 ) ((void)0)
|
||||
#define AssertMsg3( _exp, _msg, a1, a2, a3 ) ((void)0)
|
||||
#define AssertMsg4( _exp, _msg, a1, a2, a3, a4 ) ((void)0)
|
||||
#define AssertMsg5( _exp, _msg, a1, a2, a3, a4, a5 ) ((void)0)
|
||||
#define AssertMsg6( _exp, _msg, a1, a2, a3, a4, a5, a6 ) ((void)0)
|
||||
#define AssertMsg6( _exp, _msg, a1, a2, a3, a4, a5, a6 ) ((void)0)
|
||||
#define AssertMsg7( _exp, _msg, a1, a2, a3, a4, a5, a6, a7 ) ((void)0)
|
||||
#define AssertMsg8( _exp, _msg, a1, a2, a3, a4, a5, a6, a7, a8 ) ((void)0)
|
||||
#define AssertMsg9( _exp, _msg, a1, a2, a3, a4, a5, a6, a7, a8, a9 ) ((void)0)
|
||||
|
||||
#endif /* _DEBUG */
|
||||
|
||||
|
||||
|
||||
/* These are always compiled in */
|
||||
void Msg(char const* pMsg, ...);
|
||||
void DMsg(char const *pGroupName, int level, char const *pMsg, ...);
|
||||
|
||||
void Warning(char const *pMsg, ...);
|
||||
void DWarning(char const *pGroupName, int level, char const *pMsg, ...);
|
||||
|
||||
void Log(char const *pMsg, ...);
|
||||
void DLog(char const *pGroupName, int level, char const *pMsg, ...);
|
||||
|
||||
void Error(char const *pMsg, ...);
|
||||
|
||||
// You can use this macro like a runtime assert macro.
|
||||
// If the condition fails, then Error is called with the message. This macro is called
|
||||
// like AssertMsg, where msg must be enclosed in parenthesis:
|
||||
//
|
||||
// ErrorIfNot( bCondition, ("a b c %d %d %d", 1, 2, 3) );
|
||||
#define ErrorIfNot( condition, msg ) \
|
||||
if ( (condition) ) \
|
||||
; \
|
||||
else \
|
||||
{ \
|
||||
Error msg; \
|
||||
}
|
||||
|
||||
/* A couple of super-common dynamic spew messages, here for convenience */
|
||||
/* These looked at the "developer" group */
|
||||
void DevMsg(int level, char const* pMsg, ...);
|
||||
void DevWarning(int level, char const *pMsg, ...);
|
||||
void DevLog(int level, char const *pMsg, ...);
|
||||
|
||||
/* default level versions (level 1) */
|
||||
void DevMsg(char const* pMsg, ...);
|
||||
void DevWarning(char const *pMsg, ...);
|
||||
void DevLog(char const *pMsg, ...);
|
||||
|
||||
/* Code macros, debugger interface */
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
#define DBG_CODE( _code ) if (0) ; else { _code }
|
||||
#define DBG_DCODE( _g, _l, _code ) if (IsSpewActive( _g, _l )) { _code } else {}
|
||||
#define DBG_BREAK() DebuggerBreak() /* defined in platform.h */
|
||||
|
||||
#else /* not _DEBUG */
|
||||
|
||||
#define DBG_CODE( _code ) ((void)0)
|
||||
#define DBG_DCODE( _g, _l, _code ) ((void)0)
|
||||
#define DBG_BREAK() ((void)0)
|
||||
|
||||
#endif /* _DEBUG */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Macro to assist in asserting constant invariants during compilation
|
||||
|
||||
#define UID_PREFIX generated_id_
|
||||
#define UID_CAT1(a,c) a ## c
|
||||
#define UID_CAT2(a,c) UID_CAT1(a,c)
|
||||
#define UNIQUE_ID UID_CAT2(UID_PREFIX,__LINE__)
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define COMPILE_TIME_ASSERT( pred ) switch(0){case 0:case pred:;}
|
||||
#define ASSERT_INVARIANT( pred ) static void UNIQUE_ID() { COMPILE_TIME_ASSERT( pred ) }
|
||||
#else
|
||||
#define COMPILE_TIME_ASSERT( pred )
|
||||
#define ASSERT_INVARIANT( pred )
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Templates to assist in validating pointers:
|
||||
|
||||
// Have to use these stubs so we don't have to include windows.h here.
|
||||
void _AssertValidReadPtr(void* ptr, int count = 1);
|
||||
void _AssertValidWritePtr(void* ptr, int count = 1);
|
||||
void _AssertValidReadWritePtr(void* ptr, int count = 1);
|
||||
|
||||
void AssertValidStringPtr(const char* ptr, int maxchar = 0xFFFFFF);
|
||||
template<class T> inline void AssertValidReadPtr(T* ptr, int count = 1) { _AssertValidReadPtr((void*)ptr, count); }
|
||||
template<class T> inline void AssertValidWritePtr(T* ptr, int count = 1) { _AssertValidWritePtr((void*)ptr, count); }
|
||||
template<class T> inline void AssertValidReadWritePtr(T* ptr, int count = 1) { _AssertValidReadWritePtr((void*)ptr, count); }
|
||||
|
||||
#define AssertValidThis() AssertValidReadWritePtr(this,sizeof(*this))
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Macro to protect functions that are not reentrant
|
||||
|
||||
#ifdef _DEBUG
|
||||
class CReentryGuard
|
||||
{
|
||||
public:
|
||||
CReentryGuard(int *pSemaphore)
|
||||
: m_pSemaphore(pSemaphore)
|
||||
{
|
||||
++(*m_pSemaphore);
|
||||
}
|
||||
|
||||
~CReentryGuard()
|
||||
{
|
||||
--(*m_pSemaphore);
|
||||
}
|
||||
|
||||
private:
|
||||
int *m_pSemaphore;
|
||||
};
|
||||
|
||||
#define ASSERT_NO_REENTRY() \
|
||||
static int fSemaphore##__LINE__; \
|
||||
Assert( !fSemaphore##__LINE__ ); \
|
||||
CReentryGuard ReentryGuard##__LINE__( &fSemaphore##__LINE__ )
|
||||
#else
|
||||
#define ASSERT_NO_REENTRY()
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Purpose: Inline string formatter
|
||||
//
|
||||
|
||||
class CDbgFmtMsg
|
||||
{
|
||||
public:
|
||||
CDbgFmtMsg(const char *pszFormat, ...)
|
||||
{
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start(arg_ptr, pszFormat);
|
||||
_vsnprintf(m_szBuf, sizeof(m_szBuf) - 1, pszFormat, arg_ptr);
|
||||
va_end(arg_ptr);
|
||||
|
||||
m_szBuf[sizeof(m_szBuf) - 1] = 0;
|
||||
}
|
||||
|
||||
operator const char *() const
|
||||
{
|
||||
return m_szBuf;
|
||||
}
|
||||
|
||||
private:
|
||||
char m_szBuf[256];
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Purpose: Embed debug info in each file.
|
||||
//
|
||||
#ifdef _WIN32
|
||||
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(compiler)
|
||||
#pragma comment(exestr,"*** DEBUG file detected, Last Compile: " __DATE__ ", " __TIME__ " ***")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* DBG_H */
|
@ -34,9 +34,9 @@
|
||||
#endif
|
||||
|
||||
#include "osconfig.h"
|
||||
#include "tier0/dbg.h"
|
||||
//#include "tier0/dbg.h"
|
||||
#include <string.h>
|
||||
#include "tier0/platform.h"
|
||||
//#include "tier0/platform.h"
|
||||
|
||||
#pragma warning (disable:4100)
|
||||
#pragma warning (disable:4514)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user