Commit Graph

341 Commits

Author SHA1 Message Date
rtldg
2316fac678 just use snapshot since that's what gA_Timers[] are made of 2021-12-07 05:53:20 +00:00
rtldg
86b23b33a2 fix some kz button restarting things & add track param to Shavit_MarkKZMap() & Shavit_IsKZMap() 2021-12-05 01:52:04 +00:00
rtldg
76988a509b seriously no 0s times please 2021-12-03 23:01:44 +00:00
rtldg
c55531168d add Zone_NoTimerGravity and Zone_Gravity 2021-11-28 21:56:05 +00:00
rtldg
d45429127a mess around with StopChatSound stuff 2021-11-22 05:55:39 +00:00
rtldg
f344fddcdf add Loading to zone hud 2021-11-03 10:34:57 +00:00
rtldg
aba539856e merge bhopstats to remove dependency 2021-11-03 09:34:52 +00:00
rtldg
b9c6c47db4 swap #include <shavit> with <shavit/core> 2021-10-28 21:18:53 +00:00
rtldg
2fc7254149 add minimum_time & minimum_time_bonus style settings 2021-10-28 13:53:44 +00:00
rtldg
5312c31253 add SanerGetClientName 2021-10-26 21:35:01 +00:00
rtldg
b54de50c1a mess with some #include's and include-guards 2021-10-25 13:01:38 +00:00
rtldg
b364871df5 add steamid-stocks.inc 2021-10-25 12:40:24 +00:00
rtldg
966ceea5f8 finish splitting shavit.inc 2021-10-18 07:22:50 +00:00
rtldg
4b51bd7116 remove shavit_core_timernozone 2021-10-16 15:44:55 +00:00
rtldg
4e1f2db8ca clarify SayText2 buffer size comment 2021-10-16 04:45:19 +00:00
rtldg
7ca863f04b move sql table creation and migrations 2021-10-10 05:14:37 +00:00
rtldg
d02cc0bd22 move some more stuff around 2021-10-08 15:03:09 +00:00
rtldg
8449c8b9d9 move physicsuntouch stuff to a different file 2021-10-08 14:46:36 +00:00
rtldg
77265805ac move anti-sv_cheats to own file 2021-10-08 10:30:52 +00:00
rtldg
1f090f9d27 move style_setting_t & license notice 2021-10-08 10:13:16 +00:00
rtldg
2e579b82ef move styles loaded forward 2021-10-08 09:54:11 +00:00
rtldg
a0bf3b65e9 move style settings into own file 2021-10-08 09:04:45 +00:00
rtldg
93826ddfd8 cache float & int values for faster GetStyleSettings 2021-10-08 08:34:26 +00:00
rtldg
c4783eae37 shavit_misc_staticprestrafe -> shavit_core_staticprestrafe 2021-10-07 19:30:33 +00:00
rtldg
d86ac3f434 remove unnecessary TimerStatus casting 2021-10-07 12:25:08 +00:00
rtldg
0ec8bdb92b move charset stuff to GetTimerDatabaseHandle 2021-10-07 09:51:48 +00:00
rtldg
9b00e1f16a replace playertimer_t with timer_snapshot_t 2021-10-05 05:31:53 +00:00
rtldg
44cb918759 some strategic map lowercasings 2021-09-22 06:04:30 +00:00
rtldg
2d11d94237 remove unused doublestep +ds/-ds command 2021-09-21 04:38:51 +00:00
rtldg
f23bd4b96c lowercase map names in db 2021-09-21 04:30:59 +00:00
rtldg
00d16405f6 use Transaction2 in more places 2021-09-14 01:43:23 +00:00
rtldg
f8147a63f3 move eventqueuefix timescaling into timer because carnifex is removing the built-in integration 2021-09-11 01:31:22 +00:00
rtldg
670f220b76 add playtime tracking 2021-09-07 08:13:30 +00:00
rtldg
cfa724f738 try to fix tf2 uncrouch spam from limiting velocity 2021-09-05 20:55:53 +00:00
rtldg
1954583070 add !ihate!main 2021-08-28 00:39:37 +00:00
rtldg
4553286104 stop timescale from being set to 0 2021-08-21 05:31:52 +00:00
rtldg
2b4d77d281 add sql logging define 2021-08-18 15:10:42 +00:00
rtldg
14c10049ce insert prebuilt zones into db so !mapsleft and !loadunzonedmap work better 2021-08-17 14:45:15 +00:00
rtldg
4da5d528a6 short circuit cheat-impulses check sooner 2021-08-17 11:27:39 +00:00
rtldg
6663305cec use GetAngleDiff in another place 2021-08-17 11:18:32 +00:00
rtldg
9f313ee0cf add more !DEBUG wrappers around sv_cheats stuff 2021-08-15 18:36:13 +00:00
rtldg
c5480e7087 adjust parameter count for kill commands 2021-08-15 13:53:29 +00:00
rtldg
140b43dd40 add shavit_core_disable_sv_cheats and make some commands rcon-flag only 2021-08-15 12:15:35 +00:00
rtldg
a521b658c2 track wasn't set for Shavit_OnRestartPre 2021-08-12 14:20:07 +00:00
rtldg
3f14b65cc4 add Shavit_OnRestartPre 2021-08-12 12:46:50 +00:00
rtldg
6c5be61344 try to consistently use lowercase mapnames and PLATFORM_MAX_PATH for mapname buffers 2021-08-08 15:55:09 +00:00
rtldg
176dc76267 remove duplicate GetString from HasStyleSetting 2021-07-30 11:39:18 +00:00
rtldg
fea39ce643 make Shavit_OnDatabaseLoaded run after migration like it's supposed to and attempt to use it for things 2021-07-30 08:17:31 +00:00
rtldg
506076723f try to improve timer accuracy by using ticks*tickinterval instead of time+=gameframetime 2021-07-29 00:25:02 +00:00
rtldg
6c2a48aec5 cleanup some timescaling code 2021-07-28 12:56:19 +00:00
rtldg
7b75eea957 add Shavit_OnStartPre and ignore Shavit_OnStart return value 2021-07-27 08:12:03 +00:00
rtldg
f2d304a918 some pause movement related stuff 2021-07-27 08:11:58 +00:00
rtldg
e6de599808 replay changes. renamed natives, version bump, implementation changes
>Renames:
framecache_t -> frame_cache_t
Shavit_GetReplayBotFirstFrame -> Shavit_GetReplayBotFirstFrameTime
Shavit_GetReplayPreFrame -> Shavit_GetReplayPreFrames
Shavit_GetReplayPostFrame -> Shavit_GetReplayPostFrames
Shavit_GetReplayCachePreFrame -> Shavit_GetReplayCachePreFrames
Shavit_GetReplayCachePostFrame -> Shavit_GetReplayCachePostFrames
Shavit_GetPlayerPreFrame -> Shavit_GetPlayerPreFrames

>Removed:
Shavit_GetPlayerTimerFrame
Shavit_SetPlayerTimerFrame
cp_cache_t.iTimerPreFrames

Replay format version bumped to distinguish old replays that had a bad iFrameCount from postframes.

Some unnecessary ArrayList writing in SaveReplay() has been removed.

shavit-replay.sp:Shavit_OnStart should be more readable now and will also hopefully now prevent some situations where script-execution could time-out due to wiping lots of frames.

Replay bots will now freeze at the end of a replay more smoothly now and not teleport for the last frame.
2021-07-25 16:29:29 +00:00
rtldg
5a12dd7502 move shavit_core_debugoffsets out of preprocesser DEBUG check 2021-07-22 12:42:29 +00:00
rtldg
4f704a2fe4 -1 all completions in the db 2021-07-22 10:49:16 +00:00
OliviaMourning
af8ab48fc9 add shavit_core_pause_movement stuff
Co-authored-by: rtldg <55846624+rtldg@users.noreply.github.com>
2021-07-22 08:49:55 +00:00
rtldg
a6be0127ee add exact_time_int to playertimes to deal with floating point imprecision 2021-07-11 07:16:00 +00:00
rtldg
a05c15e5d7 lower minimum forwardmove/sidemove values for hsw 2021-07-09 13:16:44 +00:00
rtldg
3024982fe1 add SteamIDToAuth stock 2021-07-07 01:46:33 +00:00
rtldg
f2d396d61e bigger buffer for shavit_core_debugoffsets messages 2021-07-06 06:38:16 +00:00
rtldg
00a866bf59 add some shavit-styles.cfg index error checking 2021-06-15 17:45:33 +00:00
Nairda
178deb5b21
remove capital i (#1058)
from the range as it can be mistaken with lower case L
2021-06-14 18:32:25 +00:00
rtldg
acbcd86f18 remove some ambiguous characters from wipeplayer alphabet string 2021-06-14 17:16:53 +00:00
rtldg
69ca0af31b try to not get people stuck paused in the start zone 2021-06-14 17:16:10 +00:00
rtldg
02fb3e2f7e unadd chatstrings_t parameter from Shavit_OnChatConfigLoaded because it's not worth having 2021-05-29 02:03:21 +00:00
rtldg
5feea645c4 ugly shavit_core_timeinmessages fix 2021-05-25 10:57:11 +00:00
rtldg
3be13005e6 add chatstrings_t param to Shavit_OnChatConfigLoaded. add Shavit_GetStyleStringsStruct. add Shavit_GetChatStringsStruct. 2021-05-08 13:00:19 +00:00
rtldg
9e39689b7a unset gB_StopChatSound at the end of Shavit_PrintChatToAll 2021-05-07 06:45:50 +00:00
rtldg
7df2e2c959 add shavit_core_timeinmessages 2021-05-06 03:58:19 +00:00
rtldg
cdc0c651b9 make Shavit_PrintToChatAll a native so it can use gB_StopChatSound 'better' 2021-05-06 02:15:05 +00:00
rtldg
6386098a00 initial EndTouchFix stuff 2021-04-30 21:31:51 +00:00
rtldg
ecc2d8d2c0 use the wr table view in some more places 2021-04-30 07:30:45 +00:00
rtldg
b2cfc88651 limit buffer size for SayText2 2021-04-10 12:03:38 +00:00
rtldg
cb39acc33b remove stylesettings_t and break 3rd party plugins 2021-04-08 21:19:18 +00:00
rtldg
28f10b8899 fix bug that causes the last style to parse twice (and register command callbacks twice) 2021-04-08 15:18:20 +00:00
rtldg
5c772b06e3 hopefully fix checkpoint timescale stuff 2021-04-07 17:21:53 +00:00
rtldg
a0a74b8eaa too tired for commit messages but i promise this is a good one and if you're not satisfied then we will fully refund your purchase of the bhoptimer 2021-04-07 05:36:15 +00:00
rtldg
d272aae97b bad thing to not let you pause while crouching 2021-04-06 18:10:59 +00:00
Nairda
cd8bbdf850
update menu drawing time (#1036)
* Update shavit-rankings.sp

* Update shavit-rankings.sp

* Update shavit-hud.sp

* Update shavit-core.sp

* Update shavit-misc.sp

* Update shavit-replay.sp

* Update shavit-stats.sp
2021-04-01 13:44:10 +00:00
rtldg
7117b38038 reset stamina on landing for easybhop so you don't have to change sv_staminalandcost on csgo for stamina scroll stuff 2021-03-23 12:29:57 +00:00
rtldg
19c5ccb7f3 add sm_ccadd and sm_ccdelete 2021-03-22 09:42:03 +00:00
rtldg
1c4438911d remove use of MAX_NAME_LENGTH_SQL (32) and replace with MAX_NAME_LENGTH (32) 2021-03-19 02:39:27 +00:00
rtldg
bf7f68faec change all menus to display for at least 5 minutes 2021-03-14 00:03:10 +00:00
rtldg
a89e306322 add message about !m/!main 2021-03-11 09:46:49 +00:00
rtldg
17847d7cb0 add more setstart cmds, add anglesonly for floating bonuses, add missing create table, fix some sql ordering 2021-03-11 09:37:48 +00:00
rtldg
96ee05b5aa add sm_main/sm_m 2021-03-11 08:20:18 +00:00
BoomShot
e6b3baae81 Maintain user's current track when restarting
Previously, the timer would send you to the main start zone every time a player used sm_r, so now it'll send them to their respective track.
2021-03-11 00:00:30 -05:00
rtldg
ad9581ce2e add sm_b%d for bonuses and sm_s%d for stages 2021-03-11 02:09:23 +00:00
rtldg
e08a1bf952 rename player_speedmod_AcceptInput to DHook_AcceptInput_player_speedmod 2021-03-08 22:27:37 +00:00
rtldg
6db6b5f3cf fix player_speedmod & timescaled styles interacting 2021-03-08 01:52:08 +00:00
rtldg
ee11fa10d4 add Shavit_DeleteWR. refactor run deletion & wipeplayer 2021-03-04 05:53:41 +00:00
rtldg
9d26e5cddb add sm_fling back for testing whoops 2021-03-04 05:29:28 +00:00
Joe
b62352835f
Merge branch 'very_good_yes' into delete_replay 2021-03-01 02:12:30 +00:00
Joe
d3eede84f8
no sm_fling in timer 2021-03-01 02:01:12 +00:00
Joe
27dfcd740f add timestamp to finish-forwards. add Shavit_ShouldSaveReplayCopy and Shavit_OnReplaySaved 2021-02-27 19:39:21 +00:00
Joe
a6ff5dd94c
Avg and max velocity (#1017)
Adds Shavit_GetAvgVelocity(), Shavit_GetMaxVelocity(), Shavit_SetAvgVelocity(), Shavit_SetMaxVelocity().
Adds `float avgvel, float maxvel` to Shavit_OnWorldRecord, Shavit_OnFinish_Post, Shavit_OnFinish, Shavit_OnWorstRecord.
Adds avg/max velocity to cp_cache_t and timer_snapshot_t
Prints avg/max velocity to run-finish message.
2021-02-27 18:33:07 +00:00
Joe
ee2ed22af0 fix forward param count 2021-02-26 19:25:35 +00:00
Joe
f869498af3 fuck 2021-02-26 19:19:51 +00:00
Joe
e38eceedbe remove preframes from avg vel calc 2021-02-26 19:17:32 +00:00
Joe
5351e49e76 spread avg/max velocity into as many places as possible 2021-02-26 18:28:40 +00:00
Joe
7b2fb3be65 store avg/max velocity in persistent data & cpcache 2021-02-26 17:53:42 +00:00
Joe
71e804420c change avg/max velocity to work off frames 2021-02-26 17:34:29 +00:00
Joe
07e07fd7c8 fix typos for avg/max velocity 2021-02-26 02:46:08 +00:00
KiD Fearless
f84e271c55 Add SetStyleSetting Natives #877 2021-02-25 18:28:08 -07:00
deadw1nter
32336e5ab6 Merge remote-tracking branch 'upstream/very_good_yes' into delete_replay 2021-02-24 10:44:29 +08:00
Joe
d4893ec713 add Shavit_GetAvgMaxVelocity() and hope for best 2021-02-23 05:32:13 +00:00
Joe
4087ba778d
block s on regular hsw (so you can't shsw...) (#973)
* block s on regular hsw (so you can't shsw...)

* block shsw on hsw while still allow S to stop

* also remove IN_FORWARD when removing IN_BACK

i hope these commits are squashed so nobody sees these

* remove unnecessary bStop variable for shsw
2021-02-21 16:20:55 -07:00
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