Skip to content

Commit

Permalink
Change PFH delay
Browse files Browse the repository at this point in the history
  • Loading branch information
mazinskihenry committed Dec 12, 2024
1 parent 490b394 commit dc5d032
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions addons/chemical/functions/fnc_handleGasMaskDur.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ private _currentHealth = _unit getVariable [QGVAR(gasmask_durability), 10]; // D
// Scale the current health (0-10) to the actual time left based on maxTime
private _timeLeft = (_currentHealth / 10) * _maxTime; // Convert 0-10 health scale to time left

// Reduce the time left by 0.25 seconds (each tick reduces by 0.25 seconds)
_timeLeft = _timeLeft - 0.25;
// Reduce the time left by 1 seconds (each tick reduces by 1 seconds)
_timeLeft = _timeLeft - 1;

// Prevent negative durability
_timeLeft = _timeLeft max 0;
Expand Down
2 changes: 1 addition & 1 deletion addons/chemical/functions/fnc_poison.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private _infectionTime = missionNamespace getVariable [QGVAR(infectionTime), 60]
//Get current time left for player
private _currentInfection = _unit getVariable [QGVAR(infectionTime), 60];

private _timeLeft = _currentInfection - 0.25;
private _timeLeft = _currentInfection - 1;
_timeLeft = _timeLeft max 0;

private _newTime = _timeLeft;
Expand Down
2 changes: 1 addition & 1 deletion addons/chemical/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
#define X_PART(num) (W_PART(num) + (safeZoneX + (safeZoneW - SIZEX) / 2))
#define Y_PART(num) (H_PART(num) + (safeZoneY + (safeZoneH - SIZEY) / 2))

#define GAS_MANAGER_PFH_DELAY 0.25
#define GAS_MANAGER_PFH_DELAY 1
4 changes: 2 additions & 2 deletions addons/vitals/functions/fnc_handlePoisoning.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ private _currentCS = _unit getVariable [QEGVAR(chemical,CSGas), 0];

_unit setVariable [QEGVAR(chemical,CSGas), (_currentCS - (_poisonAdjustment * _deltaT)) max 0, _syncValue];

if (_unit getVariable [QEGVAR(chemical,airPoisoning), false]) then {
if !(_unit getVariable [QEGVAR(chemical,airPoisoning), false]) then {
private _currentInfection = _unit getVariable [QEGVAR(chemical,infectionTime), missionNamespace getVariable [QEGVAR(chemical,infectionTime), 60]];
private _updateTime = _currentInfection + (1 * _deltaT);
_updateTime = _updateTime min (missionNamespace getVariable [QEGVAR(chemical,infectionTime), 60]);

_unit setVariable [QEGVAR(chemical,infectionTime), _updateTime, true];
} else {
_unit setVariable [QEGVAR(chemical,infectionTime), 0, true];
_unit setVariable [QEGVAR(chemical,infectionTime), 60, true];
};

0 comments on commit dc5d032

Please sign in to comment.