Fixed naming and CS:GO offset for CCSPlayer::GetPlayerMaxSpeed

This commit is contained in:
shavit 2018-12-07 07:45:24 +02:00
parent e77478d159
commit 0de22f4026
2 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,7 @@
{
"Offsets"
{
"GetPlayerMaxSpeed"
"CCSPlayer::GetPlayerMaxSpeed"
{
"windows" "438"
"linux" "439"
@ -17,11 +17,11 @@
{
"Offsets"
{
"GetPlayerMaxSpeed"
"CCSPlayer::GetPlayerMaxSpeed"
{
"windows" "498"
"linux" "499"
"mac" "499"
"windows" "504"
"linux" "505"
"mac" "505"
}
}
}

View File

@ -380,16 +380,16 @@ public void OnPluginStart()
if(hGameData != null)
{
int iOffset = GameConfGetOffset(hGameData, "GetPlayerMaxSpeed");
int iOffset = GameConfGetOffset(hGameData, "CCSPlayer::GetPlayerMaxSpeed");
if(iOffset != -1)
{
gH_GetPlayerMaxSpeed = DHookCreate(iOffset, HookType_Entity, ReturnType_Float, ThisPointer_CBaseEntity, DHook_GetPlayerMaxSpeed);
gH_GetPlayerMaxSpeed = DHookCreate(iOffset, HookType_Entity, ReturnType_Float, ThisPointer_CBaseEntity, CCSPlayer__GetPlayerMaxSpeed);
}
else
{
SetFailState("Couldn't get the offset for \"GetPlayerMaxSpeed\" - make sure your gamedata is updated!");
SetFailState("Couldn't get the offset for \"CCSPlayer::GetPlayerMaxSpeed\" - make sure your gamedata is updated!");
}
}
@ -798,7 +798,7 @@ public Action Command_Radio(int client, const char[] command, int args)
return Plugin_Continue;
}
public MRESReturn DHook_GetPlayerMaxSpeed(int pThis, Handle hReturn)
public MRESReturn CCSPlayer__GetPlayerMaxSpeed(int pThis, Handle hReturn)
{
if(!gB_StaticPrestrafe || !IsValidClient(pThis, true))
{