mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
Fix static runspeed not applying
This commit is contained in:
parent
5dafe701b2
commit
0e84c0e19b
@ -230,7 +230,17 @@ public void OnPluginStart()
|
|||||||
|
|
||||||
if(hGameData != null)
|
if(hGameData != null)
|
||||||
{
|
{
|
||||||
gH_GetPlayerMaxSpeed = DHookCreate(GameConfGetOffset(hGameData, "GetPlayerMaxSpeed"), HookType_Entity, ReturnType_Float, ThisPointer_CBaseEntity, DHook_GetMaxPlayerSpeed);
|
int iOffset = GameConfGetOffset(hGameData, "GetPlayerMaxSpeed");
|
||||||
|
|
||||||
|
if(iOffset != -1)
|
||||||
|
{
|
||||||
|
gH_GetPlayerMaxSpeed = DHookCreate(iOffset, HookType_Entity, ReturnType_Float, ThisPointer_CBaseEntity, DHook_GetMaxPlayerSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetFailState("Couldn't get the offset for \"GetPlayerMaxSpeed\" - make sure your gamedata is updated!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete hGameData;
|
delete hGameData;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user