From 6865b5b3bd46fde31334caf022614fa318ff5064 Mon Sep 17 00:00:00 2001 From: Forgetest <33988868+jensewe@users.noreply.github.com> Date: Thu, 11 Jan 2024 03:01:36 +0800 Subject: [PATCH] Common Shove: Fix shove immunity when climbing (#729) Fix: - Fixed a mistake causing Common Infected to be immune to shoves when climbing. Change: - Updated gamedata to correct the way getting nextbot body. --- .../gamedata/l4d_fix_common_shove.txt | 24 ++++-- .../plugins/fixes/l4d_fix_common_shove.smx | Bin 11649 -> 12042 bytes .../scripting/l4d_fix_common_shove.sp | 79 ++++++++++++------ 3 files changed, 70 insertions(+), 33 deletions(-) diff --git a/addons/sourcemod/gamedata/l4d_fix_common_shove.txt b/addons/sourcemod/gamedata/l4d_fix_common_shove.txt index 409f2b509..13be05b89 100644 --- a/addons/sourcemod/gamedata/l4d_fix_common_shove.txt +++ b/addons/sourcemod/gamedata/l4d_fix_common_shove.txt @@ -4,10 +4,16 @@ { "Offsets" { - "Infected::m_body" + "CBaseEntity::MyNextBotPointer" { - "linux" "3472" - "windows" "3452" + "linux" "72" + "windows" "71" + } + + "INextBot::GetBodyInterface" + { + "linux" "44" + "windows" "43" } } @@ -27,10 +33,16 @@ { "Offsets" { - "Infected::m_body" + "CBaseEntity::MyNextBotPointer" + { + "linux" "82" + "windows" "81" + } + + "INextBot::GetBodyInterface" { - "linux" "7328" - "windows" "7332" + "linux" "49" + "windows" "48" } } diff --git a/addons/sourcemod/plugins/fixes/l4d_fix_common_shove.smx b/addons/sourcemod/plugins/fixes/l4d_fix_common_shove.smx index 887c4e5f28e00a5744e990968517f530fa0729eb..3f8f7b039b15a16eb0c2647efbe57d419351adec 100644 GIT binary patch literal 12042 zcmZ8`1yEaE*KTl%mKTQ>3MuYh+@Tb=;!q?&&=z+o1zKpJ6bHB}*{qNi}v(EFZy_cQ6)=YBdC@E>_qNAbV@c;lsxc~qeE*b!^hLXS6Uwr=x0Ki6Z z9Wel)kqrPKKyf@90N^QVj~vBmKmY(PIsib2;*53xKspLpP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V;FoB}OG_-)H6Av24fav#{QM*}_p6ctY%{i!q@e&r*Qy zqf1q@Jh0Quko?xQNtTSHvwwo!{8gLMTjOirX2nLq3e$KhTSTQM{rbi*Q@zsfvjU-d ze7p+L8P)Hr-74v*0(U}s^*>A2rv`01{EnlMOPnm^AN;K7>6E5bO_<+lPt%G|zT+H2 zcXHm^p&w60wHZyjA?94)VgGTRO((d(i5TUIL6JtMoI^fAK%udD4D!sh*GoTXT>F#! o9-9txS!Zs1ohr$8ct^YO1~+BOP{qgXk^=p(_9seVYxDR21AUva@Bjb+ diff --git a/addons/sourcemod/scripting/l4d_fix_common_shove.sp b/addons/sourcemod/scripting/l4d_fix_common_shove.sp index 4bbd7bdc3..7389e2db9 100644 --- a/addons/sourcemod/scripting/l4d_fix_common_shove.sp +++ b/addons/sourcemod/scripting/l4d_fix_common_shove.sp @@ -7,7 +7,7 @@ #include #include -#define PLUGIN_VERSION "1.2" +#define PLUGIN_VERSION "1.3" public Plugin myinfo = { @@ -20,7 +20,8 @@ public Plugin myinfo = #define GAMEDATA_FILE "l4d_fix_common_shove" -int g_iOffs_Infected__m_body; +Handle g_hCall_MyNextBotPointer; +Handle g_hCall_GetBodyInterface; Handle g_hCall_SetDesiredPosture; enum ActivityType @@ -41,15 +42,24 @@ enum PostureType LIE }; -methodmap IBody +INextBot MyNextBotPointer(int entity) { - public void SetDesiredPosture(PostureType posture) { - SDKCall(g_hCall_SetDesiredPosture, this, posture); + return SDKCall(g_hCall_MyNextBotPointer, entity); +} + +methodmap INextBot +{ + public ZombieBotBody GetBodyInterface() { + return SDKCall(g_hCall_GetBodyInterface, this); } } -methodmap ZombieBotBody < IBody +methodmap ZombieBotBody { + public void SetDesiredPosture(PostureType posture) { + SDKCall(g_hCall_SetDesiredPosture, this, posture); + } + property int m_activity { public get() { return LoadFromAddress(view_as
(this) + view_as
(80), NumberType_Int32); } public set(int act) { StoreToAddress(view_as
(this) + view_as
(80), act, NumberType_Int32); } @@ -156,9 +166,17 @@ public void OnPluginStart() PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain); g_hCall_SetDesiredPosture = EndPrepSDKCall(); - g_iOffs_Infected__m_body = gd.GetOffset("Infected::m_body"); - if (g_iOffs_Infected__m_body == -1) - SetFailState("Missing offset \"Infected::m_body\""); + StartPrepSDKCall(SDKCall_Entity); + if (!PrepSDKCall_SetFromConf(gd, SDKConf_Virtual, "CBaseEntity::MyNextBotPointer")) + SetFailState("Missing signature \"CBaseEntity::MyNextBotPointer\""); + PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain); + g_hCall_MyNextBotPointer = EndPrepSDKCall(); + + StartPrepSDKCall(SDKCall_Raw); + if (!PrepSDKCall_SetFromConf(gd, SDKConf_Virtual, "INextBot::GetBodyInterface")) + SetFailState("Missing signature \"INextBot::GetBodyInterface\""); + PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain); + g_hCall_GetBodyInterface = EndPrepSDKCall(); delete gd; @@ -201,7 +219,7 @@ public void OnActionCreated(BehaviorAction action, int actor, const char[] name) Action InfectedShoved_OnStart(BehaviorAction action, int actor, any priorAction, ActionResult result) { - if (GetEntPropEnt(actor, Prop_Data, "m_hGroundEntity") == -1) // falling check + if (MyNextBotPointer(actor).GetBodyInterface().m_activity == L4D2_ACT_TERROR_FALL) // falling check { if (g_iShoveFlag & SHOVE_FALLING) { @@ -227,7 +245,7 @@ Action InfectedShoved_OnStart(BehaviorAction action, int actor, any priorAction, if (g_iShoveFlag & SHOVE_CROUCHING) { - Infected__GetBodyInterface(actor).SetDesiredPosture(STAND); // force standing to activate shoves + MyNextBotPointer(actor).GetBodyInterface().SetDesiredPosture(STAND); // force standing to activate shoves } if (g_iShoveFlag & SHOVE_LANDING @@ -259,7 +277,7 @@ Action InfectedShoved_OnShoved(BehaviorAction action, int actor, int entity, Act { if (g_iShoveFlag & SHOVE_CROUCHING) { - Infected__GetBodyInterface(actor).SetDesiredPosture(STAND); // force standing to activate shoves + MyNextBotPointer(actor).GetBodyInterface().SetDesiredPosture(STAND); // force standing to activate shoves } } @@ -281,26 +299,33 @@ Action InfectedShoved_OnLandOnGroundPost(BehaviorAction action, int actor, int e bool ForceActivityInterruptible(int infected) { - ZombieBotBody body = Infected__GetBodyInterface(infected); + ZombieBotBody body = MyNextBotPointer(infected).GetBodyInterface(); - switch (body.m_activity) // perhaps unnecessary + if (L4D_IsEngineLeft4Dead1()) // perhaps unnecessary { - case L4D2_ACT_TERROR_JUMP_LANDING, - L4D2_ACT_TERROR_JUMP_LANDING_HARD, - L4D2_ACT_TERROR_JUMP_LANDING_NEUTRAL, - L4D2_ACT_TERROR_JUMP_LANDING_HARD_NEUTRAL: + switch (body.m_activity) { - body.m_activityType &= ~ACTIVITY_UNINTERRUPTIBLE; - return true; + case L4D1_ACT_TERROR_JUMP_LANDING, + L4D1_ACT_TERROR_JUMP_LANDING_HARD, + L4D1_ACT_TERROR_JUMP_LANDING_NEUTRAL, + L4D1_ACT_TERROR_JUMP_LANDING_HARD_NEUTRAL: { } + default: { return false; } + } + } + else + { + switch (body.m_activity) + { + case L4D2_ACT_TERROR_JUMP_LANDING, + L4D2_ACT_TERROR_JUMP_LANDING_HARD, + L4D2_ACT_TERROR_JUMP_LANDING_NEUTRAL, + L4D2_ACT_TERROR_JUMP_LANDING_HARD_NEUTRAL: { } + default: { return false; } } } - return false; -} - -ZombieBotBody Infected__GetBodyInterface(int infected) -{ - return view_as(GetEntData(infected, g_iOffs_Infected__m_body, 4)); + body.m_activityType &= ~ACTIVITY_UNINTERRUPTIBLE; + return true; } stock bool IsInfected(int entity) @@ -333,4 +358,4 @@ ConVar CreateConVarHook(const char[] name, cv.AddChangeHook(callback); return cv; -} \ No newline at end of file +}