Skip to content

Commit 901a265

Browse files
authored
Merge pull request #186 from DeliciousJaffa/dev
Bug fixes
2 parents 74530ed + 423524e commit 901a265

3 files changed

Lines changed: 22 additions & 18 deletions

File tree

addons/overthrow_main/functions/actions/fn_recruitSpawnCiv.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if(({side _x isEqualTo west || side _x isEqualTo east} count ((getpos player) ne
77
private _price = [OT_nation,"CIV",100] call OT_fnc_getPrice;
88
private _money = player getVariable ["money",0];
99

10-
if(_money < _price) exitWith {format ["You need $%1",_cost] call OT_fnc_notifyMinor};
10+
if(_money < _price) exitWith {format ["You need $%1",_price] call OT_fnc_notifyMinor};
1111
playSound "3DEN_notificationDefault";
1212
[-_price] call OT_fnc_money;
1313

addons/overthrow_main/functions/player/fn_statsSystemLoop.sqf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ if(!isNil "_qrfstart" && (time - _qrfstart) < 600) then {
2929
_mins = floor(_secs / 60);
3030
_secs = round(_secs % 60);
3131
};
32+
if(_mins < 10) then {_mins = format["0%1",_mins]};
3233
if(_secs < 10) then {_secs = format["0%1",_secs]};
33-
_qrf = format["<t size='0.7'>Battle of %1</t><br/>Starting (0%2:%3)",_attacking,_mins,_secs];
34+
_qrf = format["<t size='0.7'>Battle of %1</t><br/>Starting (%2:%3)",_attacking,_mins,_secs];
3435
};
3536

3637
if(!isNil "_qrfstart" && (time - _qrfstart) > 600) then {

addons/overthrow_main/functions/save/fn_savePlayerData.sqf

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,32 @@ private _uid = getPlayerUid _player;
44
private _data = [];
55

66
{
7-
private _v = _player getVariable [_x,""];
8-
if(_x isEqualTo "home" && !(_v isEqualType [])) then {
9-
_owned = (_player getVariable "owned");
10-
if(count _owned isEqualTo 0) then {
11-
diag_log format["Warning: Player %1 owns no buildings to be set as home",name _player];
12-
//fallback to current pos
13-
_v = getpos _player;
14-
}else{
15-
_buildid = _owned select 0;
16-
_pos = buildingpositions getVariable [_buildid,[]];
17-
if(count _pos isEqualTo 0) then {
7+
private _v = _player getVariable _x;
8+
if (!isNil "_v") then {
9+
if(_x isEqualTo "home" && !(_v isEqualType [])) then {
10+
_owned = (_player getVariable "owned");
11+
if(count _owned isEqualTo 0) then {
12+
diag_log format["Warning: Player %1 owns no buildings to be set as home",name _player];
1813
//fallback to current pos
19-
_v = getpos player;
14+
_v = getpos _player;
2015
}else{
21-
_v = _pos;
16+
_buildid = _owned select 0;
17+
_pos = buildingpositions getVariable [_buildid,[]];
18+
if(count _pos isEqualTo 0) then {
19+
//fallback to current pos
20+
_v = getpos player;
21+
}else{
22+
_v = _pos;
23+
};
2224
};
2325
};
26+
_data pushback [_x,_v];
2427
};
25-
_data pushback [_x,_v];
2628
}foreach(allVariables _player select {
2729
_x = toLower _x;
28-
!(_x in ["ot_loaded", "morale", "player_uid", "sa_tow_actions_loaded", "hiding", "randomValue", "saved3deninventory", "babe_em_vars"])
29-
&& { !((_x select [0,4]) in ["ace_", "cba_", "bis_"]) }
30+
!(_x in ["ot_loaded", "morale", "player_uid", "hiding", "randomValue", "saved3deninventory", "babe_em_vars"])
31+
&& { !((_x select [0,4]) in ["ace_", "cba_", "bis_", "aur_"]) }
32+
&& { !((_x select [0,3]) in ["sa_", "ar_"]) }
3033
&& { (_x select [0,11]) != "missiondata" }
3134
&& { (_x select [0,9]) != "seencache"}
3235
});

0 commit comments

Comments
 (0)