From 28e6782c03c643bd80b0294d1102759744bf99e7 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Thu, 15 Dec 2022 16:39:22 +0300 Subject: [PATCH] rename method & member --- regamedll/dlls/addons/trigger_bomb_reset.cpp | 2 +- regamedll/dlls/player.cpp | 2 +- regamedll/dlls/weapons.cpp | 6 +++--- regamedll/dlls/weapons.h | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/regamedll/dlls/addons/trigger_bomb_reset.cpp b/regamedll/dlls/addons/trigger_bomb_reset.cpp index 999fc6595..176240656 100644 --- a/regamedll/dlls/addons/trigger_bomb_reset.cpp +++ b/regamedll/dlls/addons/trigger_bomb_reset.cpp @@ -33,6 +33,6 @@ void CTriggerBombReset::Touch(CBaseEntity *pOther) if (pWeaponBox && pWeaponBox->m_bIsBomb) { // If the bomb touches this trigger, tell it to reset to its last known valid position. - pWeaponBox->ResetToLastValidPlayerHeldPosition(); + pWeaponBox->ResetToLastValidPlayerHeldC4Position(); } } diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 8e13da29a..b89784b5f 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -8030,7 +8030,7 @@ CBaseEntity *EXT_FUNC CBasePlayer::__API_HOOK(DropPlayerItem)(const char *pszIte pWeaponBox->m_bIsBomb = true; pWeaponBox->SetThink(&CWeaponBox::BombThink); pWeaponBox->pev->nextthink = gpGlobals->time + 1.0f; - pWeaponBox->SetLastValidHeldPosition(((CC4 *)pWeapon)->GetLastValidHeldPosition()); + pWeaponBox->SetLastValidHeldC4Position(((CC4 *)pWeapon)->GetLastValidHeldPosition()); if (TheCSBots()) { diff --git a/regamedll/dlls/weapons.cpp b/regamedll/dlls/weapons.cpp index 19c42e9ca..bb1a5654d 100644 --- a/regamedll/dlls/weapons.cpp +++ b/regamedll/dlls/weapons.cpp @@ -2179,14 +2179,14 @@ void CWeaponBox::SetObjectCollisionBox() pev->absmax = pev->origin + Vector(16, 16, 16); } -void CWeaponBox::ResetToLastValidPlayerHeldPosition() +void CWeaponBox::ResetToLastValidPlayerHeldC4Position() { - if (pev->origin == m_vecLastValidPlayerHeldPosition) + if (pev->origin == m_vecLastValidPlayerHeldC4Position) { return; } - Vector const vecResetPos = m_vecLastValidPlayerHeldPosition + Vector(0.0f, 0.0f, 8.0f); + Vector const vecResetPos = m_vecLastValidPlayerHeldC4Position + Vector(0.0f, 0.0f, 8.0f); Vector const angResetAng = Vector(0.0f, RANDOM_FLOAT(0.0f, 360.0f), 0.0f); // Teleport diff --git a/regamedll/dlls/weapons.h b/regamedll/dlls/weapons.h index 6ae938be4..3726e28fd 100644 --- a/regamedll/dlls/weapons.h +++ b/regamedll/dlls/weapons.h @@ -483,8 +483,8 @@ class CWeaponBox: public CBaseEntity void SetModel_OrigFunc(const char *pszModelName); #endif - void SetLastValidHeldPosition(const Vector &vecPositon) { m_vecLastValidPlayerHeldPosition = vecPositon; } - void ResetToLastValidPlayerHeldPosition(); + void SetLastValidHeldC4Position(const Vector &vecPositon) { m_vecLastValidPlayerHeldC4Position = vecPositon; } + void ResetToLastValidPlayerHeldC4Position(); public: static TYPEDESCRIPTION m_SaveData[]; @@ -496,7 +496,7 @@ class CWeaponBox: public CBaseEntity bool m_bIsBomb; private: - Vector m_vecLastValidPlayerHeldPosition; + Vector m_vecLastValidPlayerHeldC4Position; };