From 5d0d9e2cd9d9fe977a3facd7859ccb3f2b49df96 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 29 Nov 2023 14:22:48 +0000 Subject: [PATCH] Fix issue where `OriginalSurvivalTimeSeconds` would be set to the raid time in minutes, not the survival time in seconds --- project/src/controllers/GameController.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index 88f04089..4db2d396 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -575,7 +575,7 @@ export class GameController RaidTimeMinutes: baseEscapeTimeMinutes, ExitChanges: [], NewSurviveTimeSeconds: null, - OriginalSurvivalTimeSeconds: baseEscapeTimeMinutes + OriginalSurvivalTimeSeconds: db.globals.config.exp.match_end.survived_seconds_requirement } // Pmc raid, send default @@ -622,11 +622,8 @@ export class GameController this.logger.debug(`Reduced: ${request.Location} raid time by: ${chosenRaidReductionPercent}% to ${newRaidTimeMinutes} minutes`) - const originalSurvivalTimeSeconds = db.globals.config.exp.match_end.survived_seconds_requirement; - result.OriginalSurvivalTimeSeconds = originalSurvivalTimeSeconds; - // Calculate how long player needs to be in raid to get a `survived` extract status - result.NewSurviveTimeSeconds = Math.max(originalSurvivalTimeSeconds - ((baseEscapeTimeMinutes - newRaidTimeMinutes) * 60), 0); + result.NewSurviveTimeSeconds = Math.max(result.OriginalSurvivalTimeSeconds - ((baseEscapeTimeMinutes - newRaidTimeMinutes) * 60), 0); const exitAdjustments = this.getExitAdjustments(mapBase, newRaidTimeMinutes); if (exitAdjustments)