mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
changelog and bunker loot spawning fixes
respawn bunkers on first spawn, to see if this fixes animation issues
This commit is contained in:
parent
02eb814715
commit
50923897ef
@ -28,8 +28,17 @@ private ["_cfgBaseBuilding","_class","_color","_colors","_config","_delete","_di
|
|||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
params [["_building",objNull,[objNull]], ["_lootCheckBufferLimit",333], ["_lootObjectLimit",33]];
|
params [["_building",objNull,[objNull]], ["_lootCheckBufferLimit",333], ["_lootObjectLimit",33]];
|
||||||
|
|
||||||
|
_selectedConfig = typeOf _building;
|
||||||
|
if (_selectedConfig isEqualTo "") then {
|
||||||
|
(getModelInfo _building) params [["_modelName",""]];
|
||||||
|
if (!isnil "_modelName") then {
|
||||||
|
// replace spaces and periods with underscores
|
||||||
|
_selectedConfig = (_modelName splitString " .") joinString "_";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
_masterConfig = 'CfgBuildingLootPos' call EPOCH_returnConfig;
|
_masterConfig = 'CfgBuildingLootPos' call EPOCH_returnConfig;
|
||||||
_config = _masterConfig >> (typeOf _building);
|
_config = _masterConfig >> _selectedConfig;
|
||||||
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig;
|
||||||
|
|
||||||
// exit with false if building is not lootable
|
// exit with false if building is not lootable
|
||||||
|
@ -4768,6 +4768,7 @@ class CfgBuildingLootPos
|
|||||||
{ {-5.7334,5.8186,0.188561}, 355.754 }
|
{ {-5.7334,5.8186,0.188561}, 355.754 }
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
class 4_way_bunker_p3d : bunker_epoch {};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*[[[end]]]*/
|
/*[[[end]]]*/
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_bunker_event/EpochEvents/BunkerSpawner.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_bunker_event/EpochEvents/BunkerSpawner.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_allBunkers","_animationStates","_bunkerClasses","_bunkerCounter","_bunkerLocationsKey","_bunkerLocationsTMP","_colCount","_debug","_debugLocation","_expiresBunker","_firstBunker","_instanceID","_list","_loc1","_location","_maxBunkerLimitPerRow","_maxBunkerLimitSlots","_maxColumns","_memoryPoints","_modelInfo","_newBunkerCounter","_object","_originalLocation","_pOffset","_response","_rng","_rngChance","_rowCount","_score","_scriptHiveKey","_seed","_selectedBunker","_size","_veh"];
|
private ["_allBunkers","_animationStates","_bunkerClasses","_bunkerCounter","_bunkerLocationsKey","_bunkerLocations","_colCount","_debug","_debugLocation","_expiresBunker","_firstBunker","_instanceID","_list","_loc1","_location","_maxBunkerLimitPerRow","_maxBunkerLimitSlots","_maxColumns","_memoryPoints","_modelInfo","_newBunkerCounter","_object","_originalLocation","_pOffset","_response","_rng","_rngChance","_rowCount","_score","_scriptHiveKey","_seed","_selectedBunker","_size","_veh"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
if (worldName == "VR") then {
|
if (worldName == "VR") then {
|
||||||
|
|
||||||
@ -26,52 +26,35 @@ if (worldName == "VR") then {
|
|||||||
_maxBunkerLimitPerRow = 10;
|
_maxBunkerLimitPerRow = 10;
|
||||||
|
|
||||||
_rngChance = 0; // Lower this to spawn more positions
|
_rngChance = 0; // Lower this to spawn more positions
|
||||||
_scriptHiveKey = "EPOCH:DynamicBunker"; // change this to force a new seed to be generated.
|
_scriptHiveKey = "EPOCH:DynamicBunker007"; // change this to force a new seed to be generated.
|
||||||
|
|
||||||
_bunkerLocationsKey = format ["%1:%2", _instanceID, worldname];
|
_bunkerLocationsKey = format ["%1:%2", _instanceID, worldname];
|
||||||
_response = [_scriptHiveKey, _bunkerLocationsKey] call EPOCH_fnc_server_hiveGETRANGE;
|
_response = [_scriptHiveKey, _bunkerLocationsKey] call EPOCH_fnc_server_hiveGETRANGE;
|
||||||
_response params [["_status",0],["_data",[]] ];
|
_response params [["_status",0],["_data",[]] ];
|
||||||
|
|
||||||
_firstBunker = objNull;
|
_firstBunker = objNull;
|
||||||
|
_bunkerLocations = [];
|
||||||
|
|
||||||
// check for proper return and data type
|
// check for proper return and data type
|
||||||
if (_status == 1 && _data isEqualType [] && !(_data isEqualTo [])) then {
|
if (_status == 1 && _data isEqualType [] && !(_data isEqualTo [])) then {
|
||||||
|
_bunkerLocations = _data;
|
||||||
// spawn cached bunker
|
|
||||||
{
|
|
||||||
if (_x isEqualType [] && !(_x isEqualTo [])) then {
|
|
||||||
_x params ["_selectedBunker", "_posWorld", ["_memoryPointsStatus",[]] ];
|
|
||||||
_object = createSimpleObject [_selectedBunker, _posWorld];
|
|
||||||
if (isNull _firstBunker) then {_firstBunker = _object;};
|
|
||||||
{
|
|
||||||
_object animate [_x,(_memoryPointsStatus param [_forEachIndex,1]),true];
|
|
||||||
} forEach _memoryPoints;
|
|
||||||
_bunkerCounter = _bunkerCounter + 1;
|
|
||||||
};
|
|
||||||
} forEach _data;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// generate new bunker
|
// generate new bunker
|
||||||
_size = 13.081;
|
_size = 13.081;
|
||||||
_maxColumns = _maxBunkerLimitSlots / _maxBunkerLimitPerRow;
|
_maxColumns = _maxBunkerLimitSlots / _maxBunkerLimitPerRow;
|
||||||
_allBunkers = [];
|
_allBunkers = [];
|
||||||
_bunkerLocationsTMP = [];
|
|
||||||
_newBunkerCounter = 0;
|
_newBunkerCounter = 0;
|
||||||
|
|
||||||
// Generate Seed
|
// Generate Seed
|
||||||
_seed = random 999999;
|
_seed = random 999999;
|
||||||
diag_log format["Generating bunker with seed: %1",_seed];
|
diag_log format["Generating bunker with seed: %1",_seed];
|
||||||
_location = ATLToASL _debugLocation;
|
_location = ATLToASL _debugLocation;
|
||||||
_originalLocation = +_location;
|
_originalLocation = +_location;
|
||||||
|
|
||||||
_bunkerClasses = [
|
_bunkerClasses = [
|
||||||
"bunker_epoch"
|
"bunker_epoch"
|
||||||
];
|
];
|
||||||
|
|
||||||
_rowCount = 0;
|
_rowCount = 0;
|
||||||
_colCount = 0;
|
_colCount = 0;
|
||||||
|
|
||||||
//spawn x number of connected bunkers.
|
//spawn x number of connected bunkers.
|
||||||
while {true} do {
|
while {true} do {
|
||||||
if (_colCount > _maxColumns) exitWith {};
|
if (_colCount > _maxColumns) exitWith {};
|
||||||
@ -79,9 +62,7 @@ if (worldName == "VR") then {
|
|||||||
if (_rng > _rngChance) then {
|
if (_rng > _rngChance) then {
|
||||||
_selectedBunker = selectRandom _bunkerClasses;
|
_selectedBunker = selectRandom _bunkerClasses;
|
||||||
_object = createSimpleObject [_selectedBunker, _location];
|
_object = createSimpleObject [_selectedBunker, _location];
|
||||||
if (isNull _firstBunker) then {_firstBunker = _object;};
|
|
||||||
_allBunkers pushBack _object;
|
_allBunkers pushBack _object;
|
||||||
//_bunkerLocationsTMP pushBack [_selectedBunker,getPosWorld _object, vectorDir _object, vectorUp _object];
|
|
||||||
_newBunkerCounter = _newBunkerCounter + 1;
|
_newBunkerCounter = _newBunkerCounter + 1;
|
||||||
};
|
};
|
||||||
_location set [0,(_location select 0) + _size];
|
_location set [0,(_location select 0) + _size];
|
||||||
@ -104,23 +85,35 @@ if (worldName == "VR") then {
|
|||||||
_loc1 = _veh modelToWorldVisual _pOffset;
|
_loc1 = _veh modelToWorldVisual _pOffset;
|
||||||
_list = nearestObjects[_loc1, [], 1];
|
_list = nearestObjects[_loc1, [], 1];
|
||||||
if !(_list isEqualTo []) then {
|
if !(_list isEqualTo []) then {
|
||||||
_veh animate [_x,0,true];
|
|
||||||
_score = _score + 1;
|
_score = _score + 1;
|
||||||
_animationStates pushBack 0
|
_animationStates pushBack 0
|
||||||
} else {
|
} else {
|
||||||
_veh animate [_x,1,true];
|
|
||||||
_animationStates pushBack 1
|
_animationStates pushBack 1
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} forEach _memoryPoints;
|
} forEach _memoryPoints;
|
||||||
_modelInfo = getModelInfo _veh;
|
_modelInfo = getModelInfo _veh;
|
||||||
_bunkerLocationsTMP pushBack [_modelInfo select 1, getPosWorld _veh, _animationStates, _score];
|
_bunkerLocations pushBack [_modelInfo select 1, getPosWorld _veh, _animationStates, _score];
|
||||||
} forEach _allBunkers;
|
} forEach _allBunkers;
|
||||||
|
// remove temp bunkers
|
||||||
|
_allBunkers apply {deleteVehicle _x};
|
||||||
// save to DB
|
// save to DB
|
||||||
[_scriptHiveKey, _bunkerLocationsKey, _expiresBunker, _bunkerLocationsTMP] call EPOCH_fnc_server_hiveSETEX;
|
[_scriptHiveKey, _bunkerLocationsKey, _expiresBunker, _bunkerLocations] call EPOCH_fnc_server_hiveSETEX;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// spawn final bunkers
|
||||||
|
{
|
||||||
|
if (_x isEqualType [] && !(_x isEqualTo [])) then {
|
||||||
|
_x params ["_selectedBunker", "_posWorld", ["_memoryPointsStatus",[]] ];
|
||||||
|
_object = createSimpleObject [_selectedBunker, _posWorld];
|
||||||
|
if (isNull _firstBunker) then {_firstBunker = _object;};
|
||||||
|
{
|
||||||
|
_object animate [_x,(_memoryPointsStatus param [_forEachIndex,1]),true];
|
||||||
|
} forEach _memoryPoints;
|
||||||
|
_bunkerCounter = _bunkerCounter + 1;
|
||||||
|
};
|
||||||
|
} forEach _bunkerLocations;
|
||||||
|
|
||||||
// move respawn point into first bunker.
|
// move respawn point into first bunker.
|
||||||
if (!(isNull _firstBunker) && {_firstBunker distance _debugLocation > 1}) then {
|
if (!(isNull _firstBunker) && {_firstBunker distance _debugLocation > 1}) then {
|
||||||
deleteMarker "respawn_west";
|
deleteMarker "respawn_west";
|
||||||
|
@ -9,6 +9,7 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a
|
|||||||
- Vehicle Upgrade System - Upgrade your ride by using one of the new vehicle upgrade documents found in the world. @DirtySanchez
|
- Vehicle Upgrade System - Upgrade your ride by using one of the new vehicle upgrade documents found in the world. @DirtySanchez
|
||||||
- Vector Base Building (uses Arrow keys by default and with SHIFT / ALT you can control the steps). @DirtySanchez & @Ignatz-Heman
|
- Vector Base Building (uses Arrow keys by default and with SHIFT / ALT you can control the steps). @DirtySanchez & @Ignatz-Heman
|
||||||
- New Base Building Objects: Quarter and Half wood floors @DirtySanchez, Cinder block floor, Cinder wall with a window. Metal and Cinder Towers @Helion4.
|
- New Base Building Objects: Quarter and Half wood floors @DirtySanchez, Cinder block floor, Cinder wall with a window. Metal and Cinder Towers @Helion4.
|
||||||
|
- Added the following new buildables (bringing most buildables from A2/Epoch to A3 using standard ARMA models): Burn Barrel, Light Pole, Small (forest and desert) Camo Nets, Large (forest and desert) Camo Nets, Camp Fire, Field Toilet, Scaffolding, Sink (water source), Single and Double Portable Lights, Lifeguard Tower, Sun Shade, Fuel Pump, Small Sandbag Bunker, Short Sandbag Wall, Long Sandbag Wall, Bar Gate and Water Pump, @morgoth0 (Grahame) and @DirtySanchez
|
||||||
- A-frame and Dome tents as insecure storage objects. @morgoth0, @DirtySanchez, @Helion4
|
- A-frame and Dome tents as insecure storage objects. @morgoth0, @DirtySanchez, @Helion4
|
||||||
- Farming system - craft-able garden plot allows you to grow seeds into mature plants. Models by @Helion4, configs by @DirtySanchez
|
- Farming system - craft-able garden plot allows you to grow seeds into mature plants. Models by @Helion4, configs by @DirtySanchez
|
||||||
- Medical items: Adrenaline Shot (adrenaline_epoch), Caffeine Pills (caffeinepills_epoch). Orlistat Pills (orlistat_epoch) by @Helion4 and configs by @DirtySanchez
|
- Medical items: Adrenaline Shot (adrenaline_epoch), Caffeine Pills (caffeinepills_epoch). Orlistat Pills (orlistat_epoch) by @Helion4 and configs by @DirtySanchez
|
||||||
|
Loading…
Reference in New Issue
Block a user