Skip to content

Commit 7f5bc50

Browse files
authored
Infection Reveal fix (SubnauticaNitrox#1287)
* Remove Supress (Requested by Sunrunner) * Set initial infection settings. Change default Infection settings to 0.1f as 0f means cured and the initial value is supposed to be 0.1f * Comment. * Dont set reveal too early. Vanilla game reveal is done at 1f after the player scans themselves.
1 parent ea7efff commit 7f5bc50

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

NitroxClient/GameLogic/InitialSync/PlayerInitialSyncProcessor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ private void SetPlayerStats(PlayerStatsData statsData)
7171
Player.main.GetComponent<Survival>().food = statsData.Food;
7272
Player.main.GetComponent<Survival>().water = statsData.Water;
7373
Player.main.infectedMixin.SetInfectedAmount(statsData.InfectionAmount);
74-
if (statsData.InfectionAmount > 0f)
74+
75+
//If InfectionAmount is at least 1f then the infection reveal should have happened already.
76+
//If InfectionAmount is below 1f then the reveal has not.
77+
if (statsData.InfectionAmount >= 1f)
7578
{
7679
Player.main.infectionRevealed = true;
7780
}

0 commit comments

Comments
 (0)