mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-03-03 17:25:24 +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
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAirtank, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CAirtank, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -57,21 +57,22 @@ public:
|
|||||||
int Save_(CSave &save);
|
int Save_(CSave &save);
|
||||||
int Restore_(CRestore &restore);
|
int Restore_(CRestore &restore);
|
||||||
void Killed_(entvars_t *pevAttacker, int iGib);
|
void Killed_(entvars_t *pevAttacker, int iGib);
|
||||||
int BloodColor_(void)
|
|
||||||
{
|
|
||||||
return BloodColor();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_state;
|
int m_state;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
|
// linked objects
|
||||||
C_DLLEXPORT void item_airtank(entvars_t *pev);
|
C_DLLEXPORT void item_airtank(entvars_t *pev);
|
||||||
|
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#endif // AIRTANK_H
|
#endif // AIRTANK_H
|
||||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CBaseAnimating::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseAnimating, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseAnimating, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ TYPEDESCRIPTION CPendulum::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncRotating, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncRotating, m_SaveData)[5];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPendulum, m_SaveData)[8];
|
TYPEDESCRIPTION IMPL_CLASS(CPendulum, m_SaveData)[8];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ public:
|
|||||||
void RampPitchVol(int fUp);
|
void RampPitchVol(int fUp);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_flFanFriction;
|
float m_flFanFriction;
|
||||||
@ -254,7 +254,7 @@ public:
|
|||||||
// this touch func makes the pendulum a rope
|
// this touch func makes the pendulum a rope
|
||||||
void EXPORT RopeTouch(CBaseEntity *pOther);
|
void EXPORT RopeTouch(CBaseEntity *pOther);
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[8];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_accel; // Acceleration
|
float m_accel; // Acceleration
|
||||||
|
@ -468,13 +468,11 @@ NOBODY const Vector *FindNearbyRetreatSpot(CCSBot *me, float maxRange)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2eaa1d> ../cstrike/dlls/bot/cs_bot.cpp:1116 */
|
/* <2eaa1d> ../cstrike/dlls/bot/cs_bot.cpp:1116 */
|
||||||
NOBODY float CCSBot::GetRangeToFarthestEscortedHostage(void)
|
float CCSBot::GetRangeToFarthestEscortedHostage(void)
|
||||||
{
|
{
|
||||||
// {
|
FarthestHostage away(this);
|
||||||
// class FarthestHostage away; // 1118
|
g_pHostages->ForEachHostage(away);
|
||||||
// ForEachHostage<FarthestHostage>(const class CHostageManager *const this,
|
return away.m_farRange;
|
||||||
// class FarthestHostage &func); // 1120
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -1247,7 +1247,7 @@ public:
|
|||||||
if (IsSpotOccupied(m_me, spot->GetPosition()))
|
if (IsSpotOccupied(m_me, spot->GetPosition()))
|
||||||
{
|
{
|
||||||
// player is in hiding spot
|
// player is in hiding spot
|
||||||
/// @todo Check if player is moving or sitting still
|
// TODO: Check if player is moving or sitting still
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1283,21 +1283,34 @@ private:
|
|||||||
class FarthestHostage
|
class FarthestHostage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FarthestHostage(CCSBot *me)//, float range)
|
FarthestHostage(const CCSBot *me)
|
||||||
{
|
{
|
||||||
m_me = me;
|
m_me = me;
|
||||||
//m_farRange = range;
|
m_farRange = -1.0;
|
||||||
}
|
}
|
||||||
bool operator()(CHostage *hostage)
|
bool operator()(CHostage *hostage)
|
||||||
{
|
{
|
||||||
//TODO: untested
|
if (hostage->pev->takedamage != DAMAGE_YES)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (!hostage->IsFollowing(m_me))
|
if (hostage->m_improv != NULL)
|
||||||
return false;
|
{
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
const CCSBot *m_me;
|
const CCSBot *m_me;
|
||||||
float m_farRange;
|
float m_farRange;
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ void CCSBotManager::__MAKE_VHOOK(RestartRound)(void)
|
|||||||
m_bombDefuser = NULL;
|
m_bombDefuser = NULL;
|
||||||
m_earliestBombPlantTimestamp = gpGlobals->time + RANDOM_FLOAT(10, 30);
|
m_earliestBombPlantTimestamp = gpGlobals->time + RANDOM_FLOAT(10, 30);
|
||||||
|
|
||||||
IMPLEMENT_ARRAY(m_editCmd) = EDIT_NONE;
|
IMPL(m_editCmd) = EDIT_NONE;
|
||||||
|
|
||||||
ResetRadioMessageTimestamps();
|
ResetRadioMessageTimestamps();
|
||||||
m_lastSeenEnemyTimestamp = -9999.9f;
|
m_lastSeenEnemyTimestamp = -9999.9f;
|
||||||
@ -209,7 +209,7 @@ NOBODY bool CCSBotManager::IsOnOffense(CBasePlayer *player) const
|
|||||||
void CCSBotManager::__MAKE_VHOOK(ServerActivate)(void)
|
void CCSBotManager::__MAKE_VHOOK(ServerActivate)(void)
|
||||||
{
|
{
|
||||||
DestroyNavigationMap();
|
DestroyNavigationMap();
|
||||||
IMPLEMENT_ARRAY(m_isMapDataLoaded) = false;
|
IMPL(m_isMapDataLoaded) = false;
|
||||||
|
|
||||||
m_zoneCount = 0;
|
m_zoneCount = 0;
|
||||||
m_gameScenario = SCENARIO_DEATHMATCH;
|
m_gameScenario = SCENARIO_DEATHMATCH;
|
||||||
@ -217,8 +217,8 @@ void CCSBotManager::__MAKE_VHOOK(ServerActivate)(void)
|
|||||||
ValidateMapData();
|
ValidateMapData();
|
||||||
RestartRound();
|
RestartRound();
|
||||||
|
|
||||||
IMPLEMENT_ARRAY(m_isLearningMap) = false;
|
IMPL(m_isLearningMap) = false;
|
||||||
IMPLEMENT_ARRAY(m_isAnalysisRequested) = false;
|
IMPL(m_isAnalysisRequested) = false;
|
||||||
|
|
||||||
m_bServerActive = true;
|
m_bServerActive = true;
|
||||||
AddServerCommands();
|
AddServerCommands();
|
||||||
@ -480,59 +480,59 @@ void CCSBotManager::__MAKE_VHOOK(ServerCommand)(const char *pcmd)
|
|||||||
}
|
}
|
||||||
else if (FStrEq(pcmd, "bot_nav_delete"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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"))
|
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 */
|
/* <36c3c2> ../cstrike/dlls/bot/cs_bot_manager.cpp:903 */
|
||||||
NOBODY bool CCSBotManager::BotAddCommand(BotProfileTeamType team, bool isFromConsole)
|
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;
|
return false;
|
||||||
|
|
||||||
const BotProfile *profile = NULL;
|
const BotProfile *profile = NULL;
|
||||||
@ -815,12 +815,12 @@ NOBODY void CCSBotManager::MonitorBotCVars(void)
|
|||||||
/* <36b780> ../cstrike/dlls/bot/cs_bot_manager.cpp:1109 */
|
/* <36b780> ../cstrike/dlls/bot/cs_bot_manager.cpp:1109 */
|
||||||
void CCSBotManager::ValidateMapData(void)
|
void CCSBotManager::ValidateMapData(void)
|
||||||
{
|
{
|
||||||
if (IMPLEMENT_ARRAY(m_isMapDataLoaded) || !UTIL_IsGame("czero"))
|
if (IMPL(m_isMapDataLoaded) || !UTIL_IsGame("czero"))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_ARRAY(m_isMapDataLoaded) = true;
|
IMPL(m_isMapDataLoaded) = true;
|
||||||
|
|
||||||
if (LoadNavigationMap())
|
if (LoadNavigationMap())
|
||||||
{
|
{
|
||||||
|
@ -149,23 +149,23 @@ public:
|
|||||||
void ValidateMapData(void);
|
void ValidateMapData(void);
|
||||||
bool IsLearningMap(void)
|
bool IsLearningMap(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(m_isLearningMap);
|
return IMPL(m_isLearningMap);
|
||||||
}
|
}
|
||||||
void SetLearningMapFlag(void)
|
void SetLearningMapFlag(void)
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY(m_isLearningMap) = true;
|
IMPL(m_isLearningMap) = true;
|
||||||
}
|
}
|
||||||
bool IsAnalysisRequested(void)
|
bool IsAnalysisRequested(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(m_isAnalysisRequested);
|
return IMPL(m_isAnalysisRequested);
|
||||||
}
|
}
|
||||||
void RequestAnalysis(void)
|
void RequestAnalysis(void)
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY(m_isAnalysisRequested) = true;
|
IMPL(m_isAnalysisRequested) = true;
|
||||||
}
|
}
|
||||||
void AckAnalysisRequest(void)
|
void AckAnalysisRequest(void)
|
||||||
{
|
{
|
||||||
IMPLEMENT_ARRAY(m_isAnalysisRequested) = false;
|
IMPL(m_isAnalysisRequested) = false;
|
||||||
}
|
}
|
||||||
static BotDifficultyType GetDifficultyLevel(void)
|
static BotDifficultyType GetDifficultyLevel(void)
|
||||||
{
|
{
|
||||||
@ -394,10 +394,10 @@ private:
|
|||||||
#else
|
#else
|
||||||
public:
|
public:
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
static float IMPLEMENT_ARRAY(m_flNextCVarCheck);
|
static float IMPL(m_flNextCVarCheck);
|
||||||
static bool IMPLEMENT_ARRAY(m_isMapDataLoaded);
|
static bool IMPL(m_isMapDataLoaded);
|
||||||
static bool IMPLEMENT_ARRAY(m_isLearningMap);
|
static bool IMPL(m_isLearningMap);
|
||||||
static bool IMPLEMENT_ARRAY(m_isAnalysisRequested);
|
static bool IMPL(m_isAnalysisRequested);
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
private:
|
private:
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
@ -422,7 +422,7 @@ private:
|
|||||||
#else
|
#else
|
||||||
public:
|
public:
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
static NavEditCmdType IMPLEMENT_ARRAY(m_editCmd);
|
static NavEditCmdType IMPL(m_editCmd);
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
private:
|
private:
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -52,11 +52,11 @@ TYPEDESCRIPTION CEnvSpark::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvGlobal, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CEnvGlobal, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMultiSource, m_SaveData)[4];
|
TYPEDESCRIPTION IMPL_CLASS(CMultiSource, m_SaveData)[4];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseButton, m_SaveData)[8];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseButton, m_SaveData)[8];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMomentaryRotButton, m_SaveData)[6];
|
TYPEDESCRIPTION IMPL_CLASS(CMomentaryRotButton, m_SaveData)[6];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvSpark, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CEnvSpark, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -333,29 +333,29 @@ void CBaseButton::__MAKE_VHOOK(Precache)(void)
|
|||||||
// get sentence group names, for doors which are directly 'touched' to open
|
// get sentence group names, for doors which are directly 'touched' to open
|
||||||
switch (m_bLockedSentence)
|
switch (m_bLockedSentence)
|
||||||
{
|
{
|
||||||
case 1: m_ls.sLockedSentence = MAKE_STRING("NA"); break; // access denied
|
case 1: m_ls.sLockedSentence = MAKE_STRING("NA"); break; // access denied
|
||||||
case 2: m_ls.sLockedSentence = MAKE_STRING("ND"); break; // security lockout
|
case 2: m_ls.sLockedSentence = MAKE_STRING("ND"); break; // security lockout
|
||||||
case 3: m_ls.sLockedSentence = MAKE_STRING("NF"); break; // blast door
|
case 3: m_ls.sLockedSentence = MAKE_STRING("NF"); break; // blast door
|
||||||
case 4: m_ls.sLockedSentence = MAKE_STRING("NFIRE"); break; // fire door
|
case 4: m_ls.sLockedSentence = MAKE_STRING("NFIRE"); break; // fire door
|
||||||
case 5: m_ls.sLockedSentence = MAKE_STRING("NCHEM"); break; // chemical door
|
case 5: m_ls.sLockedSentence = MAKE_STRING("NCHEM"); break; // chemical door
|
||||||
case 6: m_ls.sLockedSentence = MAKE_STRING("NRAD"); break; // radiation door
|
case 6: m_ls.sLockedSentence = MAKE_STRING("NRAD"); break; // radiation door
|
||||||
case 7: m_ls.sLockedSentence = MAKE_STRING("NCON"); break; // gen containment
|
case 7: m_ls.sLockedSentence = MAKE_STRING("NCON"); break; // gen containment
|
||||||
case 8: m_ls.sLockedSentence = MAKE_STRING("NH"); break; // maintenance door
|
case 8: m_ls.sLockedSentence = MAKE_STRING("NH"); break; // maintenance door
|
||||||
case 9: m_ls.sLockedSentence = MAKE_STRING("NG"); break; // broken door
|
case 9: m_ls.sLockedSentence = MAKE_STRING("NG"); break; // broken door
|
||||||
default: m_ls.sLockedSentence = 0; break;
|
default: m_ls.sLockedSentence = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (m_bUnlockedSentence)
|
switch (m_bUnlockedSentence)
|
||||||
{
|
{
|
||||||
case 1: m_ls.sUnlockedSentence = MAKE_STRING("EA"); break; // access granted
|
case 1: m_ls.sUnlockedSentence = MAKE_STRING("EA"); break; // access granted
|
||||||
case 2: m_ls.sUnlockedSentence = MAKE_STRING("ED"); break; // security door
|
case 2: m_ls.sUnlockedSentence = MAKE_STRING("ED"); break; // security door
|
||||||
case 3: m_ls.sUnlockedSentence = MAKE_STRING("EF"); break; // blast door
|
case 3: m_ls.sUnlockedSentence = MAKE_STRING("EF"); break; // blast door
|
||||||
case 4: m_ls.sUnlockedSentence = MAKE_STRING("EFIRE"); break; // fire door
|
case 4: m_ls.sUnlockedSentence = MAKE_STRING("EFIRE"); break; // fire door
|
||||||
case 5: m_ls.sUnlockedSentence = MAKE_STRING("ECHEM"); break; // chemical door
|
case 5: m_ls.sUnlockedSentence = MAKE_STRING("ECHEM"); break; // chemical door
|
||||||
case 6: m_ls.sUnlockedSentence = MAKE_STRING("ERAD"); break; // radiation door
|
case 6: m_ls.sUnlockedSentence = MAKE_STRING("ERAD"); break; // radiation door
|
||||||
case 7: m_ls.sUnlockedSentence = MAKE_STRING("ECON"); break; // gen containment
|
case 7: m_ls.sUnlockedSentence = MAKE_STRING("ECON"); break; // gen containment
|
||||||
case 8: m_ls.sUnlockedSentence = MAKE_STRING("EH"); break; // maintenance door
|
case 8: m_ls.sUnlockedSentence = MAKE_STRING("EH"); break; // maintenance door
|
||||||
default: m_ls.sUnlockedSentence = 0; break;
|
default: m_ls.sUnlockedSentence = 0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
string_t m_globalstate;
|
string_t m_globalstate;
|
||||||
@ -144,7 +144,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[6];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[6];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_lastUsed;
|
int m_lastUsed;
|
||||||
@ -182,7 +182,7 @@ public:
|
|||||||
void EXPORT SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT SparkStop(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_flDelay;
|
float m_flDelay;
|
||||||
|
@ -56,7 +56,6 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static CCareerTask *NewTask(const char *taskName, GameEventType event, const char *weaponName, int n, bool mustLive, bool crossRounds, int id, bool isComplete);
|
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);
|
void OnWeaponKill(int weaponId, int weaponClassId, bool headshot, bool killerHasShield, CBasePlayer *pAttacker, CBasePlayer *pVictim);
|
||||||
|
@ -7,61 +7,61 @@
|
|||||||
|
|
||||||
static DLL_FUNCTIONS gFunctionTable =
|
static DLL_FUNCTIONS gFunctionTable =
|
||||||
{
|
{
|
||||||
GameDLLInit,
|
&GameDLLInit,
|
||||||
DispatchSpawn,
|
&DispatchSpawn,
|
||||||
DispatchThink,
|
&DispatchThink,
|
||||||
DispatchUse,
|
&DispatchUse,
|
||||||
DispatchTouch,
|
&DispatchTouch,
|
||||||
DispatchBlocked,
|
&DispatchBlocked,
|
||||||
DispatchKeyValue,
|
&DispatchKeyValue,
|
||||||
DispatchSave,
|
&DispatchSave,
|
||||||
DispatchRestore,
|
&DispatchRestore,
|
||||||
DispatchObjectCollsionBox,
|
&DispatchObjectCollsionBox,
|
||||||
SaveWriteFields,
|
&SaveWriteFields,
|
||||||
SaveReadFields,
|
&SaveReadFields,
|
||||||
SaveGlobalState,
|
&SaveGlobalState,
|
||||||
RestoreGlobalState,
|
&RestoreGlobalState,
|
||||||
ResetGlobalState,
|
&ResetGlobalState,
|
||||||
ClientConnect,
|
&ClientConnect,
|
||||||
ClientDisconnect,
|
&ClientDisconnect,
|
||||||
ClientKill,
|
&ClientKill,
|
||||||
ClientPutInServer,
|
&ClientPutInServer,
|
||||||
ClientCommand,
|
&ClientCommand,
|
||||||
ClientUserInfoChanged,
|
&ClientUserInfoChanged,
|
||||||
ServerActivate,
|
&ServerActivate,
|
||||||
ServerDeactivate,
|
&ServerDeactivate,
|
||||||
PlayerPreThink,
|
&PlayerPreThink,
|
||||||
PlayerPostThink,
|
&PlayerPostThink,
|
||||||
StartFrame,
|
&StartFrame,
|
||||||
ParmsNewLevel,
|
&ParmsNewLevel,
|
||||||
ParmsChangeLevel,
|
&ParmsChangeLevel,
|
||||||
GetGameDescription,
|
&GetGameDescription,
|
||||||
PlayerCustomization,
|
&PlayerCustomization,
|
||||||
SpectatorConnect,
|
&SpectatorConnect,
|
||||||
SpectatorDisconnect,
|
&SpectatorDisconnect,
|
||||||
SpectatorThink,
|
&SpectatorThink,
|
||||||
Sys_Error,
|
&Sys_Error,
|
||||||
PM_Move,
|
&PM_Move,
|
||||||
PM_Init,
|
&PM_Init,
|
||||||
PM_FindTextureType,
|
&PM_FindTextureType,
|
||||||
SetupVisibility,
|
&SetupVisibility,
|
||||||
UpdateClientData,
|
&UpdateClientData,
|
||||||
AddToFullPack,
|
&AddToFullPack,
|
||||||
CreateBaseline,
|
&CreateBaseline,
|
||||||
RegisterEncoders,
|
&RegisterEncoders,
|
||||||
GetWeaponData,
|
&GetWeaponData,
|
||||||
CmdStart,
|
&CmdStart,
|
||||||
CmdEnd,
|
&CmdEnd,
|
||||||
ConnectionlessPacket,
|
&ConnectionlessPacket,
|
||||||
GetHullBounds,
|
&GetHullBounds,
|
||||||
CreateInstancedBaselines,
|
&CreateInstancedBaselines,
|
||||||
InconsistentFile,
|
&InconsistentFile,
|
||||||
AllowLagCompensation
|
&AllowLagCompensation
|
||||||
};
|
};
|
||||||
|
|
||||||
static NEW_DLL_FUNCTIONS gNewDLLFunctions
|
static NEW_DLL_FUNCTIONS gNewDLLFunctions
|
||||||
{
|
{
|
||||||
OnFreeEntPrivateData,
|
&OnFreeEntPrivateData,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
@ -83,7 +83,7 @@ BOOL gTouchDisabled = FALSE;
|
|||||||
|
|
||||||
DLL_FUNCTIONS gFunctionTable;
|
DLL_FUNCTIONS gFunctionTable;
|
||||||
NEW_DLL_FUNCTIONS gNewDLLFunctions;
|
NEW_DLL_FUNCTIONS gNewDLLFunctions;
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseEntity, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseEntity, m_SaveData)[5];
|
||||||
|
|
||||||
CMemoryPool hashItemMemPool;
|
CMemoryPool hashItemMemPool;
|
||||||
BOOL gTouchDisabled;
|
BOOL gTouchDisabled;
|
||||||
@ -428,7 +428,7 @@ C_DLLEXPORT int GetNewDLLFunctions(NEW_DLL_FUNCTIONS *pFunctionTable, int *inter
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <30ab0> ../cstrike/dlls/cbase.cpp:498 */
|
/* <30ab0> ../cstrike/dlls/cbase.cpp:498 */
|
||||||
int DispatchSpawn(edict_t *pent)
|
int EXT_FUNC DispatchSpawn(edict_t *pent)
|
||||||
{
|
{
|
||||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ int DispatchSpawn(edict_t *pent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2e8a0> ../cstrike/dlls/cbase.cpp:549 */
|
/* <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)
|
if (!pkvd || !pentKeyvalue)
|
||||||
return;
|
return;
|
||||||
@ -514,7 +514,7 @@ void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd)
|
|||||||
// while it builds the graph
|
// while it builds the graph
|
||||||
|
|
||||||
/* <2e7db> ../cstrike/dlls/cbase.cpp:574 */
|
/* <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)
|
if (gTouchDisabled)
|
||||||
return;
|
return;
|
||||||
@ -527,7 +527,7 @@ void DispatchTouch(edict_t *pentTouched, edict_t *pentOther)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2fa9b> ../cstrike/dlls/cbase.cpp:587 */
|
/* <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 *pEntity = (CBaseEntity *)GET_PRIVATE(pentUsed);
|
||||||
CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther);
|
CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther);
|
||||||
@ -539,7 +539,7 @@ void DispatchUse(edict_t *pentUsed, edict_t *pentOther)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2fb2f> ../cstrike/dlls/cbase.cpp:596 */
|
/* <2fb2f> ../cstrike/dlls/cbase.cpp:596 */
|
||||||
void DispatchThink(edict_t *pent)
|
void EXT_FUNC DispatchThink(edict_t *pent)
|
||||||
{
|
{
|
||||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||||
|
|
||||||
@ -555,7 +555,7 @@ void DispatchThink(edict_t *pent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2fb89> ../cstrike/dlls/cbase.cpp:612 */
|
/* <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 *pEntity = (CBaseEntity *)GET_PRIVATE(pentBlocked);
|
||||||
CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther);
|
CBaseEntity *pOther = (CBaseEntity *)GET_PRIVATE(pentOther);
|
||||||
@ -567,7 +567,7 @@ void DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2ff56> ../cstrike/dlls/cbase.cpp:621 */
|
/* <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);
|
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||||
|
|
||||||
@ -627,7 +627,7 @@ CBaseEntity *FindGlobalEntity(string_t classname, string_t globalname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <3179c> ../cstrike/dlls/cbase.cpp:673 */
|
/* <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);
|
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 */
|
/* <2fdcd> ../cstrike/dlls/cbase.cpp:776 */
|
||||||
void DispatchObjectCollsionBox(edict_t *pent)
|
void EXT_FUNC DispatchObjectCollsionBox(edict_t *pent)
|
||||||
{
|
{
|
||||||
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
CBaseEntity *pEntity = (CBaseEntity *)GET_PRIVATE(pent);
|
||||||
|
|
||||||
@ -756,14 +756,14 @@ void DispatchObjectCollsionBox(edict_t *pent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2fe94> ../cstrike/dlls/cbase.cpp:788 */
|
/* <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);
|
CSave saveHelper(pSaveData);
|
||||||
saveHelper.WriteFields(pname, pBaseData, pFields, fieldCount);
|
saveHelper.WriteFields(pname, pBaseData, pFields, fieldCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <30047> ../cstrike/dlls/cbase.cpp:795 */
|
/* <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);
|
CRestore restoreHelper(pSaveData);
|
||||||
restoreHelper.ReadFields(pname, pBaseData, pFields, fieldCount);
|
restoreHelper.ReadFields(pname, pBaseData, pFields, fieldCount);
|
||||||
@ -922,7 +922,7 @@ int CBaseEntity::__MAKE_VHOOK(Save)(CSave &save)
|
|||||||
{
|
{
|
||||||
if (save.WriteEntVars("ENTVARS", pev))
|
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;
|
return 0;
|
||||||
@ -937,7 +937,7 @@ int CBaseEntity::__MAKE_VHOOK(Restore)(CRestore &restore)
|
|||||||
|
|
||||||
if (status)
|
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))
|
if (pev->modelindex != 0 && !FStringNull(pev->model))
|
||||||
|
@ -177,10 +177,10 @@
|
|||||||
#define MS_MAX_TARGETS 32
|
#define MS_MAX_TARGETS 32
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define C_EXPORT _declspec(dllexport)
|
#define EXPORT _declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define C_EXPORT
|
#define EXPORT /**/
|
||||||
#endif
|
#endif // _WIN32
|
||||||
|
|
||||||
enum hash_types_e
|
enum hash_types_e
|
||||||
{
|
{
|
||||||
@ -230,16 +230,6 @@ typedef enum
|
|||||||
|
|
||||||
} TRAIN_CODE;
|
} 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 CGrenade;
|
||||||
class CBaseEntity;
|
class CBaseEntity;
|
||||||
class CBaseMonster;
|
class CBaseMonster;
|
||||||
@ -566,7 +556,7 @@ public:
|
|||||||
CBaseEntity *m_pGoalEnt;
|
CBaseEntity *m_pGoalEnt;
|
||||||
CBaseEntity *m_pLink;
|
CBaseEntity *m_pLink;
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
void (CBaseEntity::*m_pfnThink)(void);
|
void (CBaseEntity::*m_pfnThink)(void);
|
||||||
//int m_pfnThink_Flag;
|
//int m_pfnThink_Flag;
|
||||||
@ -669,7 +659,7 @@ public:
|
|||||||
void EXPORT Register(void);
|
void EXPORT Register(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||||
|
|
||||||
EHANDLE m_rgEntities[MS_MAX_TARGETS];
|
EHANDLE m_rgEntities[MS_MAX_TARGETS];
|
||||||
int m_rgTriggered[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 SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value);
|
||||||
void EXPORT DelayThink(void);
|
void EXPORT DelayThink(void);
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
float m_flDelay;
|
float m_flDelay;
|
||||||
int m_iszKillTarget;
|
int m_iszKillTarget;
|
||||||
@ -742,7 +732,7 @@ public:
|
|||||||
int ExtractBbox(int sequence, float *mins, float *maxs);
|
int ExtractBbox(int sequence, float *mins, float *maxs);
|
||||||
void SetSequenceBox(void);
|
void SetSequenceBox(void);
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
float m_flFrameRate;
|
float m_flFrameRate;
|
||||||
float m_flGroundSpeed;
|
float m_flGroundSpeed;
|
||||||
@ -788,7 +778,7 @@ public:
|
|||||||
static float AxisDelta(int flags, const Vector &angle1, const Vector &angle2);
|
static float AxisDelta(int flags, const Vector &angle1, const Vector &angle2);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[19];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[19];
|
||||||
|
|
||||||
TOGGLE_STATE m_toggle_state;
|
TOGGLE_STATE m_toggle_state;
|
||||||
float m_flActivateFinished;
|
float m_flActivateFinished;
|
||||||
@ -870,7 +860,7 @@ public:
|
|||||||
BUTTON_CODE ButtonResponseToTouch(void);
|
BUTTON_CODE ButtonResponseToTouch(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[8];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[8];
|
||||||
|
|
||||||
BOOL m_fStayPushed;
|
BOOL m_fStayPushed;
|
||||||
BOOL m_fRotating;
|
BOOL m_fRotating;
|
||||||
|
@ -75,7 +75,7 @@ int g_serveractive;
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
PLAYERPVSSTATUS g_PVSStatus[32];
|
PLAYERPVSSTATUS g_PVSStatus[MAX_CLIENTS];
|
||||||
unsigned short m_usResetDecals;
|
unsigned short m_usResetDecals;
|
||||||
unsigned short g_iShadowSprite;
|
unsigned short g_iShadowSprite;
|
||||||
|
|
||||||
@ -154,13 +154,13 @@ void BlinkAccount(CBasePlayer *player, int numBlinks)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <47efd> ../cstrike/dlls/client.cpp:236 */
|
/* <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);
|
return g_pGameRules->ClientConnected(pEntity, pszName, pszAddress, szRejectReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <47f5b> ../cstrike/dlls/client.cpp:255 */
|
/* <47f5b> ../cstrike/dlls/client.cpp:255 */
|
||||||
void ClientDisconnect(edict_t *pEntity)
|
void EXT_FUNC ClientDisconnect(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
CBasePlayer *pPlayer = (CBasePlayer *)CBaseEntity::Instance(pEntity);
|
CBasePlayer *pPlayer = (CBasePlayer *)CBaseEntity::Instance(pEntity);
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ void respawn(entvars_t *pev, BOOL fCopyCorpse)
|
|||||||
// Suicide...
|
// Suicide...
|
||||||
|
|
||||||
/* <48013> ../cstrike/dlls/client.cpp:347 */
|
/* <48013> ../cstrike/dlls/client.cpp:347 */
|
||||||
void ClientKill(edict_t *pEntity)
|
void EXT_FUNC ClientKill(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
entvars_t *pev = &pEntity->v;
|
entvars_t *pev = &pEntity->v;
|
||||||
CHalfLifeMultiplay *mp = g_pGameRules;
|
CHalfLifeMultiplay *mp = g_pGameRules;
|
||||||
@ -496,7 +496,7 @@ void CheckStartMoney(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4c084> ../cstrike/dlls/client.cpp:661 */
|
/* <4c084> ../cstrike/dlls/client.cpp:661 */
|
||||||
void ClientPutInServer(edict_t *pEntity)
|
void EXT_FUNC ClientPutInServer(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
entvars_t *pev = &pEntity->v;
|
entvars_t *pev = &pEntity->v;
|
||||||
CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)pev);
|
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.
|
// Use CMD_ARGV, CMD_ARGV, and CMD_ARGC to get pointers the character string command.
|
||||||
|
|
||||||
/* <4c6c1> ../cstrike/dlls/client.cpp:3234 */
|
/* <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 *pcmd = CMD_ARGV_(0);
|
||||||
const char *pstr = NULL;
|
const char *pstr = NULL;
|
||||||
@ -3854,7 +3854,7 @@ void ClientCommand(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4b959> ../cstrike/dlls/client.cpp:4282 */
|
/* <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?
|
// Is the client spawned yet?
|
||||||
if (!pEntity->pvPrivateData)
|
if (!pEntity->pvPrivateData)
|
||||||
@ -3919,7 +3919,7 @@ void ClientUserInfoChanged(edict_t *pEntity, char *infobuffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a378> ../cstrike/dlls/client.cpp:4362 */
|
/* <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
|
// 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
|
// Therefore, only run it one time for each call to ServerActivate
|
||||||
@ -3946,7 +3946,7 @@ void ServerDeactivate(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a392> ../cstrike/dlls/client.cpp:4400 */
|
/* <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;
|
int i;
|
||||||
CBaseEntity *pClass;
|
CBaseEntity *pClass;
|
||||||
@ -4000,7 +4000,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a404> ../cstrike/dlls/client.cpp:4459 */
|
/* <4a404> ../cstrike/dlls/client.cpp:4459 */
|
||||||
void PlayerPreThink(edict_t *pEntity)
|
void EXT_FUNC PlayerPreThink(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
entvars_t *pev = &pEntity->v;
|
entvars_t *pev = &pEntity->v;
|
||||||
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
||||||
@ -4012,7 +4012,7 @@ void PlayerPreThink(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a47c> ../cstrike/dlls/client.cpp:4475 */
|
/* <4a47c> ../cstrike/dlls/client.cpp:4475 */
|
||||||
void PlayerPostThink(edict_t *pEntity)
|
void EXT_FUNC PlayerPostThink(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
entvars_t *pev = &pEntity->v;
|
entvars_t *pev = &pEntity->v;
|
||||||
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
||||||
@ -4024,13 +4024,13 @@ void PlayerPostThink(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a4f4> ../cstrike/dlls/client.cpp:4486 */
|
/* <4a4f4> ../cstrike/dlls/client.cpp:4486 */
|
||||||
void ParmsNewLevel(void)
|
void EXT_FUNC ParmsNewLevel(void)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <4a50d> ../cstrike/dlls/client.cpp:4491 */
|
/* <4a50d> ../cstrike/dlls/client.cpp:4491 */
|
||||||
void ParmsChangeLevel(void)
|
void EXT_FUNC ParmsChangeLevel(void)
|
||||||
{
|
{
|
||||||
// retrieve the pointer to the save data
|
// retrieve the pointer to the save data
|
||||||
SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData;
|
SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData;
|
||||||
@ -4042,7 +4042,7 @@ void ParmsChangeLevel(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a548> ../cstrike/dlls/client.cpp:4504 */
|
/* <4a548> ../cstrike/dlls/client.cpp:4504 */
|
||||||
void StartFrame(void)
|
void EXT_FUNC StartFrame(void)
|
||||||
{
|
{
|
||||||
if (g_pGameRules != NULL)
|
if (g_pGameRules != NULL)
|
||||||
{
|
{
|
||||||
@ -4495,7 +4495,7 @@ void ClientPrecache(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a6e5> ../cstrike/dlls/client.cpp:4996 */
|
/* <4a6e5> ../cstrike/dlls/client.cpp:4996 */
|
||||||
const char *GetGameDescription(void)
|
const char *EXT_FUNC GetGameDescription(void)
|
||||||
{
|
{
|
||||||
if (UTIL_IsGame("czero"))
|
if (UTIL_IsGame("czero"))
|
||||||
return "Condition Zero";
|
return "Condition Zero";
|
||||||
@ -4504,13 +4504,13 @@ const char *GetGameDescription(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a703> ../cstrike/dlls/client.cpp:5022 */
|
/* <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 */
|
/* <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);
|
CBasePlayer *pPlayer = (CBasePlayer *)GET_PRIVATE(pEntity);
|
||||||
|
|
||||||
@ -4528,21 +4528,21 @@ void PlayerCustomization(edict_t *pEntity, customization_t *pCust)
|
|||||||
|
|
||||||
switch (pCust->resource.type)
|
switch (pCust->resource.type)
|
||||||
{
|
{
|
||||||
case t_decal:
|
case t_decal:
|
||||||
pPlayer->SetCustomDecalFrames(pCust->nUserData2);
|
pPlayer->SetCustomDecalFrames(pCust->nUserData2);
|
||||||
break;
|
break;
|
||||||
case t_sound:
|
case t_sound:
|
||||||
case t_skin:
|
case t_skin:
|
||||||
case t_model:
|
case t_model:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ALERT(at_console, "PlayerCustomization: Unknown customization type!\n");
|
ALERT(at_console, "PlayerCustomization: Unknown customization type!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <4a7b9> ../cstrike/dlls/client.cpp:5079 */
|
/* <4a7b9> ../cstrike/dlls/client.cpp:5079 */
|
||||||
void SpectatorConnect(edict_t *pEntity)
|
void EXT_FUNC SpectatorConnect(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
||||||
|
|
||||||
@ -4553,7 +4553,7 @@ void SpectatorConnect(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a83d> ../cstrike/dlls/client.cpp:5095 */
|
/* <4a83d> ../cstrike/dlls/client.cpp:5095 */
|
||||||
void SpectatorDisconnect(edict_t *pEntity)
|
void EXT_FUNC SpectatorDisconnect(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
||||||
|
|
||||||
@ -4564,7 +4564,7 @@ void SpectatorDisconnect(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a8b5> ../cstrike/dlls/client.cpp:5111 */
|
/* <4a8b5> ../cstrike/dlls/client.cpp:5111 */
|
||||||
void SpectatorThink(edict_t *pEntity)
|
void EXT_FUNC SpectatorThink(edict_t *pEntity)
|
||||||
{
|
{
|
||||||
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
CBaseSpectator *pPlayer = (CBaseSpectator *)GET_PRIVATE(pEntity);
|
||||||
|
|
||||||
@ -4575,7 +4575,7 @@ void SpectatorThink(edict_t *pEntity)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4a92d> ../cstrike/dlls/client.cpp:5160 */
|
/* <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;
|
edict_t *pView = pClient;
|
||||||
|
|
||||||
@ -4673,7 +4673,7 @@ bool CheckEntityRecentlyInPVS(int clientnum, int entitynum, float currenttime)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4ac57> ../cstrike/dlls/client.cpp:5312 */
|
/* <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)
|
if ((ent->v.effects & EF_NODRAW) == EF_NODRAW && ent != host)
|
||||||
return 0;
|
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.
|
// Creates baselines used for network encoding, especially for player data since players are not spawned until connect time.
|
||||||
|
|
||||||
/* <4aef3> ../cstrike/dlls/client.cpp:5516 */
|
/* <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->origin = entity->v.origin;
|
||||||
baseline->angles = entity->v.angles;
|
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 */
|
/* <4b08a> ../cstrike/dlls/client.cpp:5811 */
|
||||||
void RegisterEncoders(void)
|
void EXT_FUNC RegisterEncoders(void)
|
||||||
{
|
{
|
||||||
DELTA_ADDENCODER("Entity_Encode", Entity_Encode);
|
DELTA_ADDENCODER("Entity_Encode", Entity_Encode);
|
||||||
DELTA_ADDENCODER("Custom_Encode", Custom_Encode);
|
DELTA_ADDENCODER("Custom_Encode", Custom_Encode);
|
||||||
@ -5043,7 +5043,7 @@ void RegisterEncoders(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4b0a4> ../cstrike/dlls/client.cpp:5818 */
|
/* <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;
|
entvars_t *pev = &player->v;
|
||||||
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
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 */
|
/* <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)
|
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 */
|
/* <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;
|
entvars_t *pev = (entvars_t *)&player->v;
|
||||||
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
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 */
|
/* <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;
|
entvars_t *pev = (entvars_t *)&player->v;
|
||||||
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
CBasePlayer *pl = reinterpret_cast<CBasePlayer *>(CBasePlayer::Instance(pev));
|
||||||
@ -5254,7 +5254,7 @@ void CmdEnd(const edict_t *player)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4b644> ../cstrike/dlls/client.cpp:6101 */
|
/* <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
|
// Parse stuff from args
|
||||||
int max_buffer_size = *response_buffer_size;
|
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 */
|
/* <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;
|
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. )
|
// to be created during play ( e.g., grenades, ammo packs, projectiles, corpses, etc. )
|
||||||
|
|
||||||
/* <4b733> ../cstrike/dlls/client.cpp:6156 */
|
/* <4b733> ../cstrike/dlls/client.cpp:6156 */
|
||||||
void CreateInstancedBaselines(void)
|
void EXT_FUNC CreateInstancedBaselines(void)
|
||||||
{
|
{
|
||||||
int iret = 0;
|
int iret = 0;
|
||||||
entity_state_t state;
|
entity_state_t state;
|
||||||
@ -5293,7 +5293,7 @@ void CreateInstancedBaselines(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4b77c> ../cstrike/dlls/client.cpp:6179 */
|
/* <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?
|
// Server doesn't care?
|
||||||
if (CVAR_GET_FLOAT("mp_consistency") != 1)
|
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.
|
// if you want.
|
||||||
|
|
||||||
/* <4b7cf> ../cstrike/dlls/client.cpp:6204 */
|
/* <4b7cf> ../cstrike/dlls/client.cpp:6204 */
|
||||||
int AllowLagCompensation(void)
|
int EXT_FUNC AllowLagCompensation(void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -299,7 +299,7 @@ void CBaseMonster::__MAKE_VHOOK(GibMonster)(void)
|
|||||||
// anim to play.
|
// anim to play.
|
||||||
|
|
||||||
/* <5f65e> ../cstrike/dlls/combat.cpp:355 */
|
/* <5f65e> ../cstrike/dlls/combat.cpp:355 */
|
||||||
NOXREF Activity CBaseMonster::__MAKE_VHOOK(GetDeathActivity)(void)
|
Activity CBaseMonster::__MAKE_VHOOK(GetDeathActivity)(void)
|
||||||
{
|
{
|
||||||
Activity deathActivity;
|
Activity deathActivity;
|
||||||
BOOL fTriedDirection;
|
BOOL fTriedDirection;
|
||||||
|
@ -23,8 +23,8 @@ TYPEDESCRIPTION CMomentaryDoor::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseDoor, m_SaveData)[7];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseDoor, m_SaveData)[7];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMomentaryDoor, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CMomentaryDoor, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -408,29 +408,29 @@ void CBaseDoor::__MAKE_VHOOK(Precache)(void)
|
|||||||
// get sentence group names, for doors which are directly 'touched' to open
|
// get sentence group names, for doors which are directly 'touched' to open
|
||||||
switch (m_bLockedSentence)
|
switch (m_bLockedSentence)
|
||||||
{
|
{
|
||||||
case 1: m_ls.sLockedSentence = ALLOC_STRING("NA"); break; // access denied
|
case 1: m_ls.sLockedSentence = ALLOC_STRING("NA"); break; // access denied
|
||||||
case 2: m_ls.sLockedSentence = ALLOC_STRING("ND"); break; // security lockout
|
case 2: m_ls.sLockedSentence = ALLOC_STRING("ND"); break; // security lockout
|
||||||
case 3: m_ls.sLockedSentence = ALLOC_STRING("NF"); break; // blast door
|
case 3: m_ls.sLockedSentence = ALLOC_STRING("NF"); break; // blast door
|
||||||
case 4: m_ls.sLockedSentence = ALLOC_STRING("NFIRE"); break; // fire door
|
case 4: m_ls.sLockedSentence = ALLOC_STRING("NFIRE"); break; // fire door
|
||||||
case 5: m_ls.sLockedSentence = ALLOC_STRING("NCHEM"); break; // chemical door
|
case 5: m_ls.sLockedSentence = ALLOC_STRING("NCHEM"); break; // chemical door
|
||||||
case 6: m_ls.sLockedSentence = ALLOC_STRING("NRAD"); break; // radiation door
|
case 6: m_ls.sLockedSentence = ALLOC_STRING("NRAD"); break; // radiation door
|
||||||
case 7: m_ls.sLockedSentence = ALLOC_STRING("NCON"); break; // gen containment
|
case 7: m_ls.sLockedSentence = ALLOC_STRING("NCON"); break; // gen containment
|
||||||
case 8: m_ls.sLockedSentence = ALLOC_STRING("NH"); break; // maintenance door
|
case 8: m_ls.sLockedSentence = ALLOC_STRING("NH"); break; // maintenance door
|
||||||
case 9: m_ls.sLockedSentence = ALLOC_STRING("NG"); break; // broken door
|
case 9: m_ls.sLockedSentence = ALLOC_STRING("NG"); break; // broken door
|
||||||
default: m_ls.sLockedSentence = 0; break;
|
default: m_ls.sLockedSentence = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (m_bUnlockedSentence)
|
switch (m_bUnlockedSentence)
|
||||||
{
|
{
|
||||||
case 1: m_ls.sUnlockedSentence = ALLOC_STRING("EA"); break; // access granted
|
case 1: m_ls.sUnlockedSentence = ALLOC_STRING("EA"); break; // access granted
|
||||||
case 2: m_ls.sUnlockedSentence = ALLOC_STRING("ED"); break; // security door
|
case 2: m_ls.sUnlockedSentence = ALLOC_STRING("ED"); break; // security door
|
||||||
case 3: m_ls.sUnlockedSentence = ALLOC_STRING("EF"); break; // blast door
|
case 3: m_ls.sUnlockedSentence = ALLOC_STRING("EF"); break; // blast door
|
||||||
case 4: m_ls.sUnlockedSentence = ALLOC_STRING("EFIRE"); break; // fire door
|
case 4: m_ls.sUnlockedSentence = ALLOC_STRING("EFIRE"); break; // fire door
|
||||||
case 5: m_ls.sUnlockedSentence = ALLOC_STRING("ECHEM"); break; // chemical door
|
case 5: m_ls.sUnlockedSentence = ALLOC_STRING("ECHEM"); break; // chemical door
|
||||||
case 6: m_ls.sUnlockedSentence = ALLOC_STRING("ERAD"); break; // radiation door
|
case 6: m_ls.sUnlockedSentence = ALLOC_STRING("ERAD"); break; // radiation door
|
||||||
case 7: m_ls.sUnlockedSentence = ALLOC_STRING("ECON"); break; // gen containment
|
case 7: m_ls.sUnlockedSentence = ALLOC_STRING("ECON"); break; // gen containment
|
||||||
case 8: m_ls.sUnlockedSentence = ALLOC_STRING("EH"); break; // maintenance door
|
case 8: m_ls.sUnlockedSentence = ALLOC_STRING("EH"); break; // maintenance door
|
||||||
default: m_ls.sUnlockedSentence = 0; break;
|
default: m_ls.sUnlockedSentence = 0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[7];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// used to selectivly override defaults
|
// used to selectivly override defaults
|
||||||
@ -157,7 +157,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BYTE m_bMoveSnd; // sound a door makes while moving
|
BYTE m_bMoveSnd; // sound a door makes while moving
|
||||||
|
@ -61,12 +61,12 @@ TYPEDESCRIPTION CGibShooter::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBubbling, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CBubbling, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLightning, m_SaveData)[13];
|
TYPEDESCRIPTION IMPL_CLASS(CLightning, m_SaveData)[13];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLaser, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CLaser, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGlow, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CGlow, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CSprite, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CSprite, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGibShooter, m_SaveData)[7];
|
TYPEDESCRIPTION IMPL_CLASS(CGibShooter, m_SaveData)[7];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ public:
|
|||||||
void EXPORT AnimateUntilDead(void);
|
void EXPORT AnimateUntilDead(void);
|
||||||
static CSprite *SpriteCreate(const char *pSpriteName, const Vector &origin, BOOL animate);
|
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:
|
private:
|
||||||
|
|
||||||
@ -356,7 +356,7 @@ public:
|
|||||||
void EXPORT StrikeThink(void);
|
void EXPORT StrikeThink(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSprite *m_pSprite;
|
CSprite *m_pSprite;
|
||||||
@ -395,7 +395,7 @@ public:
|
|||||||
void EXPORT FizzThink(void);
|
void EXPORT FizzThink(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_density;
|
int m_density;
|
||||||
@ -447,7 +447,7 @@ public:
|
|||||||
void BeamUpdateVars(void);
|
void BeamUpdateVars(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[13];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[13];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_active;
|
int m_active;
|
||||||
@ -486,7 +486,7 @@ public:
|
|||||||
|
|
||||||
void Animate(float frames);
|
void Animate(float frames);
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_lastTime;
|
float m_lastTime;
|
||||||
@ -542,7 +542,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
void EXPORT ShootThink(void);
|
void EXPORT ShootThink(void);
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[7];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_iGibs;
|
int m_iGibs;
|
||||||
|
@ -13,7 +13,7 @@ TYPEDESCRIPTION CEnvExplosion::m_SaveData[] =
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvExplosion, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CEnvExplosion, m_SaveData)[2];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
void EXPORT Smoke(void);
|
void EXPORT Smoke(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_iMagnitude;
|
int m_iMagnitude;
|
||||||
|
@ -32,11 +32,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#pragma warning(disable:4244) // int or float down-conversion
|
#pragma warning(disable:4244) // int or float down-conversion
|
||||||
//#pragma warning(disable:4305) // int or float data truncation
|
#pragma warning(disable:4305) // int or float data truncation
|
||||||
//#pragma warning(disable:4201) // nameless struct/union
|
#pragma warning(disable:4201) // nameless struct/union
|
||||||
//#pragma warning(disable:4514) // unreferenced inline function removed
|
#pragma warning(disable:4514) // unreferenced inline function removed
|
||||||
//#pragma warning(disable:4100) // unreferenced formal parameter
|
#pragma warning(disable:4100) // unreferenced formal parameter
|
||||||
|
|
||||||
#include "archtypes.h"
|
#include "archtypes.h"
|
||||||
|
|
||||||
|
@ -116,8 +116,8 @@ const char *(*CBreakable::ppSoundsGlass)[3];
|
|||||||
|
|
||||||
char *(*CPushable::pm_soundNames)[3];
|
char *(*CPushable::pm_soundNames)[3];
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBreakable, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CBreakable, m_SaveData)[5];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPushable, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CPushable, m_SaveData)[2];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ public:
|
|||||||
static const char *pSoundsConcrete[3];
|
static const char *pSoundsConcrete[3];
|
||||||
static const char *pSpawnObjects[32];
|
static const char *pSpawnObjects[32];
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Materials m_Material;
|
Materials m_Material;
|
||||||
@ -213,7 +213,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static char *m_soundNames[3];
|
static char *m_soundNames[3];
|
||||||
|
@ -57,9 +57,9 @@ static Vector gTankSpread[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTank, m_SaveData)[26];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncTank, m_SaveData)[26];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTankLaser, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncTankLaser, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTankControls, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncTankControls, m_SaveData)[1];
|
||||||
Vector gTankSpread[5];
|
Vector gTankSpread[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
@ -131,7 +131,7 @@ public:
|
|||||||
void ControllerPostFrame(void);
|
void ControllerPostFrame(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[26];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[26];
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CBasePlayer *m_pController;
|
CBasePlayer *m_pController;
|
||||||
@ -209,7 +209,7 @@ public:
|
|||||||
CLaser *GetLaser(void);
|
CLaser *GetLaser(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CLaser *m_pLaser;
|
CLaser *m_pLaser;
|
||||||
@ -274,7 +274,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CFuncTank *m_pTank;
|
CFuncTank *m_pTank;
|
||||||
|
@ -404,7 +404,7 @@ cvar_t sk_scientist_heal3;
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
/* <9c900> ../cstrike/dlls/game.cpp:500 */
|
/* <9c900> ../cstrike/dlls/game.cpp:500 */
|
||||||
void GameDLLInit(void)
|
void EXT_FUNC GameDLLInit(void)
|
||||||
{
|
{
|
||||||
g_psv_gravity = CVAR_GET_POINTER("sv_gravity");
|
g_psv_gravity = CVAR_GET_POINTER("sv_gravity");
|
||||||
g_psv_aim = CVAR_GET_POINTER("sv_aim");
|
g_psv_aim = CVAR_GET_POINTER("sv_aim");
|
||||||
|
@ -26,7 +26,7 @@ TYPEDESCRIPTION CGrenade::m_SaveData[] =
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGrenade, m_SaveData)[15];
|
TYPEDESCRIPTION IMPL_CLASS(CGrenade, m_SaveData)[15];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CRecharge::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRecharge, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CRecharge, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
void EXPORT Recharge(void);
|
void EXPORT Recharge(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
float m_flNextCharge;
|
float m_flNextCharge;
|
||||||
int m_iReactivate;
|
int m_iReactivate;
|
||||||
|
@ -24,9 +24,9 @@ TYPEDESCRIPTION CWreckage::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CCycler, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CCycler, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CCyclerSprite, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CCyclerSprite, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWreckage, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CWreckage, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax);
|
void GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
int m_animate;
|
int m_animate;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
|
|
||||||
int m_animate;
|
int m_animate;
|
||||||
float m_lastTime;
|
float m_lastTime;
|
||||||
@ -212,7 +212,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
int m_flStartTime;
|
int m_flStartTime;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ globalvars_t *gpGlobals;
|
|||||||
// do some setup operations here.
|
// do some setup operations here.
|
||||||
|
|
||||||
/* <d0737> ../cstrike/dlls/h_export.cpp:58 */
|
/* <d0737> ../cstrike/dlls/h_export.cpp:58 */
|
||||||
C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable,globalvars_t *pGlobals)
|
C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable, globalvars_t *pGlobals)
|
||||||
{
|
{
|
||||||
Q_memcpy(&g_engfuncs, pEnginefuncsTable, sizeof(enginefuncs_t));
|
Q_memcpy(&g_engfuncs, pEnginefuncsTable, sizeof(enginefuncs_t));
|
||||||
gpGlobals = pGlobals;
|
gpGlobals = pGlobals;
|
||||||
|
@ -44,7 +44,7 @@ extern globalvars_t *gpGlobals;
|
|||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
|
||||||
C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable,globalvars_t *pGlobals);
|
C_DLLEXPORT void WINAPI GiveFnptrsToDll(enginefuncs_t *pEnginefuncsTable, globalvars_t *pGlobals);
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ TYPEDESCRIPTION CWallHealth::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWallHealth, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CWallHealth, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ public:
|
|||||||
void EXPORT Off(void);
|
void EXPORT Off(void);
|
||||||
void EXPORT Recharge(void);
|
void EXPORT Recharge(void);
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_flNextCharge;
|
float m_flNextCharge;
|
||||||
|
@ -810,7 +810,7 @@ void CHostage::GiveCTTouchBonus(CBasePlayer *pPlayer)
|
|||||||
/* <45bf69> ../cstrike/dlls/hostage/hostage.cpp:869 */
|
/* <45bf69> ../cstrike/dlls/hostage/hostage.cpp:869 */
|
||||||
int CHostage::__MAKE_VHOOK(ObjectCaps)(void)
|
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 */
|
/* <45c0e3> ../cstrike/dlls/hostage/hostage.cpp:876 */
|
||||||
|
@ -320,24 +320,20 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool ForEachHostage(T &func)
|
bool ForEachHostage(T &func) const
|
||||||
{
|
{
|
||||||
UNTESTED
|
|
||||||
|
|
||||||
for (int i = 0; i < m_hostageCount; i++)
|
for (int i = 0; i < m_hostageCount; i++)
|
||||||
{
|
{
|
||||||
CHostage *pHostage = m_hostage[ i ];
|
CHostage *pHostage = m_hostage[ i ];
|
||||||
|
|
||||||
if (pHostage->deadflag != DEAD_NO || pHostage->takedamage != DAMAGE_YES)
|
if (pHostage->pev->deadflag == DEAD_DEAD)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!pHostage->m_improv)
|
if (func(pHostage) == false)
|
||||||
break;
|
return false;
|
||||||
|
|
||||||
if (func(pHostage))
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -13,7 +13,7 @@ TYPEDESCRIPTION CLight::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CLight, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CLight, m_SaveData)[2];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_iStyle;
|
int m_iStyle;
|
||||||
|
@ -27,9 +27,9 @@ TYPEDESCRIPTION CGamePlayerZone::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRuleEntity, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CRuleEntity, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGameText, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CGameText, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGamePlayerZone, m_SaveData)[4];
|
TYPEDESCRIPTION IMPL_CLASS(CGamePlayerZone, m_SaveData)[4];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -32,30 +32,30 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX_EQUIP 32
|
#define MAX_EQUIP 32
|
||||||
#define SF_SCORE_NEGATIVE 0x0001
|
#define SF_SCORE_NEGATIVE 0x0001
|
||||||
#define SF_SCORE_TEAM 0x0002
|
#define SF_SCORE_TEAM 0x0002
|
||||||
|
|
||||||
#define SF_ENVTEXT_ALLPLAYERS 0x0001
|
#define SF_ENVTEXT_ALLPLAYERS 0x0001
|
||||||
|
|
||||||
#define SF_TEAMMASTER_FIREONCE 0x0001
|
#define SF_TEAMMASTER_FIREONCE 0x0001
|
||||||
#define SF_TEAMMASTER_ANYTEAM 0x0002
|
#define SF_TEAMMASTER_ANYTEAM 0x0002
|
||||||
|
|
||||||
#define SF_TEAMSET_FIREONCE 0x0001
|
#define SF_TEAMSET_FIREONCE 0x0001
|
||||||
#define SF_TEAMSET_CLEARTEAM 0x0002
|
#define SF_TEAMSET_CLEARTEAM 0x0002
|
||||||
|
|
||||||
#define SF_PKILL_FIREONCE 0x0001
|
#define SF_PKILL_FIREONCE 0x0001
|
||||||
|
|
||||||
#define SF_GAMECOUNT_FIREONCE 0x0001
|
#define SF_GAMECOUNT_FIREONCE 0x0001
|
||||||
#define SF_GAMECOUNT_RESET 0x0002
|
#define SF_GAMECOUNT_RESET 0x0002
|
||||||
|
|
||||||
#define SF_GAMECOUNTSET_FIREONCE 0x0001
|
#define SF_GAMECOUNTSET_FIREONCE 0x0001
|
||||||
|
|
||||||
#define SF_PLAYEREQUIP_USEONLY 0x0001
|
#define SF_PLAYEREQUIP_USEONLY 0x0001
|
||||||
|
|
||||||
#define SF_PTEAM_FIREONCE 0x0001
|
#define SF_PTEAM_FIREONCE 0x0001
|
||||||
#define SF_PTEAM_KILL 0x0002
|
#define SF_PTEAM_KILL 0x0002
|
||||||
#define SF_PTEAM_GIB 0x0004
|
#define SF_PTEAM_GIB 0x0004
|
||||||
|
|
||||||
/* <edff5> ../cstrike/dlls/maprules.cpp:34 */
|
/* <edff5> ../cstrike/dlls/maprules.cpp:34 */
|
||||||
class CRuleEntity: public CBaseEntity
|
class CRuleEntity: public CBaseEntity
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
void SetMaster(int iszMaster)
|
void SetMaster(int iszMaster)
|
||||||
{
|
{
|
||||||
@ -216,7 +216,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
hudtextparms_t m_textParms;
|
hudtextparms_t m_textParms;
|
||||||
@ -321,7 +321,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string_t m_iszInTarget;
|
string_t m_iszInTarget;
|
||||||
|
@ -66,18 +66,18 @@
|
|||||||
#define R_NM 3 // (NEMESIS) A monster Will ALWAYS attack its nemsis, no matter what
|
#define R_NM 3 // (NEMESIS) A monster Will ALWAYS attack its nemsis, no matter what
|
||||||
|
|
||||||
#define MEMORY_CLEAR 0
|
#define MEMORY_CLEAR 0
|
||||||
#define bits_MEMORY_PROVOKED (1<<0) // right now only used for houndeyes.
|
#define bits_MEMORY_PROVOKED (1 << 0) // right now only used for houndeyes.
|
||||||
#define bits_MEMORY_INCOVER (1<<1) // monster knows it is in a covered position.
|
#define bits_MEMORY_INCOVER (1 << 1) // monster knows it is in a covered position.
|
||||||
#define bits_MEMORY_SUSPICIOUS (1<<2) // Ally is suspicious of the player, and will move to provoked more easily
|
#define bits_MEMORY_SUSPICIOUS (1 << 2) // Ally is suspicious of the player, and will move to provoked more easily
|
||||||
#define bits_MEMORY_PATH_FINISHED (1<<3) // Finished monster path (just used by big momma for now)
|
#define bits_MEMORY_PATH_FINISHED (1 << 3) // Finished monster path (just used by big momma for now)
|
||||||
#define bits_MEMORY_ON_PATH (1<<4) // Moving on a path
|
#define bits_MEMORY_ON_PATH (1 << 4) // Moving on a path
|
||||||
#define bits_MEMORY_MOVE_FAILED (1<<5) // Movement has already failed
|
#define bits_MEMORY_MOVE_FAILED (1 << 5) // Movement has already failed
|
||||||
#define bits_MEMORY_FLINCHED (1<<6) // Has already flinched
|
#define bits_MEMORY_FLINCHED (1 << 6) // Has already flinched
|
||||||
#define bits_MEMORY_KILLED (1<<7) // HACKHACK -- remember that I've already called my Killed()
|
#define bits_MEMORY_KILLED (1 << 7) // HACKHACK -- remember that I've already called my Killed()
|
||||||
#define bits_MEMORY_CUSTOM4 (1<<28) // Monster-specific memory
|
#define bits_MEMORY_CUSTOM4 (1 << 28) // Monster-specific memory
|
||||||
#define bits_MEMORY_CUSTOM3 (1<<29) // Monster-specific memory
|
#define bits_MEMORY_CUSTOM3 (1 << 29) // Monster-specific memory
|
||||||
#define bits_MEMORY_CUSTOM2 (1<<30) // Monster-specific memory
|
#define bits_MEMORY_CUSTOM2 (1 << 30) // Monster-specific memory
|
||||||
#define bits_MEMORY_CUSTOM1 (1<<31) // Monster-specific memory
|
#define bits_MEMORY_CUSTOM1 (1 << 31) // Monster-specific memory
|
||||||
|
|
||||||
//TODO: unused?
|
//TODO: unused?
|
||||||
enum
|
enum
|
||||||
|
@ -17,7 +17,7 @@ TYPEDESCRIPTION CFuncMortarField::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncMortarField, m_SaveData)[6];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncMortarField, m_SaveData)[6];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -94,44 +94,44 @@ void CFuncMortarField::FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, U
|
|||||||
|
|
||||||
switch (m_fControl)
|
switch (m_fControl)
|
||||||
{
|
{
|
||||||
// random
|
// random
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
// Trigger Activator
|
// Trigger Activator
|
||||||
case 1:
|
case 1:
|
||||||
|
{
|
||||||
|
if (pActivator != NULL)
|
||||||
{
|
{
|
||||||
if (pActivator != NULL)
|
vecStart.x = pActivator->pev->origin.x;
|
||||||
{
|
vecStart.y = pActivator->pev->origin.y;
|
||||||
vecStart.x = pActivator->pev->origin.x;
|
|
||||||
vecStart.y = pActivator->pev->origin.y;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
// table
|
break;
|
||||||
case 2:
|
}
|
||||||
|
// table
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
CBaseEntity *pController;
|
||||||
|
|
||||||
|
if (!FStringNull(m_iszXController))
|
||||||
{
|
{
|
||||||
CBaseEntity *pController;
|
pController = UTIL_FindEntityByTargetname(NULL, STRING(m_iszXController));
|
||||||
|
|
||||||
if (!FStringNull(m_iszXController))
|
if (pController != NULL)
|
||||||
{
|
{
|
||||||
pController = UTIL_FindEntityByTargetname(NULL, STRING(m_iszXController));
|
vecStart.x = pev->mins.x + pController->pev->ideal_yaw * pev->size.x;
|
||||||
|
|
||||||
if (pController != NULL)
|
|
||||||
{
|
|
||||||
vecStart.x = pev->mins.x + pController->pev->ideal_yaw * pev->size.x;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!FStringNull(m_iszYController))
|
|
||||||
{
|
|
||||||
pController = UTIL_FindEntityByTargetname(NULL, STRING(m_iszYController));
|
|
||||||
|
|
||||||
if (pController != NULL)
|
|
||||||
{
|
|
||||||
vecStart.y = pev->mins.y + pController->pev->ideal_yaw * pev->size.y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
if (!FStringNull(m_iszYController))
|
||||||
|
{
|
||||||
|
pController = UTIL_FindEntityByTargetname(NULL, STRING(m_iszYController));
|
||||||
|
|
||||||
|
if (pController != NULL)
|
||||||
|
{
|
||||||
|
vecStart.y = pev->mins.y + pController->pev->ideal_yaw * pev->size.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int pitch = RANDOM_LONG(95, 124);
|
int pitch = RANDOM_LONG(95, 124);
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
void EXPORT FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT FieldUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[6];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[6];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_iszXController;
|
int m_iszXController;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
|
|
||||||
/* <11c190> ../cstrike/dlls/observer.cpp:36 */
|
int GetForceCamera_api(CBasePlayer *pObserver)
|
||||||
int GetForceCamera(void)
|
|
||||||
{
|
{
|
||||||
int retVal;
|
int retVal;
|
||||||
|
|
||||||
@ -18,19 +17,30 @@ int GetForceCamera(void)
|
|||||||
return retVal;
|
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 */
|
/* <11c4fa> ../cstrike/dlls/observer.cpp:49 */
|
||||||
CBaseEntity *CBasePlayer::Observer_IsValidTarget(int iPlayerIndex, bool bSameTeam)
|
CBaseEntity *CBasePlayer::Observer_IsValidTarget(int iPlayerIndex, bool bSameTeam)
|
||||||
{
|
{
|
||||||
if (iPlayerIndex > gpGlobals->maxClients || iPlayerIndex < 1)
|
if (iPlayerIndex > gpGlobals->maxClients || iPlayerIndex < 1)
|
||||||
return NULL;
|
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
|
return g_ReGameHookchains.m_Observer_IsValidTarget.callChain(Observer_IsValidTarget_api, this, pEnt, iPlayerIndex, bSameTeam);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <11c2c7> ../cstrike/dlls/observer.cpp:82 */
|
/* <11c2c7> ../cstrike/dlls/observer.cpp:82 */
|
||||||
@ -147,7 +157,7 @@ void CBasePlayer::Observer_FindNextPlayer(bool bReverse, const char *name)
|
|||||||
|
|
||||||
iDir = bReverse ? -1 : 1;
|
iDir = bReverse ? -1 : 1;
|
||||||
|
|
||||||
bForceSameTeam = (GetForceCamera() != CAMERA_MODE_SPEC_ANYONE && m_iTeam != SPECTATOR);
|
bForceSameTeam = (GetForceCamera(this) != CAMERA_MODE_SPEC_ANYONE && m_iTeam != SPECTATOR);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@ -441,7 +451,7 @@ void CBasePlayer::Observer_SetMode(int iMode)
|
|||||||
if (iMode == pev->iuser1)
|
if (iMode == pev->iuser1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_forcecamera = GetForceCamera();
|
_forcecamera = GetForceCamera(this);
|
||||||
|
|
||||||
// is valid mode ?
|
// is valid mode ?
|
||||||
if (iMode < OBS_CHASE_LOCKED || iMode > OBS_MAP_CHASE)
|
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_TEAM 1
|
||||||
#define CAMERA_MODE_SPEC_ONLY_FRIST_PERSON 2
|
#define CAMERA_MODE_SPEC_ONLY_FRIST_PERSON 2
|
||||||
|
|
||||||
int GetForceCamera(void);
|
int GetForceCamera(CBasePlayer *pObserver);
|
||||||
void UpdateClientEffects(CBasePlayer *pObserver, int oldMode);
|
void UpdateClientEffects(CBasePlayer *pObserver, int oldMode);
|
||||||
|
|
||||||
#endif // OBSERVER_H
|
#endif // OBSERVER_H
|
||||||
|
@ -21,8 +21,8 @@ TYPEDESCRIPTION CPathTrack::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPathCorner, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CPathCorner, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CPathTrack, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CPathTrack, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float m_flWait;
|
float m_flWait;
|
||||||
|
@ -61,12 +61,12 @@ TYPEDESCRIPTION CGunTarget::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlatTrain, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CBasePlatTrain, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncPlatRot, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncPlatRot, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTrain, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncTrain, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTrackTrain, m_SaveData)[12];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncTrackTrain, m_SaveData)[12];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncTrackChange, m_SaveData)[9];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncTrackChange, m_SaveData)[9];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGunTarget, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CGunTarget, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -1621,12 +1621,12 @@ void CFuncTrackTrain::__MAKE_VHOOK(Precache)(void)
|
|||||||
// no sound
|
// no sound
|
||||||
pev->noise = 0;
|
pev->noise = 0;
|
||||||
break;
|
break;
|
||||||
case 1: PRECACHE_SOUND("plats/ttrain1.wav"); pev->noise = MAKE_STRING("plats/ttrain1.wav");break;
|
case 1: PRECACHE_SOUND("plats/ttrain1.wav"); pev->noise = MAKE_STRING("plats/ttrain1.wav"); break;
|
||||||
case 2: PRECACHE_SOUND("plats/ttrain2.wav"); pev->noise = MAKE_STRING("plats/ttrain2.wav");break;
|
case 2: PRECACHE_SOUND("plats/ttrain2.wav"); pev->noise = MAKE_STRING("plats/ttrain2.wav"); break;
|
||||||
case 3: PRECACHE_SOUND("plats/ttrain3.wav"); pev->noise = MAKE_STRING("plats/ttrain3.wav");break;
|
case 3: PRECACHE_SOUND("plats/ttrain3.wav"); pev->noise = MAKE_STRING("plats/ttrain3.wav"); break;
|
||||||
case 4: PRECACHE_SOUND("plats/ttrain4.wav"); pev->noise = MAKE_STRING("plats/ttrain4.wav");break;
|
case 4: PRECACHE_SOUND("plats/ttrain4.wav"); pev->noise = MAKE_STRING("plats/ttrain4.wav"); break;
|
||||||
case 5: PRECACHE_SOUND("plats/ttrain6.wav"); pev->noise = MAKE_STRING("plats/ttrain6.wav");break;
|
case 5: PRECACHE_SOUND("plats/ttrain6.wav"); pev->noise = MAKE_STRING("plats/ttrain6.wav"); break;
|
||||||
case 6: PRECACHE_SOUND("plats/ttrain7.wav"); pev->noise = MAKE_STRING("plats/ttrain7.wav");break;
|
case 6: PRECACHE_SOUND("plats/ttrain7.wav"); pev->noise = MAKE_STRING("plats/ttrain7.wav"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PRECACHE_SOUND("plats/ttrain_brake1.wav");
|
PRECACHE_SOUND("plats/ttrain_brake1.wav");
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BYTE m_bMoveSnd;
|
BYTE m_bMoveSnd;
|
||||||
@ -171,7 +171,7 @@ public:
|
|||||||
void RotMove(Vector &destAngle, float time);
|
void RotMove(Vector &destAngle, float time);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Vector m_end;
|
Vector m_end;
|
||||||
@ -214,7 +214,7 @@ public:
|
|||||||
void EXPORT Next(void);
|
void EXPORT Next(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Vector m_vStartPosition;
|
Vector m_vStartPosition;
|
||||||
@ -308,7 +308,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[9];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[9];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CPathTrack *m_trackTop;
|
CPathTrack *m_trackTop;
|
||||||
@ -350,7 +350,7 @@ public:
|
|||||||
virtual int Restore(CRestore &restore);
|
virtual int Restore(CRestore &restore);
|
||||||
virtual int ObjectCaps(void)
|
virtual int ObjectCaps(void)
|
||||||
{
|
{
|
||||||
return CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION;
|
return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION);
|
||||||
}
|
}
|
||||||
virtual void Activate(void);
|
virtual void Activate(void);
|
||||||
virtual int Classify(void)
|
virtual int Classify(void)
|
||||||
@ -386,7 +386,7 @@ public:
|
|||||||
void Stop(void);
|
void Stop(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BOOL m_on;
|
BOOL m_on;
|
||||||
|
@ -275,8 +275,8 @@ int gmsgShowTimer;
|
|||||||
BOOL gInitHUD;
|
BOOL gInitHUD;
|
||||||
cvar_t *sv_aim;
|
cvar_t *sv_aim;
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CRevertSaved, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CRevertSaved, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlayer, m_playerSaveData)[40];
|
TYPEDESCRIPTION IMPL_CLASS(CBasePlayer, m_playerSaveData)[40];
|
||||||
WeaponStruct g_weaponStruct[ MAX_WEAPONS ];
|
WeaponStruct g_weaponStruct[ MAX_WEAPONS ];
|
||||||
char *(*CDeadHEV::pm_szPoses)[4];
|
char *(*CDeadHEV::pm_szPoses)[4];
|
||||||
|
|
||||||
@ -395,7 +395,7 @@ void WriteSigonMessages(void)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_WEAPONS; i++)
|
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)
|
if (!II.iId)
|
||||||
continue;
|
continue;
|
||||||
@ -1520,7 +1520,7 @@ void packPlayerItem(CBasePlayer *pPlayer, CBasePlayerItem *pItem, bool packAmmo)
|
|||||||
|
|
||||||
if (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);
|
SET_MODEL(ENT(pWeaponBox->pev), modelName);
|
||||||
}
|
}
|
||||||
@ -5587,7 +5587,7 @@ int CBasePlayer::__MAKE_VHOOK(Save)(CSave &save)
|
|||||||
if (!CBaseMonster::Save(save))
|
if (!CBaseMonster::Save(save))
|
||||||
return 0;
|
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 */
|
/* <153355> ../cstrike/dlls/player.cpp:6685 */
|
||||||
@ -5622,7 +5622,7 @@ int CBasePlayer::__MAKE_VHOOK(Restore)(CRestore &restore)
|
|||||||
if (!CBaseMonster::Restore(restore))
|
if (!CBaseMonster::Restore(restore))
|
||||||
return 0;
|
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;
|
SAVERESTOREDATA *pSaveData = (SAVERESTOREDATA *)gpGlobals->pSaveData;
|
||||||
|
|
||||||
// landmark isn't present.
|
// landmark isn't present.
|
||||||
@ -6622,10 +6622,10 @@ int CBasePlayer::GetAmmoIndex(const char *psz)
|
|||||||
|
|
||||||
for (int i = 1; i < MAX_AMMO_SLOTS; i++)
|
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;
|
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 i;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -758,7 +758,6 @@ public:
|
|||||||
//m_musicState = INTENSE;
|
//m_musicState = INTENSE;
|
||||||
//m_intenseTimestamp = gpGlobals->time;
|
//m_intenseTimestamp = gpGlobals->time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum { MaxLocationLen = 32 };
|
enum { MaxLocationLen = 32 };
|
||||||
|
|
||||||
@ -913,7 +912,7 @@ public:
|
|||||||
float m_flNextDecalTime;
|
float m_flNextDecalTime;
|
||||||
char m_szTeamName[ TEAM_NAME_LENGTH ];
|
char m_szTeamName[ TEAM_NAME_LENGTH ];
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_playerSaveData)[40];
|
static TYPEDESCRIPTION IMPL(m_playerSaveData)[40];
|
||||||
|
|
||||||
/*protected:*/
|
/*protected:*/
|
||||||
int m_modelIndexPlayer;
|
int m_modelIndexPlayer;
|
||||||
|
@ -89,7 +89,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
float m_messageTime;
|
float m_messageTime;
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#define IMPLEMENT_ARRAY(var)\
|
#define IMPLEMENT_ARRAY(var)\
|
||||||
var
|
var
|
||||||
|
|
||||||
|
#define IMPL_CLASS IMPLEMENT_ARRAY_CLASS
|
||||||
#define IMPLEMENT_ARRAY_CLASS(baseClass,var)\
|
#define IMPLEMENT_ARRAY_CLASS(baseClass,var)\
|
||||||
baseClass::var
|
baseClass::var
|
||||||
|
|
||||||
@ -49,6 +50,7 @@
|
|||||||
#define IMPLEMENT_ARRAY(var)\
|
#define IMPLEMENT_ARRAY(var)\
|
||||||
(*p##var)
|
(*p##var)
|
||||||
|
|
||||||
|
#define IMPL_CLASS IMPLEMENT_ARRAY_CLASS
|
||||||
#define IMPLEMENT_ARRAY_CLASS(baseClass,var)\
|
#define IMPLEMENT_ARRAY_CLASS(baseClass,var)\
|
||||||
(*baseClass::p##var)
|
(*baseClass::p##var)
|
||||||
|
|
||||||
|
@ -69,9 +69,9 @@ dynpitchvol_t rgdpvpreset[CDPVPRESETMAX];
|
|||||||
int fSentencesInit;
|
int fSentencesInit;
|
||||||
int gcallsentences;
|
int gcallsentences;
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAmbientGeneric, m_SaveData)[4];
|
TYPEDESCRIPTION IMPL_CLASS(CAmbientGeneric, m_SaveData)[4];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CEnvSound, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CEnvSound, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CSpeaker, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CSpeaker, m_SaveData)[1];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public:
|
|||||||
void InitModulationParms(void);
|
void InitModulationParms(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||||
|
|
||||||
float m_flAttenuation; // attenuation value
|
float m_flAttenuation; // attenuation value
|
||||||
dynpitchvol_t m_dpv;
|
dynpitchvol_t m_dpv;
|
||||||
@ -170,7 +170,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
float m_flRadius;
|
float m_flRadius;
|
||||||
float m_flRoomtype;
|
float m_flRoomtype;
|
||||||
@ -205,7 +205,7 @@ public:
|
|||||||
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
|
||||||
void EXPORT SpeakerThink(void);
|
void EXPORT SpeakerThink(void);
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
int m_preset; // preset number
|
int m_preset; // preset number
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ TYPEDESCRIPTION CBaseToggle::m_SaveData[] =
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseDelay, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseDelay, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseToggle, m_SaveData)[19];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseToggle, m_SaveData)[19];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ TYPEDESCRIPTION CBaseGrenCatch::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncWeaponCheck, m_SaveData)[6];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncWeaponCheck, m_SaveData)[6];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBaseGrenCatch, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CBaseGrenCatch, m_SaveData)[5];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
int m_NeedGrenadeType;
|
int m_NeedGrenadeType;
|
||||||
string_t sTriggerOnGrenade;
|
string_t sTriggerOnGrenade;
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[6];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[6];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string_t sTriggerWithItems;
|
string_t sTriggerWithItems;
|
||||||
|
@ -88,7 +88,7 @@ public:
|
|||||||
CPathTrack *GetPrevious(void);
|
CPathTrack *GetPrevious(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
float m_length;
|
float m_length;
|
||||||
string_t m_altName;
|
string_t m_altName;
|
||||||
@ -150,7 +150,7 @@ public:
|
|||||||
static CFuncTrackTrain *Instance(edict_t *pent);
|
static CFuncTrackTrain *Instance(edict_t *pent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[12];
|
||||||
|
|
||||||
CPathTrack *m_ppath;
|
CPathTrack *m_ppath;
|
||||||
float m_length;
|
float m_length;
|
||||||
@ -234,7 +234,7 @@ public:
|
|||||||
static CFuncVehicle *Instance(edict_t *pent);
|
static CFuncVehicle *Instance(edict_t *pent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[12];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[12];
|
||||||
|
|
||||||
CPathTrack *m_ppath;
|
CPathTrack *m_ppath;
|
||||||
float m_length;
|
float m_length;
|
||||||
|
@ -68,13 +68,13 @@ FILE_GLOBAL char st_szNextSpot[cchMapNameMost];
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFrictionModifier, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CFrictionModifier, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CAutoTrigger, m_SaveData)[2];
|
TYPEDESCRIPTION IMPL_CLASS(CAutoTrigger, m_SaveData)[2];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CTriggerRelay, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CTriggerRelay, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CMultiManager, m_SaveData)[5];
|
TYPEDESCRIPTION IMPL_CLASS(CMultiManager, m_SaveData)[5];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CChangeLevel, m_SaveData)[4];
|
TYPEDESCRIPTION IMPL_CLASS(CChangeLevel, m_SaveData)[4];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CTriggerChangeTarget, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CTriggerChangeTarget, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CTriggerCamera, m_SaveData)[13];
|
TYPEDESCRIPTION IMPL_CLASS(CTriggerCamera, m_SaveData)[13];
|
||||||
|
|
||||||
char st_szNextMap[cchMapNameMost];
|
char st_szNextMap[cchMapNameMost];
|
||||||
char st_szNextSpot[cchMapNameMost];
|
char st_szNextSpot[cchMapNameMost];
|
||||||
|
@ -63,10 +63,10 @@
|
|||||||
#define SF_CAMERA_PLAYER_TAKECONTROL 4
|
#define SF_CAMERA_PLAYER_TAKECONTROL 4
|
||||||
|
|
||||||
// Flags to indicate masking off various render parameters that are normally copied to the targets
|
// Flags to indicate masking off various render parameters that are normally copied to the targets
|
||||||
#define SF_RENDER_MASKFX (1<<0)
|
#define SF_RENDER_MASKFX (1 << 0)
|
||||||
#define SF_RENDER_MASKAMT (1<<1)
|
#define SF_RENDER_MASKAMT (1 << 1)
|
||||||
#define SF_RENDER_MASKMODE (1<<2)
|
#define SF_RENDER_MASKMODE (1 << 2)
|
||||||
#define SF_RENDER_MASKCOLOR (1<<3)
|
#define SF_RENDER_MASKCOLOR (1 << 3)
|
||||||
|
|
||||||
class CFrictionModifier: public CBaseEntity
|
class CFrictionModifier: public CBaseEntity
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ public:
|
|||||||
void EXPORT ChangeFriction(CBaseEntity *pOther);
|
void EXPORT ChangeFriction(CBaseEntity *pOther);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
float m_frictionFraction;
|
float m_frictionFraction;
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[2];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
|
||||||
|
|
||||||
int m_globalstate;
|
int m_globalstate;
|
||||||
USE_TYPE triggerType;
|
USE_TYPE triggerType;
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
USE_TYPE triggerType;
|
USE_TYPE triggerType;
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ private:
|
|||||||
CMultiManager *Clone(void);
|
CMultiManager *Clone(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[5];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
|
||||||
|
|
||||||
int m_cTargets;//312
|
int m_cTargets;//312
|
||||||
int m_index;
|
int m_index;
|
||||||
@ -526,7 +526,7 @@ public:
|
|||||||
static int InTransitionVolume(CBaseEntity *pEntity, char *pVolumeName);
|
static int InTransitionVolume(CBaseEntity *pEntity, char *pVolumeName);
|
||||||
|
|
||||||
public:
|
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_szMapName[ cchMapNameMost ]; // trigger_changelevel only: next map
|
||||||
char m_szLandmarkName[ cchMapNameMost ]; // trigger_changelevel only: landmark on next map
|
char m_szLandmarkName[ cchMapNameMost ]; // trigger_changelevel only: landmark on next map
|
||||||
@ -747,7 +747,7 @@ public:
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[1];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_iszNewTarget;
|
int m_iszNewTarget;
|
||||||
@ -783,7 +783,7 @@ public:
|
|||||||
void Move(void);
|
void Move(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[13];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[13];
|
||||||
|
|
||||||
EHANDLE m_hPlayer;
|
EHANDLE m_hPlayer;
|
||||||
EHANDLE m_hTarget;
|
EHANDLE m_hTarget;
|
||||||
|
@ -553,7 +553,7 @@ CBaseEntity *UTIL_FindEntityGeneric(const char *szWhatever, const Vector &vecSrc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <1ad347> ../cstrike/dlls/util.cpp:711 */
|
/* <1ad347> ../cstrike/dlls/util.cpp:711 */
|
||||||
CBaseEntity *UTIL_PlayerByIndex(int playerIndex)
|
CBaseEntity *EXT_FUNC UTIL_PlayerByIndex(int playerIndex)
|
||||||
{
|
{
|
||||||
CBaseEntity *pPlayer = NULL;
|
CBaseEntity *pPlayer = NULL;
|
||||||
if (playerIndex > 0 && playerIndex <= gpGlobals->maxClients)
|
if (playerIndex > 0 && playerIndex <= gpGlobals->maxClients)
|
||||||
@ -1343,10 +1343,6 @@ void UTIL_StringToVector(float *pVector, const char *pString)
|
|||||||
|
|
||||||
Q_strcpy(tempString, pString);
|
Q_strcpy(tempString, pString);
|
||||||
|
|
||||||
#ifdef GAMEDLL_FIXES
|
|
||||||
tempString[127] = 0;
|
|
||||||
#endif // GAMEDLL_FIXES
|
|
||||||
|
|
||||||
pstr = tempString;
|
pstr = tempString;
|
||||||
pfront = tempString;
|
pfront = tempString;
|
||||||
|
|
||||||
@ -1698,7 +1694,7 @@ extern "C"
|
|||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _WIN32
|
||||||
|
|
||||||
/* <1b04b5> ../cstrike/dlls/util.cpp:1971 */
|
/* <1b04b5> ../cstrike/dlls/util.cpp:1971 */
|
||||||
unsigned int CSaveRestoreBuffer::HashString(const char *pszToken)
|
unsigned int CSaveRestoreBuffer::HashString(const char *pszToken)
|
||||||
@ -1726,12 +1722,13 @@ unsigned short CSaveRestoreBuffer::TokenHash(const char *pszToken)
|
|||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ALERT(at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!");
|
ALERT(at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1b06a5> ../cstrike/dlls/util.cpp:2020 */
|
/* <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);
|
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 */
|
/* <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);
|
BufferField(pname, sizeof(int) * count, (const char *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1b0c77> ../cstrike/dlls/util.cpp:2038 */
|
/* <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);
|
BufferField(pname, sizeof(float) * count, (const char *)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1b0ea5> ../cstrike/dlls/util.cpp:2044 */
|
/* <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;
|
int i;
|
||||||
BufferHeader(pname, sizeof(float) * count);
|
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 */
|
/* <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 i;
|
||||||
int size = 0;
|
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 */
|
/* <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);
|
WriteVector(pname, &value.x, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1b1630> ../cstrike/dlls/util.cpp:2105 */
|
/* <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);
|
BufferHeader(pname, sizeof(float) * 3 * count);
|
||||||
BufferData((const char *)value, 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 */
|
/* <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);
|
BufferHeader(pname, sizeof(float) * 3 * count);
|
||||||
for (int i = 0; i < count; i++)
|
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 */
|
/* <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);
|
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 */
|
/* <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++)
|
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 */
|
/* <1b46b1> ../cstrike/dlls/util.cpp:2595 */
|
||||||
NOXREF void CRestore::BufferReadHeader(HEADER *pheader)
|
void CRestore::BufferReadHeader(HEADER *pheader)
|
||||||
{
|
{
|
||||||
pheader->size = ReadShort();
|
pheader->size = ReadShort();
|
||||||
pheader->token = ReadShort();
|
pheader->token = ReadShort();
|
||||||
@ -2274,7 +2271,7 @@ NOXREF void CRestore::BufferReadHeader(HEADER *pheader)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <1b4654> ../cstrike/dlls/util.cpp:2605 */
|
/* <1b4654> ../cstrike/dlls/util.cpp:2605 */
|
||||||
NOXREF short CRestore::ReadShort(void)
|
short CRestore::ReadShort(void)
|
||||||
{
|
{
|
||||||
short tmp = 0;
|
short tmp = 0;
|
||||||
BufferReadBytes((char *)&tmp, sizeof(short));
|
BufferReadBytes((char *)&tmp, sizeof(short));
|
||||||
@ -2282,7 +2279,7 @@ NOXREF short CRestore::ReadShort(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <1b45f5> ../cstrike/dlls/util.cpp:2614 */
|
/* <1b45f5> ../cstrike/dlls/util.cpp:2614 */
|
||||||
NOXREF int CRestore::ReadInt(void)
|
int CRestore::ReadInt(void)
|
||||||
{
|
{
|
||||||
int tmp = 0;
|
int tmp = 0;
|
||||||
BufferReadBytes((char *)&tmp, sizeof(int));
|
BufferReadBytes((char *)&tmp, sizeof(int));
|
||||||
@ -2306,7 +2303,7 @@ NOXREF char *CRestore::ReadNamedString(const char *pName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <1b453a> ../cstrike/dlls/util.cpp:2644 */
|
/* <1b453a> ../cstrike/dlls/util.cpp:2644 */
|
||||||
NOXREF char *CRestore::BufferPointer(void)
|
char *CRestore::BufferPointer(void)
|
||||||
{
|
{
|
||||||
if (!m_pdata)
|
if (!m_pdata)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2335,7 +2332,7 @@ void CRestore::BufferReadBytes(char *pOutput, int size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <1b5092> ../cstrike/dlls/util.cpp:2673 */
|
/* <1b5092> ../cstrike/dlls/util.cpp:2673 */
|
||||||
NOXREF void CRestore::BufferSkipBytes(int bytes)
|
void CRestore::BufferSkipBytes(int bytes)
|
||||||
{
|
{
|
||||||
BufferReadBytes(NULL, bytes);
|
BufferReadBytes(NULL, bytes);
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ extern globalvars_t *gpGlobals;
|
|||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
#define LINK_ENTITY_TO_CLASS(mapClassName, DLLClassName)\
|
#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)\
|
void mapClassName(entvars_t *pev)\
|
||||||
{\
|
{\
|
||||||
GetClassPtr((DLLClassName *)pev);\
|
GetClassPtr((DLLClassName *)pev);\
|
||||||
@ -204,6 +204,16 @@ typedef enum
|
|||||||
|
|
||||||
} MONSTERSTATE;
|
} 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
|
typedef struct hudtextparms_s
|
||||||
{
|
{
|
||||||
float x;
|
float x;
|
||||||
|
@ -121,8 +121,8 @@ public:
|
|||||||
float_precision flLen = Length();
|
float_precision flLen = Length();
|
||||||
if (flLen > 0.0)
|
if (flLen > 0.0)
|
||||||
{
|
{
|
||||||
x /= (vec_t)flLen;
|
x = (vec_t)(1 / flLen * x);
|
||||||
y /= (vec_t)flLen;
|
y = (vec_t)(1 / flLen * y);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ TYPEDESCRIPTION CFuncVehicle::m_SaveData[] =
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CFuncVehicle, m_SaveData)[12];
|
TYPEDESCRIPTION IMPL_CLASS(CFuncVehicle, m_SaveData)[12];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
@ -960,30 +960,12 @@ void CFuncVehicle::__MAKE_VHOOK(Precache)(void)
|
|||||||
|
|
||||||
switch (m_sounds)
|
switch (m_sounds)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1: PRECACHE_SOUND("plats/vehicle1.wav");pev->noise = MAKE_STRING("plats/vehicle1.wav"); break;
|
||||||
PRECACHE_SOUND("plats/vehicle1.wav");
|
case 2: PRECACHE_SOUND("plats/vehicle2.wav");pev->noise = MAKE_STRING("plats/vehicle2.wav"); break;
|
||||||
pev->noise = MAKE_STRING("plats/vehicle1.wav");
|
case 3: PRECACHE_SOUND("plats/vehicle3.wav");pev->noise = MAKE_STRING("plats/vehicle3.wav"); break;
|
||||||
break;
|
case 4: PRECACHE_SOUND("plats/vehicle4.wav");pev->noise = MAKE_STRING("plats/vehicle4.wav"); break;
|
||||||
case 2:
|
case 5: PRECACHE_SOUND("plats/vehicle6.wav");pev->noise = MAKE_STRING("plats/vehicle6.wav"); break;
|
||||||
PRECACHE_SOUND("plats/vehicle2.wav");
|
case 6: PRECACHE_SOUND("plats/vehicle7.wav");pev->noise = MAKE_STRING("plats/vehicle7.wav"); break;
|
||||||
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");
|
PRECACHE_SOUND("plats/vehicle_brake1.wav");
|
||||||
|
@ -38,12 +38,12 @@ const char *g_pModelNameLaser = "sprites/laserbeam.spr";
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
ItemInfo IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)[32];
|
ItemInfo IMPL_CLASS(CBasePlayerItem, ItemInfoArray)[32];
|
||||||
AmmoInfo IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[32];
|
AmmoInfo IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[32];
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, m_SaveData)[3];
|
TYPEDESCRIPTION IMPL_CLASS(CBasePlayerItem, m_SaveData)[3];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CBasePlayerWeapon, m_SaveData)[7];
|
TYPEDESCRIPTION IMPL_CLASS(CBasePlayerWeapon, m_SaveData)[7];
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CWeaponBox, m_SaveData)[4];
|
TYPEDESCRIPTION IMPL_CLASS(CWeaponBox, m_SaveData)[4];
|
||||||
|
|
||||||
const char *g_pModelNameLaser;
|
const char *g_pModelNameLaser;
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ int MaxAmmoCarry(int iszName)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_WEAPONS; i++)
|
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))
|
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
|
// make sure it's not already in the registry
|
||||||
for (int i = 0; i < MAX_AMMO_SLOTS; i++)
|
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;
|
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
|
// ammo already in registry, just quite
|
||||||
return;
|
return;
|
||||||
@ -249,10 +249,10 @@ void AddAmmoNameToAmmoRegistry(const char *szAmmoname)
|
|||||||
giAmmoIndex = 0;
|
giAmmoIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)[ giAmmoIndex ].pszName = szAmmoname;
|
IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)[ giAmmoIndex ].pszName = szAmmoname;
|
||||||
|
|
||||||
// yes, this info is redundant
|
// 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
|
// Precaches the weapon and queues the weapon info for sending to clients
|
||||||
@ -278,7 +278,7 @@ void UTIL_PrecacheOtherWeapon(const char *szClassname)
|
|||||||
pEntity->Precache();
|
pEntity->Precache();
|
||||||
if (((CBasePlayerItem *)pEntity)->GetItemInfo(&II))
|
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')
|
if (II.pszAmmo1 != NULL && *II.pszAmmo1 != '\0')
|
||||||
{
|
{
|
||||||
@ -317,7 +317,7 @@ NOXREF void UTIL_PrecacheOtherWeapon2(const char *szClassname)
|
|||||||
|
|
||||||
if (((CBasePlayerItem *)pEntity)->GetItemInfo(&II))
|
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')
|
if (II.pszAmmo1 != NULL && *II.pszAmmo1 != '\0')
|
||||||
{
|
{
|
||||||
@ -339,8 +339,8 @@ NOXREF void UTIL_PrecacheOtherWeapon2(const char *szClassname)
|
|||||||
/* <1d3191> ../cstrike/dlls/weapons.cpp:345 */
|
/* <1d3191> ../cstrike/dlls/weapons.cpp:345 */
|
||||||
void W_Precache(void)
|
void W_Precache(void)
|
||||||
{
|
{
|
||||||
Q_memset(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray), 0, ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, ItemInfoArray)));
|
Q_memset(IMPL_CLASS(CBasePlayerItem, ItemInfoArray), 0, ARRAYSIZE(IMPL_CLASS(CBasePlayerItem, ItemInfoArray)));
|
||||||
Q_memset(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray), 0, ARRAYSIZE(IMPLEMENT_ARRAY_CLASS(CBasePlayerItem, AmmoInfoArray)));
|
Q_memset(IMPL_CLASS(CBasePlayerItem, AmmoInfoArray), 0, ARRAYSIZE(IMPL_CLASS(CBasePlayerItem, AmmoInfoArray)));
|
||||||
giAmmoIndex = 0;
|
giAmmoIndex = 0;
|
||||||
|
|
||||||
// custom items...
|
// custom items...
|
||||||
@ -2317,51 +2317,51 @@ void CArmoury::ArmouryTouch(CBaseEntity *pOther)
|
|||||||
{
|
{
|
||||||
switch (m_iItem)
|
switch (m_iItem)
|
||||||
{
|
{
|
||||||
case ARMOURY_FLASHBANG:
|
case ARMOURY_FLASHBANG:
|
||||||
{
|
{
|
||||||
if (p->AmmoInventory(p->GetAmmoIndex("Flashbang")) >= 2)
|
if (p->AmmoInventory(p->GetAmmoIndex("Flashbang")) >= 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p->GiveNamedItem("weapon_flashbang");
|
p->GiveNamedItem("weapon_flashbang");
|
||||||
m_iCount--;
|
m_iCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARMOURY_HEGRENADE:
|
case ARMOURY_HEGRENADE:
|
||||||
{
|
{
|
||||||
if (p->AmmoInventory(p->GetAmmoIndex("HEGrenade")) >= 1)
|
if (p->AmmoInventory(p->GetAmmoIndex("HEGrenade")) >= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p->GiveNamedItem("weapon_hegrenade");
|
p->GiveNamedItem("weapon_hegrenade");
|
||||||
m_iCount--;
|
m_iCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARMOURY_KEVLAR:
|
case ARMOURY_KEVLAR:
|
||||||
{
|
{
|
||||||
if (p->m_iKevlar == ARMOR_TYPE_KEVLAR)
|
if (p->m_iKevlar == ARMOR_TYPE_KEVLAR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p->GiveNamedItem("item_kevlar");
|
p->GiveNamedItem("item_kevlar");
|
||||||
m_iCount--;
|
m_iCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARMOURY_ASSAULT:
|
case ARMOURY_ASSAULT:
|
||||||
{
|
{
|
||||||
if (p->m_iKevlar == ARMOR_TYPE_HELMET)
|
if (p->m_iKevlar == ARMOR_TYPE_HELMET)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p->GiveNamedItem("item_assaultsuit");
|
p->GiveNamedItem("item_assaultsuit");
|
||||||
m_iCount--;
|
m_iCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARMOURY_SMOKEGRENADE:
|
case ARMOURY_SMOKEGRENADE:
|
||||||
{
|
{
|
||||||
if (p->AmmoInventory(p->GetAmmoIndex("SmokeGrenade")) >= 1)
|
if (p->AmmoInventory(p->GetAmmoIndex("SmokeGrenade")) >= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p->GiveNamedItem("weapon_smokegrenade");
|
p->GiveNamedItem("weapon_smokegrenade");
|
||||||
m_iCount--;
|
m_iCount--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ public:
|
|||||||
void EXPORT C4Think(void);
|
void EXPORT C4Think(void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[15];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[15];
|
||||||
|
|
||||||
bool m_bStartDefuse;
|
bool m_bStartDefuse;
|
||||||
bool m_bIsC4;
|
bool m_bIsC4;
|
||||||
@ -301,14 +301,11 @@ public:
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
virtual void Holster(int skiplocal = 0);
|
virtual void Holster(int skiplocal = 0);
|
||||||
|
|
||||||
virtual void UpdateItemInfo(void) {}
|
virtual void UpdateItemInfo(void) {}
|
||||||
virtual void ItemPreFrame(void) {}
|
virtual void ItemPreFrame(void) {}
|
||||||
virtual void ItemPostFrame(void) {}
|
virtual void ItemPostFrame(void) {}
|
||||||
|
|
||||||
virtual void Drop(void);
|
virtual void Drop(void);
|
||||||
virtual void Kill(void);
|
virtual void Kill(void);
|
||||||
|
|
||||||
virtual void AttachToPlayer(CBasePlayer *pPlayer);
|
virtual void AttachToPlayer(CBasePlayer *pPlayer);
|
||||||
virtual int PrimaryAmmoIndex(void)
|
virtual int PrimaryAmmoIndex(void)
|
||||||
{
|
{
|
||||||
@ -361,45 +358,45 @@ public:
|
|||||||
public:
|
public:
|
||||||
inline int iItemPosition(void)
|
inline int iItemPosition(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iPosition;
|
return IMPL(ItemInfoArray)[ m_iId ].iPosition;
|
||||||
}
|
}
|
||||||
inline const char *pszAmmo1(void)
|
inline const char *pszAmmo1(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].pszAmmo1;
|
return IMPL(ItemInfoArray)[ m_iId ].pszAmmo1;
|
||||||
}
|
}
|
||||||
inline int iMaxAmmo1(void)
|
inline int iMaxAmmo1(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iMaxAmmo1;
|
return IMPL(ItemInfoArray)[ m_iId ].iMaxAmmo1;
|
||||||
}
|
}
|
||||||
inline const char *pszAmmo2(void)
|
inline const char *pszAmmo2(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].pszAmmo2;
|
return IMPL(ItemInfoArray)[ m_iId ].pszAmmo2;
|
||||||
}
|
}
|
||||||
inline int iMaxAmmo2(void)
|
inline int iMaxAmmo2(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iMaxAmmo2;
|
return IMPL(ItemInfoArray)[ m_iId ].iMaxAmmo2;
|
||||||
}
|
}
|
||||||
inline const char *pszName(void)
|
inline const char *pszName(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].pszName;
|
return IMPL(ItemInfoArray)[ m_iId ].pszName;
|
||||||
}
|
}
|
||||||
inline int iMaxClip(void)
|
inline int iMaxClip(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iMaxClip;
|
return IMPL(ItemInfoArray)[ m_iId ].iMaxClip;
|
||||||
}
|
}
|
||||||
inline int iWeight(void)
|
inline int iWeight(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iWeight;
|
return IMPL(ItemInfoArray)[ m_iId ].iWeight;
|
||||||
}
|
}
|
||||||
inline int iFlags(void)
|
inline int iFlags(void)
|
||||||
{
|
{
|
||||||
return IMPLEMENT_ARRAY(ItemInfoArray)[ m_iId ].iFlags;
|
return IMPL(ItemInfoArray)[ m_iId ].iFlags;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[3];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[3];
|
||||||
static ItemInfo IMPLEMENT_ARRAY(ItemInfoArray)[32];
|
static ItemInfo IMPL(ItemInfoArray)[32];
|
||||||
static AmmoInfo IMPLEMENT_ARRAY(AmmoInfoArray)[32];
|
static AmmoInfo IMPL(AmmoInfoArray)[32];
|
||||||
|
|
||||||
CBasePlayer *m_pPlayer;
|
CBasePlayer *m_pPlayer;
|
||||||
CBasePlayerItem *m_pNext;
|
CBasePlayerItem *m_pNext;
|
||||||
@ -501,7 +498,7 @@ public:
|
|||||||
bool ShieldSecondaryFire(int iUpAnim, int iDownAnim);
|
bool ShieldSecondaryFire(int iUpAnim, int iDownAnim);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[7];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[7];
|
||||||
|
|
||||||
int m_iPlayEmptySound;
|
int m_iPlayEmptySound;
|
||||||
int m_fFireOnEmpty;
|
int m_fFireOnEmpty;
|
||||||
@ -601,7 +598,7 @@ public:
|
|||||||
BOOL PackAmmo(int iszName, int iCount);
|
BOOL PackAmmo(int iszName, int iCount);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static TYPEDESCRIPTION IMPLEMENT_ARRAY(m_SaveData)[4];
|
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
|
||||||
|
|
||||||
CBasePlayerItem *m_rgpPlayerItems[ MAX_ITEM_TYPES ];
|
CBasePlayerItem *m_rgpPlayerItems[ MAX_ITEM_TYPES ];
|
||||||
int m_rgiszAmmo[ MAX_AMMO_SLOTS ];
|
int m_rgiszAmmo[ MAX_AMMO_SLOTS ];
|
||||||
@ -633,7 +630,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -676,7 +677,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 250.0f;
|
return MP5N_MAX_SPEED;
|
||||||
}
|
}
|
||||||
int iItemSlot(void)
|
int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -685,9 +686,13 @@ public:
|
|||||||
virtual void PrimaryAttack(void);
|
virtual void PrimaryAttack(void);
|
||||||
virtual void Reload(void);
|
virtual void Reload(void);
|
||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -733,7 +738,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -772,7 +781,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 221.0f;
|
return AK47_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -784,7 +793,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -822,7 +835,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 240.0f;
|
return AUG_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -834,7 +847,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -933,7 +950,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -945,6 +966,7 @@ public:
|
|||||||
int GetItemInfo_(ItemInfo *p);
|
int GetItemInfo_(ItemInfo *p);
|
||||||
BOOL Deploy_(void);
|
BOOL Deploy_(void);
|
||||||
void Holster_(int skiplocal);
|
void Holster_(int skiplocal);
|
||||||
|
float GetMaxSpeed_(void);
|
||||||
void PrimaryAttack_(void);
|
void PrimaryAttack_(void);
|
||||||
void WeaponIdle_(void);
|
void WeaponIdle_(void);
|
||||||
|
|
||||||
@ -981,7 +1003,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -1039,7 +1065,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -1091,7 +1121,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1141,7 +1175,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -1197,7 +1235,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1249,7 +1291,11 @@ public:
|
|||||||
virtual void SecondaryAttack(void);
|
virtual void SecondaryAttack(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
|
|
||||||
@ -1296,7 +1342,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 220.0f;
|
return M249_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1305,9 +1351,13 @@ public:
|
|||||||
virtual void PrimaryAttack(void);
|
virtual void PrimaryAttack(void);
|
||||||
virtual void Reload(void);
|
virtual void Reload(void);
|
||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1344,7 +1394,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 230.0f;
|
return M3_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1355,7 +1405,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1398,7 +1452,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1437,7 +1495,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 250.0f;
|
return MAC10_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1448,7 +1506,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1497,7 +1559,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -1548,7 +1614,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1595,7 +1665,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1650,7 +1724,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1687,7 +1765,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 250.0f;
|
return TMP_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1698,7 +1776,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1735,7 +1817,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 240.0f;
|
return XM1014_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1746,7 +1828,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1780,7 +1866,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 250.0f;
|
return ELITE_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1791,7 +1877,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -1842,7 +1932,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
virtual BOOL IsPistol(void)
|
virtual BOOL IsPistol(void)
|
||||||
{
|
{
|
||||||
@ -1885,7 +1979,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 250.0f;
|
return UMP45_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1896,7 +1990,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1942,7 +2040,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -1980,7 +2082,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 240.0f;
|
return GALIL_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -1992,7 +2094,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
@ -2030,7 +2136,7 @@ public:
|
|||||||
virtual BOOL Deploy(void);
|
virtual BOOL Deploy(void);
|
||||||
virtual float GetMaxSpeed(void)
|
virtual float GetMaxSpeed(void)
|
||||||
{
|
{
|
||||||
return 240.0f;
|
return FAMAS_MAX_SPEED;
|
||||||
}
|
}
|
||||||
virtual int iItemSlot(void)
|
virtual int iItemSlot(void)
|
||||||
{
|
{
|
||||||
@ -2042,7 +2148,11 @@ public:
|
|||||||
virtual void WeaponIdle(void);
|
virtual void WeaponIdle(void);
|
||||||
virtual BOOL UseDecrement(void)
|
virtual BOOL UseDecrement(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CLIENT_WEAPONS
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HOOK_GAMEDLL
|
#ifdef HOOK_GAMEDLL
|
||||||
|
@ -71,7 +71,7 @@ TYPEDESCRIPTION gGlobalEntitySaveData[] =
|
|||||||
|
|
||||||
DLL_DECALLIST gDecals[42];
|
DLL_DECALLIST gDecals[42];
|
||||||
|
|
||||||
TYPEDESCRIPTION IMPLEMENT_ARRAY_CLASS(CGlobalState, m_SaveData)[1];
|
TYPEDESCRIPTION IMPL_CLASS(CGlobalState, m_SaveData)[1];
|
||||||
TYPEDESCRIPTION gGlobalEntitySaveData[3];
|
TYPEDESCRIPTION gGlobalEntitySaveData[3];
|
||||||
|
|
||||||
#endif // HOOK_GAMEDLL
|
#endif // HOOK_GAMEDLL
|
||||||
@ -324,7 +324,7 @@ int CGlobalState::Save(CSave &save)
|
|||||||
int i;
|
int i;
|
||||||
globalentity_t *pEntity;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -351,7 +351,7 @@ int CGlobalState::Restore(CRestore &restore)
|
|||||||
|
|
||||||
ClearStates();
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -403,21 +403,21 @@ void CGlobalState::ClearStates(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <1dbc13> ../cstrike/dlls/world.cpp:466 */
|
/* <1dbc13> ../cstrike/dlls/world.cpp:466 */
|
||||||
void SaveGlobalState(SAVERESTOREDATA *pSaveData)
|
void EXT_FUNC SaveGlobalState(SAVERESTOREDATA *pSaveData)
|
||||||
{
|
{
|
||||||
CSave saveHelper(pSaveData);
|
CSave saveHelper(pSaveData);
|
||||||
gGlobalState.Save(saveHelper);
|
gGlobalState.Save(saveHelper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1dbcde> ../cstrike/dlls/world.cpp:473 */
|
/* <1dbcde> ../cstrike/dlls/world.cpp:473 */
|
||||||
void RestoreGlobalState(SAVERESTOREDATA *pSaveData)
|
void EXT_FUNC RestoreGlobalState(SAVERESTOREDATA *pSaveData)
|
||||||
{
|
{
|
||||||
CRestore restoreHelper(pSaveData);
|
CRestore restoreHelper(pSaveData);
|
||||||
gGlobalState.Restore(restoreHelper);
|
gGlobalState.Restore(restoreHelper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* <1dbe72> ../cstrike/dlls/world.cpp:480 */
|
/* <1dbe72> ../cstrike/dlls/world.cpp:480 */
|
||||||
void ResetGlobalState(void)
|
void EXT_FUNC ResetGlobalState(void)
|
||||||
{
|
{
|
||||||
gGlobalState.ClearStates();
|
gGlobalState.ClearStates();
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ void CC4::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2463cc> ../cstrike/dlls/weapons.h:732 */
|
/* <2463cc> ../cstrike/dlls/weapons.h:732 */
|
||||||
float CC4::GetMaxSpeed(void)
|
float CC4::__MAKE_VHOOK(GetMaxSpeed)(void)
|
||||||
{
|
{
|
||||||
return C4_MAX_SPEED;
|
return C4_MAX_SPEED;
|
||||||
}
|
}
|
||||||
@ -378,6 +378,11 @@ void CC4::Holster(int skiplocal)
|
|||||||
Holster_(skiplocal);
|
Holster_(skiplocal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CC4::GetMaxSpeed(void)
|
||||||
|
{
|
||||||
|
return GetMaxSpeed_();
|
||||||
|
}
|
||||||
|
|
||||||
void CC4::PrimaryAttack(void)
|
void CC4::PrimaryAttack(void)
|
||||||
{
|
{
|
||||||
PrimaryAttack_();
|
PrimaryAttack_();
|
||||||
|
@ -111,6 +111,7 @@ typedef struct incomingtransfer_s
|
|||||||
#define Q_snprintf _snprintf
|
#define Q_snprintf _snprintf
|
||||||
#define Q_atoi atoi
|
#define Q_atoi atoi
|
||||||
#define Q_atof atof
|
#define Q_atof atof
|
||||||
|
#define Q_memmove memmove
|
||||||
//#define Q_strtoull strtoull
|
//#define Q_strtoull strtoull
|
||||||
//#define Q_FileNameCmp FileNameCmp
|
//#define Q_FileNameCmp FileNameCmp
|
||||||
#define Q_vsnprintf _vsnprintf
|
#define Q_vsnprintf _vsnprintf
|
||||||
|
@ -35,48 +35,54 @@
|
|||||||
enum GameEventType
|
enum GameEventType
|
||||||
{
|
{
|
||||||
EVENT_INVALID = 0,
|
EVENT_INVALID = 0,
|
||||||
EVENT_WEAPON_FIRED,
|
EVENT_WEAPON_FIRED, // tell bots the player is attack (argumens: 1 = attacker, 2 = NULL)
|
||||||
EVENT_WEAPON_FIRED_ON_EMPTY,
|
EVENT_WEAPON_FIRED_ON_EMPTY, // tell bots the player is attack without clip ammo (argumens: 1 = attacker, 2 = NULL)
|
||||||
EVENT_WEAPON_RELOADED,
|
EVENT_WEAPON_RELOADED, // tell bots the player is reloading his weapon (argumens: 1 = reloader, 2 = NULL)
|
||||||
EVENT_HE_GRENADE_EXPLODED,
|
|
||||||
EVENT_FLASHBANG_GRENADE_EXPLODED,
|
EVENT_HE_GRENADE_EXPLODED, // tell bots the HE grenade is exploded (argumens: 1 = grenade thrower, 2 = NULL)
|
||||||
EVENT_SMOKE_GRENADE_EXPLODED,
|
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_GRENADE_BOUNCED,
|
||||||
|
|
||||||
EVENT_BEING_SHOT_AT,
|
EVENT_BEING_SHOT_AT,
|
||||||
EVENT_PLAYER_BLINDED_BY_FLASHBANG,
|
EVENT_PLAYER_BLINDED_BY_FLASHBANG, // tell bots the player is flashed (argumens: 1 = flashed player, 2 = NULL)
|
||||||
EVENT_PLAYER_FOOTSTEP,
|
EVENT_PLAYER_FOOTSTEP, // tell bots the player is running (argumens: 1 = runner, 2 = NULL)
|
||||||
EVENT_PLAYER_JUMPED,
|
EVENT_PLAYER_JUMPED, // tell bots the player is jumped (argumens: 1 = jumper, 2 = NULL)
|
||||||
EVENT_PLAYER_DIED,
|
EVENT_PLAYER_DIED, // tell bots the player is killed (argumens: 1 = victim, 2 = killer)
|
||||||
EVENT_PLAYER_LANDED_FROM_HEIGHT,
|
EVENT_PLAYER_LANDED_FROM_HEIGHT, // tell bots the player is fell with some damage (argumens: 1 = felled player, 2 = NULL)
|
||||||
EVENT_PLAYER_TOOK_DAMAGE,
|
EVENT_PLAYER_TOOK_DAMAGE, // tell bots the player is take damage (argumens: 1 = victim, 2 = attacker)
|
||||||
EVENT_HOSTAGE_DAMAGED,
|
EVENT_HOSTAGE_DAMAGED, // tell bots the player has injured a hostage (argumens: 1 = hostage, 2 = injurer)
|
||||||
EVENT_HOSTAGE_KILLED,
|
EVENT_HOSTAGE_KILLED, // tell bots the player has killed a hostage (argumens: 1 = hostage, 2 = killer)
|
||||||
EVENT_DOOR,
|
|
||||||
EVENT_BREAK_GLASS,
|
EVENT_DOOR, // tell bots the door is moving (argumens: 1 = door, 2 = NULL)
|
||||||
EVENT_BREAK_WOOD,
|
EVENT_BREAK_GLASS, // tell bots the glass has break (argumens: 1 = glass, 2 = NULL)
|
||||||
EVENT_BREAK_METAL,
|
EVENT_BREAK_WOOD, // tell bots the wood has break (argumens: 1 = wood, 2 = NULL)
|
||||||
EVENT_BREAK_FLESH,
|
EVENT_BREAK_METAL, // tell bots the metal/computer has break (argumens: 1 = metal/computer, 2 = NULL)
|
||||||
EVENT_BREAK_CONCRETE,
|
EVENT_BREAK_FLESH, // tell bots the flesh has break (argumens: 1 = flesh, 2 = NULL)
|
||||||
EVENT_BOMB_PLANTED,
|
EVENT_BREAK_CONCRETE, // tell bots the concrete has break (argumens: 1 = concrete, 2 = NULL)
|
||||||
EVENT_BOMB_DROPPED,
|
|
||||||
EVENT_BOMB_PICKED_UP,
|
EVENT_BOMB_PLANTED, // tell bots the bomb has been planted (argumens: 1 = planter, 2 = NULL)
|
||||||
EVENT_BOMB_BEEP,
|
EVENT_BOMB_DROPPED, // tell bots the bomb has been dropped (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_BOMB_DEFUSING,
|
EVENT_BOMB_PICKED_UP, // let the bots hear the bomb pickup (argumens: 1 = player that pickup c4, 2 = NULL)
|
||||||
EVENT_BOMB_DEFUSE_ABORTED,
|
EVENT_BOMB_BEEP, // let the bots hear the bomb beeping (argumens: 1 = c4, 2 = NULL)
|
||||||
EVENT_BOMB_DEFUSED,
|
EVENT_BOMB_DEFUSING, // tell the bots someone has started defusing (argumens: 1 = defuser, 2 = NULL)
|
||||||
EVENT_BOMB_EXPLODED,
|
EVENT_BOMB_DEFUSE_ABORTED, // tell the bots someone has aborted defusing (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_HOSTAGE_USED,
|
EVENT_BOMB_DEFUSED, // tell the bots the bomb is defused (argumens: 1 = defuser, 2 = NULL)
|
||||||
EVENT_HOSTAGE_RESCUED,
|
EVENT_BOMB_EXPLODED, // let the bots hear the bomb exploding (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_ALL_HOSTAGES_RESCUED,
|
|
||||||
EVENT_VIP_ESCAPED,
|
EVENT_HOSTAGE_USED, // tell bots the hostage is used (argumens: 1 = user, 2 = NULL)
|
||||||
EVENT_VIP_ASSASSINATED,
|
EVENT_HOSTAGE_RESCUED, // tell bots the hostage is rescued (argumens: 1 = rescuer (CBasePlayer *), 2 = hostage (CHostage *))
|
||||||
EVENT_TERRORISTS_WIN,
|
EVENT_ALL_HOSTAGES_RESCUED, // tell bots the all hostages are rescued (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_CTS_WIN,
|
|
||||||
EVENT_ROUND_DRAW,
|
EVENT_VIP_ESCAPED, // tell bots the VIP is escaped (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_ROUND_WIN,
|
EVENT_VIP_ASSASSINATED, // tell bots the VIP is assassinated (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_ROUND_LOSS,
|
EVENT_TERRORISTS_WIN, // tell bots the terrorists won the round (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_ROUND_START,
|
EVENT_CTS_WIN, // tell bots the CTs won the round (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_PLAYER_SPAWNED,
|
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_CLIENT_CORPSE_SPAWNED,
|
||||||
EVENT_BUY_TIME_START,
|
EVENT_BUY_TIME_START,
|
||||||
EVENT_PLAYER_LEFT_BUY_ZONE,
|
EVENT_PLAYER_LEFT_BUY_ZONE,
|
||||||
@ -98,6 +104,7 @@ enum GameEventType
|
|||||||
EVENT_TUTOR_NEED_TO_BUY_DEFUSE_KIT,
|
EVENT_TUTOR_NEED_TO_BUY_DEFUSE_KIT,
|
||||||
EVENT_TUTOR_NEED_TO_BUY_GRENADE,
|
EVENT_TUTOR_NEED_TO_BUY_GRENADE,
|
||||||
EVENT_CAREER_TASK_DONE,
|
EVENT_CAREER_TASK_DONE,
|
||||||
|
|
||||||
EVENT_START_RADIO_1,
|
EVENT_START_RADIO_1,
|
||||||
EVENT_RADIO_COVER_ME,
|
EVENT_RADIO_COVER_ME,
|
||||||
EVENT_RADIO_YOU_TAKE_THE_POINT,
|
EVENT_RADIO_YOU_TAKE_THE_POINT,
|
||||||
@ -123,12 +130,13 @@ enum GameEventType
|
|||||||
EVENT_RADIO_NEGATIVE,
|
EVENT_RADIO_NEGATIVE,
|
||||||
EVENT_RADIO_ENEMY_DOWN,
|
EVENT_RADIO_ENEMY_DOWN,
|
||||||
EVENT_END_RADIO,
|
EVENT_END_RADIO,
|
||||||
EVENT_NEW_MATCH,
|
|
||||||
EVENT_PLAYER_CHANGED_TEAM,
|
EVENT_NEW_MATCH, // tell bots the game is new (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_BULLET_IMPACT,
|
EVENT_PLAYER_CHANGED_TEAM, // tell bots the player is switch his team (also called from ClientPutInServer()) (argumens: 1 = switcher, 2 = NULL)
|
||||||
EVENT_GAME_COMMENCE,
|
EVENT_BULLET_IMPACT, // tell bots the player is shoot at wall (argumens: 1 = shooter, 2 = shoot trace end position)
|
||||||
EVENT_WEAPON_ZOOMED,
|
EVENT_GAME_COMMENCE, // tell bots the game is commencing (argumens: 1 = NULL, 2 = NULL)
|
||||||
EVENT_HOSTAGE_CALLED_FOR_HELP,
|
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,
|
NUM_GAME_EVENTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ void CBot::__MAKE_VHOOK(ExecuteCommand)(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <4900fa> ../game_shared/bot/bot.cpp:362 */
|
/* <4900fa> ../game_shared/bot/bot.cpp:362 */
|
||||||
NOXREF void CBot::ResetCommand(void)
|
void CBot::ResetCommand(void)
|
||||||
{
|
{
|
||||||
m_forwardSpeed = 0.0f;
|
m_forwardSpeed = 0.0f;
|
||||||
m_strafeSpeed = 0.0f;
|
m_strafeSpeed = 0.0f;
|
||||||
@ -237,7 +237,7 @@ NOXREF void CBot::ResetCommand(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <49011b> ../game_shared/bot/bot.cpp:372 */
|
/* <49011b> ../game_shared/bot/bot.cpp:372 */
|
||||||
NOXREF byte CBot::ThrottledMsec(void) const
|
byte CBot::ThrottledMsec(void) const
|
||||||
{
|
{
|
||||||
int iNewMsec;
|
int iNewMsec;
|
||||||
|
|
||||||
|
@ -282,8 +282,8 @@ protected:
|
|||||||
const BotProfile *m_profile;
|
const BotProfile *m_profile;
|
||||||
private:
|
private:
|
||||||
|
|
||||||
NOXREF void ResetCommand(void);
|
void ResetCommand(void);
|
||||||
NOXREF byte ThrottledMsec(void) const;
|
byte ThrottledMsec(void) const;
|
||||||
|
|
||||||
// returns current movement speed (for walk/run)
|
// returns current movement speed (for walk/run)
|
||||||
float GetMoveSpeed(void);
|
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)
|
NOBODY /*extern*/ CBasePlayer *UTIL_GetClosestPlayer(const Vector *pos, int team, float *distance)
|
||||||
{
|
{
|
||||||
CBasePlayer *closePlayer = NULL;
|
CBasePlayer *closePlayer = NULL;
|
||||||
float closeDistSq = 999999999999.9f;
|
float closeDistSq = 1.0e12f; // 999999999999.9f
|
||||||
|
|
||||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
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.
|
// If functor returns false, stop iteration and return false.
|
||||||
|
|
||||||
/* <4700e1> ../game_shared/bot/bot_util.h:294 */
|
/* <4700e1> ../game_shared/bot/bot_util.h:294 */
|
||||||
template <
|
template <typename Functor>
|
||||||
typename Functor
|
|
||||||
>
|
|
||||||
bool ForEachPlayer(Functor &func)
|
bool ForEachPlayer(Functor &func)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
for (int i = 1; i <= gpGlobals->maxClients; i++)
|
||||||
@ -228,6 +226,7 @@ bool ForEachPlayer(Functor &func)
|
|||||||
if (func(player) == false)
|
if (func(player) == false)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,18 +62,18 @@ FILE_GLOBAL int BlockedIDCount = 0;
|
|||||||
|
|
||||||
#else // HOOK_GAMEDLL
|
#else // HOOK_GAMEDLL
|
||||||
|
|
||||||
unsigned int IMPLEMENT_ARRAY_CLASS(CNavArea, m_nextID);
|
unsigned int IMPL_CLASS(CNavArea, m_nextID);
|
||||||
unsigned int IMPLEMENT_ARRAY_CLASS(CNavArea, m_masterMarker);
|
unsigned int IMPL_CLASS(CNavArea, m_masterMarker);
|
||||||
|
|
||||||
unsigned int IMPLEMENT_ARRAY_CLASS(HidingSpot, m_nextID);
|
unsigned int IMPL_CLASS(HidingSpot, m_nextID);
|
||||||
unsigned int IMPLEMENT_ARRAY_CLASS(HidingSpot, m_masterMarker);
|
unsigned int IMPL_CLASS(HidingSpot, m_masterMarker);
|
||||||
|
|
||||||
NavLadderList TheNavLadderList;
|
NavLadderList TheNavLadderList;
|
||||||
HidingSpotList TheHidingSpotList;
|
HidingSpotList TheHidingSpotList;
|
||||||
NavAreaList TheNavAreaList;
|
NavAreaList TheNavAreaList;
|
||||||
CNavAreaGrid TheNavAreaGrid;
|
CNavAreaGrid TheNavAreaGrid;
|
||||||
CNavArea *IMPLEMENT_ARRAY_CLASS(CNavArea, m_openList);
|
CNavArea *IMPL_CLASS(CNavArea, m_openList);
|
||||||
bool IMPLEMENT_ARRAY_CLASS(CNavArea, m_isReset);
|
bool IMPL_CLASS(CNavArea, m_isReset);
|
||||||
|
|
||||||
float lastDrawTimestamp;
|
float lastDrawTimestamp;
|
||||||
NavAreaList goodSizedAreaList;
|
NavAreaList goodSizedAreaList;
|
||||||
@ -121,7 +121,7 @@ void DestroyHidingSpots(void)
|
|||||||
area->m_hidingSpotList.clear();
|
area->m_hidingSpotList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_ARRAY_CLASS(HidingSpot, m_nextID) = 0;
|
IMPL_CLASS(HidingSpot, m_nextID) = 0;
|
||||||
|
|
||||||
// free all the HidingSpots
|
// free all the HidingSpots
|
||||||
for (HidingSpotList::iterator iter = TheHidingSpotList.begin(); iter != TheHidingSpotList.end(); iter++)
|
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 we are resetting the system, don't bother cleaning up - all areas are being destroyed
|
||||||
if (IMPL(m_isReset))
|
if (IMPL(m_isReset))
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// tell the other areas we are going away
|
// tell the other areas we are going away
|
||||||
NavAreaList::iterator iter;
|
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
|
// Return true if given area is connected in given direction
|
||||||
// if dir == NUM_DIRECTIONS, check all directions (direction is unknown)
|
// 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 */
|
/* <4c7708> ../game_shared/bot/nav_area.cpp:615 */
|
||||||
bool CNavArea::IsConnected(const CNavArea *area, NavDirType dir) const
|
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
|
// 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 */
|
/* <4c89fd> ../game_shared/bot/nav_area.cpp:674 */
|
||||||
float CNavArea::ComputeHeightChange(const CNavArea *area)
|
float CNavArea::ComputeHeightChange(const CNavArea *area)
|
||||||
@ -993,7 +991,7 @@ void DestroyLadders(void)
|
|||||||
/* <4d6733> ../game_shared/bot/nav_area.cpp:994 */
|
/* <4d6733> ../game_shared/bot/nav_area.cpp:994 */
|
||||||
void DestroyNavigationMap(void)
|
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
|
// remove each element of the list and delete them
|
||||||
while (!TheNavAreaList.empty())
|
while (!TheNavAreaList.empty())
|
||||||
@ -1003,8 +1001,7 @@ void DestroyNavigationMap(void)
|
|||||||
delete area;
|
delete area;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TheNavAreaList.clear();
|
IMPL_CLASS(CNavArea, m_isReset) = false;
|
||||||
IMPLEMENT_ARRAY_CLASS(CNavArea, m_isReset) = false;
|
|
||||||
|
|
||||||
// destroy ladder representations
|
// destroy ladder representations
|
||||||
DestroyLadders();
|
DestroyLadders();
|
||||||
@ -1014,13 +1011,13 @@ void DestroyNavigationMap(void)
|
|||||||
|
|
||||||
// destroy navigation nodes created during map learning
|
// destroy navigation nodes created during map learning
|
||||||
CNavNode *node, *next;
|
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;
|
next = node->m_next;
|
||||||
delete node;
|
delete node;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CNavNode, m_list) = NULL;
|
IMPL_CLASS(CNavNode, m_list) = NULL;
|
||||||
|
|
||||||
// reset the grid
|
// reset the grid
|
||||||
TheNavAreaGrid.Reset();
|
TheNavAreaGrid.Reset();
|
||||||
@ -1193,13 +1190,13 @@ void ConnectGeneratedAreas(void)
|
|||||||
|
|
||||||
// south edge - this edge's nodes are actually part of adjacent areas
|
// south edge - this edge's nodes are actually part of adjacent areas
|
||||||
// move one node north, and scan west to east
|
// 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 = area->m_node[ SOUTH_WEST ];
|
||||||
node = node->GetConnectedNode(NORTH);
|
node = node->GetConnectedNode(NORTH);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
CNavNode *end = area->m_node[ SOUTH_EAST ]->GetConnectedNode(NORTH);
|
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))
|
for (; node && node != end; node = node->GetConnectedNode(EAST))
|
||||||
{
|
{
|
||||||
CNavNode *adj = node->GetConnectedNode(SOUTH);
|
CNavNode *adj = node->GetConnectedNode(SOUTH);
|
||||||
@ -1603,7 +1600,7 @@ int BuildArea(CNavNode *node, int width, int height)
|
|||||||
|
|
||||||
if (!nwNode || !neNode || !seNode || !swNode)
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2636,7 +2633,7 @@ void CNavArea::AddToOpenList(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A smaller value has been found, update this area on the open list
|
// 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 */
|
/* <4cbd73> ../game_shared/bot/nav_area.cpp:2685 */
|
||||||
void CNavArea::UpdateOnOpenList(void)
|
void CNavArea::UpdateOnOpenList(void)
|
||||||
@ -2671,7 +2668,7 @@ void CNavArea::RemoveFromOpenList(void)
|
|||||||
if (m_prevOpen)
|
if (m_prevOpen)
|
||||||
m_prevOpen->m_nextOpen = m_nextOpen;
|
m_prevOpen->m_nextOpen = m_nextOpen;
|
||||||
else
|
else
|
||||||
IMPLEMENT_ARRAY(m_openList) = m_nextOpen;
|
IMPL(m_openList) = m_nextOpen;
|
||||||
|
|
||||||
if (m_nextOpen)
|
if (m_nextOpen)
|
||||||
m_nextOpen->m_prevOpen = m_prevOpen;
|
m_nextOpen->m_prevOpen = m_prevOpen;
|
||||||
@ -3361,7 +3358,7 @@ public:
|
|||||||
if (IsSpotOccupied(m_me, spot->GetPosition()))
|
if (IsSpotOccupied(m_me, spot->GetPosition()))
|
||||||
{
|
{
|
||||||
// player is in hiding spot
|
// player is in hiding spot
|
||||||
/// @todo Check if player is moving or sitting still
|
// TODO: Check if player is moving or sitting still
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3404,7 +3401,7 @@ public:
|
|||||||
|
|
||||||
// Do a breadth-first search to find a nearby hiding spot and return it.
|
// 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.
|
// 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 */
|
/* <4d1806> ../game_shared/bot/nav_area.cpp:3477 */
|
||||||
const Vector *FindNearbyHidingSpot(CBaseEntity *me, const Vector *pos, CNavArea *startArea, float maxRange, bool isSniper, bool useNearest)
|
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)
|
// 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 */
|
/* <4ce934> ../game_shared/bot/nav_area.cpp:3707 */
|
||||||
int CNavArea::GetPlayerCount(int teamID, CBasePlayer *ignore) const
|
int CNavArea::GetPlayerCount(int teamID, CBasePlayer *ignore) const
|
||||||
@ -4642,7 +4639,7 @@ public:
|
|||||||
|
|
||||||
// Can we see this area?
|
// Can we see this area?
|
||||||
// For now, if we can see any corner, we can see the 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 */
|
/* <4c4182> ../game_shared/bot/nav_area.cpp:4791 */
|
||||||
inline bool IsAreaVisible(const Vector *pos, const CNavArea *area)
|
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 */
|
/* <4cf54c> ../game_shared/bot/nav_area.cpp:4817 */
|
||||||
void CNavArea::ComputeApproachAreas(void)
|
void CNavArea::ComputeApproachAreas(void)
|
||||||
{
|
{
|
||||||
_LOG_TRACE
|
|
||||||
|
|
||||||
m_approachCount = 0;
|
m_approachCount = 0;
|
||||||
|
|
||||||
if (cv_bot_quicksave.value > 0.0f)
|
if (cv_bot_quicksave.value > 0.0f)
|
||||||
|
@ -892,7 +892,7 @@ bool NavAreaBuildPath(CNavArea *startArea, CNavArea *goalArea, const Vector *goa
|
|||||||
|
|
||||||
if (ladderUp)
|
if (ladderUp)
|
||||||
{
|
{
|
||||||
ladder = *ladderIter;
|
ladder = (*ladderIter);
|
||||||
if (ladder->m_isDangling)
|
if (ladder->m_isDangling)
|
||||||
{
|
{
|
||||||
++ladderIter;
|
++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);
|
fprintf(fp, "v %f %f %f\n", m_extent.lo.x, m_extent.hi.y, m_swZ);
|
||||||
|
|
||||||
static int base = 1;
|
static int base = 1;
|
||||||
fprintf(fp, "\n\ng %04dArea%s%s%s%s\n",
|
fprintf(fp, "\n\ng %04dArea%s%s%s%s\n", m_id,
|
||||||
m_id,
|
(GetAttributes() & NAV_CROUCH) ? "CROUCH" : "", (GetAttributes() & NAV_JUMP) ? "JUMP" : "",
|
||||||
(GetAttributes() & NAV_CROUCH) ? "CROUCH" : "",
|
(GetAttributes() & NAV_PRECISE) ? "PRECISE" : "", (GetAttributes() & NAV_NO_JUMP) ? "NO_JUMP" : "");
|
||||||
(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);
|
fprintf(fp, "f %d %d %d %d\n\n", base, base + 1, base + 2, base + 3);
|
||||||
base += 4;
|
base += 4;
|
||||||
@ -209,9 +205,7 @@ NOBODY void CNavArea::Save(int fd, unsigned int version)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Store hiding spots for this area
|
// Store hiding spots for this area
|
||||||
//
|
|
||||||
unsigned char count;
|
unsigned char count;
|
||||||
if (m_hidingSpotList.size() > 255)
|
if (m_hidingSpotList.size() > 255)
|
||||||
{
|
{
|
||||||
@ -238,10 +232,7 @@ NOBODY void CNavArea::Save(int fd, unsigned int version)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Save the approach areas for this area
|
// Save the approach areas for this area
|
||||||
//
|
|
||||||
|
|
||||||
// save number of approach areas
|
// save number of approach areas
|
||||||
Q_write(fd, &m_approachCount, sizeof(unsigned char));
|
Q_write(fd, &m_approachCount, sizeof(unsigned char));
|
||||||
if (cv_bot_debug.value > 0.0f)
|
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));
|
Q_write(fd, &type, sizeof(unsigned char));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Save encounter spots for this area
|
// Save encounter spots for this area
|
||||||
//
|
|
||||||
{
|
{
|
||||||
// save number of encounter paths for this area
|
// save number of encounter paths for this area
|
||||||
unsigned int count = m_spotEncounterList.size();
|
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));
|
file->Read(&m_id, sizeof(unsigned int));
|
||||||
|
|
||||||
// update nextID to avoid collisions
|
// update nextID to avoid collisions
|
||||||
if (m_id >= IMPLEMENT_ARRAY(m_nextID))
|
if (m_id >= IMPL(m_nextID))
|
||||||
IMPLEMENT_ARRAY(m_nextID) = m_id + 1;
|
IMPL(m_nextID) = m_id + 1;
|
||||||
|
|
||||||
// load attribute flags
|
// load attribute flags
|
||||||
file->Read(&m_attributeFlags, sizeof(unsigned char));
|
file->Read(&m_attributeFlags, sizeof(unsigned char));
|
||||||
@ -384,10 +373,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Load hiding spots
|
// Load hiding spots
|
||||||
//
|
|
||||||
|
|
||||||
// load number of hiding spots
|
// load number of hiding spots
|
||||||
unsigned char hidingSpotCount;
|
unsigned char hidingSpotCount;
|
||||||
file->Read(&hidingSpotCount, sizeof(unsigned char));
|
file->Read(&hidingSpotCount, sizeof(unsigned char));
|
||||||
@ -420,9 +406,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Load number of approach areas
|
// Load number of approach areas
|
||||||
//
|
|
||||||
file->Read(&m_approachCount, sizeof(unsigned char));
|
file->Read(&m_approachCount, sizeof(unsigned char));
|
||||||
|
|
||||||
// load approach area info (IDs)
|
// load approach area info (IDs)
|
||||||
@ -440,9 +424,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
|||||||
m_approach[a].hereToNextHow = (NavTraverseType)type;
|
m_approach[a].hereToNextHow = (NavTraverseType)type;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Load encounter paths for this area
|
// Load encounter paths for this area
|
||||||
//
|
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
file->Read(&count, sizeof(unsigned int));
|
file->Read(&count, sizeof(unsigned int));
|
||||||
|
|
||||||
@ -511,9 +493,7 @@ NOBODY void CNavArea::Load(SteamFile *file, unsigned int version)
|
|||||||
if (version < 5)
|
if (version < 5)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//
|
|
||||||
// Load Place data
|
// Load Place data
|
||||||
//
|
|
||||||
PlaceDirectory::EntryType entry;
|
PlaceDirectory::EntryType entry;
|
||||||
file->Read(&entry, sizeof(entry));
|
file->Read(&entry, sizeof(entry));
|
||||||
|
|
||||||
@ -616,7 +596,7 @@ NOBODY NavErrorType CNavArea::PostLoad(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// build overlap list
|
// build overlap list
|
||||||
/// @todo Optimize this
|
// TODO: Optimize this
|
||||||
for (NavAreaList::iterator oiter = TheNavAreaList.begin(); oiter != TheNavAreaList.end(); ++oiter)
|
for (NavAreaList::iterator oiter = TheNavAreaList.begin(); oiter != TheNavAreaList.end(); ++oiter)
|
||||||
{
|
{
|
||||||
CNavArea *area = *oiter;
|
CNavArea *area = *oiter;
|
||||||
@ -658,9 +638,7 @@ NOBODY bool SaveNavigationMap(const char *filename)
|
|||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//
|
|
||||||
// Store the NAV file
|
// Store the NAV file
|
||||||
//
|
|
||||||
COM_FixSlashes(const_cast<char *>(filename));
|
COM_FixSlashes(const_cast<char *>(filename));
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@ -697,9 +675,7 @@ NOBODY bool SaveNavigationMap(const char *filename)
|
|||||||
|
|
||||||
Q_write(fd, &bspSize, sizeof(unsigned int));
|
Q_write(fd, &bspSize, sizeof(unsigned int));
|
||||||
|
|
||||||
//
|
|
||||||
// Build a directory of the Places in this map
|
// Build a directory of the Places in this map
|
||||||
//
|
|
||||||
placeDirectory.Reset();
|
placeDirectory.Reset();
|
||||||
|
|
||||||
NavAreaList::iterator it;
|
NavAreaList::iterator it;
|
||||||
@ -716,10 +692,7 @@ NOBODY bool SaveNavigationMap(const char *filename)
|
|||||||
|
|
||||||
placeDirectory.Save(fd);
|
placeDirectory.Save(fd);
|
||||||
|
|
||||||
//
|
|
||||||
// Store navigation areas
|
// Store navigation areas
|
||||||
//
|
|
||||||
|
|
||||||
// store number of areas
|
// store number of areas
|
||||||
unsigned int count = TheNavAreaList.size();
|
unsigned int count = TheNavAreaList.size();
|
||||||
Q_write(fd, &count, sizeof(unsigned int));
|
Q_write(fd, &count, sizeof(unsigned int));
|
||||||
@ -902,7 +875,7 @@ NOBODY NavErrorType __declspec(naked) LoadNavigationMap(void)
|
|||||||
DestroyNavigationMap();
|
DestroyNavigationMap();
|
||||||
placeDirectory.Reset();
|
placeDirectory.Reset();
|
||||||
|
|
||||||
IMPLEMENT_ARRAY_CLASS(CNavArea, m_nextID) = 1;
|
IMPL_CLASS(CNavArea, m_nextID) = 1;
|
||||||
|
|
||||||
SteamFile navFile(filename);
|
SteamFile navFile(filename);
|
||||||
|
|
||||||
@ -1015,9 +988,7 @@ NOBODY NavErrorType __declspec(naked) LoadNavigationMap(void)
|
|||||||
LoadLocationFile(filename);
|
LoadLocationFile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Set up all the ladders
|
// Set up all the ladders
|
||||||
//
|
|
||||||
BuildLadders();
|
BuildLadders();
|
||||||
|
|
||||||
return NAV_OK;
|
return NAV_OK;
|
||||||
|
@ -16,8 +16,8 @@ unsigned int CNavNode::m_listLength = 0;
|
|||||||
|
|
||||||
//NavDirType Opposite[ NUM_DIRECTIONS ];
|
//NavDirType Opposite[ NUM_DIRECTIONS ];
|
||||||
|
|
||||||
CNavNode *IMPLEMENT_ARRAY_CLASS(CNavNode, m_list);
|
CNavNode *IMPL_CLASS(CNavNode, m_list);
|
||||||
unsigned int IMPLEMENT_ARRAY_CLASS(CNavNode, m_listLength);
|
unsigned int IMPL_CLASS(CNavNode, m_listLength);
|
||||||
|
|
||||||
//Extent NodeMapExtent;
|
//Extent NodeMapExtent;
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
BOOL IsBiLinked(NavDirType dir) const; // node is bidirectionally linked to another node in the given direction
|
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
|
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)
|
void Cover(void)
|
||||||
{
|
{
|
||||||
m_isCovered = true;
|
m_isCovered = true;
|
||||||
|
@ -91,9 +91,7 @@ public:
|
|||||||
void Optimize(void);
|
void Optimize(void);
|
||||||
|
|
||||||
// Compute shortest path from 'start' to 'goal' via A* algorithm
|
// Compute shortest path from 'start' to 'goal' via A* algorithm
|
||||||
template<
|
template<typename CostFunctor>
|
||||||
typename CostFunctor
|
|
||||||
>
|
|
||||||
bool Compute(const Vector *start, const Vector *goal, CostFunctor &costFunc)
|
bool Compute(const Vector *start, const Vector *goal, CostFunctor &costFunc)
|
||||||
{
|
{
|
||||||
Invalidate();
|
Invalidate();
|
||||||
@ -209,7 +207,7 @@ public:
|
|||||||
return m_isStuck ? m_stuckTimer.GetElapsedTime() : 0.0f;
|
return m_isStuck ? m_stuckTimer.GetElapsedTime() : 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private:*/
|
private:
|
||||||
bool m_isStuck; // if true, we are stuck
|
bool m_isStuck; // if true, we are stuck
|
||||||
Vector m_stuckSpot; // the location where we became stuck
|
Vector m_stuckSpot; // the location where we became stuck
|
||||||
IntervalTimer m_stuckTimer; // how long we have been stuck
|
IntervalTimer m_stuckTimer; // how long we have been stuck
|
||||||
|
@ -33,9 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Encapsulation of a finite-state-machine state
|
// Encapsulation of a finite-state-machine state
|
||||||
template<
|
template<typename T>
|
||||||
typename T
|
|
||||||
>
|
|
||||||
/* <5c4388> ../game_shared/bot/simple_state_machine.h:21 */
|
/* <5c4388> ../game_shared/bot/simple_state_machine.h:21 */
|
||||||
class SimpleState
|
class SimpleState
|
||||||
{
|
{
|
||||||
@ -65,10 +63,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Encapsulation of a finite state machine
|
// Encapsulation of a finite state machine
|
||||||
template<
|
template<typename T, typename S>
|
||||||
typename T,
|
|
||||||
typename S
|
|
||||||
>
|
|
||||||
/* <5c4bab> ../game_shared/bot/simple_state_machine.h:68 */
|
/* <5c4bab> ../game_shared/bot/simple_state_machine.h:68 */
|
||||||
class SimpleStateMachine
|
class SimpleStateMachine
|
||||||
{
|
{
|
||||||
|
@ -715,6 +715,13 @@ bool HIDDEN GetAddress(Module *module, Address *addr, size_t baseOffset)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HOOK_GAMEDLL
|
||||||
|
void *addr_orig;
|
||||||
|
char patchByte[5];
|
||||||
|
char patchByteOriginal[5];
|
||||||
|
#endif // HOOK_GAMEDLL
|
||||||
|
|
||||||
bool HIDDEN HookFunction(Module *module, FunctionHook *hook)
|
bool HIDDEN HookFunction(Module *module, FunctionHook *hook)
|
||||||
{
|
{
|
||||||
if (hook->originalAddress == NULL)
|
if (hook->originalAddress == NULL)
|
||||||
@ -725,8 +732,15 @@ bool HIDDEN HookFunction(Module *module, FunctionHook *hook)
|
|||||||
*(size_t *)&patch[1] = hook->handlerFunc - hook->originalAddress - 5;
|
*(size_t *)&patch[1] = hook->handlerFunc - hook->originalAddress - 5;
|
||||||
patch[0] = 0xE9;
|
patch[0] = 0xE9;
|
||||||
|
|
||||||
#if 0
|
#if HOOK_GAMEDLL
|
||||||
if (strcmp(hook->symbolName,"_ZNK9BotPhrase12GetSpeakableEiPf")==0)
|
//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;
|
addr_orig = (void *)hook->originalAddress;
|
||||||
|
|
||||||
|
@ -152,4 +152,10 @@ void HIDDEN GetAddressVtableByClassname(const char *szClassName, const int iOffs
|
|||||||
|
|
||||||
#endif // _WIN32 && REGAMEDLL_UNIT_TESTS
|
#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
|
#endif // _MEMORY_H
|
||||||
|
@ -149,6 +149,9 @@
|
|||||||
|
|
||||||
#define STDCALL __stdcall
|
#define STDCALL __stdcall
|
||||||
#define HIDDEN
|
#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
|
// Attributes to specify an "exported" function, visible from outside the
|
||||||
// DLL.
|
// DLL.
|
||||||
@ -187,6 +190,9 @@
|
|||||||
#define CDECL __attribute__ ((cdecl))
|
#define CDECL __attribute__ ((cdecl))
|
||||||
#define STDCALL __attribute__ ((stdcall))
|
#define STDCALL __attribute__ ((stdcall))
|
||||||
#define HIDDEN __attribute__((visibility("hidden")))
|
#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
|
#undef DLLEXPORT
|
||||||
#define DLLEXPORT __attribute__((visibility("default")))
|
#define DLLEXPORT __attribute__((visibility("default")))
|
||||||
@ -230,7 +236,9 @@
|
|||||||
static const bool __isLinux = true;
|
static const bool __isLinux = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define EXT_FUNC /*FORCE_STACK_ALIGN*/
|
||||||
|
|
||||||
extern void regamedll_log(const char *fmt, ...);
|
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
|
#endif // OSCONFIG_H
|
||||||
|
@ -643,17 +643,8 @@
|
|||||||
<ClCompile Include="..\public\interface.cpp" />
|
<ClCompile Include="..\public\interface.cpp" />
|
||||||
<ClCompile Include="..\public\MemPool.cpp" />
|
<ClCompile Include="..\public\MemPool.cpp" />
|
||||||
<ClCompile Include="..\public\tier0\dbg.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="..\public\utlsymbol.cpp" />
|
||||||
|
<ClCompile Include="..\regamedll\hookchains_impl.cpp" />
|
||||||
<ClCompile Include="..\regamedll\mem.cpp" />
|
<ClCompile Include="..\regamedll\mem.cpp" />
|
||||||
<ClCompile Include="..\regamedll\platform.cpp" />
|
<ClCompile Include="..\regamedll\platform.cpp" />
|
||||||
<ClCompile Include="..\regamedll\precompiled.cpp">
|
<ClCompile Include="..\regamedll\precompiled.cpp">
|
||||||
@ -673,6 +664,8 @@
|
|||||||
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">precompiled.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tests|Win32'">precompiled.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\regamedll\RegameDLLRuntimeConfig.cpp" />
|
<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="..\regamedll\sse_mathfun.cpp" />
|
||||||
<ClCompile Include="..\testsuite\demoplayer.cpp">
|
<ClCompile Include="..\testsuite\demoplayer.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MP|Win32'">true</ExcludedFromBuild>
|
||||||
@ -881,6 +874,9 @@
|
|||||||
<ClInclude Include="..\public\interface.h" />
|
<ClInclude Include="..\public\interface.h" />
|
||||||
<ClInclude Include="..\public\MemPool.h" />
|
<ClInclude Include="..\public\MemPool.h" />
|
||||||
<ClInclude Include="..\public\protected_things.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\isteamapps.h" />
|
||||||
<ClInclude Include="..\public\steam\isteambilling.h" />
|
<ClInclude Include="..\public\steam\isteambilling.h" />
|
||||||
<ClInclude Include="..\public\steam\isteamclient.h" />
|
<ClInclude Include="..\public\steam\isteamclient.h" />
|
||||||
@ -904,21 +900,19 @@
|
|||||||
<ClInclude Include="..\public\steam\steam_api.h" />
|
<ClInclude Include="..\public\steam\steam_api.h" />
|
||||||
<ClInclude Include="..\public\steam\steam_gameserver.h" />
|
<ClInclude Include="..\public\steam\steam_gameserver.h" />
|
||||||
<ClInclude Include="..\public\tier0\dbg.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\tier0\platform.h" />
|
||||||
<ClInclude Include="..\public\utlmemory.h" />
|
<ClInclude Include="..\public\utlmemory.h" />
|
||||||
<ClInclude Include="..\public\utlrbtree.h" />
|
<ClInclude Include="..\public\utlrbtree.h" />
|
||||||
<ClInclude Include="..\public\utlsymbol.h" />
|
<ClInclude Include="..\public\utlsymbol.h" />
|
||||||
<ClInclude Include="..\public\utlvector.h" />
|
<ClInclude Include="..\public\utlvector.h" />
|
||||||
<ClInclude Include="..\regamedll\dlls.h" />
|
<ClInclude Include="..\regamedll\dlls.h" />
|
||||||
|
<ClInclude Include="..\regamedll\hookchains_impl.h" />
|
||||||
<ClInclude Include="..\regamedll\mem.h" />
|
<ClInclude Include="..\regamedll\mem.h" />
|
||||||
<ClInclude Include="..\regamedll\platform.h" />
|
<ClInclude Include="..\regamedll\platform.h" />
|
||||||
<ClInclude Include="..\regamedll\precompiled.h" />
|
<ClInclude Include="..\regamedll\precompiled.h" />
|
||||||
<ClInclude Include="..\regamedll\RegameDLLRuntimeConfig.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="..\regamedll\sse_mathfun.h" />
|
||||||
<ClInclude Include="..\testsuite\demoplayer.h" />
|
<ClInclude Include="..\testsuite\demoplayer.h" />
|
||||||
<ClInclude Include="..\testsuite\funccalls.h" />
|
<ClInclude Include="..\testsuite\funccalls.h" />
|
||||||
@ -1097,11 +1091,11 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@ -1134,11 +1128,11 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@ -1170,11 +1164,11 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@ -1206,11 +1200,11 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
@ -1242,11 +1236,11 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>precompiled.h</PrecompiledHeaderFile>
|
||||||
@ -1278,13 +1272,13 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
@ -1317,13 +1311,13 @@
|
|||||||
<Message>Setup version from SVN revision</Message>
|
<Message>Setup version from SVN revision</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<ClCompile>
|
<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>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<SDLCheck>true</SDLCheck>
|
<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>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/arch:IA32 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
@ -40,9 +40,6 @@
|
|||||||
<Filter Include="dlls">
|
<Filter Include="dlls">
|
||||||
<UniqueIdentifier>{73fb61d4-c4ca-4159-8967-0e98666e1d4d}</UniqueIdentifier>
|
<UniqueIdentifier>{73fb61d4-c4ca-4159-8967-0e98666e1d4d}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="public\tier0">
|
|
||||||
<UniqueIdentifier>{57885e8e-0086-47a7-8dc8-7706a51e1067}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="game_shared">
|
<Filter Include="game_shared">
|
||||||
<UniqueIdentifier>{1d2d9bb7-4ba0-4fe6-a0d9-6fae9f96ec3c}</UniqueIdentifier>
|
<UniqueIdentifier>{1d2d9bb7-4ba0-4fe6-a0d9-6fae9f96ec3c}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
@ -82,6 +79,12 @@
|
|||||||
<Filter Include="hookers\stl">
|
<Filter Include="hookers\stl">
|
||||||
<UniqueIdentifier>{e0c6021c-de51-464f-b971-89942190e545}</UniqueIdentifier>
|
<UniqueIdentifier>{e0c6021c-de51-464f-b971-89942190e545}</UniqueIdentifier>
|
||||||
</Filter>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\hookers\memory.cpp">
|
<ClCompile Include="..\hookers\memory.cpp">
|
||||||
@ -99,15 +102,6 @@
|
|||||||
<ClCompile Include="..\regamedll\precompiled.cpp">
|
<ClCompile Include="..\regamedll\precompiled.cpp">
|
||||||
<Filter>regamedll</Filter>
|
<Filter>regamedll</Filter>
|
||||||
</ClCompile>
|
</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">
|
<ClCompile Include="..\dlls\h_export.cpp">
|
||||||
<Filter>dlls</Filter>
|
<Filter>dlls</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@ -564,6 +558,18 @@
|
|||||||
<ClCompile Include="..\dlls\lights.cpp">
|
<ClCompile Include="..\dlls\lights.cpp">
|
||||||
<Filter>dlls</Filter>
|
<Filter>dlls</Filter>
|
||||||
</ClCompile>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\hookers\memory.h">
|
<ClInclude Include="..\hookers\memory.h">
|
||||||
@ -668,27 +674,6 @@
|
|||||||
<ClInclude Include="..\dlls\weapons.h">
|
<ClInclude Include="..\dlls\weapons.h">
|
||||||
<Filter>dlls</Filter>
|
<Filter>dlls</Filter>
|
||||||
</ClInclude>
|
</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">
|
<ClInclude Include="..\regamedll\platform.h">
|
||||||
<Filter>regamedll</Filter>
|
<Filter>regamedll</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@ -1127,6 +1112,30 @@
|
|||||||
<ClInclude Include="..\hookers\stl\use_ansi.h">
|
<ClInclude Include="..\hookers\stl\use_ansi.h">
|
||||||
<Filter>hookers\stl</Filter>
|
<Filter>hookers\stl</Filter>
|
||||||
</ClInclude>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\linux\appversion.sh">
|
<None Include="..\linux\appversion.sh">
|
||||||
|
@ -155,7 +155,7 @@ void PM_InitTextureTypes(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2cc7c5> ../cstrike/pm_shared/pm_shared.c:283 */
|
/* <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 left, right, pivot;
|
||||||
int val;
|
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
|
pmove->flTimeStepSound += 100; // slower step time if ducking
|
||||||
|
|
||||||
// play the sound
|
// play the sound
|
||||||
// 35% volume if ducking
|
// 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;
|
fvol *= 0.35;
|
||||||
}
|
}
|
||||||
@ -3159,7 +3159,7 @@ void PM_CreateStuckTable(void)
|
|||||||
// and client. This will ensure that prediction behaves appropriately.
|
// and client. This will ensure that prediction behaves appropriately.
|
||||||
|
|
||||||
/* <2ce182> ../cstrike/pm_shared/pm_shared.c:3596 */
|
/* <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);
|
assert(pm_shared_initialized);
|
||||||
|
|
||||||
@ -3201,7 +3201,7 @@ NOXREF int PM_GetPhysEntInfo(int ent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* <2ce21b> ../cstrike/pm_shared/pm_shared.c:3638 */
|
/* <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);
|
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");
|
|
||||||
}
|
|
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