File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,13 @@ type SayText2 struct {
447447 IsChatAll bool // Seems to always be false, team chat might not be recorded
448448}
449449
450+ // TickRateInfoAvailable signals that the tick-rate information has been received via CSVCMsg_ServerInfo.
451+ // This can be useful for corrupt demo headers where the tick-rate is missing in the beginning of the demo.
452+ type TickRateInfoAvailable struct {
453+ TickRate float64 // See Parser.TickRate()
454+ TickTime time.Duration // See Parser.TickTime()
455+ }
456+
450457// ChatMessage signals a player generated chat message.
451458// Since team chat is generally not recorded IsChatAll will probably always be false.
452459// See SayText for admin / console messages and SayText2 for raw network package data.
Original file line number Diff line number Diff line change @@ -65,4 +65,9 @@ func (p *parser) handleSetConVar(setConVar *msg.CNETMsg_SetConVar) {
6565func (p * parser ) handleServerInfo (srvInfo * msg.CSVCMsg_ServerInfo ) {
6666 // srvInfo.MapCrc might be interesting as well
6767 p .tickInterval = srvInfo .TickInterval
68+
69+ p .eventDispatcher .Dispatch (events.TickRateInfoAvailable {
70+ TickRate : p .TickRate (),
71+ TickTime : p .TickTime (),
72+ })
6873}
You can’t perform that action at this time.
0 commit comments