From 5f3d0c8cb3026560b866034c7a8fc1e33301b89e Mon Sep 17 00:00:00 2001 From: Harry Potter Date: Tue, 28 Nov 2023 13:54:31 +0800 Subject: [PATCH] Update staggersolver (#718) --- .../plugins/optional/staggersolver.smx | Bin 5730 -> 6619 bytes addons/sourcemod/scripting/staggersolver.sp | 112 +++++++++++++----- 2 files changed, 80 insertions(+), 32 deletions(-) diff --git a/addons/sourcemod/plugins/optional/staggersolver.smx b/addons/sourcemod/plugins/optional/staggersolver.smx index decb7ec007ee2d6df1edc79d22e5f06ed9b36aa4..48806eebc488865611dbd889e03007c24ce58038 100644 GIT binary patch delta 6499 zcmXY#WmHt%+s0>TNhPHQla}t75hO&U5s>a~i6PGjNH-`A(n>ct3^0gvGZKQpD2*UP zr|{16U+;(O{H_o8+55WBy7$^^o!|TmqJWBuwjKc(yub_s>AVDiXmKDAs0NIG{69@u zKp+ylCuakJcJ6{elz4w41_D{)$$*!EI0&STCj_rDy!XMA3ojN45a=E$2qb{_GV&nM zD4tSykwQVB5j>Ug!azX)=m>9g@#=?xKqx%T@Cttl0tMsgiq{R^SK$fAt5N~KD4yYX z4dZ<>K3O8(n>+`BZsVDWmkZvT;#rDUKi-RgL7)b_KUV{Rj0o_7Y&>l3KmxW_K2{(B z&y?#1pu;r8Q-9VMXs3-s$K6(>4NKOKQA@BvRYjoZN^df@b;)jwF zD`S>Z|0U@?8^igyyg}RDo-e1lmjQpjY~=gH05OybCOe~7?7|mBi(pOwc+maeQ;;{p z7qRh+~r6i?4|He2Mp3!e-eFugr>g?_<~oFI<%#WkbHiL%fF%q4U2Gg;=N2 zgaCH(r9fhjod5P`phr0{{8yz$ycZwlui4%H32UZ&^T8MB z@ymLccFTUkz6Qvb8p)R^$d`nP_e#S2Rk~%%v1Zyh0Y3OF14@?MT%_=>KXI)^H>&}T zlOEL&=C9N(TZ7Hh`L8oR@+DSsbMJcVQ61bA`BHM&X-Sv^4}6>l-cOIh{O^0c?rtx{ zE*jucpO9O;=>B7fi)29EA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Ik zbb0COLEG&MeY#!#8oCY6A7-fLJvZ<<56lN$#OayfM=5Hx-5e0XcE;_q9smJ^!fdNj zccyNc|L(sD+&&0pnP-V@(JAZ^WYO526FfMXi9Pv(OTL;gWilGCgDVxp4hkOda}>3x zCA+AI2+YMf>NomaWOy%cHi`k7^5E0#4%Xecj!*u1zJo~gqt@oHh@Yt710AgExB~7M zA1>*u{P+%FP;=`H<(L zx42_2uM;7PhePiyElutQ-_0W@*%R60s1j|2H@W(h2F1+nQ z5HlgEVtJl+Z5dZ4K=%;)Oe1$u-C>t`cB)U1nk#@Vj_r7PV`M z3hB`RqrnStNyuX)Kpy#1t0jnvm?}GfyyPNOtt7>aA?v8Rz!!=HZoEKuyCgo3V(gh8 z=q4Dr){<-z2*XPVs{P?8G0}&~za%%H>-f&Ckxaw^_IJXRCpq5^1xwX|1~!ulj8KWe&B$ z`GUan1JK2b9)WL3kjP4+2_&fsqoGno$dG#{o$6PX>NYRsVE?6EyUkxO@HZGQ;9(cC zo3Ottj;=6ly)hUvMGd!DQrs#IV@jVF^rM=j`vjF+UQs1`G&}d`*=0vh`N+@Bjn84x z{V;{VwpG9|@Q@AvZZ8h|_TaUjETK9$Ol86t4Y9i8M=6o2aMHVw_>Rf8bkU`R9bhlm z$|#;pz8=MRWgDF5d-51LetWg*6@EbWo=InhdCjhku>A_Q3G*m5n(e_Hvc`E+>}aW> zUVp1AR=;RKFOxoWN<4VGP%`4_J50}Ou?}I{)=Qw5^O{rg@kNoyLV_Yc_jNp~=&?uj zw~H5#Xg>RE@hvJ!C_CoTeNH;oh1iO9xjq=DJo6GfFr%uN3{u!;d9yg2M>bEHrK?Gyy;l|XHQ#zL?A5@SaBtgydEtYTcN9t04S(a(D)E 0 && entity <= MaxClients && IsClientInGame(entity) && GetClientTeam(entity) == 3) + if (!L4D_IsPlayerStaggering(client)) + return; + + if (IsTankThrowingRock(client)) // handled by plugin "rock_stumble_block" + return; + + PlayerAnimState anim = PlayerAnimState.FromPlayer(client); + + switch (anim.GetMainActivity()) { - if (L4D_IsPlayerStaggering(entity)) + case L4D2_ACT_TERROR_HULK_VICTORY, + L4D2_ACT_TERROR_HULK_VICTORY_B, + L4D2_ACT_TERROR_RAGE_AT_ENEMY, + L4D2_ACT_TERROR_RAGE_AT_KNOCKDOWN: + { + SetEntPropFloat(client, Prop_Send, "m_flCycle", 1.0); + } + default: { - if (!FixSpitter(entity)) - { - SetEntPropFloat(entity, Prop_Send, "m_fServerAnimStartTime", GetGameTime()); - SetEntPropFloat(entity, Prop_Send, "m_flCycle", 0.0); - } + anim.m_bIsTonguing = false; + anim.m_bIsSpitting = false; + + anim.ResetMainActivity(); } } } -bool FixSpitter(int client) -{ - if (GetClientTeam(client) != 3) - return false; - - if (GetEntProp(client, Prop_Send, "m_zombieClass") != 4) - return false; - - if (GetEntProp(client, Prop_Send, "m_nSequence") != 21) - return false; - - SetEntPropFloat(client, Prop_Send, "m_flCycle", 1.0); - return true; -} - public Action OnPlayerRunCmd(int client, int &buttons) { if (IsClientInGame(client) @@ -71,4 +63,60 @@ public Action OnPlayerRunCmd(int client, int &buttons) } } return Plugin_Continue; +} + +bool IsTankThrowingRock(int client) +{ + if (!IsTank(client)) + return false; + + int ability = GetEntPropEnt(client, Prop_Send, "m_customAbility"); + if (ability == -1) + return false; + + return CThrow__IsActive(ability) || CThrow__SelectingTankAttack(ability); +} + +bool IsTank(int client) +{ + static int s_iTankClass = -1; + if (s_iTankClass == -1) + { + s_iTankClass = L4D_IsEngineLeft4Dead() ? 5 : 8; + } + + return GetClientTeam(client) == 3 + && GetEntProp(client, Prop_Send, "m_zombieClass") == s_iTankClass; +} + +bool CThrow__IsActive(int ability) +{ + CountdownTimer ct = CThrow__GetThrowTimer(ability); + if (!CTimer_HasStarted(ct)) + return false; + + return CTimer_IsElapsed(ct) ? false : true; +} + +CountdownTimer CThrow__GetThrowTimer(int ability) +{ + static int s_iOffs_m_throwTimer = -1; + if (s_iOffs_m_throwTimer == -1) + s_iOffs_m_throwTimer = FindSendPropInfo("CThrow", "m_hasBeenUsed") + 4; + + return view_as( + GetEntityAddress(ability) + view_as
(s_iOffs_m_throwTimer) + ); +} + +bool CThrow__SelectingTankAttack(int ability) +{ + if (L4D_IsEngineLeft4Dead()) + return false; + + static int s_iOffs_m_bSelectingAttack = -1; + if (s_iOffs_m_bSelectingAttack == -1) + s_iOffs_m_bSelectingAttack = FindSendPropInfo("CThrow", "m_hasBeenUsed") + 28; + + return GetEntData(ability, s_iOffs_m_bSelectingAttack, 1) > 0; } \ No newline at end of file