diff --git a/addons/sourcemod/scripting/gokz-core/misc.sp b/addons/sourcemod/scripting/gokz-core/misc.sp index a1178803..b4e6e29c 100644 --- a/addons/sourcemod/scripting/gokz-core/misc.sp +++ b/addons/sourcemod/scripting/gokz-core/misc.sp @@ -677,9 +677,9 @@ static int FindUseEntity(int client) float m_vecMins[3]; float m_vecMaxs[3]; float m_vecOrigin[3]; - GetEntPropVector(ent, Prop_Send, "m_vecOrigin", m_vecOrigin); - GetEntPropVector(ent, Prop_Send, "m_vecMins", m_vecMins); - GetEntPropVector(ent, Prop_Send, "m_vecMaxs", m_vecMaxs); + GetEntPropVector(client, Prop_Send, "m_vecOrigin", m_vecOrigin); + GetEntPropVector(client, Prop_Send, "m_vecMins", m_vecMins); + GetEntPropVector(client, Prop_Send, "m_vecMaxs", m_vecMaxs); delta[2] = IntervalDistance(endpos[2], m_vecOrigin[2] + m_vecMins[2], m_vecOrigin[2] + m_vecMaxs[2]); if (GetVectorLength(delta) < 80.0) diff --git a/addons/sourcemod/scripting/gokz-global.sp b/addons/sourcemod/scripting/gokz-global.sp index 79f8b6ab..51242d1c 100644 --- a/addons/sourcemod/scripting/gokz-global.sp +++ b/addons/sourcemod/scripting/gokz-global.sp @@ -374,7 +374,7 @@ public void OnMapEnd() public void GOKZ_OnOptionChanged(int client, const char[] option, any newValue) { if (StrEqual(option, gC_CoreOptionNames[Option_Mode]) - && GlobalAPI_IsInit()) + && GlobalAPI_IsInit() && IsClientAuthorized(client)) { UpdatePoints(client); } diff --git a/addons/sourcemod/scripting/gokz-jumpstats.sp b/addons/sourcemod/scripting/gokz-jumpstats.sp index 74d92202..9dc8585b 100644 --- a/addons/sourcemod/scripting/gokz-jumpstats.sp +++ b/addons/sourcemod/scripting/gokz-jumpstats.sp @@ -112,9 +112,10 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3 return Plugin_Continue; } -public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float vel[3], const float angles[3], int weapon, int subtype, int cmdnum, int tickcount, int seed, const int mouse[2]) +public Action Movement_OnPlayerMovePost(int client) { - OnPlayerRunCmdPost_JumpTracking(client); + Movement_OnPlayerMovePost_JumpTracking(client); + return Plugin_Continue; } public void Movement_OnStartTouchGround(int client) diff --git a/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp b/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp index acd94428..8850786f 100644 --- a/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp +++ b/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp @@ -1425,19 +1425,15 @@ public Action Movement_OnWalkMovePost(int client) return Plugin_Continue; } -public Action Movement_OnPlayerMovePost(int client) -{ - lastMovementProcessedTime[client] = jumpTrackers[client].tickCount; - return Plugin_Continue; -} -public void OnPlayerRunCmdPost_JumpTracking(int client) +public void Movement_OnPlayerMovePost_JumpTracking(int client) { if (!IsValidClient(client) || !IsPlayerAlive(client)) { return; } + lastMovementProcessedTime[client] = jumpTrackers[client].tickCount; // Check for always failstats if (doFailstatAlways[client]) { diff --git a/addons/sourcemod/scripting/gokz-mode-kztimer.sp b/addons/sourcemod/scripting/gokz-mode-kztimer.sp index 272652b1..b268540b 100644 --- a/addons/sourcemod/scripting/gokz-mode-kztimer.sp +++ b/addons/sourcemod/scripting/gokz-mode-kztimer.sp @@ -29,7 +29,7 @@ public Plugin myinfo = #define UPDATER_URL GOKZ_UPDATER_BASE_URL..."gokz-mode-kztimer.txt" -#define MODE_VERSION 217 +#define MODE_VERSION 2170 #define DUCK_SPEED_NORMAL 8.0 #define PRE_VELMOD_MAX 1.104 // Calculated 276/250 #define PERF_SPEED_CAP 380.0 diff --git a/addons/sourcemod/scripting/gokz-mode-simplekz.sp b/addons/sourcemod/scripting/gokz-mode-simplekz.sp index 99d76ac6..e4db09cf 100644 --- a/addons/sourcemod/scripting/gokz-mode-simplekz.sp +++ b/addons/sourcemod/scripting/gokz-mode-simplekz.sp @@ -29,7 +29,7 @@ public Plugin myinfo = #define UPDATER_URL GOKZ_UPDATER_BASE_URL..."gokz-mode-simplekz.txt" -#define MODE_VERSION 21 +#define MODE_VERSION 210 #define PS_MAX_REWARD_TURN_RATE 0.703125 // Degrees per tick (90 degrees per second) #define PS_MAX_TURN_RATE_DECREMENT 0.015625 // Degrees per tick (2 degrees per second) #define PS_SPEED_MAX 26.54321 // Units diff --git a/addons/sourcemod/scripting/gokz-mode-vanilla.sp b/addons/sourcemod/scripting/gokz-mode-vanilla.sp index aecc201b..6fb99fb4 100644 --- a/addons/sourcemod/scripting/gokz-mode-vanilla.sp +++ b/addons/sourcemod/scripting/gokz-mode-vanilla.sp @@ -29,7 +29,7 @@ public Plugin myinfo = #define UPDATER_URL GOKZ_UPDATER_BASE_URL..."gokz-mode-vanilla.txt" -#define MODE_VERSION 17 +#define MODE_VERSION 170 float gF_ModeCVarValues[MODECVAR_COUNT] = { diff --git a/addons/sourcemod/scripting/gokz-replays/controls.sp b/addons/sourcemod/scripting/gokz-replays/controls.sp index cda7f07d..08d18d38 100644 --- a/addons/sourcemod/scripting/gokz-replays/controls.sp +++ b/addons/sourcemod/scripting/gokz-replays/controls.sp @@ -165,13 +165,13 @@ int MenuHandler_ReplayControls(Menu menu, MenuAction action, int param1, int par { if (!IsValidClient(param1)) { - return; + return 0; } int bot = GetBotFromClient(GetObserverTarget(param1)); if (bot == -1 || controllingPlayer[bot] != param1) { - return; + return 0; } char info[16]; @@ -207,6 +207,7 @@ int MenuHandler_ReplayControls(Menu menu, MenuAction action, int param1, int par delete menu; } } + return 0; } void CancelReplayControls(int client) diff --git a/addons/sourcemod/scripting/gokz-replays/playback.sp b/addons/sourcemod/scripting/gokz-replays/playback.sp index b3f68659..b5ffe928 100644 --- a/addons/sourcemod/scripting/gokz-replays/playback.sp +++ b/addons/sourcemod/scripting/gokz-replays/playback.sp @@ -1005,7 +1005,7 @@ void PlaybackVersion2(int client, int bot, int &buttons, float vel[3], float ang { newButtons |= IN_JUMP; } - if (currentTickData.flags & RP_IN_DUCK || currentTickData.flags & RP_FL_DUCKING) + if (currentTickData.flags & RP_IN_DUCK) { newButtons |= IN_DUCK; } @@ -1206,6 +1206,13 @@ void PlaybackVersion2Post(int client, int bot) { SetEntityFlags(client, entityFlags | FL_INWATER); } + if (currentTickData.flags & RP_FL_DUCKING) + { + SetEntPropFloat(client, Prop_Send, "m_flDuckAmount", 1.0); + SetEntProp(client, Prop_Send, "m_bDucking", false); + SetEntProp(client, Prop_Send, "m_bDucked", true); + SetEntityFlags(client, FL_DUCKING); + } botSpeed[bot] = GetVectorHorizontalLength(currentTickData.velocity); playbackTick[bot]++; diff --git a/addons/sourcemod/scripting/gokz-tpanglefix.sp b/addons/sourcemod/scripting/gokz-tpanglefix.sp index 62977958..d9e04342 100644 --- a/addons/sourcemod/scripting/gokz-tpanglefix.sp +++ b/addons/sourcemod/scripting/gokz-tpanglefix.sp @@ -131,7 +131,7 @@ void PatchAngleFix() { if (LoadFromAddress(gA_ViewAnglePatchAddress, NumberType_Int8) == 0) { - StoreToAddress(gA_ViewAnglePatchAddress, 1, NumberType_Int8); + StoreToAddress(gA_ViewAnglePatchAddress, 1, NumberType_Int8, false); } } @@ -139,7 +139,7 @@ void RestoreAngleFix() { if (LoadFromAddress(gA_ViewAnglePatchAddress, NumberType_Int8) == 1) { - StoreToAddress(gA_ViewAnglePatchAddress, 0, NumberType_Int8); + StoreToAddress(gA_ViewAnglePatchAddress, 0, NumberType_Int8, false); } }