mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
cleanup
This commit is contained in:
parent
47e16a8318
commit
2cffcbc740
@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
Author: Aaron Clark - EpochMod.com
|
|
||||||
|
|
||||||
Contributors:
|
|
||||||
|
|
||||||
Description:
|
|
||||||
Sends message server to save custom variables from player
|
|
||||||
|
|
||||||
Licence:
|
|
||||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
||||||
|
|
||||||
Github:
|
|
||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/functions/EPOCH_pushCustomVar.sqf
|
|
||||||
|
|
||||||
Example:
|
|
||||||
true call EPOCH_pushCustomVar;
|
|
||||||
|
|
||||||
Parameter(s):
|
|
||||||
_this: BOOL - true = fast save, false = slow save window
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
NOTHING
|
|
||||||
*/
|
|
||||||
//[[[cog import generate_private_arrays ]]]
|
|
||||||
private ["_customVars","_lastSave","_time"];
|
|
||||||
//[[[end]]]
|
|
||||||
_time = if (_this) then [{15},{80}];
|
|
||||||
_lastSave = missionNamespace getVariable["EPOCH_lastSave", diag_tickTime];
|
|
||||||
if ((diag_tickTime - _lastSave) >= _time) then {
|
|
||||||
_customVars = [];
|
|
||||||
{
|
|
||||||
_customVars pushBack (missionNamespace getVariable format["EPOCH_player%1",_x]);
|
|
||||||
} forEach (missionNamespace getVariable["EPOCH_customVars", []]);
|
|
||||||
[player,_customVars,missionNamespace getVariable "Epoch_personalToken"] remoteExec ["EPOCH_fnc_savePlayer",2];
|
|
||||||
missionNamespace setVariable["EPOCH_lastSave", diag_tickTime];
|
|
||||||
};
|
|
@ -149,10 +149,13 @@ _lootClasses = [];
|
|||||||
_lootClassesIgnore = ['Default'];
|
_lootClassesIgnore = ['Default'];
|
||||||
'_cN = configName _x;if !(_cN in _lootClassesIgnore)then{_lootClasses pushBackUnique _cN}; true' configClasses _masterConfig;
|
'_cN = configName _x;if !(_cN in _lootClassesIgnore)then{_lootClasses pushBackUnique _cN}; true' configClasses _masterConfig;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_lastPlayerPos = getPosATL player;
|
||||||
_lootBubble = {
|
_lootBubble = {
|
||||||
private["_jammer", "_others", "_objects", "_nearObjects", "_building", "_lootDist", "_lootLoc", "_playerPos", "_distanceTraveled"];
|
private["_jammer", "_others", "_objects", "_nearObjects", "_building", "_lootDist", "_lootLoc", "_playerPos", "_distanceTraveled"];
|
||||||
_playerPos = getPosATL vehicle player;
|
_playerPos = getPosATL vehicle player;
|
||||||
_distanceTraveled = EPOCH_lastPlayerPos distance _playerPos;
|
_distanceTraveled = _lastPlayerPos distance _playerPos;
|
||||||
if (_distanceTraveled > 10 && _distanceTraveled < 200) then {
|
if (_distanceTraveled > 10 && _distanceTraveled < 200) then {
|
||||||
_lootDist = 30 + _distanceTraveled;
|
_lootDist = 30 + _distanceTraveled;
|
||||||
_lootLoc = player getRelPos [_lootDist, (random [-180,0,180])];
|
_lootLoc = player getRelPos [_lootDist, (random [-180,0,180])];
|
||||||
@ -172,7 +175,7 @@ _lootBubble = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
EPOCH_lastPlayerPos = _playerPos;
|
_lastPlayerPos = _playerPos;
|
||||||
};
|
};
|
||||||
|
|
||||||
// init weather temperature var if not already set
|
// init weather temperature var if not already set
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/both_init.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/init/both_init.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_antagonistSpawnDefaults","_cfgDynamicSimulation","_communityStatsInit","_customVarsInit","_dynSimToggle","_say3dsounds","_say3dsoundsConfig","_spawnLimits"];
|
private ["_cfgDynamicSimulation","_communityStatsInit","_customVarsInit","_dynSimToggle"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
|
|
||||||
// detect if Ryan's Zombies and Deamons mod is present
|
// detect if Ryan's Zombies and Deamons mod is present
|
||||||
@ -89,16 +89,9 @@ EPOCH_communityStatsCount = count EPOCH_communityStats;
|
|||||||
//GroupSize (number) // Price (String)
|
//GroupSize (number) // Price (String)
|
||||||
EPOCH_group_upgrade_lvl = ["CfgEpochClient", "group_upgrade_lvl", [4,"100",6,"300",8,"500",10,"1000",12,"1500",13,"1750",14,"2000",15,"3000",16,"5000"]] call EPOCH_fnc_returnConfigEntryV2;
|
EPOCH_group_upgrade_lvl = ["CfgEpochClient", "group_upgrade_lvl", [4,"100",6,"300",8,"500",10,"1000",12,"1500",13,"1750",14,"2000",15,"3000",16,"5000"]] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
|
|
||||||
// Init 3d sound handler
|
|
||||||
EPOCH_sounds = [];
|
|
||||||
_say3dsoundsConfig = 'CfgSay3Dhandler' call EPOCH_returnConfig;
|
|
||||||
_say3dsounds = "isClass _x" configClasses (_say3dsoundsConfig);
|
|
||||||
{
|
|
||||||
EPOCH_sounds pushBack (configName _x);
|
|
||||||
} forEach _say3dsounds;
|
|
||||||
|
|
||||||
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
|
// disable remote sensors on server and client as all Epoch AI is local to the side controlling it.
|
||||||
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
|
disableRemoteSensors (["CfgEpochClient", "disableRemoteSensors", true] call EPOCH_fnc_returnConfigEntryV2);
|
||||||
|
|
||||||
// Enable Dynamic simulation on both server and clients (maybe only needed server side)
|
// Enable Dynamic simulation on both server and clients (maybe only needed server side)
|
||||||
// DynSim is handled locally and yes server and clients will need these configurations
|
// DynSim is handled locally and yes server and clients will need these configurations
|
||||||
_dynSimToggle = ["CfgDynamicSimulation", "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2;
|
_dynSimToggle = ["CfgDynamicSimulation", "enableDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
|
@ -31,11 +31,9 @@ EPOCH_tradeDone = false;
|
|||||||
EPOCH_bankBalance = 0;
|
EPOCH_bankBalance = 0;
|
||||||
EPOCH_antiWallCount = 0;
|
EPOCH_antiWallCount = 0;
|
||||||
EPOCH_lastTargetTime = diag_tickTime;
|
EPOCH_lastTargetTime = diag_tickTime;
|
||||||
EPOCH_lastSave = diag_tickTime;
|
|
||||||
EPOCH_arr_countdown = [];
|
EPOCH_arr_countdown = [];
|
||||||
EP_light = objNull;
|
EP_light = objNull;
|
||||||
EPOCH_p2ptradeTarget = objNull;
|
EPOCH_p2ptradeTarget = objNull;
|
||||||
EPOCH_lastPlayerPos = getPosATL player;
|
|
||||||
EPOCH_Holstered = "";
|
EPOCH_Holstered = "";
|
||||||
Epoch_invited_GroupUID = "";
|
Epoch_invited_GroupUID = "";
|
||||||
Epoch_invited_GroupName = "";
|
Epoch_invited_GroupName = "";
|
||||||
@ -47,7 +45,6 @@ Epoch_invited_tempGroupName = "";
|
|||||||
Epoch_invited_tempGroupUIDs = [];
|
Epoch_invited_tempGroupUIDs = [];
|
||||||
Epoch_invited_tempGroupUIDsPrev = [];
|
Epoch_invited_tempGroupUIDsPrev = [];
|
||||||
Epoch_my_tempGroup = [];
|
Epoch_my_tempGroup = [];
|
||||||
EPOCH_lastPlayerPos = [0,0,0];
|
|
||||||
EPOCH_prevOffer = [];
|
EPOCH_prevOffer = [];
|
||||||
EPOCH_drawIcon3d = false;
|
EPOCH_drawIcon3d = false;
|
||||||
EPOCH_velTransform = false;
|
EPOCH_velTransform = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user