mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-11 14:34:40 +00:00
Fix LLU becoming invisible to other players when dying as a vehicle passenger
This commit is contained in:
parent
f949926bb2
commit
bd9af97bd7
6 changed files with 39 additions and 14 deletions
|
|
@ -1822,6 +1822,9 @@ class SessionActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], con
|
|||
CancelZoningProcessWithDescriptiveReason("cancel_dmg")
|
||||
}
|
||||
|
||||
case AvatarResponse.DropSpecialItem() =>
|
||||
DropSpecialSlotItem()
|
||||
|
||||
case AvatarResponse.Killed(mount) =>
|
||||
val respawnTimer = 300.seconds
|
||||
//drop free hand item
|
||||
|
|
|
|||
|
|
@ -707,6 +707,11 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
|
|||
super.CancelJammeredStatus(target)
|
||||
//uninitialize implants
|
||||
avatarActor ! AvatarActor.DeinitializeImplants()
|
||||
|
||||
// This would normally happen async as part of AvatarAction.Killed, but if it doesn't happen before deleting calling AvatarAction.ObjectDelete on the player the LLU will end up invisible to others if carried
|
||||
// Therefore, queue it up to happen first.
|
||||
events ! AvatarServiceMessage(nameChannel, AvatarAction.DropSpecialItem())
|
||||
|
||||
events ! AvatarServiceMessage(
|
||||
nameChannel,
|
||||
AvatarAction.Killed(player_guid, target.VehicleSeated)
|
||||
|
|
|
|||
|
|
@ -415,6 +415,9 @@ class AvatarService(zone: Zone) extends Actor {
|
|||
)
|
||||
)
|
||||
|
||||
case AvatarAction.DropSpecialItem() =>
|
||||
AvatarEvents.publish(AvatarServiceResponse(s"/$forChannel/Avatar", Service.defaultPlayerGUID, AvatarResponse.DropSpecialItem()))
|
||||
|
||||
case _ => ;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ object AvatarAction {
|
|||
inventory: List[InventoryItem],
|
||||
drop: List[InventoryItem]
|
||||
) extends Action
|
||||
final case class DropSpecialItem() extends Action
|
||||
|
||||
final case class TeardownConnection() extends Action
|
||||
// final case class PlayerStateShift(killer : PlanetSideGUID, victim : PlanetSideGUID) extends Action
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ object AvatarResponse {
|
|||
inventory: List[InventoryItem],
|
||||
drop: List[InventoryItem]
|
||||
) extends Response
|
||||
final case class DropSpecialItem() extends Response
|
||||
|
||||
final case class TeardownConnection() extends Response
|
||||
// final case class PlayerStateShift(itemID : PlanetSideGUID) extends Response
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue