Commit Graph

86 Commits

Author SHA1 Message Date
rtldg
cb8c7e8d56 add shavit_rankings_new_db_connection, shavit_stats_new_db_connection, and shavit_wr_new_db_connection 2021-10-17 04:46:01 +00:00
rtldg
ae82d9a5ad add shavit_rankings_weighting_limit 2021-10-06 07:14:31 +00:00
rtldg
6c66c70094 test multiple sql connections in shavit-rankings 2021-10-05 16:28:51 +00:00
rtldg
7383cba61f remove duplicate map tier retreival 2021-10-05 16:17:01 +00:00
rtldg
838d33510b make shavit_rankings_weighting 1.0 not use a sql-function 2021-10-05 14:34:01 +00:00
rtldg
235cc9f241 work on improving rankings queries 2021-10-05 11:00:13 +00:00
rtldg
22a87ce3ee add Shavit_GuessPointsForTime so we can recalc styles only on WR 2021-10-05 04:43:10 +00:00
rtldg
4f8fd211f3 test speeding up recalc queries 2021-10-04 14:12:47 +00:00
rtldg
3155e3c15f add some more garbage to mess around with mvp count 2021-09-19 22:01:44 +00:00
rtldg
031e640552 add some stuff to hopefully fix mvp counts being broken on css and sliding between different players 2021-09-17 02:32:50 +00:00
rtldg
00d16405f6 use Transaction2 in more places 2021-09-14 01:43:23 +00:00
rtldg
fcab0a7db6 make sure we always fill the tier cache 2021-09-12 05:02:08 +00:00
rtldg
762c9a1923 swap GetTimerDatabaseHandle2 with Shavit_GetDatabase in a few places 2021-08-31 20:03:59 +00:00
rtldg
8bc2662418 less shitty wrholder queries 2021-08-31 19:58:21 +00:00
rtldg
c25e3404b4 fix mvp star queries not running 2021-08-31 18:45:43 +00:00
rtldg
309421ad18 fix some errors that come up due to due to migrations 2021-08-20 22:37:37 +00:00
rtldg
5687095144 remove some non-threaded queries 2021-08-18 15:37:08 +00:00
rtldg
2b4d77d281 add sql logging define 2021-08-18 15:10:42 +00:00
rtldg
077cbe9a01 use lowercase strings when sending to GuessBestMapName 2021-08-17 23:50:51 +00:00
rtldg
d4b61a474f make wrhrankmain stuff use VIEWs instead of temp tables 2021-08-16 21:47:17 +00:00
rtldg
9c344ee225 a few more mapname buffers adjusted to PLATFORM_MAX_PATH 2021-08-08 15:55:16 +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
b68aba6fd2 reorganize some things to stop looping so much when a player joins 2021-08-01 18:07:06 +00:00
rtldg
8a8db13c4a gH_SQL might be null in OnMapEnd after server-restart 2021-07-31 05:50:56 +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
da9144f1b5 also have sm_recalcall zero-out all users points 2021-07-27 08:12:03 +00:00
rtldg
3de6f38f7d add cvar shavit_rankings_wrranks 2021-07-27 07:17:56 +00:00
rtldg
2c374eb924 make sm_recalcall wipe ALL points first 2021-07-26 11:42:42 +00:00
rtldg
361c73f7b1 fix typo in rankings description 2021-07-22 06:07:18 +00:00
rtldg
ab0de50a9f try to recreate wrhrankmain & friends if there's an error about them not existing 2021-07-19 13:22:47 +00:00
rtldg
6f058127c4 make all plugins require dhooks so there's error spam due to them not loading 2021-07-06 02:22:35 +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
6a092d996c add shavit_rankings_default_tier for #1041 2021-05-09 06:39:57 +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
7d6d906060 moving some stuff from stats to rankings
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
2021-04-02 18:15:00 +00:00
rtldg
3a84ae091a remove some TODOs 2021-04-01 15:46:20 +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
bf7f68faec change all menus to display for at least 5 minutes 2021-03-14 00:03:10 +00:00
rtldg
dc9f39bdf3 improve map point recalculation 2021-03-06 22:32:30 +00:00
kidfearless
ec85dae24f Removed shavit_getstylesettings from shavit-rankings 2020-12-04 07:17:14 -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
c40ab49fac
Wr suggestions (#972)
* 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>
2020-10-17 15:41:43 -06:00
KiD Fearless
3283a26d45 Added Convar_class methodmaps for timer convars 2020-01-22 17:16:37 -07:00
shavit
10bed693da Micro optimization for recalculation SQL query. 2019-08-08 04:52:41 +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
9cbb0c3f08 Fixed rankings querying the database for tiers/recalc more than once per map.
The database was being queried 3 times on the first server startup.
And during additional map changes, the database was being queried twice instead of once.
This caused the biggest query (users points recalculate) to be executed multiple times, and causing the database handle to be locked up.
2019-05-31 16:51:41 +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
7f01ddee4b Added "shavit_rankings_llrecalc" as a major rankings optimization. 2019-05-12 04:05:24 +03:00
shavit
67ff423dcc Fixed recalculations on long map names breaking. 2019-04-26 17:09:37 +03:00