Skip to content

Commit

Permalink
Update fn_ceasefire.sqf
Browse files Browse the repository at this point in the history
- Initialised global variable to prevent an error on first execution
- Fixed varname casing for _ceasefireStateChanged
  • Loading branch information
Cre8or committed Mar 31, 2022
1 parent e014df7 commit 5bf5d85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/ceasefire/fn_ceasefire.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ if (!isServer) exitWith {};


// Set up some variables
if (isNil "cafe_ceasefire_active") then {cafe_ceasefire_active = false};
if (isNil "cafe_ceasefire_server_EH") then {cafe_ceasefire_server_EH = -1};
if (isNil "cafe_ceasefire_server_sideRelations") then {cafe_ceasefire_server_sideRelations = []};
private _ceaseFireStateChanged = (cafe_ceasefire_active != _enabled);
private _ceasefireStateChanged = (cafe_ceasefire_active != _enabled);

cafe_ceasefire_active = _enabled;
cafe_ceasefire_endTime = [-1, CBA_missionTime + _duration] select (_duration > 0);
Expand Down Expand Up @@ -62,7 +63,7 @@ publicVariable "cafe_ceasefire_active";



if (_ceaseFireStateChanged) then {
if (_ceasefireStateChanged) then {

// Enforce the ceasefire via side relations
if (_enabled) then {
Expand Down

0 comments on commit 5bf5d85

Please sign in to comment.