let me explore

This commit is contained in:
ScrawnyRonnie 2023-12-07 08:25:21 -05:00
parent ebf821865a
commit c24e46f735
2 changed files with 16 additions and 9 deletions

View file

@ -1309,7 +1309,10 @@ class PlayerControl(player: Player, avatarActor: typed.ActorRef[AvatarActor.Comm
* @param data additional interaction information, if applicable
*/
def doInteractingWithDeath(obj: PlanetSideServerObject, body: PieceOfEnvironment, data: Option[OxygenStateTarget]): Unit = {
suicide()
player.History.findLast { entry => entry.isInstanceOf[ReconstructionActivity] } match {
case Some(entry) if System.currentTimeMillis() - entry.time > 3000L => suicide()
case _ =>
}
}
//noinspection ScalaUnusedSymbol

View file

@ -679,14 +679,18 @@ class VehicleControl(vehicle: Vehicle)
*/
def doInteractingWithDeath(obj: PlanetSideServerObject, body: PieceOfEnvironment, data: Option[OxygenStateTarget]): Unit = {
if (!obj.Destroyed) {
PerformDamage(
vehicle,
DamageInteraction(
VehicleSource(vehicle),
SuicideReason(),
vehicle.Position
).calculate()
)
vehicle.History.findLast { entry => entry.isInstanceOf[SpawningActivity] } match {
case Some(entry) if System.currentTimeMillis() - entry.time > 3000L =>
PerformDamage(
vehicle,
DamageInteraction(
VehicleSource(vehicle),
SuicideReason(),
vehicle.Position
).calculate()
)
case _ =>
}
}
}