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
common "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/common"
6
10
st "github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/sendtables"
7
11
)
8
12
9
13
//go:generate ifacemaker -f game_state.go -s gameState -i GameState -p demoinfocs -D -y "GameState is an auto-generated interface for gameState." -c "DO NOT EDIT: Auto generated" -o game_state_interface.go
10
14
//go:generate ifacemaker -f game_state.go -s participants -i Participants -p demoinfocs -D -y "Participants is an auto-generated interface for participants." -c "DO NOT EDIT: Auto generated" -o participants_interface.go
15
+
//go:generate ifacemaker -f game_state.go -s gameRules -i GameRules -p demoinfocs -D -y "GameRules is an auto-generated interface for gameRules." -c "DO NOT EDIT: Auto generated" -o game_rules_interface.go
11
16
12
17
// gameState contains all game-state relevant information.
13
18
typegameStatestruct {
@@ -20,7 +25,6 @@ type gameState struct {
20
25
infernosmap[int]*common.Inferno// Maps entity-IDs to active infernos.
21
26
weaponsmap[int]*common.Equipment// Maps entity IDs to weapons. Used to remember what a weapon is (p250 / cz etc.)
22
27
entitiesmap[int]st.Entity// Maps entity IDs to entities
23
-
conVarsmap[string]string
24
28
bomb common.Bomb
25
29
totalRoundsPlayedint
26
30
gamePhase common.GamePhase
@@ -30,6 +34,8 @@ type gameState struct {
30
34
currentDefuser*common.Player// Player currently defusing the bomb, if any
31
35
currentPlanter*common.Player// Player currently planting the bomb, if any
32
36
thrownGrenadesmap[*common.Player][]*common.Equipment// Information about every player's thrown grenades (from the moment they are thrown to the moment their effect is ended)
varErrFailedToRetrieveGameRule=errors.New("failed to retrieve GameRule value, it's recommended to have a fallback to a default value for this scenario")
192
+
193
+
// RoundTime returns how long rounds in the current match last for (excluding freeze time).
194
+
// May return error if cs_gamerules_data.m_iRoundTime is not set.
0 commit comments