You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [DB] Add Transactions (#12)
* cs# version bump
* add transaction method
* save cps with transaction;dot for millis
co-pilot = op
* small patch
* Change hook methods for OnTriggerStart/EndTouch
* don't start timer after `!s <X>`
* reset `IsStageMode`
* Latest "update" and reworks (#17)
* hi
Summary of completed items:
- Resolved hibernation issues with timers.
- Implemented async queries and methods with multiple database connections.
- Moved PlayerProfile and Map queries to respective classes.
- Added ReplayFrame Situations for situation-specific replay handling.
- Corrected Map Replays reload and ReplayFrameSituations usage.
- Updated Checkpoints comparison messages for correct display.
- Adjusted Stage Replays tracking, saving, and reloading during map runs.
- Fixed checkpoint saving on first map run.
- Refer to TODO for more information
* bonus replays
* readme + todo
* Update README.md
* Update README.md
* Update README.md
Fix `TODO` link
---------
Co-authored-by: 1zc <liamzcharles@gmail.com>
# PLEASE DO NOT USE THIS, IT IS NOT COMPLETE AND IS AN ACTIVE WORK-IN-PROGRESS. ISSUES HAVE BEEN DISABLED FOR THIS REASON.
1
+
# EVERYONE IS WELCOME TO BUILD UP ON THIS PROJECT AND CONTRIBUTE. ISSUES ARE DISABLED FOR THE TIME BEING
2
2
## Please join the Discord: https://discord.cs.surf
3
3
4
4
# Timer
5
5
Core plugin for CS2 Surf Servers. This project is aimed to be fully open-source with the goal of uniting all of CS2 surf towards building the game mode.
6
+
<br>
7
+
<details>
8
+
<summary>Center HUD Speedometer</summary>
9
+
<p>Different time formatting is available in the code base but not implemented for players to change it themselves. Refer to <strong>PlayerTimer.TimeFormatStyle</strong> in codebase</p>
10
+
<ul>
11
+
<li><strong>Map</strong>
12
+
<p><em>Shown while player starts their Map Run from the map start zone (!r)</em></p>
<img src="https://i.imgur.com/Rfm9qG4.png" alt="Bonuses Start Zone exit">
44
+
</details>
45
+
</li>
46
+
</ul>
47
+
</details>
6
48
7
-
# Goals
49
+
<details>
50
+
<summary>Replays</summary>
51
+
<p>Currently only accessible through the <strong>!spec</strong> command and cycling the players. Different time formatting is available in the code base but not implemented for players to change it themselves. Refer to <strong>PlayerTimer.TimeFormatStyle</strong> in codebase</p>
52
+
<p>Replays are saved for all types of runs Map/Stage/Bonus (and future Styles) regardless if they are a World Record or just a Personal Best. No functionality is implemented for replaying PB replays yet, feel free to add and Pull Request it</p>
53
+
<ul>
54
+
<li><strong>Map</strong>
55
+
<details>
56
+
<summary>Spectating Map Replay</summary>
57
+
<p>Map Run:</p>
58
+
<img src="https://i.imgur.com/gZutBkS.png" alt="Map Run Replay">
59
+
</details>
60
+
</li>
61
+
<li><strong>Stages</strong>
62
+
<details>
63
+
<summary>Spectating Stage Replay</summary>
64
+
<p>Stage Run:</p>
65
+
<img src="https://i.imgur.com/tL7kM1l.png" alt="Stages Run Replay">
66
+
</details>
67
+
</li>
68
+
<li><strong>Bonuses</strong>
69
+
<p>Bonus Replays are also available but no screenshots at the time of writing.</p>
70
+
</li>
71
+
<li><strong>Scoreboard</strong>
72
+
<details>
73
+
<summary>Currently available replays for the map</summary>
74
+
<p>Scoreboard:</p>
75
+
<img src="https://i.imgur.com/RNTTFgi.png" alt="Scoreboard showing all available Replays">
76
+
</details>
77
+
</li>
78
+
</ul>
79
+
</details>
80
+
81
+
82
+
<details>
83
+
<summary>Chat Messages</summary>
84
+
<ul>
85
+
<li><strong>Map Run</strong>
86
+
<details>
87
+
<summary>Improving a Record</summary>
88
+
<p>Timer sends a chat message to all players upon a player beating the Map Record. Missing it sends a message only to the player:</p>
89
+
<img src="https://i.imgur.com/ggCNjZ8.png" alt="Beating a Map record">
90
+
</details>
91
+
<details>
92
+
<summary>Checkpoint Comparison</summary>
93
+
<p>Timer sends a chat message the player comparing their PB checkpoint times with the current run (value in brackets after the time indicate the Speed):</p>
<summary>New Stage record and improving Stage record</summary>
100
+
<p>Timer sends a chat message to all players upon a player beating a Stage/Bonus/Map record. Different scenarios for missed/comparing times are also available and shown in chat but only to the player who is doing the run:</p>
101
+
<img src="https://i.imgur.com/MNehNmv.png" alt="Stage Records and comparisons">
102
+
</details>
103
+
</li>
104
+
<li><strong>QOL</strong>
105
+
<details>
106
+
<summary>Player Connected + Map Info (!mi / !tier)</summary>
107
+
<p>LL is used for Local development and testing:</p>
- Re-add the MySQL queries in code and make it switch between API and DB functions
2
+
- Map Time is NOT being saved with API
3
+
- Make configs generate themselves inside the `./configs/plugins/...` folder
4
+
- Fix loading MapTimes for each type (stage, bonus, maps)
5
+
- API
6
+
- DB
7
+
- Change `DB_QUERY_MAP_GET_RUNS` query with `DB_QUERY_MAP_GET_RECORD_RUNS_AND_COUNT` in API and edit code in plugin
8
+
- Change `DB_QUERY_PB_GET_RUNTIME` query in API
9
+
10
+
- Double check the Start/End velocities for End Zone,Checkpoints, Stages, Bonuses
11
+
+ Maps
12
+
+ Checkpoints
13
+
- Stages
14
+
- Try and get the Start/End velocity values from the Checkpoint object in Map Run
15
+
+ Bonuses
16
+
17
+
- Using `!spec` from any start zone and going back to CT starts your timer
18
+
19
+
- Try and determine Left/Right side for Bonuses (surf_ace)
20
+
- Try and determine Left/Right side for Maps
21
+
- Try and determine Left/Right side for Stages
22
+
# Done
23
+
+ Hibernation fucks up the creation of `CurrentMap`, if nobody has joined the first map it was on and you change to another map, server segfaults. I guess a query is being held?? :think:
24
+
+ Solution is to use `Server.NextWorldUpdate` as hibernation stops all `Timer`s :peepoHappy:
25
+
+ Introduce `async` for queries and some methods
26
+
+ Make Database spawn a new connection for each query to avoid `Connection in use` error
27
+
+ Add notes to apply `using` blocks for certain methods for proper operation
28
+
+ Move **PlayerProfile** queries to the respective class
29
+
+ Move **Map** queries to the respective class
30
+
+ Total Completions for a map are wrong in HUD
31
+
+ Add `Situation` to each `ReplayFrame` and load it properly
32
+
+ Fix `STAGE_EXIT_ZONE` situations - not triggered (logic in `TriggerEndTouch` is most likely bad)
33
+
+ Fix Map Replays
34
+
+ Reload after setting a new WR
35
+
+ Load if no replay existed before a new run
36
+
+ Use the `ReplayFrameSituation` for determining where to cut replays
37
+
+ Do not cut replay as soon as we enter end zone (determined by the AddTimer amount for `SaveMapTime`)
38
+
+ Double check the Checkpoints comparison messages
0 commit comments