From cd4f1c924860ebdd0e9f2d3fa6a5f68886349a91 Mon Sep 17 00:00:00 2001 From: Nora <50810398+akanora@users.noreply.github.com> Date: Mon, 12 May 2025 08:17:24 +0300 Subject: [PATCH 1/5] Prevent gB_ForceJump when teleporting to a checkpoint in the start zone (#1240) Co-authored-by: rtldg <55846624+rtldg@users.noreply.github.com> --- addons/sourcemod/scripting/shavit-tas.sp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/sourcemod/scripting/shavit-tas.sp b/addons/sourcemod/scripting/shavit-tas.sp index a5b528c8..8912927f 100644 --- a/addons/sourcemod/scripting/shavit-tas.sp +++ b/addons/sourcemod/scripting/shavit-tas.sp @@ -257,6 +257,12 @@ public void Shavit_OnRestart(int client, int track) gI_LastRestart[client] = GetGameTickCount(); } +public Action Shavit_OnTeleportPre(int client, int index, int target) +{ + // to prevent gB_ForceJump when teleporting to a checkpoint in the start zone + gI_LastRestart[client] = GetGameTickCount(); +} + public void Shavit_OnEnterZone(int client, int type, int track, int id, int entity, int data) { if (!IsValidClient(client, true) || IsFakeClient(client)) From 49105001d3fbcec5060689f3b28a4816ff3e2340 Mon Sep 17 00:00:00 2001 From: olivia Date: Sun, 11 May 2025 23:14:25 -0700 Subject: [PATCH 2/5] shavit-chat - fix chat messages near (or at) max length overflowing into a broken message (#1241) --- addons/sourcemod/scripting/shavit-chat.sp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/shavit-chat.sp b/addons/sourcemod/scripting/shavit-chat.sp index c88bd751..28c7527e 100644 --- a/addons/sourcemod/scripting/shavit-chat.sp +++ b/addons/sourcemod/scripting/shavit-chat.sp @@ -40,7 +40,7 @@ #define MAGIC_NUMBER 2147483648.0 #define MAXLENGTH_NAME 128 -#define MAXLENGTH_TEXT 128 +#define MAXLENGTH_TEXT 255 #define MAXLENGTH_MESSAGE 255 #define MAXLENGTH_DISPLAY 192 #define MAXLENGTH_CMESSAGE 16 From 91ca6a7ea93cef72ef4854655c351babacaf1f07 Mon Sep 17 00:00:00 2001 From: rtldg Date: Thu, 15 May 2025 22:45:11 +0000 Subject: [PATCH 3/5] Use `IsMapValid` instead of `GetMapDisplayName` sometimes For reasons, only known to God and Gaben, `GetMapDisplayName` will start failing. Something along these lines: - make hundreds (or thousand+) maps named `test_{i}.bsp` - start server - delete them all - make `test_{i+1}.bsp` - `sm_map test_{i+1}.bsp` - "Invalid map :(" thinker emoji --- addons/sourcemod/scripting/shavit-mapchooser.sp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/shavit-mapchooser.sp b/addons/sourcemod/scripting/shavit-mapchooser.sp index c468f3c3..887a402b 100644 --- a/addons/sourcemod/scripting/shavit-mapchooser.sp +++ b/addons/sourcemod/scripting/shavit-mapchooser.sp @@ -2102,7 +2102,7 @@ public Action Command_ReloadMap(int client, int args) bool MapValidOrYell(int client, const char[] map) { - if (!GetMapDisplayName(map, "hi:)", 5)) + if (!IsMapValid(map)) { ReplyToCommand(client, "%sInvalid map :(", g_cPrefix); return false; From b29cc54d0b2285f0f10d502d262c6adf945296b1 Mon Sep 17 00:00:00 2001 From: rtldg Date: Fri, 16 May 2025 07:09:29 +0000 Subject: [PATCH 4/5] Fix the Migration_MoreFirstLoginStuff queries from rtldg/sqldumb (surely.. hopefully..) --- .../shavit/sql-create-tables-and-migrations.sp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/sourcemod/scripting/include/shavit/sql-create-tables-and-migrations.sp b/addons/sourcemod/scripting/include/shavit/sql-create-tables-and-migrations.sp index d6bdfebe..99530982 100644 --- a/addons/sourcemod/scripting/include/shavit/sql-create-tables-and-migrations.sp +++ b/addons/sourcemod/scripting/include/shavit/sql-create-tables-and-migrations.sp @@ -715,24 +715,24 @@ public void ApplyMigration_MoreFirstLoginStuff() { FormatEx(query, sizeof(query), "UPDATE %susers JOIN ( \ - SELECT auth, `time`, FLOOR(MIN(`date`) - `time`) as min_date \ + SELECT auth, MIN(FLOOR(`date` - `time`)) as min_date \ FROM %splayertimes \ WHERE `date` > 1188518400 \ GROUP BY auth \ ) as pt ON %susers.auth = pt.auth \ - SET firstlogin = FLOOR(pt.min_date - pt.time) \ + SET firstlogin = pt.min_date \ WHERE firstlogin <= 0;", gS_SQLPrefix, gS_SQLPrefix, gS_SQLPrefix ); AddQueryLog(trans, query); FormatEx(query, sizeof(query), "UPDATE %susers JOIN ( \ - SELECT auth, `time`, FLOOR(MIN(`date`) - `time`) as min_date \ + SELECT auth, MIN(FLOOR(`date` - `time`)) as min_date \ FROM %splayertimes \ WHERE `date` > 1188518400 \ GROUP BY auth \ ) as pt ON %susers.auth = pt.auth \ - SET firstlogin = LEAST(firstlogin, FLOOR(pt.min_date - pt.time)) \ + SET firstlogin = LEAST(firstlogin, pt.min_date) \ WHERE firstlogin > 0;", gS_SQLPrefix, gS_SQLPrefix, gS_SQLPrefix ); @@ -741,9 +741,9 @@ public void ApplyMigration_MoreFirstLoginStuff() else // sqlite & postgresql use the same syntax here { FormatEx(query, sizeof(query), - "UPDATE %susers SET firstlogin = FLOOR(pt.min_date - pt.time) \ + "UPDATE %susers SET firstlogin = pt.min_date \ FROM ( \ - SELECT auth, time, MIN(date) as min_date \ + SELECT auth, MIN(FLOOR(date - time)) as min_date \ FROM %splayertimes \ WHERE date > 1188518400 \ GROUP BY auth \ @@ -753,9 +753,9 @@ public void ApplyMigration_MoreFirstLoginStuff() ); AddQueryLog(trans, query); FormatEx(query, sizeof(query), - "UPDATE %susers SET firstlogin = MIN(firstlogin, FLOOR(pt.min_date - pt.time)) \ + "UPDATE %susers SET firstlogin = MIN(firstlogin, pt.min_date) \ FROM ( \ - SELECT auth, time, MIN(date) as min_date \ + SELECT auth, MIN(FLOOR(date - time)) as min_date \ FROM %splayertimes \ WHERE date > 1188518400 \ GROUP BY auth \ From 321cdb28d97df4c720136a33b63b8df5bdd93534 Mon Sep 17 00:00:00 2001 From: rtldg Date: Fri, 16 May 2025 07:36:52 +0000 Subject: [PATCH 5/5] more changelog stuff --- CHANGELOG.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 623efe2d..29b29195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ Note: Dates are UTC+0. # v?.?.? - ? - 2025-0?-?? - rtldg +this is too dense and unreadable. I'm sorry... + - random things - move around the absolute minimum time (0.11s) stuff https://github.com/shavitush/bhoptimer/commit/2dbb211742124484f4a420c61b4511b2c5f16b38 - fix wrong variable used in `LessStupidGetMapDisplayName` (relevant for tf2 & csgo) https://github.com/shavitush/bhoptimer/commit/afa6b07da8e7540277ada3a85895da2c1395aed3 @@ -34,6 +36,18 @@ Note: Dates are UTC+0. - like on `bhop_ins_mariooo` - fix some colors in advertisement messages not working https://github.com/shavitush/bhoptimer/commit/ad48aa3345878fab54d785980f0be656677a68e3 - check & use `sv_autobunnyhopping` even if the game is not CS:GO (and it's in CS:S as of the 2025-02-18 update! Thank you @misyltoad) https://github.com/shavitush/bhoptimer/commit/94ebb97c79f0ff71dd7115ac6626d86e162df1a7 + - other gamedata stuff for 2025-02-18 update: https://github.com/shavitush/bhoptimer/pull/1226 https://github.com/shavitush/bhoptimer/commit/90a6714bebfc384055401032f396c1f82fb996d4 + - Make sure MaybeDoPhysicsUntouch() is called in ProcessMovementPost https://github.com/shavitush/bhoptimer/pull/1226/commits/2c093bb02d4ad99c3ca378426ce5ba96deed0767 + - swap sm_p to sm_noclip in shavit_misc_noclipme description https://github.com/shavitush/bhoptimer/pull/1230 @lilac1337 https://github.com/shavitush/bhoptimer/commit/78f55f9a1a9c9ca94bd9128c6294737f30933b57 + - add shavit_misc_unnocliponrestart to disable noclip on restart https://github.com/shavitush/bhoptimer/pull/1232 @mourningsickness https://github.com/shavitush/bhoptimer/commit/2726865399e9a25689f000600816fbc8070ec28b + - Add FirstLogin to database and profile https://github.com/shavitush/bhoptimer/pull/1234 @mourningsickness https://github.com/shavitush/bhoptimer/commit/3d0cd963195e55e836e71028b28c469d5e4fff0a + - Make firstlogin pull from old runs if possible https://github.com/shavitush/bhoptimer/commit/158edbe15880228cb393d0a9f4f5f2f27fbaa767 + - follow up commit to fix my bad sql https://github.com/shavitush/bhoptimer/commit/b29cc54d0b2285f0f10d502d262c6adf945296b1 + - Mark Steam Datagram Relay IPs https://github.com/shavitush/bhoptimer/commit/983a3c8e747cbf8104ab90f9477824ac803e2a6c + - (shows "Steam Datagram Relay" for the player's country if that's how they last connected) + - fix: prevent unnecessary jump when using !r or switching to TAS (brought to attention by @akanora) https://github.com/shavitush/bhoptimer/commit/7e1c3f0dc31b79a093da1995d40888a890da9cef + - shavit-chat - fix chat messages near (or at) max length overflowing into a broken message https://github.com/shavitush/bhoptimer/pull/1241 @mourningsickness https://github.com/shavitush/bhoptimer/commit/49105001d3fbcec5060689f3b28a4816ff3e2340 + - this increases the user chat message buffer size - menu & hud things - save `!wr` menu record page for back button https://github.com/shavitush/bhoptimer/commit/9423ef79add10b5d48e64eb1a90e845d781b9906 - timeleft hud - show seconds starting at 150s https://github.com/shavitush/bhoptimer/commit/3a1e6a60cd810089ee0b4db37e99c0ad6c0e031b @@ -43,11 +57,32 @@ Note: Dates are UTC+0. - add keyhint forwards and forceUpdate https://github.com/shavitush/bhoptimer/pull/1201 @enimmy https://github.com/shavitush/bhoptimer/commit/d57ec73adb70ad5ece0a688f71cd54619a57883d - allow the !recentrecords menu to be sorted by style https://github.com/shavitush/bhoptimer/commit/4652e36cc66b5296d91f6d4e2a22aff7c1459016 - fix error spam from PR #1201 https://github.com/shavitush/bhoptimer/commit/23fa606920707c99749474653a5588e6681bf423 + - add player PB to !style menu https://github.com/shavitush/bhoptimer/pull/1239 @mourningsickness https://github.com/shavitush/bhoptimer/commit/b1a2f064327906f2ca063d807603309ed5015c74 - checkpoint things - Make sure CSS uses the ladder checkpoint stuff https://github.com/shavitush/bhoptimer/commit/c2a9017810d5df1a185d665d31e482a4a476d9cc - this also changes the checkpoint struct size because we need to save some internal ladder variables the engine uses + - ALWAYS include this (so third-party plugins don't have to be rebuilt sometimes) https://github.com/shavitush/bhoptimer/commit/2013968f1c1970e380b77259389191a927d9da91 + - save m_afButtonDisabled & m_afButtonForced in checkpoints (mainly for player_speedmod) https://github.com/shavitush/bhoptimer/commit/bf5ec55a6a008d5d24c7aa8b8782b9c8f5f19b00 + - this makes kz_bhop_genkai a bit more bearable at times + this also isn't perfect since restarting doesn't reset them + - csgo gamedata https://github.com/shavitush/bhoptimer/commit/d93ed2881620cc5263703a60da9c8cec8c3ed05b + - Prevent gB_ForceJump when teleporting to a checkpoint in the start zone https://github.com/shavitush/bhoptimer/pull/1240 @akanora https://github.com/shavitush/bhoptimer/commit/cd4f1c924860ebdd0e9f2d3fa6a5f68886349a91 - zones things - make `shavit_zones_box_offset` a bool (which also affects height offset) & correct TF2 bounding box values https://github.com/shavitush/bhoptimer/pull/1179 @jedso https://github.com/shavitush/bhoptimer/commit/f7ff341131c09119f078124717a6f95b0d631e57 + -
Summary + Previously with offsets: + - Zone is 62/2 units raised off the "ground". + - Zone is 62/2 units shorter than the beams showed. + Previously without offsets: + - Zone is 62/2 units raised off the "ground". + - Zone is 62/2 units shorter than the beams showed. + Now with offsets: + - Zone is 62/2 units raised off the "ground". + - Zone is 62/2 units shorter than the beams showed. + Now without offsets: + - Zone is 0 units raised off the "ground". + - Zone is 0 units shorter than the beams showed. +
- wip shavit-zones-json stuff - https://github.com/shavitush/bhoptimer/commit/7a81b44655742864cdc2b9dc3eaffedbcc21bb8a - https://github.com/shavitush/bhoptimer/commit/9cf9d7ff27b4cb97b02b6f827cf27a1619502912 @@ -68,6 +103,7 @@ Note: Dates are UTC+0. - force `sv_enablebunnyhopping 1` in Custom Speed Limit zones (for `_strafe`); make AirAccelerate & Custom Speed Limit zones check the player's track https://github.com/shavitush/bhoptimer/pull/1212 https://github.com/shavitush/bhoptimer/commit/7aca8755a4beab088788ed57dde22aef47cf6a07 - part 2: fix bad casts that broke Custom Airaccelerate & Custom Speed Limit zones https://github.com/shavitush/bhoptimer/commit/ee0fe65b01b7fd616092f3b2998123480dc2dca2 - Add no-jump and autobhop zones https://github.com/shavitush/bhoptimer/pull/1216 @Awesomerly https://github.com/shavitush/bhoptimer/commit/c9cfbefa277b703529f47d3e64106cd5fca4c1fe + - some fixes https://github.com/shavitush/bhoptimer/commit/8ecc2a78290942325fcc5a8742a2c0261450a4ce - probably fix `exact_time_int` deprecation issue https://github.com/shavitush/bhoptimer/issues/1218 https://github.com/shavitush/bhoptimer/commit/e41ba9fa9525a808a54807ff0e0c4593fa8c3027 - part 2: edit the DeprecateExactInt sql error handling a bit for https://github.com/shavitush/bhoptimer/commit/9434dc943866b3891dd18ea936e1e35e156c6f94 - Add new zone types to hookzone menu https://github.com/shavitush/bhoptimer/pull/1221 @Awesomerly https://github.com/shavitush/bhoptimer/commit/7c8002557416e909d430709cf05e551129258f3b @@ -75,6 +111,11 @@ Note: Dates are UTC+0. - make `!beamer` more reliable and stuck in walls less (if at all!) @rumourA https://github.com/shavitush/bhoptimer/commit/2bbb3865f8785b3d8ddbf93b9cb83e78ed625ae6 - I love `!beamer` so much. I lie in bed and think about `!beamer`. - Make `func_rot_button` entities hookable just like `func_button` https://github.com/shavitush/bhoptimer/commit/04ad339fe81deb97fbb3880290d24e4891f526e0 https://github.com/shavitush/bhoptimer/commit/f54775044ccae66ad7a14948bc1a4eb11b0b676c + - Fix not being able to overlap bonus+main endzones https://github.com/shavitush/bhoptimer/commit/420c8e02ea4c2520ad0d73eed2b8b9649379f265 + - Startzone speed limit flexibility https://github.com/shavitush/bhoptimer/pull/1219 @Awesomerly https://github.com/shavitush/bhoptimer/commit/354c2445c28b4a926fa516b1ae2299660c96f0ca + - adds the "maxprestrafe" style key (& adds shavit_misc_prespeed 6): + "The max prestrafe that still allows your timer to start/restart. You generally do *not* need or want to change this unless for surf things (combined with style-setting "prespeed_type" "6" or cvar "shavit_misc_prespeed 6"). Default is 0.0 (disabled)." + - fix shavit-zones cvar change callback errors (found by caliph) https://github.com/shavitush/bhoptimer/commit/0151ace718c8256b5f16ef39e6fcfd0a03d41765 - replay things - make salvage replay-files have frame-count in filename https://github.com/shavitush/bhoptimer/commit/1f8461f64b54cd03533b0deacc5285c17e55e00c - add `!specbot` to shavit-misc as an alias for `!spec` https://github.com/shavitush/bhoptimer/commit/bb49da4d9c12ede5929be933726ea783a77c4b85