Skip to content

Commit 48f4c01

Browse files
committed
Starting island fix
1 parent 4cd617d commit 48f4c01

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

addons/overthrow_main.pbo

547 Bytes
Binary file not shown.

addons/overthrow_main/functions/save/fn_savePlayerData.sqf

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,25 @@ private _uid = getPlayerUid _player;
44
private _data = [];
55

66
{
7-
_data pushback [_x,_player getVariable _x];
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 {
18+
//fallback to current pos
19+
_v = getpos player;
20+
}else{
21+
_v = _pos;
22+
};
23+
};
24+
};
25+
_data pushback [_x,_v];
826
}foreach(allVariables _player select {
927
_x = toLower _x;
1028
!(_x in ["ot_loaded", "morale", "player_uid", "sa_tow_actions_loaded", "hiding", "randomValue", "saved3deninventory", "babe_em_vars"])

addons/overthrow_main/script_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
#define MAJOR 0
2020
#define MINOR 7
2121
#define PATCHLVL 8
22-
#define BUILD 0
22+
#define BUILD 1

0 commit comments

Comments
 (0)