ZPS: Add missing offsets (#1719)
* Update offsets for ZPS 3.2 Zombie Panic! Source Version 3.2 released and these are the updated offsets. * Update offsets for 3.2 ZPS 3.2 has been release and these are the updated offsets / signatures. * ZPS: Add missing offsets. Adds support for OnTakeDamage_Alive, GetMaxHealth, Blocked, Reload and GroundEntChanged. I wasn't aware these were missing entirely or I would have pushed them with the previous PR. * ZPS Add missing offsets. Adds support for GivePlayerAmmo. Wasn't aware these were missing the first place. * Fix ForcePlayerSuicide not properly working in ZPS ZPS requires the second bool parameter to be true otherwise it won't do anything for players in the lobby or delayed for players on either team 2 or team 3. * Fixed breaking code for other mods. Added bForce which is set to true for zps.
This commit is contained in:
parent
2ffaa04130
commit
b5ed266941
@ -516,13 +516,19 @@ static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params)
|
||||
return pContext->ThrowNativeError("\"CommitSuicide\" wrapper failed to initialize");
|
||||
}
|
||||
}
|
||||
bool bForce = false;
|
||||
if (!strcmp(g_pSM->GetGameFolderName(), "zps"))
|
||||
{
|
||||
// ZPS requires force to be set as true otherwise the action itself is delayed.
|
||||
// Which affects Slay and Timebomb.
|
||||
bForce = true;
|
||||
}
|
||||
|
||||
START_CALL();
|
||||
DECODE_VALVE_PARAM(1, thisinfo, 0);
|
||||
*(bool *)(vptr + pCall->vparams[0].offset) = false;
|
||||
*(bool *)(vptr + pCall->vparams[1].offset) = false;
|
||||
*(bool *)(vptr + pCall->vparams[1].offset) = bForce;
|
||||
FINISH_CALL_SIMPLE(NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
|
@ -4,6 +4,31 @@
|
||||
{
|
||||
"Offsets"
|
||||
{
|
||||
"GroundEntChanged"
|
||||
{
|
||||
"windows" "188"
|
||||
"linux" "190"
|
||||
}
|
||||
"OnTakeDamage_Alive"
|
||||
{
|
||||
"windows" "287"
|
||||
"linux" "288"
|
||||
}
|
||||
"GetMaxHealth"
|
||||
{
|
||||
"windows" "126"
|
||||
"linux" "127"
|
||||
}
|
||||
"Blocked"
|
||||
{
|
||||
"windows" "109"
|
||||
"linux" "110"
|
||||
}
|
||||
"Reload"
|
||||
{
|
||||
"windows" "287"
|
||||
"linux" "288"
|
||||
}
|
||||
"EndTouch"
|
||||
{
|
||||
"windows" "107"
|
||||
|
@ -96,6 +96,11 @@
|
||||
"windows" "25"
|
||||
"linux" "26"
|
||||
}
|
||||
"GiveAmmo"
|
||||
{
|
||||
"windows" "264"
|
||||
"linux" "265"
|
||||
}
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user