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]++;