diff --git a/addons/sourcemod/scripting/gokz-core/commands.sp b/addons/sourcemod/scripting/gokz-core/commands.sp index c08c9252..5de384ae 100644 --- a/addons/sourcemod/scripting/gokz-core/commands.sp +++ b/addons/sourcemod/scripting/gokz-core/commands.sp @@ -75,6 +75,15 @@ public Action CommandJoinTeam(int client, const char[] command, int argc) char teamString[4]; GetCmdArgString(teamString, sizeof(teamString)); int team = StringToInt(teamString); + + if (team == CS_TEAM_SPECTATOR) + { + if (!GOKZ_GetPaused(client) && !GOKZ_GetCanPause(client)) + { + return Plugin_Handled; + } + } + GOKZ_JoinTeam(client, team); return Plugin_Handled; } diff --git a/addons/sourcemod/scripting/gokz-core/demofix.sp b/addons/sourcemod/scripting/gokz-core/demofix.sp index fe8c83a1..a37c80f1 100644 --- a/addons/sourcemod/scripting/gokz-core/demofix.sp +++ b/addons/sourcemod/scripting/gokz-core/demofix.sp @@ -72,6 +72,11 @@ static void DoDemoFix() { case 0: { + if (!mapRunning) + { + return; + } + GameRules_SetProp("m_bWarmupPeriod", 0); } case 1: diff --git a/addons/sourcemod/scripting/gokz-core/map/triggers.sp b/addons/sourcemod/scripting/gokz-core/map/triggers.sp index 0c0f642a..ab12102a 100644 --- a/addons/sourcemod/scripting/gokz-core/map/triggers.sp +++ b/addons/sourcemod/scripting/gokz-core/map/triggers.sp @@ -18,6 +18,7 @@ static int antiJumpstatTriggerTouchCount[MAXPLAYERS + 1]; static int mapMappingApiVersion = GOKZ_MAPPING_API_VERSION_NONE; static int bhopTouchCount[MAXPLAYERS + 1]; static ArrayList triggerTouchList[MAXPLAYERS + 1]; // arraylist of TouchedTrigger that the player is currently touching. this array won't ever get long (unless the mapper does something weird). +static StringMap triggerTouchCounts[MAXPLAYERS + 1]; // stringmap of int touch counts with key being a string of the entity reference. static StringMap antiBhopTriggers; // stringmap of AntiBhopTrigger with key being a string of the m_iHammerID entprop. static StringMap teleportTriggers; // stringmap of TeleportTrigger with key being a string of the m_iHammerID entprop. static StringMap timerButtonTriggers; // stringmap of legacy timer zone triggers with key being a string of the m_iHammerID entprop. @@ -143,6 +144,15 @@ void OnClientPutInServer_MapTriggers(int client) triggerTouchList[client].Clear(); } + if (triggerTouchCounts[client] == null) + { + triggerTouchCounts[client] = new StringMap(); + } + else + { + triggerTouchCounts[client].Clear(); + } + bhopTouchCount[client] = 0; if (lastTouchSequentialBhopEntRefs[client] == null) @@ -191,7 +201,14 @@ void OnPlayerRunCmd_MapTriggers(int client, int &buttons) } else if (touched.triggerType == TriggerType_Teleport) { - TouchTeleportTrigger(client, touched, flags); + // Sometimes due to lag or whatever, the player can be + // teleported twice by the same trigger. This fixes that. + if (TouchTeleportTrigger(client, touched, flags)) + { + RemoveTriggerFromTouchList(client, EntRefToEntIndex(touched.entRef)); + i--; + triggerTouchListLength--; + } } } } @@ -299,6 +316,14 @@ public void OnAntiBhopTrigTouchStart_MapTriggers(const char[] output, int entity return; } + int touchCount = IncrementTriggerTouchCount(other, entity); + if (touchCount <= 0) + { + // The trigger has fired a matching endtouch output before + // the starttouch output, so ignore it. + return; + } + AddTriggerToTouchList(other, entity, TriggerType_Antibhop); } @@ -309,6 +334,7 @@ public void OnAntiBhopTrigTouchEnd_MapTriggers(const char[] output, int entity, return; } + DecrementTriggerTouchCount(other, entity); RemoveTriggerFromTouchList(other, entity); } @@ -319,6 +345,14 @@ public void OnTeleportTrigTouchStart_MapTriggers(const char[] output, int entity return; } + int touchCount = IncrementTriggerTouchCount(other, entity); + if (touchCount <= 0) + { + // The trigger has fired a matching endtouch output before + // the starttouch output, so ignore it. + return; + } + char key[32]; GetEntityHammerIDString(entity, key, sizeof(key)); TeleportTrigger trigger; @@ -338,6 +372,8 @@ public void OnTeleportTrigTouchEnd_MapTriggers(const char[] output, int entity, return; } + DecrementTriggerTouchCount(other, entity); + char key[32]; GetEntityHammerIDString(entity, key, sizeof(key)); TeleportTrigger trigger; @@ -552,6 +588,34 @@ static void RemoveTriggerFromTouchList(int client, int trigger) } } +static int IncrementTriggerTouchCount(int client, int trigger) +{ + int entref = EntIndexToEntRef(trigger); + char szEntref[64]; + FormatEx(szEntref, sizeof(szEntref), "%i", entref); + + int value = 0; + triggerTouchCounts[client].GetValue(szEntref, value); + + value += 1; + triggerTouchCounts[client].SetValue(szEntref, value); + + return value; +} + +static void DecrementTriggerTouchCount(int client, int trigger) +{ + int entref = EntIndexToEntRef(trigger); + char szEntref[64]; + FormatEx(szEntref, sizeof(szEntref), "%i", entref); + + int value = 0; + triggerTouchCounts[client].GetValue(szEntref, value); + + value -= 1; + triggerTouchCounts[client].SetValue(szEntref, value); +} + static void TouchAntibhopTrigger(TouchedTrigger touched, int &newButtons, int flags) { if (!(flags & FL_ONGROUND)) @@ -582,22 +646,24 @@ static void TouchAntibhopTrigger(TouchedTrigger touched, int &newButtons, int fl } } -static void TouchTeleportTrigger(int client, TouchedTrigger touched, int flags) +static bool TouchTeleportTrigger(int client, TouchedTrigger touched, int flags) { + bool shouldTeleport = false; + char key[32]; GetEntityHammerIDString(touched.entRef, key, sizeof(key)); TeleportTrigger trigger; if (!teleportTriggers.GetArray(key, trigger, sizeof(trigger))) { // Couldn't get the teleport trigger from the trigger array for some reason. - return; + return shouldTeleport; } bool isBhopTrigger = IsBhopTrigger(trigger.type); // NOTE: Player hasn't touched the ground inside this trigger yet. if (touched.groundTouchTick == -1 && isBhopTrigger) { - return; + return shouldTeleport; } float destOrigin[3]; @@ -615,11 +681,10 @@ static void TouchTeleportTrigger(int client, TouchedTrigger touched, int flags) || (!gotTriggerOrigin && trigger.relativeDestination)) { PrintToConsole(client, "[KZ] Invalid teleport destination \"%s\" on trigger with hammerID %i.", trigger.tpDestination, trigger.hammerID); - return; + return shouldTeleport; } // NOTE: Find out if we should actually teleport. - bool shouldTeleport = false; if (isBhopTrigger && (flags & FL_ONGROUND)) { float touchTime = CalculateGroundTouchTime(touched); @@ -653,7 +718,7 @@ static void TouchTeleportTrigger(int client, TouchedTrigger touched, int flags) if (!shouldTeleport) { - return; + return shouldTeleport; } bool shouldReorientPlayer = trigger.reorientPlayer @@ -708,6 +773,8 @@ static void TouchTeleportTrigger(int client, TouchedTrigger touched, int flags) { TeleportPlayer(client, finalOrigin, finalPlayerAngles, gotDestAngles && trigger.useDestAngles, trigger.resetSpeed); } + + return shouldTeleport; } static float CalculateGroundTouchTime(TouchedTrigger touched) diff --git a/addons/sourcemod/scripting/gokz-core/misc.sp b/addons/sourcemod/scripting/gokz-core/misc.sp index 8ef86d2b..5b74ffcc 100644 --- a/addons/sourcemod/scripting/gokz-core/misc.sp +++ b/addons/sourcemod/scripting/gokz-core/misc.sp @@ -312,7 +312,7 @@ void JoinTeam(int client, int newTeam, bool restorePos) static bool validJump[MAXPLAYERS + 1]; static float validJumpTeleportOrigin[MAXPLAYERS + 1][3]; - +static int lastInvalidatedTick[MAXPLAYERS + 1]; bool GetValidJump(int client) { return validJump[client]; @@ -320,6 +320,7 @@ bool GetValidJump(int client) static void InvalidateJump(int client) { + lastInvalidatedTick[client] = GetGameTickCount(); if (validJump[client]) { validJump[client] = false; @@ -329,7 +330,7 @@ static void InvalidateJump(int client) void OnStopTouchGround_ValidJump(int client, bool jumped, bool ladderJump, bool jumpbug) { - if (Movement_GetMovetype(client) == MOVETYPE_WALK) + if (Movement_GetMovetype(client) == MOVETYPE_WALK && lastInvalidatedTick[client] != GetGameTickCount()) { validJump[client] = true; Call_GOKZ_OnJumpValidated(client, jumped, ladderJump, jumpbug); @@ -350,7 +351,7 @@ void OnPlayerRunCmdPost_ValidJump(int client) void OnChangeMovetype_ValidJump(int client, MoveType oldMovetype, MoveType newMovetype) { - if (oldMovetype == MOVETYPE_LADDER && newMovetype == MOVETYPE_WALK) // Ladderjump + if (oldMovetype == MOVETYPE_LADDER && newMovetype == MOVETYPE_WALK && lastInvalidatedTick[client] != GetGameTickCount()) // Ladderjump { validJump[client] = true; Call_GOKZ_OnJumpValidated(client, false, true, false); diff --git a/addons/sourcemod/scripting/gokz-core/teleports.sp b/addons/sourcemod/scripting/gokz-core/teleports.sp index 7346e00d..4996e762 100644 --- a/addons/sourcemod/scripting/gokz-core/teleports.sp +++ b/addons/sourcemod/scripting/gokz-core/teleports.sp @@ -115,7 +115,12 @@ void MakeCheckpoint(int client) { GOKZ_PrintToChat(client, true, "%t", "Make Checkpoint", checkpointCount[client]); } - + + if (!GetTimerRunning(client) && AntiCpTriggerIsTouched(client)) + { + GOKZ_PrintToChat(client, true, "%t", "Anti Checkpoint Area Warning"); + } + // Call Post Forward Call_GOKZ_OnMakeCheckpoint_Post(client); } diff --git a/addons/sourcemod/scripting/gokz-core/triggerfix.sp b/addons/sourcemod/scripting/gokz-core/triggerfix.sp index f9103f56..0379a950 100644 --- a/addons/sourcemod/scripting/gokz-core/triggerfix.sp +++ b/addons/sourcemod/scripting/gokz-core/triggerfix.sp @@ -342,9 +342,9 @@ static bool DoTriggerFix(int client, bool filterFix = false) { char className[64]; GetEntityClassname(trigger, className, sizeof(className)); - if (GetEntityFlags(client) & FL_BASEVELOCITY && StrEqual(className, "trigger_push")) + if (StrEqual(className, "trigger_push")) { - // We are currently affected by a push trigger, do not try to touch it again to prevent double boost. + // Completely ignore push triggers. continue; } // If the player is still touching the trigger on this tick, and Touch was not called for whatever reason diff --git a/addons/sourcemod/scripting/gokz-global.sp b/addons/sourcemod/scripting/gokz-global.sp index 82abe48b..c7d6eabc 100644 --- a/addons/sourcemod/scripting/gokz-global.sp +++ b/addons/sourcemod/scripting/gokz-global.sp @@ -54,6 +54,7 @@ int gI_MapFileSize; int gI_MapTier; ConVar gCV_gokz_settings_enforcer; +ConVar gCV_gokz_warn_for_non_global_map; ConVar gCV_EnforcedCVar[ENFORCEDCVAR_COUNT]; #include "gokz-global/api.sp" @@ -259,6 +260,24 @@ public void GlobalAPI_OnInitialized() SetupAPI(); } + +public Action GOKZ_OnTimerStart(int client, int course) +{ + KZPlayer player = KZPlayer(client); + int mode = player.Mode; + + // We check the timer running to prevent spam when standing inside VB. + if (gCV_gokz_warn_for_non_global_map.BoolValue + && GlobalAPI_HasAPIKey() + && !GlobalsEnabled(mode) + && !GOKZ_GetTimerRunning(client)) + { + GOKZ_PrintToChat(client, true, "%t", "Warn Player Not Global Run"); + } + + return Plugin_Continue; +} + public void GOKZ_OnTimerStart_Post(int client, int course) { KZPlayer player = KZPlayer(client); @@ -512,6 +531,7 @@ static void CreateConVars() AutoExecConfig_SetCreateFile(true); gCV_gokz_settings_enforcer = AutoExecConfig_CreateConVar("gokz_settings_enforcer", "1", "Whether GOKZ enforces convars required for global records.", _, true, 0.0, true, 1.0); + gCV_gokz_warn_for_non_global_map = AutoExecConfig_CreateConVar("gokz_warn_for_non_global_map", "1", "Whether or not GOKZ should warn players if the global check does not pass.", _, true, 0.0, true, 1.0); gCV_gokz_settings_enforcer.AddChangeHook(OnConVarChanged); AutoExecConfig_ExecuteFile(); diff --git a/addons/sourcemod/scripting/gokz-hud.sp b/addons/sourcemod/scripting/gokz-hud.sp index 188cf511..04a3a84a 100644 --- a/addons/sourcemod/scripting/gokz-hud.sp +++ b/addons/sourcemod/scripting/gokz-hud.sp @@ -1,5 +1,6 @@ #include +#include #include #include @@ -30,6 +31,8 @@ public Plugin myinfo = bool gB_GOKZRacing; bool gB_GOKZReplays; bool gB_MenuShowing[MAXPLAYERS + 1]; +bool gB_JBTakeoff[MAXPLAYERS + 1]; +bool gB_FastUpdateRate[MAXPLAYERS + 1]; #include "gokz-hud/commands.sp" #include "gokz-hud/hide_weapon.sp" @@ -43,7 +46,6 @@ bool gB_MenuShowing[MAXPLAYERS + 1]; #include "gokz-hud/tp_menu.sp" - // =====[ PLUGIN EVENTS ]===== public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) @@ -80,6 +82,13 @@ public void OnAllPluginsLoaded() gB_GOKZRacing = LibraryExists("gokz-racing"); gB_GOKZReplays = LibraryExists("gokz-replays"); + for (int client = 1; client <= MaxClients; client++) + { + if (IsClientInGame(client)) + { + OnClientPutInServer(client); + } + } } public void OnLibraryAdded(const char[] name) @@ -103,6 +112,17 @@ public void OnLibraryRemoved(const char[] name) // =====[ CLIENT EVENTS ]===== +public void OnClientPutInServer(int client) +{ + SDKHook(client, SDKHook_PostThinkPost, OnPlayerPostThinkPost); +} + +public void OnPlayerPostThinkPost(int client) +{ + KZPlayer player = KZPlayer(client); + gB_JBTakeoff[client] = (gB_JBTakeoff[client] && !player.OnGround && !player.OnLadder && !player.Noclipping) || Movement_GetJumpbugged(client); +} + 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]) { if (!IsValidClient(client)) @@ -216,10 +236,17 @@ public void GOKZ_OnOptionChanged(int client, const char[] option, any newValue) OnOptionChanged_Menu(client, hudOption); OnOptionChanged_HideWeapon(client, hudOption); OnOptionChanged_Options(client, hudOption, newValue); + if (hudOption == HUDOption_UpdateRate) + { + gB_FastUpdateRate[client] = GOKZ_HUD_GetOption(client, HUDOption_UpdateRate) == UpdateRate_Fast; + } } } - +public void GOKZ_OnOptionsLoaded(int client) +{ + gB_FastUpdateRate[client] = GOKZ_HUD_GetOption(client, HUDOption_UpdateRate) == UpdateRate_Fast; +} // =====[ OTHER EVENTS ]===== @@ -264,6 +291,7 @@ static void SetHUDInfo(KZPlayer player, HUDInfo info, int cmdnum) info.ID = player.ID; info.Jumped = player.Jumped; info.HitPerf = player.GOKZHitPerf; + info.HitJB = gB_JBTakeoff[info.ID]; info.TakeoffSpeed = player.GOKZTakeoffSpeed; info.IsTakeoff = Movement_GetTakeoffCmdNum(player.ID) == cmdnum; info.Buttons = player.Buttons; diff --git a/addons/sourcemod/scripting/gokz-hud/info_panel.sp b/addons/sourcemod/scripting/gokz-hud/info_panel.sp index 54e8f94a..d4393fa2 100644 --- a/addons/sourcemod/scripting/gokz-hud/info_panel.sp +++ b/addons/sourcemod/scripting/gokz-hud/info_panel.sp @@ -12,7 +12,6 @@ static bool infoPanelOnGroundLast[MAXPLAYERS + 1]; static bool infoPanelShowDuckString[MAXPLAYERS + 1]; - // =====[ PUBLIC ]===== bool IsDrawingInfoPanel(int client) @@ -28,7 +27,15 @@ bool IsDrawingInfoPanel(int client) void OnPlayerRunCmdPost_InfoPanel(int client, int cmdnum, HUDInfo info) { - if (cmdnum % 10 == 0 || info.IsTakeoff) + int updateSpeed = 10; + if (gB_FastUpdateRate[client]) + { + // The hint text panel update speed depends on the client ping. + // To optimize resource usage, we scale the update speed with it. + // The fastest speed the client can get is around once every 2 ticks. + updateSpeed = RoundToFloor(GetClientAvgLatency(client, NetFlow_Outgoing) / GetTickInterval()); + } + if (cmdnum % updateSpeed == 0 || info.IsTakeoff) { UpdateInfoPanel(client, info); } @@ -159,11 +166,23 @@ static char[] GetSpeedString(KZPlayer player, HUDInfo info) } else { - FormatEx(speedString, sizeof(speedString), - "%T: %.0f %s\n", - "Info Panel Text - Speed", player.ID, - RoundToPowerOfTen(info.Speed, -2), - GetTakeoffString(info)); + if (GOKZ_HUD_GetOption(player.ID, HUDOption_DeadstrafeColor) == DeadstrafeColor_Enabled + && Movement_GetVerticalVelocity(info.ID) > 0.0 && Movement_GetVerticalVelocity(info.ID) < 140.0) + { + FormatEx(speedString, sizeof(speedString), + "%T: %.0f %s\n", + "Info Panel Text - Speed", player.ID, + RoundToPowerOfTen(info.Speed, -2), + GetTakeoffString(info)); + } + else + { + FormatEx(speedString, sizeof(speedString), + "%T: %.0f %s\n", + "Info Panel Text - Speed", player.ID, + RoundToPowerOfTen(info.Speed, -2), + GetTakeoffString(info)); + } } } return speedString; @@ -189,8 +208,15 @@ static char[] GetTakeoffString(HUDInfo info) duckString = ""; infoPanelShowDuckString[info.ID] = false; } - - if (info.HitPerf) + + if (info.HitJB) + { + FormatEx(takeoffString, sizeof(takeoffString), + "(%.0f)%s", + RoundToPowerOfTen(info.TakeoffSpeed, -2), + duckString); + } + else if (info.HitPerf) { FormatEx(takeoffString, sizeof(takeoffString), "(%.0f)%s", diff --git a/addons/sourcemod/scripting/gokz-hud/options.sp b/addons/sourcemod/scripting/gokz-hud/options.sp index 694b97a2..d8f603bb 100644 --- a/addons/sourcemod/scripting/gokz-hud/options.sp +++ b/addons/sourcemod/scripting/gokz-hud/options.sp @@ -122,5 +122,37 @@ static void PrintOptionChangeMessage(int client, HUDOption option, any newValue) } } } + case HUDOption_DeadstrafeColor: + { + switch (newValue) + { + case DeadstrafeColor_Disabled: + { + GOKZ_PrintToChat(client, true, "%t", "Option - Dead Strafe - Disable"); + } + case DeadstrafeColor_Enabled: + { + GOKZ_PrintToChat(client, true, "%t", "Option - Dead Strafe - Enable"); + } + } + } + case HUDOption_ShowSpectators: + { + switch (newValue) + { + case ShowSpecs_Disabled: + { + GOKZ_PrintToChat(client, true, "%t", "Option - Show Spectators - Disable"); + } + case ShowSpecs_Number: + { + GOKZ_PrintToChat(client, true, "%t", "Option - Show Spectators - Number"); + } + case ShowSpecs_Full: + { + GOKZ_PrintToChat(client, true, "%t", "Option - Show Spectators - Full"); + } + } + } } } \ No newline at end of file diff --git a/addons/sourcemod/scripting/gokz-hud/options_menu.sp b/addons/sourcemod/scripting/gokz-hud/options_menu.sp index 851e6b92..b68999de 100644 --- a/addons/sourcemod/scripting/gokz-hud/options_menu.sp +++ b/addons/sourcemod/scripting/gokz-hud/options_menu.sp @@ -120,6 +120,24 @@ public void TopMenuHandler_HUD(TopMenu topmenu, TopMenuAction action, TopMenuObj gC_HUDOptionPhrases[option], param, gC_ShowControlsPhrases[GOKZ_HUD_GetOption(param, option)], param); } + case HUDOption_DeadstrafeColor: + { + FormatEx(buffer, maxlength, "%T - %T", + gC_HUDOptionPhrases[option], param, + gC_DeadstrafeColorPhrases[GOKZ_HUD_GetOption(param, option)], param); + } + case HUDOption_UpdateRate: + { + FormatEx(buffer, maxlength, "%T - %T", + gC_HUDOptionPhrases[option], param, + gC_HUDUpdateRatePhrases[GOKZ_HUD_GetOption(param, option)], param); + } + case HUDOption_ShowSpectators: + { + FormatEx(buffer, maxlength, "%T - %T", + gC_HUDOptionPhrases[option], param, + gC_ShowSpecsPhrases[GOKZ_HUD_GetOption(param, option)], param); + } default:FormatToggleableOptionDisplay(param, option, buffer, maxlength); } } diff --git a/addons/sourcemod/scripting/gokz-hud/racing_text.sp b/addons/sourcemod/scripting/gokz-hud/racing_text.sp index 732cb425..a341a14e 100644 --- a/addons/sourcemod/scripting/gokz-hud/racing_text.sp +++ b/addons/sourcemod/scripting/gokz-hud/racing_text.sp @@ -21,7 +21,8 @@ void OnPluginStart_RacingText() void OnPlayerRunCmdPost_RacingText(int client, int cmdnum) { - if (gB_GOKZRacing && cmdnum % 6 == 3) + int updateSpeed = gB_FastUpdateRate[client] ? 3 : 6; + if (gB_GOKZRacing && cmdnum % updateSpeed == 2) { UpdateRacingText(client); } diff --git a/addons/sourcemod/scripting/gokz-hud/speed_text.sp b/addons/sourcemod/scripting/gokz-hud/speed_text.sp index 8272aa3a..e4b30ccf 100644 --- a/addons/sourcemod/scripting/gokz-hud/speed_text.sp +++ b/addons/sourcemod/scripting/gokz-hud/speed_text.sp @@ -24,7 +24,8 @@ void OnPluginStart_SpeedText() void OnPlayerRunCmdPost_SpeedText(int client, int cmdnum, HUDInfo info) { - if (cmdnum % 6 == 0 || info.IsTakeoff) + int updateSpeed = gB_FastUpdateRate[client] ? 3 : 6; + if (cmdnum % updateSpeed == 0 || info.IsTakeoff) { UpdateSpeedText(client, info); } @@ -69,16 +70,27 @@ static void ShowSpeedText(KZPlayer player, HUDInfo info) return; } - int colour[4]; // RGBA - if (info.HitPerf && !info.OnGround && !info.OnLadder && !info.Noclipping) + int colour[4] = { 255, 255, 255, 0 }; // RGBA + float velZ = Movement_GetVerticalVelocity(info.ID); + if (!info.OnGround && !info.OnLadder && !info.Noclipping) { - colour = { 64, 255, 64, 0 }; - } - else - { - colour = { 255, 255, 255, 0 }; + if (GOKZ_HUD_GetOption(player.ID, HUDOption_DeadstrafeColor) == DeadstrafeColor_Enabled && velZ > 0.0 && velZ < 140.0) + { + colour = { 255, 32, 32, 0 }; + } + else if (info.HitPerf) + { + if (info.HitJB) + { + colour = { 255, 255, 32, 0 }; + } + else + { + colour = { 64, 255, 64, 0 }; + } + } } - + switch (player.SpeedText) { case SpeedText_Bottom: diff --git a/addons/sourcemod/scripting/gokz-hud/timer_text.sp b/addons/sourcemod/scripting/gokz-hud/timer_text.sp index 866e9aad..6785a648 100644 --- a/addons/sourcemod/scripting/gokz-hud/timer_text.sp +++ b/addons/sourcemod/scripting/gokz-hud/timer_text.sp @@ -43,7 +43,8 @@ void OnPluginStart_TimerText() void OnPlayerRunCmdPost_TimerText(int client, int cmdnum, HUDInfo info) { - if (cmdnum % 6 == 3) + int updateSpeed = gB_FastUpdateRate[client] ? 3 : 6; + if (cmdnum % updateSpeed == 1) { UpdateTimerText(client, info); } diff --git a/addons/sourcemod/scripting/gokz-hud/tp_menu.sp b/addons/sourcemod/scripting/gokz-hud/tp_menu.sp index 54c1b8f5..ac74f220 100644 --- a/addons/sourcemod/scripting/gokz-hud/tp_menu.sp +++ b/addons/sourcemod/scripting/gokz-hud/tp_menu.sp @@ -21,7 +21,8 @@ void OnPlayerRunCmdPost_TPMenu(int client, int cmdnum, HUDInfo info) { - if (cmdnum % 6 == 3) + int updateSpeed = gB_FastUpdateRate[client] ? 3 : 6; + if (cmdnum % updateSpeed == 2) { UpdateTPMenu(client, info); } @@ -112,9 +113,25 @@ static void ShowTPMenu(KZPlayer player, HUDInfo info) static void TPMenuSetTitle(KZPlayer player, Menu menu, HUDInfo info) { + switch (player.ShowSpectators) + { + case ShowSpecs_Number: + { + menu.SetTitle("%T\n \n", "TP Menu - Spectators - Number", player.ID, GetNumSpectators(player)); + } + case ShowSpecs_Full: + { + char display[512]; + FormatSpectatorNames(player, display); + menu.SetTitle("%T\n \n", "TP Menu - Spectators - Full", player.ID, GetNumSpectators(player), display); + } + } + if (player.TimerRunning && player.TimerText == TimerText_TPMenu) { - menu.SetTitle(FormatTimerTextForMenu(player, info)); + char display[512]; + menu.GetTitle(display, sizeof(display)); + menu.SetTitle("%s%s", display, FormatTimerTextForMenu(player,info)); } } @@ -248,4 +265,60 @@ static void TPMenuAddItemStart(KZPlayer player, Menu menu) FormatEx(display, sizeof(display), "%T", "TP Menu - Start", player.ID); menu.AddItem(ITEM_INFO_START, display, ITEMDRAW_DEFAULT); } -} \ No newline at end of file +} + +static int GetNumSpectators(KZPlayer player) +{ + int count; + + for(int i = 1; i <= MaxClients; i++) + { + if (IsValidClient(i) && !IsPlayerAlive(i)) + { + int SpecMode = GetEntProp(i, Prop_Send, "m_iObserverMode"); + if (SpecMode == 4 || SpecMode == 5) + { + int target = GetEntPropEnt(i, Prop_Send, "m_hObserverTarget"); + if (target == player.ID) + { + count++; + } + } + } + } + + return count; +} + +static void FormatSpectatorNames(KZPlayer player, char display[512]) +{ + int count; + + for(int i = 1; i <= MaxClients; i++) + { + if (IsValidClient(i) && !IsPlayerAlive(i)) + { + int SpecMode = GetEntProp(i, Prop_Send, "m_iObserverMode"); + if (SpecMode == 4 || SpecMode == 5) + { + int target = GetEntPropEnt(i, Prop_Send, "m_hObserverTarget"); + if (target == player.ID) + { + count++; + //strip pound symbol from names + char cleanName[MAX_NAME_LENGTH]; + GetClientName(i, cleanName, sizeof(cleanName)); + ReplaceString(cleanName, sizeof(cleanName), "#", "", false); + if (count < 6) + { + Format(display, sizeof(display), "%s%s\n", display, cleanName); + } + } + if (count == 6) + { + Format(display, sizeof(display), "%s...", display); + } + } + } + } +} \ No newline at end of file diff --git a/addons/sourcemod/scripting/gokz-jumpstats/jump_reporting.sp b/addons/sourcemod/scripting/gokz-jumpstats/jump_reporting.sp index c625f444..4e1c5282 100644 --- a/addons/sourcemod/scripting/gokz-jumpstats/jump_reporting.sp +++ b/addons/sourcemod/scripting/gokz-jumpstats/jump_reporting.sp @@ -240,12 +240,12 @@ static void DoConsoleReport(int client, bool isFailstat, Jump jump, int tier, ch PrintToConsole(client, " #. %12t%12t%12t%12t%12t%9t%t", "Sync (Table)", "Gain (Table)", "Loss (Table)", "Airtime (Table)", "Width (Table)", "Overlap (Table)", "Dead Air (Table)"); if (jump.strafes_ticks[0] > 0) { - PrintToConsole(client, " 0. ---- ----- ----- %3.0f%% ----- -- --", GetStrafeAirtime(jump, 0)); + PrintToConsole(client, " 0. ---- ----- ----- %3.0f%% ----- -- --", GetStrafeAirtime(jump, 0)); } for (int strafe = 1; strafe <= jump.strafes && strafe < JS_MAX_TRACKED_STRAFES; strafe++) { - PrintToConsole(client, - " %2d. %3.0f%% %5.2f %5.2f %3.0f%% %5.1f° %2d %2d", + PrintToConsole(client, + " %2d. %3.0f%% %5.2f %5.2f %3.0f%% %5.1f° %2d %2d", strafe, GetStrafeSync(jump, strafe), jump.strafes_gain[strafe], diff --git a/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp b/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp index 4e1111b0..bb026efb 100644 --- a/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp +++ b/addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp @@ -26,6 +26,7 @@ static int entityTouchCount[MAXPLAYERS + 1]; static int entityTouchDuration[MAXPLAYERS + 1]; static int lastNoclipTime[MAXPLAYERS + 1]; static int lastDuckbugTime[MAXPLAYERS + 1]; +static float lastJumpButtonTime[MAXPLAYERS + 1]; static bool validCmd[MAXPLAYERS + 1]; // Whether no illegal action is detected static const float playerMins[3] = { -16.0, -16.0, 0.0 }; static const float playerMaxs[3] = { 16.0, 16.0, 0.0 }; @@ -117,6 +118,8 @@ enum struct JumpTracker // Reset pose history this.poseIndex = 0; + // Update the first tick if it is a jumpbug. + this.UpdateOnGround(); } void Begin() @@ -281,21 +284,22 @@ enum struct JumpTracker } else if (ladderJump) { - if (this.tickCount - this.lastJumpTick <= JS_MAX_BHOP_GROUND_TICKS) + // Check for ladder gliding. + float curtime = GetGameTime(); + float ignoreLadderJumpTime = GetEntPropFloat(this.jumper, Prop_Data, "m_ignoreLadderJumpTime"); + // Check if the ladder glide period is still active and if the player held jump in that period. + if (ignoreLadderJumpTime > curtime && + ignoreLadderJumpTime - IGNORE_JUMP_TIME < lastJumpButtonTime[this.jumper] && lastJumpButtonTime[this.jumper] < ignoreLadderJumpTime) { - return this.tickCount - this.ladderGrabTick > JS_MAX_BHOP_GROUND_TICKS ? JumpType_Ladderhop : JumpType_Invalid; + return JumpType_Invalid; + } + if (jumped) + { + return JumpType_Ladderhop; } else { - // Check for ladder gliding. - if (GetClientButtons(this.jumper) & IN_JUMP) - { - return JumpType_Invalid; - } - else - { - return JumpType_LadderJump; - } + return JumpType_LadderJump; } } else if (!jumped) @@ -1272,6 +1276,7 @@ void OnClientPutInServer_JumpTracking(int client) entityTouchCount[client] = 0; lastNoclipTime[client] = 0; lastDuckbugTime[client] = 0; + lastJumpButtonTime[client] = 0.0; jumpTrackers[client].Init(client); } @@ -1289,15 +1294,6 @@ void OnJumpValidated_JumpTracking(int client, bool jumped, bool ladderJump, bool return; } - // Check if this change of move type is caused by ladder hopping in the air. - // If it is then this is not a valid jumpstat. - int buttons = GetClientButtons(client); - float ignoreLadderJumpTime = GetEntPropFloat(client, Prop_Data, "m_ignoreLadderJumpTime"); - if (ladderJump && buttons & IN_JUMP && ignoreLadderJumpTime <= GetGameTime()) - { - return; - } - // Update: Takeoff speed should be always correct with the new MovementAPI. if (jumped) { @@ -1352,6 +1348,11 @@ void OnPlayerRunCmd_JumpTracking(int client, int buttons, int tickcount) jumpTrackers[client].tickCount = tickcount; + if (GetClientButtons(client) & IN_JUMP) + { + lastJumpButtonTime[client] = GetGameTime(); + } + if (CheckNoclip(client)) { lastNoclipTime[client] = GetGameTickCount(); diff --git a/addons/sourcemod/scripting/gokz-localranks/db/js_top.sp b/addons/sourcemod/scripting/gokz-localranks/db/js_top.sp index 37528e12..d07b676c 100644 --- a/addons/sourcemod/scripting/gokz-localranks/db/js_top.sp +++ b/addons/sourcemod/scripting/gokz-localranks/db/js_top.sp @@ -268,11 +268,7 @@ public int MenuHandler_JumpTopList(Menu menu, MenuAction action, int param1, int "%s/%d/%s/%d_%d_%s_%s.%s", RP_DIRECTORY_JUMPS, jumpInfo[param1][param2][0], RP_DIRECTORY_BLOCKJUMPS, jumpTopType[param1], blockNums[param1][param2], gC_ModeNamesShort[jumpInfo[param1][param2][2]], gC_StyleNamesShort[0], RP_FILE_EXTENSION); } - - if (GOKZ_RP_LoadJumpReplay(param1, path) == -1) - { - GOKZ_PrintToChat(param1, true, "%t", "No Replay for Jump"); - } + GOKZ_RP_LoadJumpReplay(param1, path); } if (action == MenuAction_Cancel && param2 == MenuCancel_Exit) diff --git a/addons/sourcemod/scripting/gokz-replays.sp b/addons/sourcemod/scripting/gokz-replays.sp index c8468545..c2b95761 100644 --- a/addons/sourcemod/scripting/gokz-replays.sp +++ b/addons/sourcemod/scripting/gokz-replays.sp @@ -41,7 +41,6 @@ int gI_CurrentMapFileSize; bool gB_HideNameChange; bool gB_NubRecordMissed[MAXPLAYERS + 1]; ArrayList g_ReplayInfoCache; -ConVar gCV_bot_quota; #include "gokz-replays/commands.sp" #include "gokz-replays/nav.sp" @@ -68,7 +67,6 @@ public void OnPluginStart() LoadTranslations("gokz-replays.phrases"); CreateGlobalForwards(); - CreateConVars(); HookEvents(); RegisterCommands(); } @@ -126,7 +124,6 @@ public void OnConfigsExecuted() FindConVar("bot_zombie").BoolValue = true; FindConVar("bot_join_after_player").BoolValue = false; FindConVar("bot_quota_mode").SetString("normal"); - gCV_bot_quota.IntValue = RP_MAX_BOTS; } public void OnEntityCreated(int entity, const char[] classname) @@ -175,15 +172,6 @@ public Action Hook_SayText2(UserMsg msg_id, any msg, const int[] players, int pl return Plugin_Continue; } -public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] intValue) -{ - // Keep the bots in the server - if (convar == gCV_bot_quota) - { - gCV_bot_quota.IntValue = RP_MAX_BOTS; - } -} - // =====[ CLIENT EVENTS ]===== @@ -282,12 +270,6 @@ public void GOKZ_DB_OnJumpstatPB(int client, int jumptype, int mode, float dista // =====[ PRIVATE ]===== -static void CreateConVars() -{ - gCV_bot_quota = FindConVar("bot_quota"); - gCV_bot_quota.Flags &= ~FCVAR_NOTIFY; - gCV_bot_quota.AddChangeHook(OnConVarChanged); -} static void HookEvents() { diff --git a/addons/sourcemod/scripting/gokz-replays/playback.sp b/addons/sourcemod/scripting/gokz-replays/playback.sp index 664126bc..cd6258b4 100644 --- a/addons/sourcemod/scripting/gokz-replays/playback.sp +++ b/addons/sourcemod/scripting/gokz-replays/playback.sp @@ -254,7 +254,6 @@ void OnClientPutInServer_Playback(int client) { botInGame[bot] = true; botClient[bot] = client; - ResetBotStuff(bot); break; } } @@ -311,8 +310,7 @@ static bool LoadPlayback(int client, int bot, char[] path) { if (!FileExists(path)) { - // This can happen relatively frequently, e.g. for jumps without a replay, - // therefore we're not logging it for now to avoid clutter. + GOKZ_PrintToChat(client, true, "%t", "No Replay Found"); return false; } @@ -421,7 +419,7 @@ static bool LoadFormatVersion1Replay(File file, int bot) // Setup playback tick data array list if (playbackTickData[bot] == null) { - playbackTickData[bot] = new ArrayList(RP_V1_TICK_DATA_BLOCKSIZE, length); + playbackTickData[bot] = new ArrayList(IntMax(RP_V1_TICK_DATA_BLOCKSIZE, sizeof(ReplayTickData)), length); } else { // Make sure it's all clear and the correct size @@ -630,10 +628,10 @@ static bool LoadFormatVersion2Replay(File file, int client, int bot) // Setup playback tick data array list if (playbackTickData[bot] == null) { - playbackTickData[bot] = new ArrayList(sizeof(ReplayTickData)); + playbackTickData[bot] = new ArrayList(IntMax(RP_V1_TICK_DATA_BLOCKSIZE, sizeof(ReplayTickData))); } else - { // Make sure it's all clear and the correct size + { playbackTickData[bot].Clear(); } @@ -716,7 +714,7 @@ static void PlaybackVersion1(int client, int bot, int &buttons) playbackTickData[bot].Clear(); // Clear it all out botDataLoaded[bot] = false; CancelReplayControlsForBot(bot); - ResetBotStuff(bot); + KickClient(botClient[bot]); } } } @@ -736,7 +734,7 @@ static void PlaybackVersion1(int client, int bot, int &buttons) playbackTickData[bot].Clear(); botDataLoaded[bot] = false; CancelReplayControlsForBot(bot); - ResetBotStuff(bot); + KickClient(botClient[bot]); return; } @@ -881,7 +879,7 @@ void PlaybackVersion2(int client, int bot, int &buttons) playbackTickData[bot].Clear(); // Clear it all out botDataLoaded[bot] = false; CancelReplayControlsForBot(bot); - ResetBotStuff(bot); + KickClient(botClient[bot]); } } } @@ -901,7 +899,7 @@ void PlaybackVersion2(int client, int bot, int &buttons) playbackTickData[bot].Clear(); botDataLoaded[bot] = false; CancelReplayControlsForBot(bot); - ResetBotStuff(bot); + KickClient(botClient[bot]); return; } @@ -1091,20 +1089,6 @@ void PlaybackVersion2(int client, int bot, int &buttons) } } -// Reset the bot client's clan tag and name to the default, unused state -static void ResetBotStuff(int bot) -{ - int client = botClient[bot]; - - CS_SetClientClanTag(client, "!REPLAY"); - char name[MAX_NAME_LENGTH]; - FormatEx(name, sizeof(name), "%d", bot + 1); - gB_HideNameChange = true; - SetClientName(client, name); - - GOKZ_JoinTeam(client, CS_TEAM_SPECTATOR); -} - // Set the bot client's GOKZ options, clan tag and name based on the loaded replay data static void SetBotStuff(int bot) { @@ -1267,8 +1251,9 @@ static int GetUnusedBot() { for (int bot = 0; bot < RP_MAX_BOTS; bot++) { - if (botInGame[bot] && !botDataLoaded[bot]) + if (!botInGame[bot]) { + CreateFakeClient("botName"); return bot; } } diff --git a/addons/sourcemod/scripting/include/gokz.inc b/addons/sourcemod/scripting/include/gokz.inc index f1087a51..b1e23444 100644 --- a/addons/sourcemod/scripting/include/gokz.inc +++ b/addons/sourcemod/scripting/include/gokz.inc @@ -40,6 +40,7 @@ enum ObsMode #define PI 3.14159265359 #define SPEED_NORMAL 250.0 #define SPEED_NO_WEAPON 260.0 +#define IGNORE_JUMP_TIME 0.2 stock float PLAYER_MINS[3] = {-16.0, -16.0, 0.0}; stock float PLAYER_MAXS[3] = {16.0, 16.0, 72.0}; stock float PLAYER_MAXS_DUCKED[3] = {16.0, 16.0, 54.0}; diff --git a/addons/sourcemod/scripting/include/gokz/hud.inc b/addons/sourcemod/scripting/include/gokz/hud.inc index 9c229794..7ca88a90 100644 --- a/addons/sourcemod/scripting/include/gokz/hud.inc +++ b/addons/sourcemod/scripting/include/gokz/hud.inc @@ -22,9 +22,12 @@ enum HUDOption: HUDOption_TimerText, HUDOption_TimerStyle, HUDOption_TimerType, - HUDOption_SpeedText, + HUDOption_SpeedText, HUDOption_ShowWeapon, - HUDOption_ShowControls, + HUDOption_ShowControls, + HUDOption_DeadstrafeColor, + HUDOption_UpdateRate, + HUDOption_ShowSpectators, HUDOPTION_COUNT }; @@ -97,7 +100,28 @@ enum REPLAYCONTROLS_COUNT }; +enum +{ + DeadstrafeColor_Disabled = 0, + DeadstrafeColor_Enabled, + DEADSTRAFECOLOR_COUNT +}; + +enum +{ + ShowSpecs_Disabled = 0, + ShowSpecs_Number, + ShowSpecs_Full, + SHOWSPECS_COUNT +}; + +enum +{ + UpdateRate_Slow = 0, + UpdateRate_Fast, + UPDATERATE_COUNT, +}; // =====[ STRUCTS ]====== @@ -117,6 +141,7 @@ enum struct HUDInfo int ID; bool Jumped; bool HitPerf; + bool HitJB; float TakeoffSpeed; int Buttons; int CurrentTeleport; @@ -140,7 +165,10 @@ stock char gC_HUDOptionNames[HUDOPTION_COUNT][] = "GOKZ HUD - Show Time Type", "GOKZ HUD - Speed Text", "GOKZ HUD - Show Weapon", - "GOKZ HUD - Show Controls" + "GOKZ HUD - Show Controls", + "GOKZ HUD - Dead Strafe", + "GOKZ HUD - Update Rate", + "GOKZ HUD - Show Spectators" }; stock char gC_HUDOptionDescriptions[HUDOPTION_COUNT][] = @@ -151,9 +179,12 @@ stock char gC_HUDOptionDescriptions[HUDOPTION_COUNT][] = "Timer Display - 0 = Disabled, 1 = Centre Panel, 2 = Teleport Menu, 3 = Bottom, 4 = Top", "Timer Style - 0 = Standard, 1 = Precise", "Timer Type - 0 = Disabled, 1 = Enabled", - "Speed Display - 0 = Disabled, 1 = Centre Panel, 2 = Bottom", + "Speed Display - 0 = Disabled, 1 = Centre Panel, 2 = Bottom", "Weapon Viewmodel - 0 = Disabled, 1 = Enabled", - "Replay Controls Display - 0 = Disbled, 1 = Enabled" + "Replay Controls Display - 0 = Disbled, 1 = Enabled", + "Dead Strafe Indicator - 0 = Disabled, 1 = Enabled", + "HUD Update Rate - 0 = Slow, 1 = Fast", + "Show Spectators - 0 = Disabled, 1 = Number Only, 2 = Number and Names" }; stock char gC_HUDOptionPhrases[HUDOPTION_COUNT][] = @@ -164,9 +195,12 @@ stock char gC_HUDOptionPhrases[HUDOPTION_COUNT][] = "Options Menu - Timer Text", "Options Menu - Timer Style", "Options Menu - Timer Type", - "Options Menu - Speed Text", + "Options Menu - Speed Text", "Options Menu - Show Weapon", - "Options Menu - Show Controls" + "Options Menu - Show Controls", + "Options Menu - Dead Strafe Indicator", + "Options Menu - Update Rate", + "Options Menu - Show Spectators" }; stock int gI_HUDOptionCounts[HUDOPTION_COUNT] = @@ -177,9 +211,12 @@ stock int gI_HUDOptionCounts[HUDOPTION_COUNT] = TIMERTEXT_COUNT, TIMERSTYLE_COUNT, TIMERTYPE_COUNT, - SPEEDTEXT_COUNT, + SPEEDTEXT_COUNT, SHOWWEAPON_COUNT, - REPLAYCONTROLS_COUNT + REPLAYCONTROLS_COUNT, + DEADSTRAFECOLOR_COUNT, + UPDATERATE_COUNT, + SHOWSPECS_COUNT }; stock int gI_HUDOptionDefaults[HUDOPTION_COUNT] = @@ -190,9 +227,12 @@ stock int gI_HUDOptionDefaults[HUDOPTION_COUNT] = TimerText_InfoPanel, TimerStyle_Standard, TimerType_Enabled, - SpeedText_InfoPanel, + SpeedText_InfoPanel, ShowWeapon_Enabled, - ReplayControls_Enabled + ReplayControls_Enabled, + DeadstrafeColor_Disabled, + UpdateRate_Slow, + ShowSpecs_Disabled }; stock char gC_TPMenuPhrases[TPMENU_COUNT][] = @@ -237,7 +277,24 @@ stock char gC_ShowControlsPhrases[REPLAYCONTROLS_COUNT][] = "Options Menu - Enabled" }; +stock char gC_DeadstrafeColorPhrases[DEADSTRAFECOLOR_COUNT][] = +{ + "Options Menu - Disabled", + "Options Menu - Enabled" +}; + +stock char gC_ShowSpecsPhrases[SHOWSPECS_COUNT][] = +{ + "Options Menu - Disabled", + "Options Menu - Number", + "Options Menu - Number and Names" +}; +stock char gC_HUDUpdateRatePhrases[UPDATERATE_COUNT][]= +{ + "Options Menu - Slow", + "Options Menu - Fast" +}; // =====[ STOCKS ]===== diff --git a/addons/sourcemod/scripting/include/gokz/kzplayer.inc b/addons/sourcemod/scripting/include/gokz/kzplayer.inc index cca3ac63..c4900d6e 100644 --- a/addons/sourcemod/scripting/include/gokz/kzplayer.inc +++ b/addons/sourcemod/scripting/include/gokz/kzplayer.inc @@ -421,6 +421,24 @@ methodmap KZPlayer < MovementAPIPlayer { } } + property int ReplayControls { + public get() { + return this.GetHUDOption(HUDOption_ShowControls); + } + public set(int value) { + this.SetHUDOption(HUDOption_ShowControls, value); + } + } + + property int ShowSpectators { + public get() { + return this.GetHUDOption(HUDOption_ShowSpectators); + } + public set(int value) { + this.SetHUDOption(HUDOption_ShowSpectators, value); + } + } + #endif // =====[ END HUD ]===== diff --git a/addons/sourcemod/translations/gokz-common.phrases.txt b/addons/sourcemod/translations/gokz-common.phrases.txt index 1f50a834..5b373251 100644 --- a/addons/sourcemod/translations/gokz-common.phrases.txt +++ b/addons/sourcemod/translations/gokz-common.phrases.txt @@ -110,4 +110,12 @@ "chi" "高级" "ru" "Продвинутый" } + "Options Menu - Slow" + { + "en" "Slow" + } + "Options Menu - Fast" + { + "en" "Fast" + } } \ No newline at end of file diff --git a/addons/sourcemod/translations/gokz-core.phrases.txt b/addons/sourcemod/translations/gokz-core.phrases.txt index b3b3a9c6..bc0ac654 100644 --- a/addons/sourcemod/translations/gokz-core.phrases.txt +++ b/addons/sourcemod/translations/gokz-core.phrases.txt @@ -53,6 +53,10 @@ "chi" "{grey}你存储了一个存点 (#{default}{1}{grey})." "ru" "{grey}Вы поставили чекпойнт (#{default}{1}{grey})." } + "Anti Checkpoint Area Warning" + { + "en" "{yellow}Warning{grey}: Checkpoint created in checkpoint disabled area." + } "Can't Checkpoint (Midair)" { "en" "{darkred}You can't make a checkpoint mid-air." diff --git a/addons/sourcemod/translations/gokz-global.phrases.txt b/addons/sourcemod/translations/gokz-global.phrases.txt index a9e07e62..a4e2694e 100644 --- a/addons/sourcemod/translations/gokz-global.phrases.txt +++ b/addons/sourcemod/translations/gokz-global.phrases.txt @@ -200,6 +200,10 @@ "en" "Your m_yaw value must be less or equal to 0.3 to play on this server" "ru" "Ваше значение m_yaw должно быть меньше или равно 0.3 для игры на этом сервере." } + "Warn Player Not Global Run" + { + "en" "{yellow}Warning{grey}: The current map did not pass the Global check. Global times will not save. See {default}!globalcheck{grey} for more information." + } // =====[ GLOBAL TOP MENU ]===== diff --git a/addons/sourcemod/translations/gokz-hud.phrases.txt b/addons/sourcemod/translations/gokz-hud.phrases.txt index 00817a12..1e94e16b 100644 --- a/addons/sourcemod/translations/gokz-hud.phrases.txt +++ b/addons/sourcemod/translations/gokz-hud.phrases.txt @@ -71,6 +71,26 @@ { "en" "{grey}Replay controls are now hidden." } + "Option - Dead Strafe - Enable" + { + "en" "{grey}The speed text now indicates period with low airstrafe gain." + } + "Option - Dead Strafe - Disable" + { + "en" "{grey}Dead strafe period indicator disabled." + } + "Option - Show Spectators - Disable" + { + "en" "{grey}Spectators are now not shown." + } + "Option - Show Spectators - Number" + { + "en" "{grey}Number of spectators is now shown." + } + "Option - Show Spectators - Full" + { + "en" "{grey}Number and names of spectators are now shown." + } // =====[ INFO PANEL ]===== @@ -107,6 +127,16 @@ // =====[ TELEPORT MENU ]===== + "TP Menu - Spectators - Full" + { + "#format" "{1:d},{2:s}" + "en" "Specs ({1}):\n{2}" + } + "TP Menu - Spectators - Number" + { + "#format" "{1:d}" + "en" "Specs: {1}" + } "TP Menu - Checkpoint" { "en" "Checkpoint" @@ -220,6 +250,10 @@ "chi" "空速文字" "ru" "Текст скорости" } + "Options Menu - Dead Strafe Indicator" + { + "en" "Dead strafe period" + } "Options Menu - Show Weapon" { "en" "Show weapon" @@ -230,6 +264,22 @@ { "en" "Show replay controls" } + "Options Menu - Update Rate" + { + "en" "Update rate" + } + "Options Menu - Show Spectators" + { + "en" "Show spectators" + } + "Options Menu - Number" + { + "en" "Number" + } + "Options Menu - Number and Names" + { + "en" "Number and Names" + } // =====[ RACING ]===== diff --git a/addons/sourcemod/translations/gokz-localranks.phrases.txt b/addons/sourcemod/translations/gokz-localranks.phrases.txt index 4f6b0434..ba1e3d73 100644 --- a/addons/sourcemod/translations/gokz-localranks.phrases.txt +++ b/addons/sourcemod/translations/gokz-localranks.phrases.txt @@ -380,10 +380,6 @@ "en" "{grey}No jumpstats were found!" "ru" "{grey}Статистика прыжков не найдена!" } - "No Replay for Jump" - { - "en" "{red}No replay for jump found!" - } "Jump Record" { "#format" "{1:s},{2:s},{3:s},{4:.4f}" diff --git a/addons/sourcemod/translations/gokz-replays.phrases.txt b/addons/sourcemod/translations/gokz-replays.phrases.txt index a7f39004..fed68a4b 100644 --- a/addons/sourcemod/translations/gokz-replays.phrases.txt +++ b/addons/sourcemod/translations/gokz-replays.phrases.txt @@ -21,6 +21,10 @@ "chi" "{darkred}当前没有可用的回放机器人." "ru" "{darkred}В настоящее время нет доступных ботов воспроизведения." } + "No Replay Found" + { + "en" "{red}No replay found!" + } // =====[ REPLAY MENU ]===== diff --git a/cfg/sourcemod/gokz/gokz.cfg b/cfg/sourcemod/gokz/gokz.cfg index 8b1ecf95..79657137 100644 --- a/cfg/sourcemod/gokz/gokz.cfg +++ b/cfg/sourcemod/gokz/gokz.cfg @@ -53,7 +53,7 @@ mp_ignore_round_win_conditions 1 mp_match_end_changelevel 1 sv_ignoregrenaderadio 1 sv_disable_radar 1 -mp_footsteps_serverside 0 +mp_footsteps_serverside 1 sv_mincmdrate 128 sv_minupdaterate 128 mp_warmuptime_all_players_connected 0 diff --git a/cfg/sourcemod/gokz/options_menu_sorting.cfg b/cfg/sourcemod/gokz/options_menu_sorting.cfg index 01b49c23..1dffd7d7 100644 --- a/cfg/sourcemod/gokz/options_menu_sorting.cfg +++ b/cfg/sourcemod/gokz/options_menu_sorting.cfg @@ -23,11 +23,13 @@ } "HUD" { + "item" "GOKZ HUD - Update Rate" "item" "GOKZ HUD - Teleport Menu" "item" "GOKZ HUD - Centre Panel" "item" "GOKZ HUD - Timer Text" "item" "GOKZ HUD - Timer Style" "item" "GOKZ HUD - Speed Text" + "item" "GOKZ HUD - Dead Strafe" "item" "GOKZ HUD - Show Keys" "item" "GOKZ HUD - Show Weapon" "item" "GOKZ HUD - Show Controls"