From a685f71d6ed85d7249bca29e5047677e972bbe88 Mon Sep 17 00:00:00 2001 From: ScrawnyRonnie Date: Thu, 30 Jan 2025 12:11:13 -0500 Subject: [PATCH] killed player lifespan calculation --- src/main/scala/net/psforever/objects/zones/exp/Support.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/scala/net/psforever/objects/zones/exp/Support.scala b/src/main/scala/net/psforever/objects/zones/exp/Support.scala index 0233426ca..1ad7ead6e 100644 --- a/src/main/scala/net/psforever/objects/zones/exp/Support.scala +++ b/src/main/scala/net/psforever/objects/zones/exp/Support.scala @@ -29,8 +29,13 @@ object Support { //setup val historyList = history.toList val withKills = victim.progress.kills.nonEmpty + //TODO Issue #1259 - Use another method to capture time of death than current time ("kill shots" aren't working) + /* val fullLifespan = (historyList.headOption, historyList.lastOption) match { case (Some(spawn), Some(death)) => death.time - spawn.time + */ + val fullLifespan = historyList.headOption match { + case Some(spawn) => System.currentTimeMillis() - spawn.time case _ => 0L } val recordOfWornTimes = countTimeWhileExoSuitOrMounted(historyList)