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 * @param data additional interaction information, if applicable
*/ */
def doInteractingWithDeath(obj: PlanetSideServerObject, body: PieceOfEnvironment, data: Option[OxygenStateTarget]): Unit = { 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 //noinspection ScalaUnusedSymbol

View file

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