diff --git a/pre-packaged pbo/a3_exile_occupation.pbo b/pre-packaged pbo/a3_exile_occupation.pbo index c4067aa..90b3b35 100644 Binary files a/pre-packaged pbo/a3_exile_occupation.pbo and b/pre-packaged pbo/a3_exile_occupation.pbo differ diff --git a/source/a3_exile_occupation/changeLog.txt b/source/a3_exile_occupation/changeLog.txt index c8f64a3..a5e69d9 100644 --- a/source/a3_exile_occupation/changeLog.txt +++ b/source/a3_exile_occupation/changeLog.txt @@ -1,3 +1,8 @@ +================================================================================= +V60 (15-08-2016) +================================================================================= +Bug fixes and tweaks + ================================================================================= V59 (12-08-2016) ================================================================================= diff --git a/source/a3_exile_occupation/config.cpp b/source/a3_exile_occupation/config.cpp index 3b3c59c..1a075cb 100644 --- a/source/a3_exile_occupation/config.cpp +++ b/source/a3_exile_occupation/config.cpp @@ -4,7 +4,7 @@ class CfgPatches units[] = {}; weapons[] = {}; requiredVersion = 0.1; - a3_exile_occupation_version = "V59 (12-08-2016)"; + a3_exile_occupation_version = "V60 (15-08-2016)"; requiredAddons[] = {"a3_dms"}; author[]= {"second_coming"}; }; diff --git a/source/a3_exile_occupation/config.sqf b/source/a3_exile_occupation/config.sqf index 6d6de34..cd1d33f 100644 --- a/source/a3_exile_occupation/config.sqf +++ b/source/a3_exile_occupation/config.sqf @@ -45,8 +45,8 @@ SC_occupyTraders = true; // true if you want to create trader c SC_occupyStatic = false; // true if you want to add AI in specific locations SC_occupyTransport = true; // true if you want pubic transport (travels between traders) SC_occupyLootCrates = true; // true if you want to have random loot crates with guards -SC_occupyRandomSpawn = true; // (WORK IN PROGRESS) true if you want random spawning AI that hunt for nearby players -SC_occupyMilitary = false; // true if you want military buildings patrolled +SC_occupyRandomSpawn = true; // (WORK IN PROGRESS) true if you want random spawning AI that hunt for nearby players +SC_occupyMilitary = true; // true if you want military buildings patrolled SC_occupyVehicle = true; // true if you want to have roaming AI land vehicles SC_occupySky = true; // true if you want to have roaming AI helis SC_occupySea = false; // true if you want to have roaming AI boats @@ -243,11 +243,11 @@ SC_maximumCrewAmount = 3; // Maximum amount of AI allowed in a vehi ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// SC_maxNumberofVehicles = 3; // How many roaming vehicles to spawn -SC_occupyVehicleIgnoreCount = true; // true if you want spawn vehicles regardless of overall AI count +SC_occupyVehicleIgnoreCount = false; // true if you want spawn vehicles regardless of overall AI count SC_occupyVehiclesLocked = false; // true if AI vehicles to stay locked until all the linked AI are dead SC_occupyVehicleSurvivors = false; // true if you want a chance to spawn survivor AI as well as bandits (SC_occupyVehicle must be true to use this option) -SC_occupyVehicleUseFixedPos = true; // True if you want to specify the patrol positions and radius of the area to patrol / false for random +SC_occupyVehicleUseFixedPos = false; // True if you want to specify the patrol positions and radius of the area to patrol / false for random // if you set SC_maxNumberofVehicles higher than the number of static positions, the remainder will be random // they will also ignore any blacklisted areas @@ -410,19 +410,20 @@ if (worldName == 'Namalsk' AND SC_useMapOverrides) then if (worldName == 'Napf' AND SC_useMapOverrides) then { - SC_maxAIcount = 160; + SC_maxAIcount = 120; SC_maxNumberofVehicles = 5; }; if (worldName == 'Chernarus' AND SC_useMapOverrides) then { - SC_maxAIcount = 160; + SC_maxAIcount = 120; SC_maxNumberofVehicles = 5; }; if (worldName == 'Tanoa' AND SC_useMapOverrides) then { SC_useApexClasses = true; + }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -458,18 +459,18 @@ if (SC_debug) then SC_extendedLogging = true; SC_processReporter = true; SC_mapMarkers = true; - SC_occupyPlaces = false; - SC_occupyVehicle = false; - SC_occupyMilitary = false; + SC_occupyPlaces = true; + SC_occupyVehicle = true; + SC_occupyMilitary = true; SC_occupyRandomSpawn = true; SC_occupyStatic = false; - SC_occupySky = false; + SC_occupySky = true; SC_occupySea = false; - SC_occupyTraders = false; - SC_occupyTransport = false; - SC_occupyLootCrates = false; - SC_occupyHeliCrashes = false; - SC_maxAIcount = 200; + SC_occupyTraders = true; + SC_occupyTransport = true; + SC_occupyLootCrates = true; + SC_occupyHeliCrashes = true; + SC_maxAIcount = 100; SC_maxNumberofVehicles = 5; SC_maxNumberofBoats = 5; SC_maxNumberofHelis = 5; diff --git a/source/a3_exile_occupation/scripts/eventHandlers/driverKilled.sqf b/source/a3_exile_occupation/scripts/eventHandlers/driverKilled.sqf index 3f0970e..44d0b41 100644 --- a/source/a3_exile_occupation/scripts/eventHandlers/driverKilled.sqf +++ b/source/a3_exile_occupation/scripts/eventHandlers/driverKilled.sqf @@ -16,7 +16,6 @@ if(SC_debug) then }; // Select a replacement driver -_vehicle removeAllMPEventHandlers "mphit"; _group = group _vehicle; // Remove dead units from the group @@ -31,8 +30,7 @@ if(count units _group > 0) then _logDetail = format ["[OCCUPATION:Vehicle]:: vehicle: %1 group: %2 units left:%3",_vehicle,_group,count units _group]; [_logDetail] call SC_fnc_log; }; - - + _groupMembers = units _group; _driver = _groupMembers call BIS_fnc_selectRandom; @@ -68,5 +66,6 @@ else [_logDetail] call SC_fnc_log; _vehicle lock 0; _vehicle setVehicleLock "UNLOCKED"; - _vehicle setVariable ["ExileIsLocked", 0, true]; + _vehicle setVariable ["ExileIsLocked", 0, true]; + [_vehicle] call SC_fnc_vehicleDestroyed; }; diff --git a/source/a3_exile_occupation/scripts/eventHandlers/hitLand.sqf b/source/a3_exile_occupation/scripts/eventHandlers/hitLand.sqf index 8f38c99..ad07965 100644 --- a/source/a3_exile_occupation/scripts/eventHandlers/hitLand.sqf +++ b/source/a3_exile_occupation/scripts/eventHandlers/hitLand.sqf @@ -1,8 +1,13 @@ // Triggered when a ground vehicle takes damage // Attempts to get the current vehicle driver to repair the vehicle -_vehicle = _this select 0; -_vehicle removeAllMPEventHandlers "mphit"; +_vehicle = _this select 0; +_repairStatus = _vehicle getVariable "SC_repairStatus"; + +if(_repairStatus) exitWith {}; + +// Mark the vehicle as currently being repaired +_vehicle setVariable ["SC_repairStatus",true]; _vehicleDamage = damage _vehicle; _damagedWheels = 0; @@ -35,8 +40,7 @@ if(isNil "_assignedDriver") then _assignedDriver setVariable ["DMS_AssignedVeh",_vehicle]; _assignedDriver setVariable ["SC_drivenVehicle", _vehicle,true]; _assignedDriver addMPEventHandler ["mpkilled", "_this call SC_fnc_driverKilled;"]; - _vehicle setVariable ["SC_assignedDriver", _assignedDriver,true]; - + _vehicle setVariable ["SC_assignedDriver", _assignedDriver,true]; }; @@ -68,13 +72,9 @@ if ((_vehicle getHitPointDamage "HitFuel") > 0) then { _fueltankDamage = true; } if(_wheelDamage OR _engineDamage OR _fueltankDamage) then { - if(SC_extendedLogging) then - { - _logDetail = format ["[OCCUPATION:repairVehicle]:: Unit %2 repairing vehicle at %1",time,_assignedDriver]; - [_logDetail] call SC_fnc_log; - }; + _logDetail = format ["[OCCUPATION:repairVehicle]:: Unit %2 repairing vehicle at %1",time,_assignedDriver]; + [_logDetail] call SC_fnc_log; - [_vehicle,_assignedDriver ] spawn { _vehicle = _this select 0; @@ -111,11 +111,8 @@ if(_wheelDamage OR _engineDamage OR _fueltankDamage) then _driver assignAsDriver _vehicle; _driver moveInDriver _vehicle; _driver action ["movetodriver", _vehicle]; - if(SC_extendedLogging) then - { - _logDetail = format ["[OCCUPATION:repairVehicle]:: Unit %2 finished repairing vehicle %3 at %1",time,_driver,_vehicle]; - [_logDetail] call SC_fnc_log; - }; + _logDetail = format ["[OCCUPATION:repairVehicle]:: Unit %2 finished repairing vehicle %3 at %1",time,_driver,_vehicle]; + [_logDetail] call SC_fnc_log; }; _wp = _group addWaypoint [position _vehicle, 0] ; _wp setWaypointFormation "Column"; @@ -132,18 +129,14 @@ if(_wheelDamage OR _engineDamage OR _fueltankDamage) then _group setCombatMode "RED"; _driver enableAI "MOVE"; _driver enableAI "FSM"; - _vehicle addMPEventHandler ["mphit", "_this call SC_fnc_hitLand;"]; - }; + }; + // Mark the vehicle as not currently being repaired + _vehicle setVariable ["SC_repairStatus",false]; } else { _logDetail = format ["[OCCUPATION:repairVehicle]:: Not repairing %2, driver is %3 at %1",time,_vehicle,_assignedDriver]; [_logDetail] call SC_fnc_log; _logDetail = format ["[OCCUPATION:repairVehicle]:: Vehicle: %1 damage: %2 engine: %3 fuelTank: %4",_vehicle,_vehicleDamage,_engineDamage,_fueltankDamage]; - [_logDetail] call SC_fnc_log; - [] spawn - { - sleep 2; - }; - _vehicle addMPEventHandler ["mphit", "_this call SC_fnc_hitLand;"]; -}; + [_logDetail] call SC_fnc_log; +}; \ No newline at end of file diff --git a/source/a3_exile_occupation/scripts/occupationVehicle.sqf b/source/a3_exile_occupation/scripts/occupationVehicle.sqf index bb1dabe..62d6d51 100644 --- a/source/a3_exile_occupation/scripts/occupationVehicle.sqf +++ b/source/a3_exile_occupation/scripts/occupationVehicle.sqf @@ -6,11 +6,6 @@ _logDetail = format['[OCCUPATION:Vehicle] Started']; // set the default side for bandit AI _side = "bandit"; -if(SC_occupyVehicleSurvivors) then -{ - if(!isNil "DMS_Enable_RankChange") then { DMS_Enable_RankChange = true; }; -}; - // more than _scaleAI players on the server and the max AI count drops per additional player _currentPlayerCount = count playableUnits; _maxAIcount = SC_maxAIcount; @@ -35,35 +30,16 @@ if((_aiActive > _maxAIcount) && !SC_occupyVehicleIgnoreCount) exitWith if(SC_liveVehicles >= SC_maxNumberofVehicles) exitWith { - if(SC_extendedLogging) then - { - _logDetail = format['[OCCUPATION:Vehicle] End check %1 currently active (max %2) @ %3',SC_liveVehicles,SC_maxNumberofVehicles,time]; - [_logDetail] call SC_fnc_log; - }; + _logDetail = format['[OCCUPATION:Vehicle] End check %1 currently active (max %2) @ %3',SC_liveVehicles,SC_maxNumberofVehicles,time]; + [_logDetail] call SC_fnc_log; }; _vehiclesToSpawn = (SC_maxNumberofVehicles - SC_liveVehicles); - -if(SC_extendedLogging) then -{ - if(_vehiclesToSpawn > 0) then - { - _logDetail = format['[OCCUPATION:Vehicle] Started %2 currently active (max %3) spawning %1 extra vehicle(s) @ %4',_vehiclesToSpawn,SC_liveVehicles,SC_maxNumberofVehicles,time]; - [_logDetail] call SC_fnc_log; - } - else - { - _logDetail = format['[OCCUPATION:Vehicle] Started %2 currently active (max %3) @ %4',_vehiclesToSpawn,SC_liveVehicles,SC_maxNumberofVehicles,time]; - [_logDetail] call SC_fnc_log; - }; - -}; - _middle = worldSize/2; _spawnCenter = [_middle,_middle,0]; _maxDistance = _middle; -if(_vehiclesToSpawn >= 1) then +if(_vehiclesToSpawn > 0) then { if(SC_occupyVehicleSurvivors) then { @@ -88,8 +64,8 @@ if(_vehiclesToSpawn >= 1) then if(SC_occupyVehicleUseFixedPos) then { { - _vehLocation = _x getVariable "SC_vehicleSpawnLocation"; - _locationArray = _locationArray - _vehLocation; + _vehLocation = _x getVariable "SC_vehicleSpawnLocation"; + _locationArray = _locationArray - [_vehLocation]; }forEach SC_liveVehiclesArray; if(count _locationArray > 0) then @@ -98,7 +74,7 @@ if(_vehiclesToSpawn >= 1) then diag_log format["_randomLocation: %1",_randomLocation]; _spawnLocation = _randomLocation select 0; _radius = _randomLocation select 1; - _locationArray = _locationArray - _randomLocation; + _locationArray = _locationArray - [_randomLocation]; } else { @@ -120,7 +96,7 @@ if(_vehiclesToSpawn >= 1) then _group = createGroup SC_SurvivorSide; }; _group setVariable ["DMS_AllowFreezing",false]; - _group setVariable ["DMS_LockLocality",true]; + _group setVariable ["DMS_LockLocality",false]; _group setVariable ["DMS_SpawnedGroup",true]; _group setVariable ["DMS_Group_Side", _side]; @@ -170,8 +146,9 @@ if(_vehiclesToSpawn >= 1) then SC_liveVehicles = SC_liveVehicles + 1; SC_liveVehiclesArray = SC_liveVehiclesArray + [_vehicle]; - _vehicle setVariable["vehPos",_spawnLocation,true]; - _vehicle setVariable["vehClass",_VehicleClassToUse,true]; + _vehicle setVariable ["vehPos",_spawnLocation,true]; + _vehicle setVariable ["SC_repairStatus",false]; + _vehicle setVariable ["vehClass",_VehicleClassToUse,true]; _vehicle setVariable ["SC_vehicleSpawnLocation", [_spawnLocation,_radius,worldName],true]; _vehicle setFuel 1; _vehicle engineOn true;