+ added allowed objects list for mpkilled and publishing objects
+ added missing vaultstorage to gear sync
+ fixed broken maxLocalZombies override via mission init.sqf
This commit is contained in:
vbawol
2013-02-22 09:01:35 -06:00
parent 0aaf2438cb
commit f5c738b74d
5 changed files with 10 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
private ["_objects"];
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage","VaultStorage"], 10];
{
["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
} foreach _objects;

View File

@@ -32,6 +32,7 @@ TK_INS_Warlord_EP1_DZ = "TK_INS_Warlord_EP1_DZ";
AllPlayers = ["SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ"];
AllPlayersVehicles = ["SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","AllVehicles"];
dayz_allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ"];
PZombie_VB = "PZombie_VB";
@@ -266,7 +267,7 @@ DAYZ_agentnumber = 0;
dayz_animalDistance = 800;
dayz_zSpawnDistance = 1000;
if(isNil "dayzTraderMenuResult") then {
if(isNil "dayz_maxLocalZombies") then {
dayz_maxLocalZombies = 40;
};

View File

@@ -24,7 +24,7 @@ _key call server_hiveWrite;
_object setVariable ["ObjectUID", _uid,true];
if (_object isKindOf "TentStorage") then {
if ((typeOf _object) in dayz_allowedObjects) then {
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
};

View File

@@ -49,16 +49,16 @@ vehicle_handleServerKilled = {
};
check_publishobject = {
private["_allowed","_allowedObjects","_object"];
private["_allowed","_object","_playername"];
_object = _this select 0;
_playername = _this select 1;
_allowedObjects = ["TentStorage", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ"];
_allowed = false;
diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername];
if ((typeOf _object) in _allowedObjects) then {
if ((typeOf _object) in dayz_allowedObjects) then {
diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
_allowed = true;
};

View File

@@ -98,8 +98,10 @@ diag_log "HIVE: Starting";
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
if (_object isKindOf "TentStorage" or _object isKindOf "Land_HBarrier1" or _object isKindOf "Wall_FenW2_6_EP1") then {
if ((typeOf _object) in dayz_allowedObjects) then {
// Forces object to ground may not be needed
_pos set [2,0];
// Must be set to damage buildables
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
};