Fix spawn marker count for non-cherno maps

This commit is contained in:
ebaydayz
2016-04-17 15:32:47 -04:00
parent a3cfdd4058
commit 59a4459809
10 changed files with 30 additions and 12 deletions

View File

@@ -64,10 +64,10 @@ if (!_finished) exitWith {
if (_finished) then {
_canAfford = false;
_qty = 0;
if(_bos == 1) then {
//sell
_qty = 0;
_bag = unitBackpack player;
_class = typeOf _bag;
if(_class == _part_in) then {

View File

@@ -20,7 +20,7 @@ _metals_conversion = [
} count _metals_conversion;
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false];
s_player_parts set [count s_player_parts,_cancel];
DZE_ActionInProgress = false;

View File

@@ -138,7 +138,7 @@ playMusic "dayz_track_death_1";
uiSleep 2;
for "_x" from 5 to 1 step -1 do {
format[localize "str_return_lobby",_x] call dayz_rollingMessages;
[format[localize "str_return_lobby",_x],1] call dayz_rollingMessages;
uiSleep 1;
};

View File

@@ -43,7 +43,7 @@ while {(!isNull _display) && !r_player_dead} do {
};
case (isInTraderCity) : {
_btnAbort ctrlEnable false;
localize "str_epoch_player_12" call dayz_rollingMessages;
[localize "str_epoch_player_12",1] call dayz_rollingMessages;
};
default {
_btnAbort ctrlEnable true;

View File

@@ -477,7 +477,7 @@ if (!isDedicated) then {
dayz_rollingMessages = {
//title and cutText are in the same layer, so both simultaneously on the same line overlaps and is unreadable
if (typeName _this == "ARRAY") exitWith {titleText [_this select 0,"PLAIN DOWN"];}; //Multi-line
if (typeName _this == "ARRAY") exitWith {cutText [_this select 0,"PLAIN DOWN"];}; //Special or multi-line message
if ((diag_ticktime - Message_1_time) < 5) then {
if ((time - Message_2_time) < 5) then {
Message_3 = Message_2;
@@ -496,7 +496,7 @@ if (!isDedicated) then {
Message_1 = _this;
Message_1_time = diag_ticktime;
//"PLAIN DOWN" fits a maximum of 3 lines on screen at once
titleText [format ["%1\n%2\n%3", Message_1, Message_2, Message_3], "PLAIN DOWN"];
cutText [format ["%1\n%2\n%3", Message_1, Message_2, Message_3], "PLAIN DOWN"];
};
dayz_originalPlayer = player;

View File

@@ -17,6 +17,7 @@
"PVDZE_veh_Init" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH};
{
if (toLower worldName != "chernarus") exitWith {};
private ["_building","_fckingcode"];
_fckingcode = {

View File

@@ -2,8 +2,14 @@ private ["_SWcorner","_NEcorner","_amount","_a","_b","_c"];
#define CONFIGBASE_VEHMAINTENANCE configFile >> "CfgPatches" >> "vehMaint"
_SWcorner = getArray(CONFIGBASE_VEHMAINTENANCE >> (worldName) >> "SWcorner");
_NEcorner = getArray(CONFIGBASE_VEHMAINTENANCE >> (worldName) >> "NEcorner");
if (toLower worldName == "chernarus") then {
_SWcorner = getArray(CONFIGBASE_VEHMAINTENANCE >> (worldName) >> "SWcorner");
_NEcorner = getArray(CONFIGBASE_VEHMAINTENANCE >> (worldName) >> "NEcorner");
} else {
// Not used, plant spawner is disabled on other maps for now, may add town generator and other coordinates later
_SWcorner = [0,1360];
_NEcorner = [14400,13560];
};
_a = [(_SWcorner select 0), (_SWcorner select 1), (_NEcorner select 0) - (_SWcorner select 0), (_NEcorner select 1) - (_SWcorner select 1) ] call psrnd_init;
_b = [ -15, -15, 30, 30 ] call psrnd_init;

View File

@@ -171,7 +171,7 @@ if (count _stats > 0) then {
if (_randomSpot) then {
private ["_counter","_position","_isNear","_isZero","_mkr"];
if (!isDedicated) then {endLoadingScreen;};
_IslandMap = if (worldName in ["dzhg","panthera2","Sara","Utes","Dingor","namalsk","isladuala","Tavi","dayznogova","tasmania2010"]) then {true} else {false};
_IslandMap = if (toLower worldName in ["caribou","cmr_ovaron","dingor","fallujah","fapovo","fdf_isle1_a","isladuala","lingor","mbg_celle2","namalsk","napf","oring","panthera2","sara","sauerland","smd_sahrani_a2","tavi","trinity","utes"]) then {true} else {false};
//spawn into random
_findSpot = true;
@@ -180,7 +180,7 @@ if (_randomSpot) then {
for [{_j=0},{_j<=100 && _findSpot},{_j=_j+1}] do {
if (_spawnSelection == 9) then {
// random spawn location selected, lets get the marker and spawn in somewhere
if (dayz_spawnselection == 1) then {_mkr = getMarkerPos ("spawn" + str(floor(random 6)));} else {_mkr = getMarkerPos ("spawn" + str(floor(random 5)));};
if (dayz_spawnselection == 1) then {_mkr = getMarkerPos ("spawn" + str(floor(random 6)));} else {_mkr = getMarkerPos ("spawn" + str(floor(random actualSpawnMarkerCount)));};
} else {
// spawn is not random, lets spawn in our location that was selected
_mkr = getMarkerPos ("spawn" + str(_spawnSelection));

View File

@@ -104,7 +104,7 @@ AllowedVehiclesList = [
["VWGolf",3]
];
if ((toLower worldName) in ["caribou","chernarus","cmr_ovaron","dingor","fallujah","fapovo","fdf_isle1_a","isladuala","lingor","mbg_celle2","namalsk","napf","oring","panthera2","sara","sauerland","smd_sahrani_a2","tavi","trinity","utes"]) then {
if (toLower worldName in ["caribou","chernarus","cmr_ovaron","dingor","fallujah","fapovo","fdf_isle1_a","isladuala","lingor","mbg_celle2","namalsk","napf","oring","panthera2","sara","sauerland","smd_sahrani_a2","tavi","trinity","utes"]) then {
// water map, add boats
{AllowedVehiclesList set [count AllowedVehiclesList,_x];} count [

View File

@@ -381,4 +381,15 @@ _debugMarkerPosition = getMarkerPos "respawn_west";
_debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1];
_vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"];
_vehicle_0 setPos _debugMarkerPosition;
_vehicle_0 setVariable ["ObjectID","1",true];
_vehicle_0 setVariable ["ObjectID","1",true];
actualSpawnMarkerCount = 0;
// count valid spawn markers, since different maps have different amounts
for "_i" from 0 to 10 do {
if !([(getMarkerPos format["spawn%1",_i]), [0,0,0]] call BIS_fnc_areEqual) then {
actualSpawnMarkerCount = actualSpawnMarkerCount + 1;
} else {
_i = 11; // exit since we did not find any further markers
};
};
diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount];