File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ func newGameEventHandler(parser *Parser) gameEventHandler {
109109 "bomb_exploded" : geh .bombExploded , // Bomb exploded
110110 "bomb_pickup" : geh .bombPickup , // Bomb picked up
111111 "bomb_planted" : geh .bombPlanted , // Plant finished
112- "bot_takeover" : geh .botTakeover , // Bot got taken over
112+ "bot_takeover" : delay ( geh .botTakeover ), // Bot got taken over
113113 "buytime_ended" : nil , // Not actually end of buy time, seems to only be sent once per game at the start
114114 "cs_match_end_restart" : nil , // Yawn
115115 "cs_pre_restart" : nil , // Not sure, doesn't seem to be important
@@ -252,8 +252,14 @@ func (geh gameEventHandler) roundMVP(data map[string]*msg.CSVCMsg_GameEventKeyT)
252252}
253253
254254func (geh gameEventHandler ) botTakeover (data map [string ]* msg.CSVCMsg_GameEventKeyT ) {
255+ taker := geh .playerByUserID32 (data ["userid" ].GetValShort ())
256+
257+ unassert .True (! taker .IsBot )
258+ unassert .True (taker .IsControllingBot ())
259+ unassert .NotNil (taker .ControlledBot ())
260+
255261 geh .dispatch (events.BotTakenOver {
256- Taker : geh . playerByUserID32 ( data [ "userid" ]. GetValShort ()) ,
262+ Taker : taker ,
257263 })
258264}
259265
You can’t perform that action at this time.
0 commit comments