mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
fix WR menu erroring (#50)
This commit is contained in:
parent
0ba5f66065
commit
8c77a312d6
@ -11,7 +11,7 @@ a bhop server should be simple
|
|||||||
[Mapzones' setup demonstration](https://www.youtube.com/watch?v=oPKso2hoLw0)
|
[Mapzones' setup demonstration](https://www.youtube.com/watch?v=oPKso2hoLw0)
|
||||||
|
|
||||||
# Requirements:
|
# Requirements:
|
||||||
* [SourceMod 1.7 and above](http://www.sourcemod.net/downloads.php)
|
* [SourceMod 1.8 and above](http://www.sourcemod.net/downloads.php)
|
||||||
|
|
||||||
# Optional requirements:
|
# Optional requirements:
|
||||||
* [DHooks](http://users.alliedmods.net/~drifter/builds/dhooks/2.0/) - required for static 250 prestrafe (bhoptimer 1.2b and above)
|
* [DHooks](http://users.alliedmods.net/~drifter/builds/dhooks/2.0/) - required for static 250 prestrafe (bhoptimer 1.2b and above)
|
||||||
@ -94,6 +94,7 @@ a bhop server should be simple
|
|||||||
- [x] Remove `sm_wrsw` and make `sm_wr` a dynamic menu with all difficulties. (dynamic!)
|
- [x] Remove `sm_wrsw` and make `sm_wr` a dynamic menu with all difficulties. (dynamic!)
|
||||||
- [ ] Add strafe sync to the WR menu where available.
|
- [ ] Add strafe sync to the WR menu where available.
|
||||||
- [ ] Add `sm_bwr` `sm_bonuswr` `sm_bonusworldrecord`.
|
- [ ] Add `sm_bwr` `sm_bonuswr` `sm_bonusworldrecord`.
|
||||||
|
- [ ] Use unix timestamps for future record dates.
|
||||||
|
|
||||||
~ shavit-stats
|
~ shavit-stats
|
||||||
- [x] Make style names editable from shavit.inc (like I did to the rest of modules) (dynamic!)
|
- [x] Make style names editable from shavit.inc (like I did to the rest of modules) (dynamic!)
|
||||||
|
|||||||
@ -780,14 +780,14 @@ public void StartWRMenu(int client, const char[] map, int style)
|
|||||||
dp.WriteCell(GetClientSerial(client));
|
dp.WriteCell(GetClientSerial(client));
|
||||||
dp.WriteString(map);
|
dp.WriteString(map);
|
||||||
|
|
||||||
|
int iLength = ((strlen(map) * 2) + 1);
|
||||||
|
char[] sEscapedMap = new char[iLength];
|
||||||
|
gH_SQL.Escape(map, sEscapedMap, iLength);
|
||||||
|
|
||||||
char[] sQuery = new char[512];
|
char[] sQuery = new char[512];
|
||||||
FormatEx(sQuery, 512, "SELECT p.id, u.name, p.time, p.jumps, p.auth FROM %splayertimes p JOIN %susers u ON p.auth = u.auth WHERE map = '%s' AND style = %d ORDER BY time ASC;", gS_MySQLPrefix, gS_MySQLPrefix, map, style);
|
FormatEx(sQuery, 512, "SELECT p.id, u.name, p.time, p.jumps, p.auth FROM %splayertimes p JOIN %susers u ON p.auth = u.auth WHERE map = '%s' AND style = %d ORDER BY time ASC;", gS_MySQLPrefix, gS_MySQLPrefix, sEscapedMap, style);
|
||||||
|
|
||||||
int iLength = ((strlen(sQuery) * 2) + 1);
|
gH_SQL.Query(SQL_WR_Callback, sQuery, dp, DBPrio_High);
|
||||||
char[] sEscapedQuery = new char[iLength];
|
|
||||||
gH_SQL.Escape(sQuery, sEscapedQuery, iLength);
|
|
||||||
|
|
||||||
gH_SQL.Query(SQL_WR_Callback, sEscapedQuery, dp, DBPrio_High);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user