From 068bdb25cf5366ce6bdb478d66aed198a2fced4c Mon Sep 17 00:00:00 2001 From: He-Man Date: Thu, 30 Apr 2020 19:43:15 +0200 Subject: [PATCH] Extension limit for Community Stats --- .../compile/epoch_player/EPOCH_server_updatePlayerStats.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_updatePlayerStats.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_updatePlayerStats.sqf index c07d30b1..fc3b839b 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_updatePlayerStats.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_updatePlayerStats.sqf @@ -59,10 +59,10 @@ if (_sIndex > -1) then { _currentStat = _playerStats select _sIndex; //set the new stat value if (_isTotal) then { - _playerStats set[_sIndex, _adjust]; + _playerStats set[_sIndex, _adjust min 3.4028235e+37 max -3.4028235e+37]; // +/- 3.4028235e+38 is Epoch Extension limit! } else { - _playerStats set[_sIndex, _currentStat + _adjust]; + _playerStats set[_sIndex, (_currentStat + _adjust) min 3.4028235e+37 max -3.4028235e+37]; }; //set the new stats array back onto this playerObj _playerObj setVariable["COMMUNITY_STATS", _playerStats];