Commit Graph

184 Commits

Author SHA1 Message Date
KiD Fearless
590b70dd2f Sent players movetype to none to prevent movement processing, don't allow paused players to finish the map
Thanks acer for the report
2021-01-13 10:22:18 -07:00
KiD Fearless
dc57d481f8 Change Shavit_GetStyleStrings to use style keys 2020-12-29 11:12:31 -07:00
kidfearless
f997d4e544 implement force_timescale in configs 2020-12-14 15:12:22 -07:00
kidfearless
b2da978f73 re-work shavit-core to use GetStyleSetting stocks. Log error when using Shavit_GetStyleSettings. 2020-12-14 15:02:59 -07:00
kidfearless
1011629ec4 Add helper natives for Shavit_GetStyleSetting 2020-12-04 07:36:24 -07:00
kidfearless
69efd6c5e8 use smcparser for style loading 2020-12-04 06:49:15 -07:00
kidfearless
db27bdce14 Added Shavit_GetStyleSetting, deprecated Shavit_GetStyleSettings 2020-12-01 08:43:06 -07:00
Joe
a1e60b39fa
Multiple bonuses (#982)
* cleanup GetTrackName()

* a few more changes to change mod_zone_bonus & add Track_Bonus_Last

* fix undefined symbol sTrack

* fixup !bwr for multiple bonuses

* fix GetTrackName() after I broke it

* add bonus number param to help text of sm_bwr

* fix !wr after I broke it adding !bwr [bonus number]

* ignore checkpoint zones for now because nothing is ready for them

* update points for bonus #2 through #8 at same time

so instead of something like `9 (track count) * 22 (style count)` queries, it'll do `3 (main, bonus1, rest of bonuses) * 22 (style count)` queries and the rest of the bonuses on the recalc all in the same query
2020-11-30 09:40:45 -07:00
Joe
3d670a7812
allow !resume when not on the ground (#966)
* allow !resume when not on the ground

* block !pause if moving / velocity != 0.0
2020-11-30 09:36:05 -07:00
KiD Fearless
06addf326f Implement the ProcessMovment forwards 2020-11-23 13:56:30 -07:00
KiD Fearless
069450d443 remove unused variable 2020-11-22 09:54:34 -07:00
KiD Fearless
7a3efcfe6b Revert "Remove The Loop"
This reverts commit 60599ee95d.
2020-11-21 14:33:04 -07:00
KiD Fearless
60599ee95d Remove The Loop 2020-11-20 17:46:26 -07:00
kidfearless
c52c3c3e79
Add account id validation when deleting replays
* Fixed bugs

* Make it optional

* no empty line

* Update shavit-core.sp

* How can I didn't notice this before
2020-11-10 12:40:53 -07:00
KiD Fearless
b20a2c6762 Update documentation and change some verbage 2020-11-10 12:40:06 -07:00
Joe
8a36caaa14
don't set FL_ATCONTROLS when dead/spec so you can freecam while paused (#968)
* don't set FL_ATCONTROLS when dead/spec so you can freecam while paused...

* fix formatting

Co-authored-by: KiD Fearless <kidfearless1@gmail.com>
2020-10-15 09:10:28 -06:00
Herman Simensen
35878fc81d
Fix offset bug and add GetStageZone native (#948)
* fix bug and add GetStageZone native

* Update Native

Now preloads stage zone data on map start.
2020-10-04 07:54:48 -06:00
Q
1e737ebd05 Update shavit-core.sp 2020-08-20 12:16:07 +08:00
Q
d4d51c752d Fixed bugs 2020-08-20 09:44:27 +08:00
KiD Fearless
9a96ca461f Add sanity check for zone offsets 2020-07-29 20:45:02 -06:00
KiD Fearless
4415ea4ead re-implement z-axis check for start zone offset calculation 2020-07-22 19:51:45 -06:00
KiD Fearless
12acb77318 #939 Move tick calculations outside of EndTouch event 2020-07-22 17:49:22 -06:00
KiD Fearless
fbb055bbd8 add ProcessMovement forwards 2020-07-22 17:41:01 -06:00
KiD Fearless
6ca4396163 Don't compile debug messages, Fixup naming 2020-07-10 21:47:01 -06:00
KiD Fearless
436db49ed1 Debug code only in debug mode 2020-07-10 21:21:42 -06:00
hermansimensen
3c938dd20d small change 2020-07-11 03:06:01 +02:00
hermansimensen
a6f0af27c0 Update natives 2020-07-11 00:26:17 +02:00
hermansimensen
fb5e657fc3 add distance to forward 2020-07-10 23:17:23 +02:00
hermansimensen
3baca9aaf8 new forwards, and native changes
Also added support for checkpoints
2020-07-10 23:10:44 +02:00
hermansimensen
6a4d383cd7 Change trace method to hull 2020-07-10 21:54:48 +02:00
hermansimensen
8005b3fd6d Fix offsets, add offset natives for styles like TAS
Also doesn't calculate offsets when NoZAxisSpeed is set to 0 and player is jumping from within the startzone, as requested by rumour.
2020-07-10 18:06:43 +02:00
Herman Simensen
dec640f2b4
New timer method, tick fractions & StartReplay native (#931)
* Add Convar to restrict noclip in start zone

* remove unused translation file

* Require the enum struct size to be passed to natives

This should hopefully prevent Invalid memory access from plugins compiled on older version of the timer. If an enum struct is changed then plugins compiled on older version of the timer will be forced to be recompiled to match the version they are using.

* Fix save states not tracking preframes

Misc. name changes for natives. And a somehow possible exception fixed when getting a record.

* Add hitbox/center mass cvar (#930)

* Add optional cvar for player center of mass/player hitbox for touching zones

* 2.5.7a Final Changes

fix spelling mistake
add missing optional native
tabify spaces

* Tick offsets, new timing method

Added the tick fraction system from Momentum Mod. Timer is now run within ProcessMovement

* Add StartReplay Native

* Remove debug code

* remove extra gamedata

* Change Hook To Post.

* Increment version

Co-authored-by: KiD Fearless <kidfearless1@gmail.com>
Co-authored-by: Nairda <38843773+Nairdaa@users.noreply.github.com>
2020-07-08 18:00:28 -06:00
kidfearless
48f051f78c
Update very_good_yes from master (#932)
* Add Convar to restrict noclip in start zone

* remove unused translation file

* Require the enum struct size to be passed to natives

This should hopefully prevent Invalid memory access from plugins compiled on older version of the timer. If an enum struct is changed then plugins compiled on older version of the timer will be forced to be recompiled to match the version they are using.

* Fix save states not tracking preframes

Misc. name changes for natives. And a somehow possible exception fixed when getting a record.

* Add hitbox/center mass cvar (#930)

* Add optional cvar for player center of mass/player hitbox for touching zones

* 2.5.7a Final Changes

fix spelling mistake
add missing optional native
tabify spaces

Co-authored-by: Nairda <38843773+Nairdaa@users.noreply.github.com>
2020-07-07 17:37:17 -06:00
Nairda
d1308939bd
Add dynamic timer difference (#921) 2020-06-10 11:16:15 -06:00
KiD Fearless
15942d05ff properly fix perf jumps 2020-04-24 13:18:07 -06:00
Nairda
606e3e70c0
removed the debug lines
they were only for you to see what I did to test the stuff
2020-04-21 03:12:48 +02:00
hermansimensen
35b608af88 Fix timescale being reset to styles default
This new line will fix the native Shavit_SetClientTimescale by not
resetting the timescale of the player to the style default after each
jump
2020-04-15 21:36:51 +02:00
KiD Fearless
d590934324 Add jump multiplier and jump bonus to shavit-styles.cfg 2020-04-04 14:35:14 -06:00
KiD Fearless
3283a26d45 Added Convar_class methodmaps for timer convars 2020-01-22 17:16:37 -07:00
KiD Fearless
41d17befd7 Set speed multiplyer even if it's the default 2020-01-22 14:54:19 -07:00
KiD Fearless
ac8a4f30f8 Parse permission flag even without command override. Moved late-loading check to the end of OnPluginStart 2019-12-22 16:33:09 -07:00
KiD Fearless
32e994aa18 Added dynamic timescales.
Start zone will no longer enforce 1.0 style speed.
2019-12-19 11:53:21 -07:00
KiD Fearless
c42d14f46d Added Shavit_OnTrackChanged and Shavit_OnReplaysLoaded 2019-12-18 12:14:22 -07:00
shavit
e7e1935388 Added logging for player wiping, added warning message when entering invalid SteamID. 2019-08-08 04:49:11 +03:00
shavit
b490313e1f Added sm_migration command to re-apply migrations manually. 2019-08-08 04:22:01 +03:00
shavit
a6a1ed8c8d Fixed issues with certain migrations not working as intended with table prefix setups. 2019-08-08 04:08:30 +03:00
shavit
7a1f530e07 Improved measuring for perfect jumps. 2019-07-20 13:34:10 +03:00
shavit
dfcaee5c5b Fixed HSW sync - thanks Nairda! (#809) 2019-07-13 07:53:18 +03:00
shavit
fd121092c8 Refactored database handles so that there are multiple instead of a single one. 2019-05-31 17:32:03 +03:00
shavit
0650d20eff Removed ancient SetPrefix code and put it in a stock function instead. 2019-05-31 17:03:27 +03:00
shavit
487135f85a Allowed using all keys in limited styles after touching ladder (#800).
Key restriction is added again after touching the ground.
ConVar to disable this is `shavit_core_simplerladders`
2019-05-28 18:44:28 +03:00
shavit
70dd8f7c9c Added tracking for map completions (#804). 2019-05-28 18:32:24 +03:00
shavit
26dd200408 Changed "No Speed Limit" zones to "Custom Speed Limit" (#797). 2019-05-14 04:56:26 +03:00
shavit
a7c743cf29 Added custom airaccelerate zones and some natives. (#797)
Shavit_GetZoneData, Shavit_GetZoneFlags, and Shavit_InsideZoneGetID
2019-05-14 04:27:39 +03:00
shavit
058b88b98c Added zone flags and data to mapzones table. 2019-05-14 03:25:15 +03:00
shavit
1fe1196342 Optimizations to migrations
* Deletes invalid times/chat records before adding the new constraints.
* Use of `ip` index while converting the IP addresses.
* Limit IP conversion transaction to 10k queries to prevent memory leak on large datasets.
2019-05-13 05:36:12 +03:00
shavit
29c57b4fca Fixed workshop migration applying 3 times 2019-05-12 23:38:00 +03:00
shavit
547f90ef62 Added automatic database migrations and revamped overall database structure.
Now I can push database migrations without making the plugin's users do the querying on their own.

List of migrations:
* **Converted all SteamIDs in the database from SteamID3 to Steam Account ID format. The difference is simply stripping of the [U:1: prefix and ] suffix. This change speeds up the queries and reduces the database's size by a lot.**
* Removal of `workshop/` paths from all map names in the database.
* Added index to `lastlogin` to speedup the filtering I added to rankings with `shavit_rankings_llrecalc`.
* Removed `country` from database. It was completely unnecessary.
* Converted IP addresses from plaintext to a single 4 bytes integer.
* Converted `date` of records from a string to integer.
2019-05-12 07:57:04 +03:00
shavit
203644d1d2 Added prespeed setting 2 which also respect shavit_core_nozaxisspeed. 2019-04-17 22:57:37 +03:00
shavit
271b669d47 Fixed !r not triggering stop timer warning. 2019-04-15 03:03:09 +03:00
shavit
b88915ba18 Added "force_groundkeys" style property. 2019-04-15 03:01:06 +03:00
shavit
c61e646785 Added shavit_misc_stoptimerwarning 2019-04-14 23:25:17 +03:00
shavit
30264ef092 Added Shavit_OnStopPre 2019-04-14 23:25:13 +03:00
shavit
bac741e7f8 Added teleport parameter to Shavit_ResumeTimer 2019-04-14 22:45:19 +03:00
shavit
3150225755 Added Shavit_CanPause 2019-04-14 22:45:19 +03:00
shavit
40d443180e Disabled timer from starting before cookies are loaded. 2019-03-27 22:02:30 +02:00
shavit
39572abfd9 Added persisting timer data (#757). 2019-03-27 19:50:03 +02:00
shavit
4388409e0a Fixed HSW strafe counter breaking. 2019-03-27 14:21:17 +02:00
shavit
12005e8c18 Rewrote queries to support ONLY_FULL_GROUP_BY (#764). 2019-03-27 10:27:50 +02:00
shavit
538429e36c Changed !style to show records per track (#754). 2019-03-25 13:52:16 +02:00
shavit
bbccdcf28a Removed ancient table migration code (#758).
Should speed up initial load after map change by a lot! I believe this is now useless.
2019-03-25 10:20:23 +02:00
shavit
463b8a857b Major optimizations to database structure.
* in table `playertimes` add `time` to the `map` index - it should look like this:
```sql
INDEX `map` (`map`, `style`, `track`, `time`)
```

* in all tables, change all CHAR(x) to VARCHAR(x). the following are the changes:
- `chat.auth VARCHAR(32)`
- `chat.ccname VARCHAR(128)`
- `chat.ccmessage VARCHAR(16)`
- `users.auth VARCHAR(32)`
- `users.country VARCHAR(32)`
- `users.ip VARCHAR(64)`
- `maptiers.map VARCHAR(128)`
- `playertimes.auth VARCHAR(32)`
- `playertimes.map VARCHAR(128)`
- `playertimes.date VARCHAR(16)`
- `mapzones.map VARCHAR(128)`
2019-03-25 09:33:34 +02:00
shavit
7365cbcb53 Added "kzcheckpoints" mode (#759). 2019-03-25 02:48:50 +02:00
shavit
79a6fef09c Added "enabled" and "inaccessible" style settings. (#761) 2019-03-24 23:10:00 +02:00
shavit
bf37674812 Implemented Shavit_ChangeClientStyle forward. 2019-03-08 09:37:37 +02:00
shavit
08f0224759 Added menu ordering for styles (#681).
Also added Shavit_GetOrderedStyles ofc.
2019-02-24 17:05:39 +02:00
shavit
c767a375b3 Added sm_wipeplayer. (#568) 2019-02-24 15:54:52 +02:00
shavit
b264f50705 Fixed commands erroring at IsClientInGame when ran from console/rcon. 2019-02-24 14:07:21 +02:00
shavit
5468a94243 Separated unset start zone message per track (#735). 2019-02-22 19:36:48 +02:00
shavit
942d6d9675 Added Shavit_IsPaused. 2019-02-22 17:11:55 +02:00
shavit
26534c1d18 Added shavit_core_nochatsound 2018-12-27 07:42:17 +02:00
shavit
3114eec03f Got rid of the cached cvars bullshit
protip: don't follow hosties' coding conventions that shit sucks mad dick
2018-12-27 06:42:02 +02:00
shavit
7f81c9d6c0 unicode -> general 2018-12-27 06:14:50 +02:00
shavit
cf1fce9bc3 Fixed CS:GO chat colors. 2018-12-26 23:07:05 +02:00
shavit
f999073ee2 Structified replay plugin, doubled #pragma dynamic
First chat color in CS:GO is broken.. pending fix
2018-12-26 21:50:42 +02:00
shavit
2ab6c57e1f Refactored whole plugin to use enum structs
SourceMod 1.10 is now a requirement.
2018-12-24 00:31:50 +02:00
shavit
a5513eb14b changed default collation of user inputs to utf8mb4_unicode_ci (#691) 2018-11-03 13:05:49 +02:00
shavit
bb3ac308ca prefer utf8mb4 but fallback to utf8 if not support (#691) 2018-11-03 10:26:04 +02:00
shavit
5c22149b93 Deprecated halftime for timescale.
There's backwards compatibility of course. Untested but should work..
2018-10-16 22:24:34 +03:00
shavit
8fb3f0d23f prac mode alert thing !hud
[Promising] Promises : cud u make a setting to disable this:
[Promising] Promises : [ Timer ] WARNING: You're now in practice mode. Your times WILL NOT be saved and will be only displayed to you!
2018-10-11 19:16:13 +03:00
shavit
29415315b9 Fixed loading issue with rankings module. 2018-10-02 16:40:33 +03:00
shavit
d1d594503e Dropped dynamic arrays for strings, unless necessary. 2018-09-23 04:16:23 +03:00
shavit
81dbdedfba Added !deletemap (#668) 2018-09-15 17:26:11 +03:00
shavit
482cd86c8c Fixed low gravity styles.
thanks @strafe!!!
2018-09-13 23:28:45 +03:00
shavit
b6ca23d9f0 reduced size to 32 blablabla yes the usual things sql error nairda 2018-06-26 19:30:18 +03:00
shavit
8a98fe96b9 Unrestricted movement when noclipping. 2018-05-09 19:55:15 +03:00
shavit
06250b7fe0 Assigned style ID 0 on connect, merged style gameplay setting updates.
Should solve the out-of-bound error.
2018-05-07 18:53:17 +03:00
shavit
07434d085d Fixed chat printing error. 2018-05-07 18:25:13 +03:00
shavit
f2887fabfa Changed default +left/right block behavior.
* 1 now blocks movement, 2 also stops timer.
2018-05-03 17:00:23 +03:00
shavit
4bcfae7e94 Don't show perf% for old records. 2018-05-02 13:54:01 +03:00