mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-13 03:33:37 +00:00
re-initialized vehicle utility actors properly depending in regards to what zone the vehicle belongs; this affects pretty much every utility (initially observed in AMS terminals specifically); touch-up on pickup and drop item ops (#271)
This commit is contained in:
parent
4fe871455d
commit
612bceb440
2 changed files with 17 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package net.psforever.objects.vehicles
|
||||
|
||||
import akka.actor.Actor
|
||||
import akka.actor.{Actor, ActorRef}
|
||||
import net.psforever.objects.Vehicle
|
||||
import net.psforever.objects.ballistics.VehicleSource
|
||||
import net.psforever.objects.serverobject.mount.{Mountable, MountableBehavior}
|
||||
|
|
@ -33,6 +33,14 @@ class VehicleControl(vehicle : Vehicle) extends Actor
|
|||
|
||||
def receive : Receive = Enabled
|
||||
|
||||
override def postStop() : Unit = {
|
||||
super.postStop()
|
||||
vehicle.Utilities.values.foreach { util =>
|
||||
util().Actor ! akka.actor.PoisonPill
|
||||
util().Actor = ActorRef.noSender
|
||||
}
|
||||
}
|
||||
|
||||
def Enabled : Receive = checkBehavior
|
||||
.orElse(deployBehavior)
|
||||
.orElse(dismountBehavior)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue