mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-16 00:44:43 +00:00
let me explore
This commit is contained in:
parent
ebf821865a
commit
c24e46f735
2 changed files with 16 additions and 9 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 _ =>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue