From 9768ca96f0aad87434f05079417fc62f77a7015b Mon Sep 17 00:00:00 2001 From: vbawol Date: Tue, 12 Mar 2013 13:31:50 -0500 Subject: [PATCH] 0.996c + Removed cfgtowngenerator /stream_locationCheck; loop entirely. Tests show to have improved fps. + Added disabling zombies servers side for server side performance increase/testing. + Fixed crafting error from 0.996b. + Revert helicopter intel removal test. --- dayz_code/actions/player_craftItem.sqf | 10 ++-- dayz_code/cfgVehicles.hpp | 58 +++++++++---------- dayz_code/compile/zombie_generate.sqf | 2 + dayz_code/init/publicEH.sqf | 3 + dayz_code/init/variables.sqf | 4 +- dayz_code/system/player_monitor.fsm | 6 -- dayz_server/compile/server_handleZedSpawn.sqf | 1 - 7 files changed, 41 insertions(+), 43 deletions(-) diff --git a/dayz_code/actions/player_craftItem.sqf b/dayz_code/actions/player_craftItem.sqf index 56a2dcec2..faa33b71d 100644 --- a/dayz_code/actions/player_craftItem.sqf +++ b/dayz_code/actions/player_craftItem.sqf @@ -73,10 +73,10 @@ if (inflamed cursorTarget and _canDo) then { // Moved all recipes input and outputs to configs - _selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Crafting" >> "output") select 0; - _selectedRecipe = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Crafting" >> "input") select 0; + _selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Crafting" >> "output"); + _selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Crafting" >> "input"); - diag_log format["Selected Recipe Input: %1", _selectedRecipe]; + diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; _proceed = true; @@ -95,7 +95,7 @@ if (inflamed cursorTarget and _canDo) then { if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipe; + } forEach _selectedRecipeInput; if (_proceed) then { player playActionNow "Medic"; @@ -121,7 +121,7 @@ if (inflamed cursorTarget and _canDo) then { } forEach magazines player; - } forEach _selectedRecipe; + } forEach _selectedRecipeInput; // Put items { diff --git a/dayz_code/cfgVehicles.hpp b/dayz_code/cfgVehicles.hpp index d20d6b50c..eddfa6ad1 100644 --- a/dayz_code/cfgVehicles.hpp +++ b/dayz_code/cfgVehicles.hpp @@ -154,9 +154,9 @@ class Citizen1; // External class reference hiddenSelections[] = {}; class TransportMagazines{}; class TransportWeapons{}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 10; transportMaxMagazines = 50; transportmaxbackpacks = 10; @@ -184,9 +184,9 @@ class Citizen1; // External class reference typicalCargo[] = {}; class TransportMagazines{}; class TransportWeapons{}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 10; transportMaxMagazines = 50; transportmaxbackpacks = 10; @@ -219,9 +219,9 @@ class Citizen1; // External class reference hiddenSelections[] = {}; class TransportMagazines{}; class TransportWeapons{}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 5; transportMaxMagazines = 25; transportmaxbackpacks = 4; @@ -261,9 +261,9 @@ class Citizen1; // External class reference class TransportWeapons{}; weapons[] = {}; magazines[] = {}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 3; transportMaxMagazines = 10; transportmaxbackpacks = 2; @@ -277,9 +277,9 @@ class Citizen1; // External class reference displayName = "CH-47F"; crew = ""; typicalCargo[] = {}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 10; transportMaxMagazines = 200; transportmaxbackpacks = 5; @@ -571,9 +571,9 @@ class Citizen1; // External class reference class TransportWeapons{}; weapons[] = {}; magazines[] = {}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 3; transportMaxMagazines = 20; transportmaxbackpacks = 5; @@ -956,7 +956,7 @@ class Citizen1; // External class reference mapsize = 2; model = "\ca\weapons_e\AmmoBoxes\backpack_tk_alice.p3d"; transportMaxWeapons = 2; - transportMaxMagazines = 16; + transportMaxMagazines = 0; }; class DZ_TK_Assault_Pack_EP1 : Bag_Base_BAF @@ -968,7 +968,7 @@ class Citizen1; // External class reference icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa"; model = "\ca\weapons_e\AmmoBoxes\backpack_civil_assault.p3d"; transportMaxWeapons = 2; - transportMaxMagazines = 16; + transportMaxMagazines = 0; }; class DZ_British_ACU : Bag_Base_BAF @@ -1022,9 +1022,9 @@ class Citizen1; // External class reference weapons[] = {}; magazines[] = {}; gunnerHasFlares = false; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 10; transportMaxMagazines = 80; transportmaxbackpacks = 15; @@ -1174,9 +1174,9 @@ class Citizen1; // External class reference hiddenSelections[] = {}; class TransportMagazines{}; class TransportWeapons{}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 5; transportMaxMagazines = 25; transportmaxbackpacks = 4; @@ -1191,9 +1191,9 @@ class Citizen1; // External class reference hiddenSelections[] = {}; class TransportMagazines{}; class TransportWeapons{}; - commanderCanSee = 2; - gunnerCanSee = 2; - driverCanSee = 2; + commanderCanSee = 2+16+32; + gunnerCanSee = 2+16+32; + driverCanSee = 2+16+32; transportMaxWeapons = 5; transportMaxMagazines = 25; transportmaxbackpacks = 4; diff --git a/dayz_code/compile/zombie_generate.sqf b/dayz_code/compile/zombie_generate.sqf index 9fa8e387c..5c480c3ac 100644 --- a/dayz_code/compile/zombie_generate.sqf +++ b/dayz_code/compile/zombie_generate.sqf @@ -30,6 +30,8 @@ if (_doLoiter) then { }; //diag_log ("Spawned: " + str([_type, _position, [], _radius, _method])); _agent = createAgent [_type, _position, [], _radius, _method]; +dayzSpawnZed = [_agent]; +publicVariableServer "dayzSpawnZed"; if (_doLoiter) then { _agent setPosATL _position; diff --git a/dayz_code/init/publicEH.sqf b/dayz_code/init/publicEH.sqf index eb45ed77e..a9188ec43 100644 --- a/dayz_code/init/publicEH.sqf +++ b/dayz_code/init/publicEH.sqf @@ -43,6 +43,9 @@ if (isServer) then { "dayzDeleteObj" addPublicVariableEventHandler {(_this select 1) spawn server_deleteObj}; "atp" addPublicVariableEventHandler { _array = _this select 1; diag_log format["TELEPORT REVERT: %1 (%2) from %3 to %4 now at %5", _array select 0, _array select 1, _array select 2, _array select 3, _array select 4];}; + // disable zombies server side + "dayzSpawnZed" addPublicVariableEventHandler {(_this select 1) spawn server_handleZedSpawn}; + // Dayz epoch custom "dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh}; "dayzPublishVeh2" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh2}; diff --git a/dayz_code/init/variables.sqf b/dayz_code/init/variables.sqf index 568e0a14d..f456538dc 100644 --- a/dayz_code/init/variables.sqf +++ b/dayz_code/init/variables.sqf @@ -430,8 +430,8 @@ if(!isDedicated) then { dayz_Locations set [count dayz_Locations, [_location,_locHdr,_size]]; }; }; - _cfgLocation = configFile >> "CfgTownGenerator"; - _cfgLocation call _funcGetLocation; + //_cfgLocation = configFile >> "CfgTownGenerator"; + //_cfgLocation call _funcGetLocation; dayz_buildingMonitor = []; //Buildings to check dayz_bodyMonitor = []; diff --git a/dayz_code/system/player_monitor.fsm b/dayz_code/system/player_monitor.fsm index c3230a940..5b7be714b 100644 --- a/dayz_code/system/player_monitor.fsm +++ b/dayz_code/system/player_monitor.fsm @@ -1112,12 +1112,6 @@ class FSM " };" \n "};" \n "" \n - "dayz_locationCheck = [] spawn {" \n - " while {true} do {" \n - " call stream_locationCheck;" \n - " sleep 2;" \n - " };" \n - "};" \n "dayz_friendliesCheck = [] spawn {" \n " while {true} do {" \n " call player_friendliesCheck;" \n diff --git a/dayz_server/compile/server_handleZedSpawn.sqf b/dayz_server/compile/server_handleZedSpawn.sqf index a42232056..2de9e6813 100644 --- a/dayz_server/compile/server_handleZedSpawn.sqf +++ b/dayz_server/compile/server_handleZedSpawn.sqf @@ -1,4 +1,3 @@ private["_zed"]; _zed = _this select 0; - _zed enableSimulation false; \ No newline at end of file