Removed old debug

This commit is contained in:
Christian 2017-10-10 09:33:35 +02:00
parent b750f9a992
commit 052c367406
22 changed files with 68 additions and 161 deletions

View File

@ -27,5 +27,3 @@ if (!isDedicated && hasInterface) then {
} else {
setViewDistance 1600;
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] init.sqf done for: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -1,5 +1,3 @@
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Respawn script started for: %1", debug_source];_text remoteExec ["diag_log",2];};
if ( isNil "GRLIB_respawn_loadout" ) then {
removeAllWeapons player;
removeAllItems player;
@ -16,5 +14,3 @@ if ( isNil "GRLIB_respawn_loadout" ) then {
sleep 4;
[ player, GRLIB_respawn_loadout ] call F_setLoadout;
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Respawn script ended for: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -74,5 +74,3 @@ player addEventHandler ["GetInMan", {[_this select 2] spawn kp_cr_checkVehicle;}
[] execVM "onPlayerRespawn.sqf";
[player] joinSilent (createGroup GRLIB_side_friendly);
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] init_client.sqf done for: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -13,8 +13,6 @@ if (KP_liberation_arsenalUsePreset) then {
if (isNil "GRLIB_arsenal_backpacks") then {GRLIB_arsenal_backpacks = []};
if (isNil "blacklisted_from_arsenal") then {blacklisted_from_arsenal = []};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Arsenal preset %1 initializing for: %2", KP_liberation_arsenal, debug_source];_text remoteExec ["diag_log",2];};
if ((count GRLIB_arsenal_weapons) == 0) then {
if ((count blacklisted_from_arsenal) == 0) then {
_virtualWeapons = _virtualCargo select 0;
@ -79,14 +77,9 @@ if (KP_liberation_arsenalUsePreset) then {
if ((count KP_liberation_allowed_items_extension) > 0) then {
KP_liberation_allowed_items append KP_liberation_allowed_items_extension;
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Arsenal preset %1 initialized for: %2", KP_liberation_arsenal, debug_source];_text remoteExec ["diag_log",2];};
} else {
[missionNamespace, true] call BIS_fnc_addVirtualWeaponCargo;
[missionNamespace, true] call BIS_fnc_addVirtualMagazineCargo;
[missionNamespace, true] call BIS_fnc_addVirtualItemCargo;
[missionNamespace, true] call BIS_fnc_addVirtualBackpackCargo;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Arsenal with no restrictions initialized for: %1", debug_source];_text remoteExec ["diag_log",2];};
};

View File

@ -1,6 +1,5 @@
if (isDedicated) exitWith {};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Source: %1 - Remove SuppMod Sync", debug_source];_text remoteExec ["diag_log",2];};
[KP_liberation_suppMod_req, KP_liberation_suppMod_arty] call BIS_fnc_removeSupportLink;
deleteVehicle KP_liberation_suppMod_req;
KP_liberation_suppMod_req = nil;

View File

@ -29,8 +29,6 @@ while {true} do {
(GRLIB_force_redeploy || (player distance (getmarkerpos GRLIB_respawn_marker) < 50)) && vehicle player == player && alive player && !dialog && howtoplay == 0
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Redeploy management executed at: %1", debug_source];_text remoteExec ["diag_log",2];};
fullmap = 0;
_old_fullmap = 0;
@ -222,26 +220,21 @@ while {true} do {
default {_access = true;};
};
if (_access) then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Source: %1 - Entered _access area", debug_source];_text remoteExec ["diag_log",2];};
if (isNil "KP_liberation_suppMod_handle") then {KP_liberation_suppMod_handle = scriptNull;};
if (isNull KP_liberation_suppMod_handle) then {
KP_liberation_suppMod_handle = [KP_liberation_suppMod_arty] execVM "A3\modules_f\supports\init_provider.sqf";
};
if (isNil "KP_liberation_suppMod_req") then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Source: %1 - Requester seems to be Nil", debug_source];_text remoteExec ["diag_log",2];};
KP_liberation_suppMod_req = KP_liberation_suppMod_grp createUnit ["SupportRequester", KP_liberation_suppMod_grp, [], 0, "NONE"];
//KP_liberation_suppMod_req spawn BIS_fnc_moduleSupportsInitRequester;
[KP_liberation_suppMod_req] execVM "A3\modules_f\supports\init_requester.sqf";
{
[KP_liberation_suppMod_req, _x, -1] call BIS_fnc_limitSupport;
} forEach ["Artillery","CAS_Heli","CAS_Bombing","UAV","Drop","Transport"];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Source: %1 - Requester: %2", debug_source, KP_liberation_suppMod_req];_text remoteExec ["diag_log",2];};
};
if ((count (synchronizedObjects player)) == 0) then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Source: %1 - No synced Objects", debug_source];_text remoteExec ["diag_log",2];};
[player, KP_liberation_suppMod_req, KP_liberation_suppMod_arty] call BIS_fnc_addSupportLink;
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Source: %1 - Synced to %2 -> %3", debug_source, (synchronizedObjects player), synchronizedObjects ((synchronizedObjects player) select 0)];_text remoteExec ["diag_log",2];};
};
};*/
};

View File

@ -1,17 +1,13 @@
private [ "_last_transition", "_last_position", "_cinematic_camera", "_cinematic_pointer", "_positions", "_last_position", "_nearentities", "_camtarget", "_startpos", "_endpos", "_startfov", "_endfov", "_nearest_sector", "_unitname", "_position" ];
if ( isNil "active_sectors" ) then { active_sectors = [] };
if ( isNil "GRLIB_all_fobs" ) then { GRLIB_all_fobs = [] };
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Cinematic camera started for: %1", debug_source];_text remoteExec ["diag_log",2];};
cinematic_camera_started = true;
_last_transition = -1;
_last_position = [ -1, -1, -1 ];
private _last_transition = -1;
private _last_position = [ -1, -1, -1 ];
showCinemaBorder true;
_cinematic_camera = "camera" camCreate [0,0,0];
_cinematic_pointer = "Sign_Arrow_Blue_F" createVehicleLocal [0,0,0];
private _cinematic_camera = "camera" camCreate [0,0,0];
private _cinematic_pointer = "Sign_Arrow_Blue_F" createVehicleLocal [0,0,0];
_cinematic_pointer hideObject true;
_cinematic_camera camSetTarget _cinematic_pointer;
_cinematic_camera cameraEffect ["internal","back"];
@ -25,7 +21,7 @@ while { cinematic_camera_started } do {
if ( cinematic_camera_started ) then {
camUseNVG false;
_positions = [ getpos startbase ];
private _positions = [ getpos startbase ];
if ( !first_camera_round ) then {
if ( count GRLIB_all_fobs > 0 ) then {
@ -57,8 +53,8 @@ while { cinematic_camera_started } do {
_position = selectRandom (_positions - [_last_position]);
_last_position = _position;
_cinematic_pointer setpos [ _position select 0, _position select 1, (_position select 2) + 7 ];
_nearentities = _position nearEntities [ "Man", 100 ];
_camtarget = _cinematic_pointer;
private _nearentities = _position nearEntities [ "Man", 100 ];
private _camtarget = _cinematic_pointer;
if ( first_camera_round ) then {
_camtarget = startbase;
} else {
@ -72,10 +68,10 @@ while { cinematic_camera_started } do {
};
_cinematic_camera camSetTarget _camtarget;
_startpos = [ ((getpos _camtarget) select 0) - 60, ((getpos _camtarget) select 1) + 350, 5 ];
_endpos = [ ((getpos _camtarget) select 0) - 60, ((getpos _camtarget) select 1) - 230, 5 ];
_startfov = 0.5;
_endfov = 0.5;
private _startpos = [ ((getpos _camtarget) select 0) - 60, ((getpos _camtarget) select 1) + 350, 5 ];
private _endpos = [ ((getpos _camtarget) select 0) - 60, ((getpos _camtarget) select 1) - 230, 5 ];
private _startfov = 0.5;
private _endfov = 0.5;
if ( !first_camera_round ) then {
_startfov = 0.8;
@ -250,9 +246,9 @@ while { cinematic_camera_started } do {
if ( !isNil "showcaminfo" ) then {
if ( showcaminfo && howtoplay == 0 ) then {
_unitname = "";
private _unitname = "";
if ( isPlayer _camtarget ) then { _unitname = name _camtarget };
_nearest_sector = "";
private _nearest_sector = "";
if ( _position distance startbase < 300 ) then {
_nearest_sector = "BEGIN OF OPERATION";
} else {
@ -277,5 +273,3 @@ _cinematic_camera cameraEffect ["Terminate", "BACK"];
camDestroy _cinematic_camera;
camUseNVG false;
cinematic_camera_stop = true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Cinematic camera stopped for: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -1,11 +1,7 @@
private [ "_dialog" ];
if ( isNil "cinematic_camera_started" ) then { cinematic_camera_started = false };
sleep 0.5;
waitUntil { time > 0 };
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Intro started for: %1", debug_source];_text remoteExec ["diag_log",2];};
[] spawn cinematic_camera;
if ( GRLIB_introduction ) then {
@ -21,7 +17,7 @@ if ( GRLIB_introduction ) then {
showcaminfo = true;
dostartgame = 0;
howtoplay = 0;
_dialog = createDialog "liberation_menu";
private _dialog = createDialog "liberation_menu";
waitUntil { dialog };
waitUntil { dostartgame == 1 || howtoplay == 1 || !dialog };
@ -30,5 +26,3 @@ if ( howtoplay == 0 ) then {
cinematic_camera_started = false;
};
introDone = true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Intro ended for: %1", debug_source];_text remoteExec ["diag_log",2];};

View File

@ -14,5 +14,4 @@ if (KP_liberation_suppMod_enb > 0) then {
publicVariable "KP_liberation_suppMod_grp";
publicVariable "KP_liberation_suppMod_arty";
KP_liberation_suppMod_created = true; publicVariable "KP_liberation_suppMod_created";
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] SuppMods created by: %1 - Grp: %2 - Arty: %3", debug_source, KP_liberation_suppMod_grp, KP_liberation_suppMod_arty];_text remoteExec ["diag_log",2];};
};

View File

@ -41,8 +41,6 @@ while { true } do {
huron setDamage 0;
huron allowdamage true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] huron spawned by: %1", debug_source];_text remoteExec ["diag_log",2];};
if ( alive huron ) then {
waitUntil {
@ -58,5 +56,4 @@ while { true } do {
deletevehicle huron;
};
sleep 0.25;
};
};

View File

@ -23,8 +23,6 @@ if (count GRLIB_all_fobs == 0) then {
_spawnplace = selectRandom _potentialplaces;
[markerPos _spawnplace, true] remoteExec ["build_fob_remote_call",2];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Preplaced FOB placed by: %1", debug_source];_text remoteExec ["diag_log",2];};
} else {
private _fobbox = objNull;
@ -35,8 +33,6 @@ if (count GRLIB_all_fobs == 0) then {
[_fobbox, 3000] remoteExec ["F_setMass",_fobbox];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] FOB Box placed by: %1", debug_source];_text remoteExec ["diag_log",2];};
sleep 3;
waitUntil {
@ -53,8 +49,6 @@ if (count GRLIB_all_fobs == 0) then {
waitUntil {sleep 5; (count GRLIB_all_fobs) > 0};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] First FOB built at %1. Sending resource package.", (GRLIB_all_fobs select 0)];_text remoteExec ["diag_log",2];};
private _crateArray = [];
uiSleep 10;
@ -82,6 +76,4 @@ if (count GRLIB_all_fobs == 0) then {
_smoke attachTo [_x];
} forEach _crateArray;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Startresources dropped by: %1", debug_source];_text remoteExec ["diag_log",2];};
};
};

View File

@ -2,29 +2,26 @@ params ["_vehicle"];
if (!isServer) exitWith {};
private ["_id", "_synced", "_crew_old", "_crew_grp"];
if (isNil "kp_supp_vehicles") then {
kp_supp_vehicles = [];
};
if (_vehicle in kp_supp_vehicles) exitWith {};
_id = count kp_supp_vehicles;
_synced = false;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] Arty Monitor for ID %1 started on: %2 - _vehicle: %3 ", _id, debug_source, typeOf _vehicle];_text remoteExec ["diag_log",2];};
private _id = count kp_supp_vehicles;
private _synced = false;
private _crew_grp = [];
kp_supp_vehicles pushBack _vehicle;
while {true} do {
_crew_old = ({alive _x} count (crew _vehicle));
private _crew_old = ({alive _x} count (crew _vehicle));
if ((_crew_old > 0) && !_synced) then {
_synced = true;
_vehicle synchronizeObjectsAdd [KP_liberation_suppMod_arty];
KP_liberation_suppMod_arty synchronizeObjectsAdd [_vehicle];
_crew_grp = group _vehicle;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] ID %1 - %2 added to sync - group: %3", _id, typeOf _vehicle, _crew_grp];_text remoteExec ["diag_log",2];};
} else {
if ((_crew_old == 0) && _synced) then {
_synced = false;
@ -32,7 +29,6 @@ while {true} do {
_x synchronizeObjectsRemove [KP_liberation_suppMod_arty];
KP_liberation_suppMod_arty synchronizeObjectsRemove [_x];
} forEach (units _crew_grp);
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] [SUPP] ID %1 - %2 removed from sync", _id, typeOf _vehicle];_text remoteExec ["diag_log",2];};
};
};

View File

@ -12,8 +12,8 @@ if (KP_liberation_production_markers isEqualTo []) then {
} forEach sectors_factory;
};
_KP_liberation_production_old = [0];
_KP_liberation_logistics_old = [0];
private _KP_liberation_production_old = [0];
private _KP_liberation_logistics_old = [0];
while {true} do {
@ -37,6 +37,4 @@ while {true} do {
_KP_liberation_production_old = +KP_liberation_production;
_KP_liberation_logistics_old = +KP_liberation_logistics;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Serverside eco sent from: %1", debug_source];_text remoteExec ["diag_log",2];};
};

View File

@ -4,8 +4,6 @@ waitUntil {!isNil "KP_liberation_production"};
sectors_recalculating = false;
sectors_timer = false;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource management started on: %1", debug_source];_text remoteExec ["diag_log",2];};
while {GRLIB_endgame == 0} do {
recalculate_sectors = false;
@ -13,23 +11,20 @@ while {GRLIB_endgame == 0} do {
if (((count allPlayers) > 0) && ((count KP_liberation_production) > 0)) then {
waitUntil {sleep 0.5; !sectors_recalculating};
sectors_recalculating = true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource interval started: %1", time];_text remoteExec ["diag_log",2];};
private ["_time_update", "_tempProduction", "_storage", "_storageArray", "_supplyValue", "_ammoValue", "_fuelValue", "_time", "_crateType", "_crate"];
_time_update = false;
private _time_update = false;
if (sectors_timer) then {_time_update = true; sectors_timer = false;};
_tempProduction = [];
private _tempProduction = [];
{
_storageArray = [];
_supplyValue = 0;
_ammoValue = 0;
_fuelValue = 0;
_time = _x select 8;
private _storageArray = [];
private _supplyValue = 0;
private _ammoValue = 0;
private _fuelValue = 0;
private _time = _x select 8;
_storage = nearestObjects [(markerPos (_x select 1)), [KP_liberation_small_storage_building], GRLIB_fob_range];
private _storage = nearestObjects [(markerPos (_x select 1)), [KP_liberation_small_storage_building], GRLIB_fob_range];
_storage = [_storage, {(_x getVariable ["KP_liberation_storage_type",-1]) == 1}] call BIS_fnc_conditionalSelect;
if ((count _storage) > 0) then {
_storage = (_storage select 0);
@ -81,15 +76,11 @@ while {GRLIB_endgame == 0} do {
_ammoValue,
_fuelValue
];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Sector Production Update: %1", (_tempProduction select _forEachIndex)];_text remoteExec ["diag_log",2];};
} forEach KP_liberation_production;
_tempProduction sort true;
KP_liberation_production = +_tempProduction;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource interval finished: %1", time];_text remoteExec ["diag_log",2];};
sectors_recalculating = false;
};
waitUntil {sleep 1; recalculate_sectors};

View File

@ -1,8 +1,4 @@
waitUntil { !isNil "save_is_loaded" };
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource calculation initializing on: %1", debug_source];_text remoteExec ["diag_log",2];};
private ["_local_fob_resources", "_local_supplies_global", "_local_ammo_global", "_local_fuel_global", "_local_heli_slots", "_local_plane_slots", "_local_infantry_cap", "_fob_buildings", "_heliSlots", "_planeSlots", "_hasAirBuilding", "_hasRecBuilding", "_storage_areas", "_supplyValue", "_ammoValue", "_fuelValue"];
waitUntil {!isNil "save_is_loaded"};
KP_liberation_fob_resources = [];
KP_liberation_supplies_global = 0;
@ -16,33 +12,31 @@ please_recalculate = true;
waitUntil {time > 1};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Resource calculation started on: %1", debug_source];_text remoteExec ["diag_log",2];};
while { true } do {
waitUntil { sleep 0.5; please_recalculate };
while {true} do {
waitUntil {sleep 0.5; please_recalculate};
please_recalculate = false;
_local_fob_resources = [];
_local_supplies_global = 0;
_local_ammo_global = 0;
_local_fuel_global = 0;
_local_heli_slots = 0;
_local_plane_slots = 0;
_local_infantry_cap = 50 * GRLIB_resources_multiplier;
private _local_fob_resources = [];
private _local_supplies_global = 0;
private _local_ammo_global = 0;
private _local_fuel_global = 0;
private _local_heli_slots = 0;
private _local_plane_slots = 0;
private _local_infantry_cap = 50 * GRLIB_resources_multiplier;
{
_fob_buildings = _x nearobjects (GRLIB_fob_range * 2);
_storage_areas = [_fob_buildings, {(_x getVariable ["KP_liberation_storage_type",-1]) == 0}] call BIS_fnc_conditionalSelect;
_heliSlots = {(typeOf _x) == KP_liberation_heli_slot_building;} count _fob_buildings;
_planeSlots = {(typeOf _x) == KP_liberation_plane_slot_building;} count _fob_buildings;
_hasAirBuilding = {(typeOf _x) == KP_liberation_air_vehicle_building;} count _fob_buildings;
private _fob_buildings = _x nearobjects (GRLIB_fob_range * 2);
private _storage_areas = [_fob_buildings, {(_x getVariable ["KP_liberation_storage_type",-1]) == 0}] call BIS_fnc_conditionalSelect;
private _heliSlots = {(typeOf _x) == KP_liberation_heli_slot_building;} count _fob_buildings;
private _planeSlots = {(typeOf _x) == KP_liberation_plane_slot_building;} count _fob_buildings;
private _hasAirBuilding = {(typeOf _x) == KP_liberation_air_vehicle_building;} count _fob_buildings;
if (_hasAirBuilding > 0) then {_hasAirBuilding = true;} else {_hasAirBuilding = false;};
_hasRecBuilding = {(typeOf _x) == KP_liberation_recycle_building;} count _fob_buildings;
private _hasRecBuilding = {(typeOf _x) == KP_liberation_recycle_building;} count _fob_buildings;
if (_hasRecBuilding > 0) then {_hasRecBuilding = true;} else {_hasRecBuilding = false;};
_supplyValue = 0;
_ammoValue = 0;
_fuelValue = 0;
private _supplyValue = 0;
private _ammoValue = 0;
private _fuelValue = 0;
{
{

View File

@ -2,16 +2,12 @@ unitcap = 0;
KP_liberation_heli_count = 0;
KP_liberation_plane_count = 0;
private ["_local_unitcap","_local_heli_count","_local_plane_count"];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Unitcap calculation started on: %1", debug_source];_text remoteExec ["diag_log",2];};
while { true } do {
_local_unitcap = 0;
_local_heli_count = 0;
_local_plane_count = 0;
while {true} do {
private _local_unitcap = 0;
private _local_heli_count = 0;
private _local_plane_count = 0;
{
if ( (side group _x == GRLIB_side_friendly) && (alive _x) && ((_x distance startbase) > 250 || (isPlayer _x)) ) then {
if ((side group _x == GRLIB_side_friendly) && (alive _x) && ((_x distance startbase) > 250 || (isPlayer _x))) then {
_local_unitcap = _local_unitcap + 1;
};
} forEach allUnits;
@ -29,4 +25,4 @@ while { true } do {
KP_liberation_heli_count = _local_heli_count;
KP_liberation_plane_count = _local_plane_count;
sleep 1;
};
};

View File

@ -1,5 +1,4 @@
params ["_sector"];
private ["_crates_amount", "_spawnpos", "_i", "_spawnclass", "_newbox"];
if (isNil "KP_capture_sectors_already_activated") then {KP_capture_sectors_already_activated = []};
@ -7,19 +6,19 @@ if (!(_sector in KP_capture_sectors_already_activated)) then {
KP_capture_sectors_already_activated pushback _sector;
_crates_amount = ((ceil (random 3)) * GRLIB_resources_multiplier);
private _crates_amount = ((ceil (random 3)) * GRLIB_resources_multiplier);
for [{_i=0},{_i < _crates_amount},{_i=_i+1}] do {
_spawnpos = zeropos;
private _spawnpos = zeropos;
while { _spawnpos distance zeropos < 1000 } do {
_spawnpos = ( [ ( markerpos _sector), random 50, random 360 ] call BIS_fnc_relPos ) findEmptyPosition [10, 100, 'B_Heli_Transport_01_F'];
if ( count _spawnpos == 0 ) then { _spawnpos = zeropos; };
};
_spawnclass = selectRandom KP_liberation_crates;
private _spawnclass = selectRandom KP_liberation_crates;
_newbox = _spawnclass createVehicle _spawnpos;
private _newbox = _spawnclass createVehicle _spawnpos;
_newbox setdir (random 360);
_newbox setpos _spawnpos;
clearWeaponCargoGlobal _newbox;
@ -30,5 +29,4 @@ if (!(_sector in KP_capture_sectors_already_activated)) then {
_newbox setVariable ["KP_liberation_crate_value", 100, true];
[_newbox, 500] remoteExec ["F_setMass",_newbox];
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] %1 Crates spawned at %2", _crates_amount, (markerText _sector)];_text remoteExec ["diag_log",2];};
};

View File

@ -1,9 +1,8 @@
params ["_sector"];
private ["_nearbuildings", "_compatible_classnames", "_intel_range", "_building_positions", "_nbintel", "_used_positions", "_buildingposition", "_inteldir", "_intelclassname", "_intelobject"];
_intel_range = 150;
_nbintel = 2 + (floor (random 3));
_compatible_classnames = [
private _intel_range = 150;
private _nbintel = 2 + (floor (random 3));
private _compatible_classnames = [
"Land_Cargo_House_V1_F",
"Land_Cargo_House_V2_F",
"Land_Cargo_House_V3_F",
@ -28,10 +27,10 @@ if (!(_sector in KP_military_sectors_already_activated)) then {
KP_military_sectors_already_activated pushback _sector;
_nearbuildings = [nearestObjects [markerpos _sector, _compatible_classnames, _intel_range], {alive _x}] call BIS_fnc_conditionalSelect;
private _nearbuildings = [nearestObjects [markerpos _sector, _compatible_classnames, _intel_range], {alive _x}] call BIS_fnc_conditionalSelect;
if ((count _nearbuildings) > 0) then {
_building_positions = [];
private _building_positions = [];
{_building_positions = _building_positions + ([_x] call BIS_fnc_buildingPositions);} foreach _nearbuildings;
@ -39,28 +38,23 @@ if (!(_sector in KP_military_sectors_already_activated)) then {
if ((count _building_positions) >= (_nbintel * 4)) then {
_used_positions = [];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] %1 Intelobjects spawned at %2", _nbintel, (markerText _sector)];_text remoteExec ["diag_log",2];};
private _used_positions = [];
while {_nbintel > 0} do {
_buildingposition = selectRandom _building_positions;
private _buildingposition = selectRandom _building_positions;
while {_buildingposition in _used_positions} do {
_buildingposition = selectRandom _building_positions;
};
_used_positions pushback _buildingposition;
_inteldir = random 360;
_intelclassname = selectRandom [GRLIB_intel_file, GRLIB_intel_laptop];
_intelobject = _intelclassname createVehicle _buildingposition;
_intelobject = (selectRandom [GRLIB_intel_file, GRLIB_intel_laptop]) createVehicle _buildingposition;
_intelobject setPosATL [_buildingposition select 0, _buildingposition select 1, (_buildingposition select 2) - 0.15];
_intelobject enableSimulationGlobal false;
_intelobject allowDamage false;
_intelobject setdir _inteldir;
_intelobject setdir (random 360);
_nbintel = _nbintel - 1;
};

View File

@ -72,7 +72,6 @@ if ( isMultiplayer ) then {
KP_liberation_mobilearsenal = 1;
KP_liberation_ailogistics = 1;
KP_liberation_ace = 0;
KP_liberation_debug = 0;
// Arty Supp deactivated for now - KP_liberation_suppMod_enb = 1;
KP_liberation_restart = 0;
KP_liberation_cr_param_buildings = 0;
@ -85,8 +84,6 @@ if ( isMultiplayer ) then {
KP_liberation_kill_debug = 0;
};
KP_liberation_debug = false;
if ( GRLIB_fatigue < 0.1 ) then { GRLIB_fatigue = false } else { GRLIB_fatigue = true };
if ( GRLIB_introduction == 1 ) then { GRLIB_introduction = true } else { GRLIB_introduction = false };
if ( GRLIB_deployment_cinematic == 1 ) then { GRLIB_deployment_cinematic = true } else { GRLIB_deployment_cinematic = false };

View File

@ -16,8 +16,5 @@ if (isDedicated) exitWith {};
hint format [localize "STR_ACTION_CRATE_VALUE_HINT", (_this select 0) getVariable ["KP_liberation_crate_value",0]];
if (!(ropeAttachEnabled (_this select 0))) then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Crate had ropeAttachEnabled %1. Checked by: %2", (ropeAttachEnabled (_this select 0)), debug_source];_text remoteExec ["diag_log",2];};
[(_this select 0), true] remoteExec ["enableRopeAttach",(_this select 0)];
};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Crate check done - value: %1 - ropeAttachEnabled: %2 - Checked by: %3",((_this select 0) getVariable "KP_liberation_crate_value"), (ropeAttachEnabled (_this select 0)), debug_source];_text remoteExec ["diag_log",2];};

View File

@ -5,8 +5,6 @@ params [
[ "_random_rotate", true ]
];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Spawning vehicle %1 at %2", _classname, time];_text remoteExec ["diag_log",2];};
private _newvehicle = objNull;
private _spawnpos = zeropos;
@ -52,7 +50,4 @@ sleep 0.1;
_newvehicle allowdamage true;
_newvehicle setdamage 0;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Done Spawning vehicle %1 at %2 - Owner: %3", _classname, time, debug_source];_text remoteExec ["diag_log",2];};
_newvehicle

View File

@ -41,5 +41,3 @@ asymm_notifications = compileFinal preprocessFileLineNumbers "scripts\client\asy
[] spawn compileFinal preprocessFileLineNumbers "scripts\shared\scan_skill.sqf";
[] spawn compileFinal preprocessFileLineNumbers "scripts\shared\diagnostics.sqf";
if (!KP_liberation_ace) then {[] spawn compileFinal preprocessFileLineNumbers "scripts\shared\manage_weather.sqf";};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] init_shared.sqf done for: %1", debug_source];_text remoteExec ["diag_log",2];};