mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-02 19:50:21 +00:00
Safeguard against trying to send messages to a vehicle actor that no longer exists
This commit is contained in:
parent
0ada64fd44
commit
1092e76348
2 changed files with 2 additions and 2 deletions
|
|
@ -309,7 +309,7 @@ class PersistenceMonitor(name : String, squadService : ActorRef, taskResolver :
|
|||
player.Position = Vector3.Zero
|
||||
player.Health = 0
|
||||
inZone.GUID(player.VehicleOwned) match {
|
||||
case Some(vehicle : Vehicle) if vehicle.OwnerName.contains(player.Name) =>
|
||||
case Some(vehicle : Vehicle) if vehicle.OwnerName.contains(player.Name) && vehicle.Actor != ActorRef.noSender =>
|
||||
vehicle.Actor ! Vehicle.Ownership(None)
|
||||
case _ => ;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue