Move remaining shavit-rankings dependent calls (#1043)
If the shavit-rankings plugin isn't loaded, the calls to its natives will cause an exception and the client's messages will not be formatted correctly.
Add native for getting the number of stages
Implemented native for getting number of stages and allowed practice mode to view stage times.
Added WR stage time comparisons for when a user enters a stage zone.
It's important that the stage zone number starts at two. It may be preferred to remove the user input of stage numbers and just auto increment as stages are added. Stage 1 should be the start zone and just have any additional stages increment from there. I'll readdress this if it's necessary.
Add translations for WR stage time comparison messages
Accidentally undid a change from a previous commit.
I didn't have a merge conflict, so I'm unsure why it got replaced.
Combine stage time translations into one
Implemented suggestions to translations and changed the stagetimes table
The stagetimes table no longer uses auth as a primary key, so it will now replace the old WR stage time.
However, the auth is still stored, so it can be used to reference the player and potentially a players PB.
Update callback name for replacing stage time for logging.
shavit_stats_mvprankones -> shavit_rankings_mvprankones
shavit_stats_mvprankones_maintrack -> shavit_rankings_mvprankones_maintrack
Shavit_GetWRCount, Shavit_GetWRHolders, and Shavit_GetWRHolderRank now in shavit-rankings.sp
changed natives:
Shavit_OnReplayStart, Shavit_OnReplayEnd, Shavit_GetReplayBotFirstFrame, Shavit_GetReplayBotIndex,
Shavit_GetReplayBotCurrentFrame, Shavit_GetReplayTime, Shavit_GetReplayStatus, Shavit_StartReplay
added natives:
Shavit_IsReplayEntity
thanks carnifex for telling me how to make replay props
Shavit_GetClosestReplayTime(client, style, track) -> Shavit_GetClosestReplayTime(client)
+ Shavit_GetClosestReplayStyle(client)
+ Shavit_SetClosestReplayStyle(client, style) // to be used eventually for allowing you to change replay style to compare to
+ Shavit_GetClosestReplayVelocityDifference(client, threeD)
+ shavit_replay_timedifference_tick
natives:
Shavit_GetWRCount(client) -> Shavit_GetWRCount(client, track, style, usecvars)
Shavit_GetWRHolders(track, style, usecvars)
Shavit_GetWRHolderRank(client, track, style, usecvars)
configs/shavit-chat.cfg:
added w (WR Count) and W (rank out of WR holders) to ranks prefix options
added {pts}, {wrs}, and {wrrank}
translations/shavit-chat.phrases.txt:
added a lot here... make sure you update your #format, parameter numbers, and translations...
* 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
* make !wr say map not found when map not found...
* use translation string for 'map was not found'
* stockify GuessBestMapName() and also use in sm_tier
* fix formatting
Co-authored-by: KiD Fearless <kidfearless1@gmail.com>
* Update shavit-misc.phrases.txt
* Update shavit-misc.sp
* remove debug lines
* Update shavit-misc.phrases.txt
* Update shavit-misc.sp
* Works.
deadwinter Today at 17:44
i fixed it myself
so
it is safe to merge now
@KiD
* Add forward for when checkpoints are deleted
* Adjust OnTeleport forward to match other checkpoint natives
* Create function for DeleteCheckpoint. Added documentation.
Co-authored-by: KiD Fearless <kidfearless1@gmail.com>
* 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>
* 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>
* Implement prerun feature for replay
* Update shavit-replay.sp
* Update shavit-replay.sp
* Using blacky's method to handle prerun
I know it is kinda copy-pasta, but it is the best way that I can come up with :(
* I suck at naming 👎
Added 6 new natives to better interact with the checkpoint system of the timer. As well as moving the cp_cache_t into shavit.inc to allow 3rd party plugins to modify the checkpoint cache.
Update .gitignore
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.
[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!
* Added `oldtime` and `perfs` parameters for forwards that missed them.
* Added `iMeasuredJumps` and `iPerfectJumps` to snapshots.
* Added a database migration to add `perfs` column.
* Added perfect jumps% to CS:S keyhint HUD. Not necessary in CS:GO due to annoying limitations.
* Added perfect jumps% to WR menu.
* Added `Shavit_GetPerfectJumps` native.
* Added `Shavit_HasStyleAccess` native.
* Added `permissions` setting to styles. Use like "p;style_tas" for example. First section is the flag needed, and the second section is the override for it.
* Changed default (1) to block button inconsistencies.
* Made the duration of inconsistencies less annoying.
* Changed the first option to 2, which stops the timer on inconsistencies.