File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -278,8 +278,12 @@ func (p *parser) bindNewPlayer(playerEntity st.Entity) {
278
278
playerEntity .Property ("m_bSpottedByMask.001" ).OnUpdate (spottersChanged )
279
279
}
280
280
281
- if isNew && pl .SteamID64 != 0 {
282
- p .eventDispatcher .Dispatch (events.PlayerConnect {Player : pl })
281
+ if isNew {
282
+ if pl .SteamID64 != 0 {
283
+ p .eventDispatcher .Dispatch (events.PlayerConnect {Player : pl })
284
+ } else {
285
+ p .eventDispatcher .Dispatch (events.BotConnect {Player : pl })
286
+ }
283
287
}
284
288
}
285
289
Original file line number Diff line number Diff line change @@ -408,11 +408,16 @@ type PlayerHurt struct {
408
408
HitGroup HitGroup
409
409
}
410
410
411
- // PlayerConnect signals that a player has started connecting .
411
+ // PlayerConnect signals that a player connected .
412
412
type PlayerConnect struct {
413
413
Player * common.Player
414
414
}
415
415
416
+ // BotConnect signals that a bot has connected.
417
+ type BotConnect struct {
418
+ Player * common.Player
419
+ }
420
+
416
421
// PlayerDisconnected signals that a player has disconnected.
417
422
type PlayerDisconnected struct {
418
423
Player * common.Player
You can’t perform that action at this time.
0 commit comments