mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Changed default +left/right block behavior.
* 1 now blocks movement, 2 also stops timer.
This commit is contained in:
parent
ff31efeaf5
commit
f2887fabfa
@ -38,8 +38,8 @@
|
||||
"block_d" "0" // Block +moveright (D).
|
||||
"block_use" "0" // Block +use (E).
|
||||
"force_hsw" "0" // Force half-sideways gameplay. 1 for regular HSW and 2 for surf-HSW.
|
||||
"block_pleft" "0" // Block +left (requires shavit_core_blockleftright 1).
|
||||
"block_pright" "0" // Block +right (requires shavit_core_blockleftright 1).
|
||||
"block_pleft" "0" // Block +left. 2 to stop timer.
|
||||
"block_pright" "0" // Block +right. 2 to stop timer.
|
||||
"block_pstrafe" "0" // Prevent button inconsistencies (including +pstrafe). May have false positives when players lag. Will prevent some strafe hacks too. Set this to 2 to also stop the timer.
|
||||
|
||||
// Feature excluding
|
||||
|
||||
@ -106,8 +106,8 @@ enum
|
||||
bBlockD,
|
||||
bBlockUse,
|
||||
iForceHSW,
|
||||
bBlockPLeft,
|
||||
bBlockPRight,
|
||||
iBlockPLeft,
|
||||
iBlockPRight,
|
||||
iBlockPStrafe,
|
||||
bUnranked,
|
||||
bNoReplay,
|
||||
|
||||
@ -1490,8 +1490,8 @@ bool LoadStyles()
|
||||
gA_StyleSettings[i][bBlockD] = view_as<bool>(kv.GetNum("block_d", 0));
|
||||
gA_StyleSettings[i][bBlockUse] = view_as<bool>(kv.GetNum("block_use", 0));
|
||||
gA_StyleSettings[i][iForceHSW] = kv.GetNum("force_hsw", 0);
|
||||
gA_StyleSettings[i][bBlockPLeft] = view_as<bool>(kv.GetNum("block_pleft", 0));
|
||||
gA_StyleSettings[i][bBlockPRight] = view_as<bool>(kv.GetNum("block_pright", 0));
|
||||
gA_StyleSettings[i][iBlockPLeft] = kv.GetNum("block_pleft", 0);
|
||||
gA_StyleSettings[i][iBlockPRight] = kv.GetNum("block_pright", 0);
|
||||
gA_StyleSettings[i][iBlockPStrafe] = kv.GetNum("block_pstrafe", 0);
|
||||
gA_StyleSettings[i][bUnranked] = view_as<bool>(kv.GetNum("unranked", 0));
|
||||
gA_StyleSettings[i][bNoReplay] = view_as<bool>(kv.GetNum("noreplay", 0));
|
||||
@ -1913,14 +1913,19 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
|
||||
if(gB_TimerEnabled[client] && !gB_ClientPaused[client])
|
||||
{
|
||||
char[] sCheatDetected = new char[64];
|
||||
|
||||
// +left/right block
|
||||
if(!gB_Zones || (!bInStart && ((gA_StyleSettings[gI_Style[client]][bBlockPLeft] &&
|
||||
(buttons & IN_LEFT) > 0) || (gA_StyleSettings[gI_Style[client]][bBlockPRight] && (buttons & IN_RIGHT) > 0))))
|
||||
if(!gB_Zones || (!bInStart && ((gA_StyleSettings[gI_Style[client]][iBlockPLeft] > 0 &&
|
||||
(buttons & IN_LEFT) > 0) || (gA_StyleSettings[gI_Style[client]][iBlockPRight] > 0 && (buttons & IN_RIGHT) > 0))))
|
||||
{
|
||||
FormatEx(sCheatDetected, 64, "%T", "LeftRightCheat", client);
|
||||
StopTimer_Cheat(client, sCheatDetected);
|
||||
vel[0] = 0.0;
|
||||
vel[1] = 0.0;
|
||||
|
||||
if(gA_StyleSettings[gI_Style[client]][iBlockPRight] >= 2)
|
||||
{
|
||||
char[] sCheatDetected = new char[64];
|
||||
FormatEx(sCheatDetected, 64, "%T", "LeftRightCheat", client);
|
||||
StopTimer_Cheat(client, sCheatDetected);
|
||||
}
|
||||
}
|
||||
|
||||
// +strafe block
|
||||
@ -1932,6 +1937,7 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
{
|
||||
if(gA_StyleSettings[gI_Style[client]][iBlockPStrafe] >= 2)
|
||||
{
|
||||
char[] sCheatDetected = new char[64];
|
||||
FormatEx(sCheatDetected, 64, "%T", "Inconsistencies", client);
|
||||
StopTimer_Cheat(client, sCheatDetected);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user