From 59905c1d18042d9670a7470b1e05960dab688d94 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sun, 26 May 2013 12:23:31 -0500 Subject: [PATCH] private array updates + fixes --- dayz_code/actions/ammo.sqf | 2 +- dayz_code/actions/boil.sqf | 2 +- dayz_code/actions/build.sqf | 2 +- dayz_code/actions/call_zombies.sqf | 4 +- dayz_code/actions/cargocheck.sqf | 2 +- dayz_code/actions/cook.sqf | 2 +- dayz_code/actions/disassemble.sqf | 1 + dayz_code/actions/dog/feed.sqf | 2 +- dayz_code/actions/engineer.sqf | 1 + dayz_code/actions/engineer_upgrade.sqf | 1 + dayz_code/actions/fill_nearestVehicle.sqf | 4 +- dayz_code/actions/fill_startGenerator.sqf | 2 +- dayz_code/actions/flare_pickup.sqf | 2 +- dayz_code/actions/forcesave.sqf | 5 +- dayz_code/actions/gather_meat.sqf | 4 +- dayz_code/actions/gather_zparts.sqf | 10 +-- dayz_code/actions/jerry_fill.sqf | 6 +- dayz_code/actions/list_playerDeaths.sqf | 2 +- dayz_code/actions/object_pickup.sqf | 4 +- dayz_code/actions/pack.sqf | 1 + dayz_code/actions/player_addToolbelt.sqf | 2 +- dayz_code/actions/player_build.sqf | 6 +- dayz_code/actions/player_chopWood.sqf | 4 +- dayz_code/actions/player_copyKey.sqf | 2 +- dayz_code/actions/player_drink.sqf | 2 +- dayz_code/actions/player_dropWeapon.sqf | 2 +- dayz_code/actions/player_eat.sqf | 4 +- dayz_code/actions/player_flipvehicle.sqf | 4 +- dayz_code/actions/player_makefire.sqf | 4 +- dayz_code/actions/player_reloadMags.sqf | 2 +- dayz_code/actions/player_setTrap.sqf | 7 +- dayz_code/actions/player_tagFriendly.sqf | 4 +- dayz_code/actions/player_useMeds.sqf | 2 +- dayz_code/actions/player_wearClothes.sqf | 2 +- dayz_code/actions/pzombie/pz_feed.sqf | 7 +- dayz_code/actions/pzombie/pz_vision.sqf | 2 +- dayz_code/actions/pzombie/pz_vision_ap.sqf | 2 +- dayz_code/actions/pzombie/pz_vision_rbg1.sqf | 2 +- dayz_code/actions/refuel.sqf | 2 +- dayz_code/actions/remove.sqf | 2 +- dayz_code/actions/repair.sqf | 2 +- dayz_code/actions/repair_vehicle.sqf | 4 +- dayz_code/actions/salvage.sqf | 11 +--- dayz_code/actions/salvage_vehicle.sqf | 6 +- dayz_code/actions/sell_db.sqf | 16 ++--- dayz_code/actions/siphonFuel.sqf | 4 +- dayz_code/actions/stopGenerator.sqf | 2 +- dayz_code/actions/tame_dog.sqf | 4 +- dayz_code/actions/tent_pitch.sqf | 2 +- dayz_code/actions/trade_backpacks.sqf | 2 +- dayz_code/actions/trade_cancel.sqf | 2 +- dayz_code/actions/trade_items.sqf | 2 +- dayz_code/actions/trade_items_wo_db.sqf | 4 +- dayz_code/actions/trade_metals.sqf | 2 +- dayz_code/actions/trade_weapons.sqf | 2 +- dayz_code/actions/unpack.sqf | 2 + dayz_code/actions/vault_pitch.sqf | 1 + dayz_code/actions/water_fill.sqf | 4 +- .../cfgworlds/intro.Chernarus/initIntro.sqf | 1 + dayz_code/compile/building_spawnLoot.sqf | 2 +- dayz_code/compile/building_spawnZombies.sqf | 2 +- dayz_code/compile/control_zombieAgent.sqf | 3 +- dayz_code/compile/dog_findTargetAgent.sqf | 2 +- dayz_code/compile/fn_buildWeightedArray.sqf | 4 +- dayz_code/compile/fn_curTimeStr.sqf | 1 + dayz_code/compile/fn_damageActions.sqf | 4 +- dayz_code/compile/fn_damageHandler.sqf | 14 ++-- dayz_code/compile/fn_damageHandlerVehicle.sqf | 6 +- dayz_code/compile/fn_isInsideBuilding.sqf | 4 +- dayz_code/compile/fn_selectRandomWeighted.sqf | 2 +- dayz_code/compile/fn_setpitchbank.sqf | 4 +- dayz_code/compile/fn_sunRise.sqf | 2 +- dayz_code/compile/fn_surfaceNoise.sqf | 4 +- dayz_code/compile/fn_temperatur.sqf | 12 ++-- dayz_code/compile/fn_unconscious.sqf | 3 +- dayz_code/compile/fnc_MapEventHandler.sqf | 64 +++++++++---------- dayz_code/compile/local_gutObjectZ.sqf | 4 +- dayz_code/compile/object_cargoCheck.sqf | 2 +- dayz_code/compile/object_processHit.sqf | 2 +- dayz_code/compile/object_roadFlare.sqf | 6 +- dayz_code/compile/object_setFixServer.sqf | 2 +- dayz_code/compile/object_setHit.sqf | 4 +- dayz_code/compile/object_setHitLocal.sqf | 4 +- dayz_code/compile/object_speak.sqf | 2 +- dayz_code/compile/object_vehicleKilled.sqf | 10 +-- dayz_code/compile/player_alertZombies.sqf | 2 +- dayz_code/compile/player_animalCheck.sqf | 2 +- dayz_code/compile/player_checkStealth.sqf | 4 +- dayz_code/compile/player_crossbowBolt.sqf | 2 +- dayz_code/compile/player_death.sqf | 2 +- dayz_code/compile/player_fired.sqf | 2 +- dayz_code/compile/player_friendliesCheck.sqf | 2 +- dayz_code/compile/player_gearSet.sqf | 2 +- dayz_code/compile/player_humanityChange.sqf | 4 +- dayz_code/compile/player_humanityMorph.sqf | 2 +- dayz_code/compile/player_login.sqf | 2 +- dayz_code/compile/player_music.sqf | 2 +- dayz_code/compile/player_onPause.sqf | 6 +- dayz_code/compile/player_packTent.sqf | 2 +- dayz_code/compile/player_projectileNear.sqf | 4 +- dayz_code/compile/player_spawnCheck.sqf | 6 +- dayz_code/compile/player_spawnlootCheck.sqf | 2 +- dayz_code/compile/player_spawnzedCheck.sqf | 14 ++-- dayz_code/compile/player_switchModel.sqf | 4 +- dayz_code/compile/player_tameDog.sqf | 9 +-- dayz_code/compile/player_throwObject.sqf | 2 +- dayz_code/compile/player_updateGui.sqf | 6 +- dayz_code/compile/player_weaponCheck.sqf | 4 +- dayz_code/compile/player_weaponFiredNear.sqf | 2 +- dayz_code/compile/player_zombieAttack.sqf | 9 +-- dayz_code/compile/player_zombieCheck.sqf | 5 +- dayz_code/compile/server_updatePlayer.sqf | 2 +- dayz_code/compile/spawn_loot.sqf | 6 +- dayz_code/compile/stream_locationCheck.sqf | 3 +- dayz_code/compile/tame_dog.sqf | 2 +- dayz_code/compile/ui_selectSlot.sqf | 2 +- dayz_code/init/variables.sqf | 4 ++ dayz_code/medical/transfusion.sqf | 9 +-- dayz_equip/textures/planks.rvmat | 2 +- dayz_equip/textures/rod.rvmat | 2 +- dayz_equip/textures/spindle.rvmat | 2 +- .../compile/server_publishVehicle2.sqf | 8 +-- dayz_server/compile/server_updateObject.sqf | 18 ++---- 123 files changed, 268 insertions(+), 260 deletions(-) diff --git a/dayz_code/actions/ammo.sqf b/dayz_code/actions/ammo.sqf index d8ba7446f..cdad0baa9 100644 --- a/dayz_code/actions/ammo.sqf +++ b/dayz_code/actions/ammo.sqf @@ -1,4 +1,4 @@ -private["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array"]; +private ["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array","_magazines"]; _array = _this select 3; _vehicle = _array select 0; _weapon = _array select 1; diff --git a/dayz_code/actions/boil.sqf b/dayz_code/actions/boil.sqf index 87c92ce50..24c44ee2f 100644 --- a/dayz_code/actions/boil.sqf +++ b/dayz_code/actions/boil.sqf @@ -1,4 +1,4 @@ -private["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_dis","_sfx"]; +private ["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_dis","_sfx","_removed"]; if(TradeInprogress) exitWith { cutText ["Boil already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/build.sqf b/dayz_code/actions/build.sqf index e6c77b884..9a4cf50f7 100644 --- a/dayz_code/actions/build.sqf +++ b/dayz_code/actions/build.sqf @@ -1,4 +1,4 @@ -private["_location","_isOk","_dir","_classname","_item"]; +private ["_location","_isOk","_dir","_classname","_item","_cancel","_location3","_location4","_location1","_location2","_counter","_hasbuilditem","_dis","_sfx","_object","_onLadder","_isWater","_text","_offset_x","_offset_y","_offset_z","_offset_z_attach","_tmpbuilt","_built_location"]; if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/call_zombies.sqf b/dayz_code/actions/call_zombies.sqf index 00f743c58..e76ba44b2 100644 --- a/dayz_code/actions/call_zombies.sqf +++ b/dayz_code/actions/call_zombies.sqf @@ -1,5 +1,5 @@ -private ["_item","_id"]; -_item = _this select 3; +private []; +//_item = _this select 3; // remove menu player removeAction s_player_callzombies; diff --git a/dayz_code/actions/cargocheck.sqf b/dayz_code/actions/cargocheck.sqf index ebd5e2f6d..a33cbf5fc 100644 --- a/dayz_code/actions/cargocheck.sqf +++ b/dayz_code/actions/cargocheck.sqf @@ -1,4 +1,4 @@ -private ["_vehicle","_class","_maxMagazines","_maxWeapons","_maxBackpacks","_magazineCount","_weaponsCount","_backpackCount"]; +private ["_vehicle","_class","_maxMagazines","_maxWeapons","_maxBackpacks","_magazineCount","_weaponsCount","_backpackCount","_magazineCount_raw","_weaponsCount_raw","_backpackCount_raw"]; _vehicle = _this select 3; _class = typeOf _vehicle; diff --git a/dayz_code/actions/cook.sqf b/dayz_code/actions/cook.sqf index e4bdaba7f..bd325fa1d 100644 --- a/dayz_code/actions/cook.sqf +++ b/dayz_code/actions/cook.sqf @@ -1,4 +1,4 @@ -private["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"]; +private ["_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_started","_finished","_animState","_isMedic","_removed","_dis","_sfx"]; if(TradeInprogress) exitWith { cutText ["Cooking already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/disassemble.sqf b/dayz_code/actions/disassemble.sqf index db3421e3f..e06c2f355 100644 --- a/dayz_code/actions/disassemble.sqf +++ b/dayz_code/actions/disassemble.sqf @@ -1,3 +1,4 @@ +private ["_array","_object","_inventory"]; _array = _this select 3; _object = _array select 0; _inventory = _array select 1; diff --git a/dayz_code/actions/dog/feed.sqf b/dayz_code/actions/dog/feed.sqf index 9099ac486..bea15b563 100644 --- a/dayz_code/actions/dog/feed.sqf +++ b/dayz_code/actions/dog/feed.sqf @@ -1,4 +1,4 @@ -private ["_array", "_handle", "_type", "_onLadder"]; +private ["_array","_handle","_type","_onLadder","_removed","_itemIn","_countIn"]; _array = _this select 3; _handle = _array select 0; _type = _array select 1; diff --git a/dayz_code/actions/engineer.sqf b/dayz_code/actions/engineer.sqf index c59c66781..39a7b5276 100644 --- a/dayz_code/actions/engineer.sqf +++ b/dayz_code/actions/engineer.sqf @@ -1,3 +1,4 @@ +private ["_array","_location","_dir","_classname","_magazine","_weapon"]; _array = _this select 3; _location = player modeltoworld [0,0.5,0]; _dir = (getDir player) + 180; diff --git a/dayz_code/actions/engineer_upgrade.sqf b/dayz_code/actions/engineer_upgrade.sqf index 176f3ca14..9f67e45a2 100644 --- a/dayz_code/actions/engineer_upgrade.sqf +++ b/dayz_code/actions/engineer_upgrade.sqf @@ -1,3 +1,4 @@ +private ["_array","_object","_magazine","_classname","_dir","_location","_weapon"]; _array = _this select 3; _object = _array select 0; _magazine = _array select 1; diff --git a/dayz_code/actions/fill_nearestVehicle.sqf b/dayz_code/actions/fill_nearestVehicle.sqf index 0f7abd676..7f5bdada1 100644 --- a/dayz_code/actions/fill_nearestVehicle.sqf +++ b/dayz_code/actions/fill_nearestVehicle.sqf @@ -1,4 +1,4 @@ -private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canName","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCan","_configVeh","_capacity","_nameText","_availableCansEmpty","_availableCans"]; +private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle"]; if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; @@ -75,7 +75,7 @@ if(_IsNearVehicle >= 1) then { // Get vehicle fuel levels again _curFuel = ((fuel _vehicle) * _capacity); - _newFuel = (_curFuel + 20); + _newFuel = (_curFuel + _canSize); if (_newFuel > _capacity) then {_newFuel = _capacity; _abort = true; }; diff --git a/dayz_code/actions/fill_startGenerator.sqf b/dayz_code/actions/fill_startGenerator.sqf index 4e99fa278..5729f19f6 100644 --- a/dayz_code/actions/fill_startGenerator.sqf +++ b/dayz_code/actions/fill_startGenerator.sqf @@ -1,4 +1,4 @@ -private ["_vehicle","_started","_finished","_animState","_isMedic"]; +private ["_vehicle","_started","_finished","_animState","_isMedic","_soundSource"]; if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; diff --git a/dayz_code/actions/flare_pickup.sqf b/dayz_code/actions/flare_pickup.sqf index 421c432c8..e093a2209 100644 --- a/dayz_code/actions/flare_pickup.sqf +++ b/dayz_code/actions/flare_pickup.sqf @@ -1,4 +1,4 @@ -private["_flare"]; +private ["_flare","_text"]; _flare = _this select 3; player playActionNow "PutDown"; sleep 2; diff --git a/dayz_code/actions/forcesave.sqf b/dayz_code/actions/forcesave.sqf index 887980dc9..8f3a6ce5c 100644 --- a/dayz_code/actions/forcesave.sqf +++ b/dayz_code/actions/forcesave.sqf @@ -1,5 +1,4 @@ -private["_object"]; - +private []; //["dayzUpdateVehicle",[_this select 3,"all"]] call callRpcProcedure; dayzUpdateVehicle = [_this select 3,"all"]; -publicVariableServer "dayzUpdateVehicle"; +publicVariableServer "dayzUpdateVehicle"; \ No newline at end of file diff --git a/dayz_code/actions/gather_meat.sqf b/dayz_code/actions/gather_meat.sqf index 4fc7e0d07..8b2a78666 100644 --- a/dayz_code/actions/gather_meat.sqf +++ b/dayz_code/actions/gather_meat.sqf @@ -1,4 +1,4 @@ -private["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_string","_type"]; +private ["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_string","_type","_started","_finished","_animState","_isMedic","_array","_isListed","_config"]; if(TradeInprogress) exitWith { cutText ["Gutting animal already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -52,7 +52,7 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; cutText ["Canceled gutting." , "PLAIN DOWN"]; - _abort = true; + //_abort = true; }; _hasHarvested = _item getVariable["meatHarvested",false]; diff --git a/dayz_code/actions/gather_zparts.sqf b/dayz_code/actions/gather_zparts.sqf index 8862aeb16..61f9cc086 100644 --- a/dayz_code/actions/gather_zparts.sqf +++ b/dayz_code/actions/gather_zparts.sqf @@ -1,4 +1,4 @@ -private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"]; +private ["_hasKnife","_qty","_item","_text","_string","_type","_started","_finished","_animState","_isMedic","_array","_hasHarvested","_hasKnifeBlunt"]; if(TradeInprogress) exitWith { cutText ["Gutting zombie already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -8,15 +8,15 @@ _hasKnife = "ItemKnife" in items player; _hasKnifeBlunt = "ItemKnifeBlunt" in items player; _type = typeOf _item; _hasHarvested = _item getVariable["meatHarvested",false]; -_config = configFile >> "CfgSurvival" >> "Meat" >> _type; +//_config = configFile >> "CfgSurvival" >> "Meat" >> _type; player removeAction s_player_butcher; s_player_butcher = 1; if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then { //Get Animal Type - _loop = true; - _isListed = isClass (_config); + //_loop = true; + //_isListed = isClass (_config); _text = getText (configFile >> "CfgVehicles" >> _type >> "displayName"); // force animation @@ -53,7 +53,7 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; cutText ["Canceled gutting." , "PLAIN DOWN"]; - _abort = true; + //_abort = true; }; _hasHarvested = _item getVariable["meatHarvested",false]; diff --git a/dayz_code/actions/jerry_fill.sqf b/dayz_code/actions/jerry_fill.sqf index 0038d98f9..06ccb24c6 100644 --- a/dayz_code/actions/jerry_fill.sqf +++ b/dayz_code/actions/jerry_fill.sqf @@ -1,4 +1,4 @@ -private["_hasFood","_item","_text","_qty"]; +private ["_qty","_started","_finished","_animState","_isMedic","_abort","_fillCounter","_dis","_sfx"]; if(TradeInprogress) exitWith { cutText ["Fill Jerry already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -15,10 +15,10 @@ for "_x" from 1 to _qty do { _fillCounter = _fillCounter + 1; - if(_siphonQty == 1) then { + if(_qty == 1) then { cutText ["Preparing to siphon, stand still to fill empty jerry can.", "PLAIN DOWN"]; } else { - cutText [format[("Preparing to siphon, stand still to fill empty jerry can %1 of %2."),_fillCounter,_siphonQty] , "PLAIN DOWN"]; + cutText [format[("Preparing to siphon, stand still to fill empty jerry can %1 of %2."),_fillCounter,_qty] , "PLAIN DOWN"]; }; // force animation diff --git a/dayz_code/actions/list_playerDeaths.sqf b/dayz_code/actions/list_playerDeaths.sqf index 7508804d9..16b0f03a2 100644 --- a/dayz_code/actions/list_playerDeaths.sqf +++ b/dayz_code/actions/list_playerDeaths.sqf @@ -1,4 +1,4 @@ -private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"]; +private ["_activatingPlayer"]; // [ _trader_id, _category, _action ]; _activatingPlayer = _this select 1; diff --git a/dayz_code/actions/object_pickup.sqf b/dayz_code/actions/object_pickup.sqf index afa7e2d5c..b43d3e4fc 100644 --- a/dayz_code/actions/object_pickup.sqf +++ b/dayz_code/actions/object_pickup.sqf @@ -1,4 +1,4 @@ -private["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text","_control","_dialog","_item","_val","_max","_bolts","_quivers","_quiver","_broken"]; +private ["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text","_broken","_playerNear","_obj","_qty"]; // Exit if player zombie if(player isKindOf "PZombie_VB") exitWith {}; @@ -60,7 +60,7 @@ if(_classname isKindOf "Bag_Base_EP1") then { }; // test to see if item still exists just before adding and removing -if(_holder == objNull) exitWith { TradeInprogress = false; }; +if(isNull _holder) exitWith { TradeInprogress = false; }; _obj = nearestObjects [(getPosATL player), [(typeOf _holder)], 5]; _qty = count _obj; diff --git a/dayz_code/actions/pack.sqf b/dayz_code/actions/pack.sqf index a3be90728..151500c8e 100644 --- a/dayz_code/actions/pack.sqf +++ b/dayz_code/actions/pack.sqf @@ -1,3 +1,4 @@ +private ["_array","_object","_type"]; _array = _this select 3; _object = _array select 0; _type = TypeOf(_object); diff --git a/dayz_code/actions/player_addToolbelt.sqf b/dayz_code/actions/player_addToolbelt.sqf index 7b878ebce..b7be4bd98 100644 --- a/dayz_code/actions/player_addToolbelt.sqf +++ b/dayz_code/actions/player_addToolbelt.sqf @@ -1,4 +1,4 @@ -private["_item","_config","_onLadder","_create","_isOk","_config2","_consume"]; +private ["_item","_config","_onLadder","_create","_isOk","_config2","_magType","_meleeNum","_muzzles","_wtype","_type","_hastoolweapon","_text"]; if(TradeInprogress) exitWith { cutText ["Add to toolbelt already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/player_build.sqf b/dayz_code/actions/player_build.sqf index f0daaf1c3..a4340a390 100644 --- a/dayz_code/actions/player_build.sqf +++ b/dayz_code/actions/player_build.sqf @@ -1,4 +1,4 @@ -private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_isBuilding","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_buildings","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object"]; +private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_isBuilding","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_buildings","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole"]; if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -78,7 +78,7 @@ _hasrequireditem = true; if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = _x; } } forEach _require; -_hasbuilditem = _this in magazines playwer; +_hasbuilditem = _this in magazines player; if (!_hasbuilditem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; }; if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["Missing tool %1",_missing] , "PLAIN DOWN"]; }; @@ -144,8 +144,6 @@ if (_hasrequireditem) then { // Start Build _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; - _tmpbuilt setVariable ["ObjectID",1,true]; - _dir = getDir player; _tmpbuilt setdir _dir; diff --git a/dayz_code/actions/player_chopWood.sqf b/dayz_code/actions/player_chopWood.sqf index f78f710ca..9112e82fd 100644 --- a/dayz_code/actions/player_chopWood.sqf +++ b/dayz_code/actions/player_chopWood.sqf @@ -1,4 +1,4 @@ -private ["_item","_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_sfx","_dis","_animState","_isMedic","_proceed","_counter","_objType","_limit","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"]; +private ["_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_animState","_isMedic","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"]; if(TradeInprogress) exitWith { cutText ["Harvest wood already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -6,7 +6,7 @@ TradeInprogress = true; // allowed trees list move this later _trees = ["t_pyrus2s.p3d","str_briza_kriva.p3d","dd_borovice.p3d","les_singlestrom_b.p3d","les_singlestrom.p3d","smrk_velky.p3d","smrk_siroky.p3d","smrk_maly.p3d","les_buk.p3d","str krovisko vysoke.p3d","str_fikovnik_ker.p3d","str_fikovnik.p3d","str vrba.p3d","hrusen2.p3d","str dub jiny.p3d","str lipa.p3d","str briza.p3d","p_akat02s.p3d","jablon.p3d","p_buk.p3d","str_topol.p3d","str_topol2.p3d","p_osika.p3d","t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fagus2s.p3d","t_fagus2f.p3d","t_betula1f.p3d","t_betula2f.p3d","t_betula2s.p3d","t_betula2w.p3d","t_alnus2s.p3d","t_acer2s.p3d","t_populus3s.p3d","t_quercus2f.p3d","t_sorbus2s.p3d","t_malus1s.p3d","t_salix2s.p3d","t_picea1s_w.p3d","t_picea2s_w.p3d","t_ficusb2s_ep1.p3d","t_populusb2s_ep1.p3d","t_populusf2s_ep1.p3d","t_amygdalusc2s_ep1.p3d","t_ficusb2s_ep1.p3d","t_pistacial2s_ep1.p3d","t_pinuse2s_ep1.p3d","t_pinuss3s_ep1.p3d","t_prunuss2s_ep1.p3d","t_pinusn2s.p3d","t_pinusn1s.p3d","t_pinuss2f.p3d","t_poplar2f_dead_pmc.p3d","misc_torzotree_pmc.p3d","misc_burnspruce_pmc.p3d","brg_cocunutpalm8.p3d","brg_umbrella_acacia01b.p3d","brg_jungle_tree_canopy_1.p3d","brg_jungle_tree_canopy_2.p3d","brg_cocunutpalm4.p3d","brg_cocunutpalm3.p3d","palm_01.p3d","palm_02.p3d","palm_03.p3d","palm_04.p3d","palm_09.p3d","palm_10.p3d","brg_cocunutpalm2.p3d","brg_jungle_tree_antiaris.p3d","brg_cocunutpalm1.p3d"]; -_item = _this; +//_item = _this; call gear_ui_init; _findNearestTree = []; diff --git a/dayz_code/actions/player_copyKey.sqf b/dayz_code/actions/player_copyKey.sqf index bcc786b99..6a2c1ede8 100644 --- a/dayz_code/actions/player_copyKey.sqf +++ b/dayz_code/actions/player_copyKey.sqf @@ -1,4 +1,4 @@ -private["_item","_config","_onLadder","_create","_isOk","_config2","_consume"]; +private ["_item","_config","_onLadder","_create","_started","_finished","_animState","_isMedic","_qty","_box","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"]; if(TradeInprogress) exitWith { cutText ["Copy key already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/player_drink.sqf b/dayz_code/actions/player_drink.sqf index 9e6f949cb..b7905d071 100644 --- a/dayz_code/actions/player_drink.sqf +++ b/dayz_code/actions/player_drink.sqf @@ -1,4 +1,4 @@ -private["_onLadder","_itemorignal","_hasdrinkitem","_hasoutput","_config","_text","_sfx","_dis","_id","_itemtodrop","_nearByPile","_item","_display"]; +private ["_onLadder","_itemorignal","_hasdrinkitem","_hasoutput","_config","_text","_sfx","_dis","_itemtodrop","_nearByPile","_item","_display"]; disableserialization; call gear_ui_init; diff --git a/dayz_code/actions/player_dropWeapon.sqf b/dayz_code/actions/player_dropWeapon.sqf index b8cfec647..0ebeb6435 100644 --- a/dayz_code/actions/player_dropWeapon.sqf +++ b/dayz_code/actions/player_dropWeapon.sqf @@ -1,4 +1,4 @@ -private["_item"]; +private ["_item","_config","_onLadder","_consume","_meleeNum","_bag"]; _item = _this; _config = configFile >> "CfgWeapons" >> _item; diff --git a/dayz_code/actions/player_eat.sqf b/dayz_code/actions/player_eat.sqf index c5a8ed69f..269ef26c4 100644 --- a/dayz_code/actions/player_eat.sqf +++ b/dayz_code/actions/player_eat.sqf @@ -1,4 +1,4 @@ -private["_onLadder","_itemorignal","_hasfooditem","_rawfood","_cookedfood","_hasoutput","_config","_text","_regen","_dis","_sfx","_Cookedtime","_itemtodrop","_nearByPile","_item","_display"]; +private ["_onLadder","_itemorignal","_hasfooditem","_rawfood","_hasoutput","_config","_text","_regen","_dis","_sfx","_itemtodrop","_nearByPile","_item","_display","_rawexceptions","_badfood"]; disableserialization; call gear_ui_init; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; @@ -14,7 +14,7 @@ _hasfooditem = _itemorignal in magazines player; _rawfood = _itemorignal in meatraw; _rawexceptions = _itemorignal in exceptionsraw; -_cookedfood = _itemorignal in meatcooked; +//_cookedfood = _itemorignal in meatcooked; _hasoutput = _itemorignal in food_with_output; _badfood = _itemorignal in badfood; diff --git a/dayz_code/actions/player_flipvehicle.sqf b/dayz_code/actions/player_flipvehicle.sqf index 6861bf7fb..b50c8407e 100644 --- a/dayz_code/actions/player_flipvehicle.sqf +++ b/dayz_code/actions/player_flipvehicle.sqf @@ -1,7 +1,7 @@ -private["_object","_position"]; +private ["_object"]; _object = _this select 3; -_position = [position _object,0,0,0,0,0,0,position player] call BIS_fnc_findSafePos; +// _position = [position _object,0,0,0,0,0,0,position player] call BIS_fnc_findSafePos; //Standup //player playMove "amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon"; diff --git a/dayz_code/actions/player_makefire.sqf b/dayz_code/actions/player_makefire.sqf index e17f848eb..267de0367 100644 --- a/dayz_code/actions/player_makefire.sqf +++ b/dayz_code/actions/player_makefire.sqf @@ -1,4 +1,4 @@ -private["_location","_isOk","_dir","_classname"]; +private ["_location","_isOk","_dir","_classname","_fire","_hasWood"]; _location = player modeltoworld [0,0.3,0]; if ((_location select 2) < 0) then { _location set [2,0]; @@ -18,7 +18,7 @@ if (_hasWood) then { _fire setDir _dir; player reveal _fire; - _id = _fire spawn player_fireMonitor; + _fire spawn player_fireMonitor; cutText [localize "str_fireplace_01", "PLAIN DOWN"]; } else { diff --git a/dayz_code/actions/player_reloadMags.sqf b/dayz_code/actions/player_reloadMags.sqf index aeb4c92bc..4e86165d0 100644 --- a/dayz_code/actions/player_reloadMags.sqf +++ b/dayz_code/actions/player_reloadMags.sqf @@ -1,4 +1,4 @@ -private["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_i","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_avaliable_slots"]; +private ["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_avaliable_slots"]; disableSerialization; call gear_ui_init; diff --git a/dayz_code/actions/player_setTrap.sqf b/dayz_code/actions/player_setTrap.sqf index 00c75bb83..e996f5f1b 100644 --- a/dayz_code/actions/player_setTrap.sqf +++ b/dayz_code/actions/player_setTrap.sqf @@ -1,6 +1,6 @@ -private["_item"]; +private ["_item","_onLadder","_classname","_text","_hastrapitem","_location","_object","_dir"]; _item = _this; -_config = configFile >> "CfgWeapons" >> _item; +// _config = configFile >> "CfgWeapons" >> _item; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]}; @@ -9,7 +9,7 @@ call gear_ui_init; _classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); -_consume = ([] + getArray (_config >> "magazines")) select 0; +//_consume = ([] + getArray (_config >> "magazines")) select 0; _hastrapitem = _this in magazines player; @@ -22,6 +22,7 @@ player playActionNow "PutDown"; sleep 1; _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; +_dir = getDir player; _object setDir _dir; player reveal _object; diff --git a/dayz_code/actions/player_tagFriendly.sqf b/dayz_code/actions/player_tagFriendly.sqf index 3f22ac80c..417448f76 100644 --- a/dayz_code/actions/player_tagFriendly.sqf +++ b/dayz_code/actions/player_tagFriendly.sqf @@ -16,7 +16,7 @@ _rfriendlies = _target getVariable ["friendlies", []]; if (!(_callerID in _rfriendlies)) then { // caller - titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept.",(name _target)], "PLAIN DOWN"]; + titleText [format["You have tagged a player as friendly. Waiting for other player to accept.",(name _target)], "PLAIN DOWN"]; // target - [_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %1 as friendly.", (name _caller)],"PLAIN DOWN"] call RE; + [_caller,_target,"loc",rTITLETEXT,format["A player wants to tag you as friendly. To accept, tag player as friendly.", (name _caller)],"PLAIN DOWN"] call RE; }; \ No newline at end of file diff --git a/dayz_code/actions/player_useMeds.sqf b/dayz_code/actions/player_useMeds.sqf index be70c04be..ebd68e6bd 100644 --- a/dayz_code/actions/player_useMeds.sqf +++ b/dayz_code/actions/player_useMeds.sqf @@ -1,4 +1,4 @@ -private["_item"]; +private ["_item","_id","_onLadder","_hasmeditem","_config","_text"]; _item = _this; call gear_ui_init; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; diff --git a/dayz_code/actions/player_wearClothes.sqf b/dayz_code/actions/player_wearClothes.sqf index 625bd6dd6..2281403e6 100644 --- a/dayz_code/actions/player_wearClothes.sqf +++ b/dayz_code/actions/player_wearClothes.sqf @@ -2,7 +2,7 @@ _item spawn player_wearClothes; Added Female skin changes - DayZ Epoch - vbawol */ -private["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_itemNew","_currentSex","_newSex","_model"]; +private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model"]; if(TradeInprogress) exitWith { cutText ["Changing clothes already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; diff --git a/dayz_code/actions/pzombie/pz_feed.sqf b/dayz_code/actions/pzombie/pz_feed.sqf index 1d19a6f68..f7667f08a 100644 --- a/dayz_code/actions/pzombie/pz_feed.sqf +++ b/dayz_code/actions/pzombie/pz_feed.sqf @@ -1,6 +1,6 @@ -private ["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent","_ctrlBlood","_rnd","_move","_display","_control","_bloodVal"]; +private ["_item","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ctrlBlood","_rnd","_move","_display","_control","_bloodVal"]; _item = _this select 3; -_ent = _item; +// _ent = _item; disableSerialization; @@ -9,7 +9,7 @@ s_player_butcher = 1; if(!(alive _item)) then { - _rnd = round(random 4) + 1; + _rnd = (round(random 4)) + 1; _move = "ZombieFeed" + str(_rnd); player playMoveNow _move; @@ -76,6 +76,7 @@ if(!(alive _item)) then { _control = _display displayCtrl 1301; _control ctrlShow true; + _ctrlBlood = _display displayCtrl 1300; _bloodVal = r_player_blood / r_player_bloodTotal; if (_bloodVal >= 0.2) then { _ctrlBlood ctrlShow true; diff --git a/dayz_code/actions/pzombie/pz_vision.sqf b/dayz_code/actions/pzombie/pz_vision.sqf index c2747c4d7..81fdf5033 100644 --- a/dayz_code/actions/pzombie/pz_vision.sqf +++ b/dayz_code/actions/pzombie/pz_vision.sqf @@ -1,5 +1,5 @@ -private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"]; +private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture","_NV1","_NV2","_NV3"]; _gen = _this select 0; _caller = _this select 1; _id = _this select 2; diff --git a/dayz_code/actions/pzombie/pz_vision_ap.sqf b/dayz_code/actions/pzombie/pz_vision_ap.sqf index 59d0561c9..3f5dd900a 100644 --- a/dayz_code/actions/pzombie/pz_vision_ap.sqf +++ b/dayz_code/actions/pzombie/pz_vision_ap.sqf @@ -1,4 +1,4 @@ -private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"]; +private ["_gen","_caller","_id","_NV","_NVOn","_new","_inc","_newap"]; _gen = _this select 0; _caller = _this select 1; diff --git a/dayz_code/actions/pzombie/pz_vision_rbg1.sqf b/dayz_code/actions/pzombie/pz_vision_rbg1.sqf index 30bb2036e..e10b5f6a4 100644 --- a/dayz_code/actions/pzombie/pz_vision_rbg1.sqf +++ b/dayz_code/actions/pzombie/pz_vision_rbg1.sqf @@ -1,4 +1,4 @@ -private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"]; +private ["_gen","_caller","_id","_NV","_NVOn","_index","_NV1","_NV2","_NV3","_new","_NVx","_increase","_newap"]; _gen = _this select 0; _caller = _this select 1; diff --git a/dayz_code/actions/refuel.sqf b/dayz_code/actions/refuel.sqf index 994f33b1d..1d6390ba3 100644 --- a/dayz_code/actions/refuel.sqf +++ b/dayz_code/actions/refuel.sqf @@ -1,4 +1,4 @@ -private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canName","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCan","_configVeh","_capacity","_nameText","_availableCansEmpty","_availableCans"]; +private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canName","_canSize","_configCan","_configVeh","_capacity","_nameText","_availableCans","_canText"]; if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; diff --git a/dayz_code/actions/remove.sqf b/dayz_code/actions/remove.sqf index 5ec603a06..014ae3aaa 100644 --- a/dayz_code/actions/remove.sqf +++ b/dayz_code/actions/remove.sqf @@ -2,7 +2,7 @@ delete object from db with extra waiting by [VB]AWOL parameters: _obj */ -private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_id","_objType","_sfx","_dis","_itemOut","_countOut","_textCreate","_selectedRemoveOutput"]; +private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot"]; if(TradeInprogress) exitWith { cutText ["Remove already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/repair.sqf b/dayz_code/actions/repair.sqf index 663a103a3..9be170397 100644 --- a/dayz_code/actions/repair.sqf +++ b/dayz_code/actions/repair.sqf @@ -1,4 +1,4 @@ -private["_vehicle","_part","_hitpoint","_type","_selection","_array"]; +private ["_vehicle","_part","_hitpoint","_type","_selection","_array","_started","_finished","_animState","_isMedic","_num_removed","_damage","_dis","_sfx","_allFixed","_id","_hasToolbox","_section","_nameType","_namePart","_hitpoints"]; if(TradeInprogress) exitWith { cutText ["Repair already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/repair_vehicle.sqf b/dayz_code/actions/repair_vehicle.sqf index dac9649fd..69afa5367 100644 --- a/dayz_code/actions/repair_vehicle.sqf +++ b/dayz_code/actions/repair_vehicle.sqf @@ -1,7 +1,7 @@ -private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"]; +private ["_part","_cancel","_color","_allFixed","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; // [ _trader_id, _category, _action ]; -_activatingPlayer = _this select 1; +// _activatingPlayer = _this select 1; _vehicle = _this select 3; diff --git a/dayz_code/actions/salvage.sqf b/dayz_code/actions/salvage.sqf index b2d3ed8bf..9be707b8c 100644 --- a/dayz_code/actions/salvage.sqf +++ b/dayz_code/actions/salvage.sqf @@ -1,9 +1,9 @@ -private["_vehicle","_part","_hitpoint","_type","_selection","_array"]; +private ["_vehicle","_part","_hitpoint","_type","_selection","_array","_started","_finished","_animState","_isMedic","_isOK","_brokenPart","_findPercent","_damage","_hasToolbox","_nameType","_namePart"]; if(TradeInprogress) exitWith { cutText ["Salvage already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; -_id = _this select 2; +//_id = _this select 2; _array = _this select 3; _vehicle = _array select 0; _part = _array select 1; @@ -28,7 +28,7 @@ if (_hasToolbox) then { player playActionNow "Medic"; [player,"repair",0,false] call dayz_zombieSpeak; - null = [player,50,true,(getPosATL player)] spawn player_alertZombies; + [player,50,true,(getPosATL player)] spawn player_alertZombies; r_interrupt = false; _animState = animationState player; @@ -97,16 +97,11 @@ if (_hasToolbox) then { cutText [format["You have successfully removed %1 from the %2",_namePart,_nameType], "PLAIN DOWN"]; }; - - - } else { cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"]; }; - }; - } else { r_interrupt = false; diff --git a/dayz_code/actions/salvage_vehicle.sqf b/dayz_code/actions/salvage_vehicle.sqf index a25ec0c74..4456d2cc3 100644 --- a/dayz_code/actions/salvage_vehicle.sqf +++ b/dayz_code/actions/salvage_vehicle.sqf @@ -1,14 +1,14 @@ -private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"]; +private ["_part","_cancel","_color","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; // [ _trader_id, _category, _action ]; -_activatingPlayer = _this select 1; +// _activatingPlayer = _this select 1; _vehicle = _this select 3; {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = []; // dayz_myCursorTarget = _vehicle; -_allFixed = true; +// _allFixed = true; _hitpoints = _vehicle call vehicle_getHitpoints; { diff --git a/dayz_code/actions/sell_db.sqf b/dayz_code/actions/sell_db.sqf index d6e1aa1e8..090f799db 100644 --- a/dayz_code/actions/sell_db.sqf +++ b/dayz_code/actions/sell_db.sqf @@ -1,4 +1,4 @@ -private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart","_count"]; +private ["_activatingPlayer","_trader_id","_type","_name","_sell","_order","_tid","_in","_part","_cancel","_Display","_File","_textCurrency","_textPart","_count","_btype","_stype","_bag","_bagclass","_header","_item","_buy","_sqty","_sname","_afile"]; if(TradeInprogress) exitWith { cutText ["already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -9,14 +9,14 @@ TradeInprogress = true; _activatingPlayer = _this select 1; _trader_id = (_this select 3) select 0; -_category = (_this select 3) select 1; +//_category = (_this select 3) select 1; dayzTraderMenuResult = call compile format["tcacheSell_%1;",_trader_id]; if(isNil "dayzTraderMenuResult") then { diag_log format["DEBUG TRADER OBJ: %1", _trader_id]; //["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure; - dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action]; + dayzTraderMenu = [_activatingPlayer,_trader_id]; publicVariableServer "dayzTraderMenu"; waitUntil {!isNil "dayzTraderMenuResult"}; }; @@ -44,12 +44,12 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult]; _textPart = getText(configFile >> _type >> _name >> "displayName"); // Total in stock - _qty = _x select 2; + //_qty = _x select 2; // Buy Data from array _buy = _x select 3; - _bqty = _buy select 0; - _bname = _buy select 1; + //_bqty = _buy select 0; + //_bname = _buy select 1; _btype = _buy select 2; switch(true)do{ case (_btype == 1): { @@ -63,7 +63,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult]; }; }; // Display Name of buy item - _textCurrencyBuy = getText(configFile >> _btype >> _bname >> "displayName"); + //_textCurrencyBuy = getText(configFile >> _btype >> _bname >> "displayName"); // Sell data from array _sell = _x select 4; @@ -95,7 +95,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult]; _File = "\z\addons\dayz_code\actions\" + _afile + ".sqf"; // Allways 1 for now - _out = _sqty; + //_out = _sqty; // qty consumed of bname _in = 1; diff --git a/dayz_code/actions/siphonFuel.sqf b/dayz_code/actions/siphonFuel.sqf index a1b7aa3a7..2aeecaa72 100644 --- a/dayz_code/actions/siphonFuel.sqf +++ b/dayz_code/actions/siphonFuel.sqf @@ -1,4 +1,4 @@ -private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText","_availableCansEmpty","_availableCans"]; +private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText","_availableCansEmpty"]; if(TradeInprogress) exitWith { cutText ["Siphon already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; @@ -14,7 +14,7 @@ _capacity = getNumber(_configVeh >> "fuelCapacity"); _nameText = getText(_configVeh >> "displayName"); _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"]; -_availableCans = ["ItemJerrycan","ItemFuelBarrel"]; +// _availableCans = ["ItemJerrycan","ItemFuelBarrel"]; // Loop to find containers that can could hold fuel and fill them { diff --git a/dayz_code/actions/stopGenerator.sqf b/dayz_code/actions/stopGenerator.sqf index 4618238fc..67b030008 100644 --- a/dayz_code/actions/stopGenerator.sqf +++ b/dayz_code/actions/stopGenerator.sqf @@ -1,4 +1,4 @@ -private ["_vehicle","_started","_finished","_animState","_isMedic"]; +private ["_vehicle","_started","_finished","_animState","_isMedic","_soundObject"]; if(TradeInprogress) exitWith { cutText ["Stop already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; diff --git a/dayz_code/actions/tame_dog.sqf b/dayz_code/actions/tame_dog.sqf index b47a1e8cb..9d5fec5de 100644 --- a/dayz_code/actions/tame_dog.sqf +++ b/dayz_code/actions/tame_dog.sqf @@ -14,7 +14,7 @@ _dog = Intended target of the script. */ -private["_target", "_caller", "_id", "_dog", "_pos", "_fsmid"]; +private ["_target","_caller","_id","_dog","_fsmid","_removed","_selected","_animalID","_textRemoved","_chanceToFail","_itemIn","_countIn"]; _target = _this select 0; _caller = _this select 1; _id = _this select 2; @@ -40,7 +40,7 @@ if(_removed == _countIn) then { _textRemoved = getText(configFile >> "CfgMagazines" >> _selected >> "displayName"); // add failure rate based on skill level variable (days alive) - _chanceToFail = ((random 1 + (dayz_skilllevel/100)) > 0.5); + _chanceToFail = (((random 1) + (dayz_skilllevel/100)) > 0.5); if(!_chanceToFail) then { diff --git a/dayz_code/actions/tent_pitch.sqf b/dayz_code/actions/tent_pitch.sqf index 7664d41ee..c9256f6ad 100644 --- a/dayz_code/actions/tent_pitch.sqf +++ b/dayz_code/actions/tent_pitch.sqf @@ -1,4 +1,4 @@ -private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"]; +private ["_location","_isOk","_pondPos","_isPond","_dir","_dis","_sfx","_classname","_object","_playerPos","_item","_hastentitem","_building","_config","_text","_objectsPond"]; //check if can pitch here call gear_ui_init; _playerPos = getPosATL player; diff --git a/dayz_code/actions/trade_backpacks.sqf b/dayz_code/actions/trade_backpacks.sqf index 1e413190b..b27e74642 100644 --- a/dayz_code/actions/trade_backpacks.sqf +++ b/dayz_code/actions/trade_backpacks.sqf @@ -1,4 +1,4 @@ -private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty"]; +private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_class","_started","_finished","_animState","_isMedic","_num_removed","_needed","_activatingPlayer","_buy_o_sell","_textPartIn","_textPartOut","_traderID"]; // [part_out,part_in, qty_out, qty_in,]; if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/trade_cancel.sqf b/dayz_code/actions/trade_cancel.sqf index 1051ff17a..cfff7ef20 100644 --- a/dayz_code/actions/trade_cancel.sqf +++ b/dayz_code/actions/trade_cancel.sqf @@ -1,3 +1,3 @@ -private["_none"]; +private []; {player removeAction _x} forEach s_player_parts;s_player_parts = []; s_player_parts_crtl = -1; \ No newline at end of file diff --git a/dayz_code/actions/trade_items.sqf b/dayz_code/actions/trade_items.sqf index 7fc10fb80..e80a7f46d 100644 --- a/dayz_code/actions/trade_items.sqf +++ b/dayz_code/actions/trade_items.sqf @@ -1,4 +1,4 @@ -private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_isOk"]; +private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","_activatingPlayer","_traderID","_total_trades"]; // [part_out,part_in, qty_out, qty_in,]; if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"] }; diff --git a/dayz_code/actions/trade_items_wo_db.sqf b/dayz_code/actions/trade_items_wo_db.sqf index d58664e96..8133d6b49 100644 --- a/dayz_code/actions/trade_items_wo_db.sqf +++ b/dayz_code/actions/trade_items_wo_db.sqf @@ -1,4 +1,4 @@ -private["_activatingPlayer","_part_out","_part_in","_qty_out","_qty_in","_buy_o_sell","_textPartIn","_textPartOut","_traderID","_counter","_failed","_qty","_isOk","_needed"]; +private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut","_qty","_needed","_started","_finished","_animState","_isMedic","_abort","_removed","_tradeCounter","_total_trades"]; // [part_out,part_in, qty_out, qty_in,]; if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; }; @@ -10,7 +10,7 @@ _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; _qty_out = (_this select 3) select 2; _qty_in = (_this select 3) select 3; -_buy_o_sell = (_this select 3) select 4; +// _buy_o_sell = (_this select 3) select 4; _textPartIn = (_this select 3) select 5; _textPartOut = (_this select 3) select 6; //_traderID = (_this select 3) select 7; diff --git a/dayz_code/actions/trade_metals.sqf b/dayz_code/actions/trade_metals.sqf index 672123632..5256de25c 100644 --- a/dayz_code/actions/trade_metals.sqf +++ b/dayz_code/actions/trade_metals.sqf @@ -1,4 +1,4 @@ -private["_none"]; +private ["_buy","_metals_conversion","_cancel"]; if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/actions/trade_weapons.sqf b/dayz_code/actions/trade_weapons.sqf index fa6b29bf7..45ebe74f2 100644 --- a/dayz_code/actions/trade_weapons.sqf +++ b/dayz_code/actions/trade_weapons.sqf @@ -1,4 +1,4 @@ -private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_bulkItem","_bulkqty","_gold_out","_gold_qty_out","_partial_qty_out","_silver_qty_out","_needed","_activatingPlayer","_textPartIn","_textPartOut"]; +private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_needed","_activatingPlayer","_textPartIn","_textPartOut","_started","_finished","_animState","_isMedic"]; // [part_out,part_in, qty_out, qty_in,"buy"]; if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/unpack.sqf b/dayz_code/actions/unpack.sqf index 5b38c0295..7b55fa791 100644 --- a/dayz_code/actions/unpack.sqf +++ b/dayz_code/actions/unpack.sqf @@ -1,3 +1,5 @@ + +private ["_array","_location","_dir","_classname","_weapon"]; _array = _this select 3; _location = player modeltoworld [0,1,0]; _dir = getDir player; diff --git a/dayz_code/actions/vault_pitch.sqf b/dayz_code/actions/vault_pitch.sqf index dbfe1d1bf..355e7a60c 100644 --- a/dayz_code/actions/vault_pitch.sqf +++ b/dayz_code/actions/vault_pitch.sqf @@ -34,6 +34,7 @@ if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"p //diag_log ("Pitch Tent: " + str(_isok) ); +_dir = getDir player; // Start Preview loop _tmpvault = createVehicle ["VaultStorageLocked", _location, [], 0, "CAN_COLLIDE"]; diff --git a/dayz_code/actions/water_fill.sqf b/dayz_code/actions/water_fill.sqf index f0cd9a73c..e8aacb85b 100644 --- a/dayz_code/actions/water_fill.sqf +++ b/dayz_code/actions/water_fill.sqf @@ -1,4 +1,4 @@ -private["_hasFood","_item","_text","_qty"]; +private ["_text","_qty","_canFill","_isWell","_objectsWell","_pondPos","_isPond","_objectsPond","_dis","_sfx","_playerPos","_onLadder","_hasbottleitem","_config"]; call gear_ui_init; @@ -14,7 +14,7 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]}; _hasbottleitem = _this in magazines player; -_config = configFile >> "CfgMagazines" >> _item; +_config = configFile >> "CfgMagazines" >> _this; _text = getText (_config >> "displayName"); if (!_hasbottleitem) exitWith {cutText [format[(localize "str_player_31"),_text,"fill"] , "PLAIN DOWN"]}; diff --git a/dayz_code/cfgworlds/intro.Chernarus/initIntro.sqf b/dayz_code/cfgworlds/intro.Chernarus/initIntro.sqf index 62262ac04..59b2561db 100644 --- a/dayz_code/cfgworlds/intro.Chernarus/initIntro.sqf +++ b/dayz_code/cfgworlds/intro.Chernarus/initIntro.sqf @@ -1,3 +1,4 @@ +private ["_target","_position","_camera"]; titleCut ["","BLACK FADED",10e10]; setViewDistance 3000; diff --git a/dayz_code/compile/building_spawnLoot.sqf b/dayz_code/compile/building_spawnLoot.sqf index 279bf793b..d83b01e89 100644 --- a/dayz_code/compile/building_spawnLoot.sqf +++ b/dayz_code/compile/building_spawnLoot.sqf @@ -1,4 +1,4 @@ -private["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_itemChances","_lootChance","_weights","_cntWeights","_index"]; +private ["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_lootChance","_weights","_cntWeights","_index"]; _obj = _this select 0; diff --git a/dayz_code/compile/building_spawnZombies.sqf b/dayz_code/compile/building_spawnZombies.sqf index ab220d294..22dba4ba0 100644 --- a/dayz_code/compile/building_spawnZombies.sqf +++ b/dayz_code/compile/building_spawnZombies.sqf @@ -15,7 +15,7 @@ if (_canLoot) then { _max = getNumber (_config >> "maxRoaming"); //Walking Zombies //_num = round(random _max) min _min; - _num = round(random _max) max _min; + _num = (round(random _max)) max _min; _config = configFile >> "CfgBuildingLoot" >> _type; //Get zombie class _zombieChance = getNumber (_config >> "zombieChance"); diff --git a/dayz_code/compile/control_zombieAgent.sqf b/dayz_code/compile/control_zombieAgent.sqf index 32b2b4ceb..5f557de7b 100644 --- a/dayz_code/compile/control_zombieAgent.sqf +++ b/dayz_code/compile/control_zombieAgent.sqf @@ -1,4 +1,4 @@ -private["_position","_unitTypes","_group","_unit","_target","_bodies","_targetPos","_codeSpawns","_unitSpawn","_lead","_isAlive","_units"]; +private ["_position","_target","_targetPos","_isAlive","_list","_isSomeone","_myDest","_agent"]; //Definitions _agent = _this select 0; @@ -8,6 +8,7 @@ _agent = _this select 0; //Loop behaviour _list = (getposATL _agent) nearEntities ["Man",200]; _isSomeone = ({isPlayer _x} count _list) > 0; +_isAlive = alive _agent; while {_isAlive and _isSomeone} do { //NO TARGET _agent disableAI "FSM"; diff --git a/dayz_code/compile/dog_findTargetAgent.sqf b/dayz_code/compile/dog_findTargetAgent.sqf index 461c5e7a5..b3f65991a 100644 --- a/dayz_code/compile/dog_findTargetAgent.sqf +++ b/dayz_code/compile/dog_findTargetAgent.sqf @@ -1,4 +1,4 @@ -private["_dog","_target","_targets","_targetDis","_c","_man","_manDis","_targets","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"]; +private ["_dog","_target","_targets","_man","_manDis"]; _dog = _this; _target = objNull; _targets = []; diff --git a/dayz_code/compile/fn_buildWeightedArray.sqf b/dayz_code/compile/fn_buildWeightedArray.sqf index e17cfd345..8f74f754f 100644 --- a/dayz_code/compile/fn_buildWeightedArray.sqf +++ b/dayz_code/compile/fn_buildWeightedArray.sqf @@ -18,8 +18,8 @@ scriptName "Functions\arrays\fn_selectRandomWeighted.sqf"; [*] Algorithm is inefficient? */ -private ["_array", "_weights"]; -_array = _this select 0; +private ["_weights","_weighted"]; +//_array = _this select 0; _weights = _this select 1; /* diff --git a/dayz_code/compile/fn_curTimeStr.sqf b/dayz_code/compile/fn_curTimeStr.sqf index d81788fa4..7b334dfa8 100644 --- a/dayz_code/compile/fn_curTimeStr.sqf +++ b/dayz_code/compile/fn_curTimeStr.sqf @@ -1,3 +1,4 @@ +private ["_hrStr","_minStr","_curDate","_hr","_min"]; _curDate = date; _hr = _curDate select 3; _min = _curDate select 4; diff --git a/dayz_code/compile/fn_damageActions.sqf b/dayz_code/compile/fn_damageActions.sqf index e66b98738..1b327b402 100644 --- a/dayz_code/compile/fn_damageActions.sqf +++ b/dayz_code/compile/fn_damageActions.sqf @@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageActions.sqf"; - Function - [] call fnc_usec_damageActions; ************************************************************/ -private ["_weaponName","_action","_turret","_weapons","_assignedRole","_action1","_action2","_x","_vehicle","_unit","_vehType","_displayName","_ammoQty","_ammoSerial","_weapon","_magTypes","_type","_typeVeh","_index","_inventory","_unitTo","_isEngineer","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasJerryE","_hasEtool","_hasWire","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_bag","_classbag","_isDisallowRefuel","_hasBarrel","_hasBarrelE"]; +private ["_weaponName","_action","_turret","_weapons","_assignedRole","_action1","_action2","_x","_vehicle","_unit","_vehType","_displayName","_ammoQty","_ammoSerial","_weapon","_magTypes","_type","_typeVeh","_index","_inventory","_unitTo","_isEngineer","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasJerryE","_hasWire","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_bag","_classbag","_isDisallowRefuel","_hasBarrel","_hasBarrelE"]; if (TradeInprogress) exitWith {}; // Do not allow if any script is running. @@ -65,7 +65,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco _hasBarrel = "ItemFuelBarrel" in _playerMagazines; _hasJerryE = "ItemJerrycanEmpty" in _playerMagazines; _hasBarrelE = "ItemFuelBarrelEmpty" in _playerMagazines; - _hasEtool = "ItemEtool" in weapons player; + //_hasEtool = "ItemEtool" in weapons player; _hasWire = "ItemWire" in _playerMagazines; _hasPainkillers = "ItemPainkiller" in _playerMagazines; diff --git a/dayz_code/compile/fn_damageHandler.sqf b/dayz_code/compile/fn_damageHandler.sqf index ebcd36137..810558955 100644 --- a/dayz_code/compile/fn_damageHandler.sqf +++ b/dayz_code/compile/fn_damageHandler.sqf @@ -1,10 +1,12 @@ + +private ["_unit","_humanityHit","_myKills","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_isCardiac","_isHeadHit","_isMinor","_scale","_canHitFree","_rndPain","_rndInfection","_hitInfection","_lowBlood","_isPZombie","_source","_ammo","_unitIsPlayer"]; scriptName "Functions\misc\fn_damageHandler.sqf"; /*********************************************************** PROCESS DAMAGE TO A UNIT - Function - [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler; ************************************************************/ -private["_unit","_humanityHit","_myKills","_isBandit","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_isHeadHit","_isMinor","_scale","_canHitFree"]; +private ["_unit","_humanityHit","_myKills","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_isCardiac","_isHeadHit","_isMinor","_scale","_canHitFree","_rndPain","_rndInfection","_hitInfection","_lowBlood","_isPZombie","_source","_ammo","_unitIsPlayer"]; _unit = _this select 0; _hit = _this select 1; _damage = _this select 2; @@ -14,8 +16,8 @@ _ammo = _this select 4; _type = [_damage,_ammo] call fnc_usec_damageType; _isMinor = (_hit in USEC_MinorWounds); _isHeadHit = (_hit == "head_hit"); -_evType = ""; -_recordable = false; +//_evType = ""; +//_recordable = false; _isPlayer = (isPlayer _source); _humanityHit = 0; _myKills = 0; @@ -161,7 +163,7 @@ if (_damage > 0.4) then { //0.25 }; }; if ((_damage > 1.5) and _isHeadHit) then { - _id = [_source,"shothead"] spawn player_death; + [_source,"shothead"] spawn player_death; }; }; if(!_isHit) then { @@ -203,7 +205,7 @@ if (_type == 1) then { if (_damage > 4) then { //serious ballistic damage if (_unitIsPlayer) then { - _id = [_source,"explosion"] spawn player_death; + [_source,"explosion"] spawn player_death; }; } else { if (_damage > 2) then { @@ -222,7 +224,7 @@ if (_type == 2) then { if (_damage > 4) then { //serious ballistic damage if (_unitIsPlayer) then { - _id = [_source,"shotheavy"] spawn player_death; + [_source,"shotheavy"] spawn player_death; }; } else { if (_damage > 2) then { diff --git a/dayz_code/compile/fn_damageHandlerVehicle.sqf b/dayz_code/compile/fn_damageHandlerVehicle.sqf index aae55c921..b33044509 100644 --- a/dayz_code/compile/fn_damageHandlerVehicle.sqf +++ b/dayz_code/compile/fn_damageHandlerVehicle.sqf @@ -4,12 +4,12 @@ scriptName "Functions\misc\fn_damageHandler.sqf"; - Function - [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler; ************************************************************/ -private["_unit","_hit","_damage","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_inVehicle","_isHeadHit","_isMinor","_total"]; +private ["_unit","_hit","_damage","_total"]; _unit = _this select 0; _hit = _this select 1; _damage = _this select 2; -_source = _this select 3; -_ammo = _this select 4; +//_source = _this select 3; +//_ammo = _this select 4; _total = _damage; //diag_log ("DAMAGE VEH: " + typeof(_unit) + " / " + str(_hit) + " / " + str(_damage) + " / " + str(getDammage _unit)); diff --git a/dayz_code/compile/fn_isInsideBuilding.sqf b/dayz_code/compile/fn_isInsideBuilding.sqf index ab77616a1..409f8c7e9 100644 --- a/dayz_code/compile/fn_isInsideBuilding.sqf +++ b/dayz_code/compile/fn_isInsideBuilding.sqf @@ -1,9 +1,9 @@ -private["_unit1","_building","_type","_relPos","_boundingBox","_min","_max","_myX","_myY","_myZ","_inside"]; +private ["_unit1","_building","_relPos","_boundingBox","_min","_max","_myX","_myY","_myZ","_inside"]; _unit1 = _this select 0; //_building = _this select 1; _building = nearestObject [player, "HouseBase"]; -_type = typeOf _building; +//_type = typeOf _building; _relPos = _building worldToModel (getPosATL _unit1); _boundingBox = boundingBox _building; //diag_log ("DEBUG: Building: " + str(_building) ); diff --git a/dayz_code/compile/fn_selectRandomWeighted.sqf b/dayz_code/compile/fn_selectRandomWeighted.sqf index 0ea86517d..6657e50cf 100644 --- a/dayz_code/compile/fn_selectRandomWeighted.sqf +++ b/dayz_code/compile/fn_selectRandomWeighted.sqf @@ -18,7 +18,7 @@ scriptName "Functions\arrays\fn_selectRandomWeighted.sqf"; [*] Algorithm is inefficient? */ -private ["_array", "_weights","_index","_weighted","_i"]; +private ["_array","_weights","_index","_weighted"]; _array = _this select 0; _weights = _this select 1; diff --git a/dayz_code/compile/fn_setpitchbank.sqf b/dayz_code/compile/fn_setpitchbank.sqf index b22cac1e9..e4cd65eaa 100644 --- a/dayz_code/compile/fn_setpitchbank.sqf +++ b/dayz_code/compile/fn_setpitchbank.sqf @@ -67,7 +67,7 @@ _v _sign = [1,-1] select (_pitch < 0); //cut off numbers above 180 -while {abs _pitch > 180} do {_pitch = _sign*(abs _pitch - 180)}; +while {abs _pitch > 180} do {_pitch = _sign*((abs _pitch) - 180)}; //we can't use pitch that is exactly equal to 90, because then the engine doesn't know what 2d compass direction the object is facing if(abs _pitch == 90) then {_pitch = _sign*(89.9)}; @@ -102,7 +102,7 @@ _vdir = [_vdir, _yaw] call _rotate; _sign = [1,-1] select (_bank < 0); //cut off numbers above 360 -while {abs _bank > 360} do {_bank = _sign*(abs _bank - 360)}; +while {abs _bank > 360} do {_bank = _sign*((abs _bank) - 360)}; //reflect numbers above 180 if(abs _bank > 180) then {_sign = -1*_sign; _bank = (360-_bank)*_sign}; diff --git a/dayz_code/compile/fn_sunRise.sqf b/dayz_code/compile/fn_sunRise.sqf index 9774d90c8..e2ad65bd6 100644 --- a/dayz_code/compile/fn_sunRise.sqf +++ b/dayz_code/compile/fn_sunRise.sqf @@ -14,7 +14,7 @@ Reference: http://forums.bistudio.com/showthread.php?107476-How-do-I-detect-sundown-sunrise */ -private ["_lat", "_day", "_hour"]; +private ["_lat","_day","_hour","_daytime"]; _lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); _day = 360 * (dateToNumber date); _hour = acos ((24 * sin(_lat) * cos(_day)) / ((12 * cos(_day) - 78) * cos(_lat))); diff --git a/dayz_code/compile/fn_surfaceNoise.sqf b/dayz_code/compile/fn_surfaceNoise.sqf index 055366b78..e9c49b1c5 100644 --- a/dayz_code/compile/fn_surfaceNoise.sqf +++ b/dayz_code/compile/fn_surfaceNoise.sqf @@ -1,5 +1,5 @@ //Assess Terrain -private["_unit","_pos","_type","_typeA","_soundType","_soundVal","_array","_test"]; +private ["_unit","_pos","_type","_typeA","_soundType","_soundVal","_array"]; _unit = _this; _pos = getPosATL _unit; _type = surfaceType _pos; @@ -7,7 +7,7 @@ _typeA = toArray _type; _typeA set [0,"DEL"]; _typeA = _typeA - ["DEL"]; _type = toString _typeA; -_test = 0; +// _test = 0; //diag_log ("FINDME: " + _type); diff --git a/dayz_code/compile/fn_temperatur.sqf b/dayz_code/compile/fn_temperatur.sqf index 8ee3ad716..2ffb9290f 100644 --- a/dayz_code/compile/fn_temperatur.sqf +++ b/dayz_code/compile/fn_temperatur.sqf @@ -19,7 +19,7 @@ Missing: */ - private ["_looptime","_sun_factor","_building_factor","_vehicle_factor","_fire_factor","_water_factor","_rain_factor","_night_factor","_wind_factor","_height_mod","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_building"]; + private ["_looptime","_sun_factor","_building_factor","_vehicle_factor","_fire_factor","_water_factor","_rain_factor","_night_factor","_wind_factor","_height_mod","_difference","_isinbuilding","_isinvehicle","_raining","_sunrise","_building","_fireplaces","_daytime","_temp","_moving_factor"]; _looptime = _this; @@ -38,7 +38,7 @@ Missing: _wind_factor = -1; _difference = 0; - _hasfireffect = false; + // _hasfireffect = false; _isinbuilding = false; _isinvehicle = false; @@ -65,7 +65,7 @@ Missing: if(({inflamed _x} count _fireplaces) > 0 && !_isinvehicle ) then { //Math: factor * 1 / (0.5*(distance max 1)^2) 0.5 = 12.5% of the factor effect in a distance o 4 meters _difference = _difference + (_fire_factor /(0.5*((player distance (_fireplaces select 0)) max 1)^2)); - _hasfireffect = true; + //_hasfireffect = true; }; //building @@ -98,12 +98,12 @@ Missing: s = sunrise d = daytime - I: a = f / (12 - s)² - II: t = -a * (d - 12)² + f + I: a = f / (12 - s)� + II: t = -a * (d - 12)� + f I + II => - t = -(f / (12 - s)²) * (d - 12)² + f + t = -(f / (12 - s)�) * (d - 12)� + f Parabel with highest Point( greatest Effect == _sun_factor) always at 12.00 Zero Points are always at sunrise and sunset -> Only Positiv Values Possible diff --git a/dayz_code/compile/fn_unconscious.sqf b/dayz_code/compile/fn_unconscious.sqf index b4b3c42d7..ddfe9153d 100644 --- a/dayz_code/compile/fn_unconscious.sqf +++ b/dayz_code/compile/fn_unconscious.sqf @@ -1,3 +1,4 @@ +private ["_timeout","_isOnDeck","_isInLocation","_inVehicle","_bloodLow","_isHospital","_totalTimeout","_display","_ctrl1","_ctrl1Pos"]; disableSerialization; if ((!r_player_handler1) and (r_handlerCount == 0)) then { //Unconscious Meter @@ -25,7 +26,7 @@ if ((!r_player_handler1) and (r_handlerCount == 0)) then { sleep 1; _isOnDeck = false; //getPos player in LHA_Deck; _isInLocation = false; //getPos player in LHA_Location; - _inVehicle = (vehicle _unit != _unit); + _inVehicle = (vehicle player != player); _bloodLow = ((r_player_blood/r_player_bloodTotal) < 0.5); if ((surfaceIsWater (getPosASL player)) and !_isOnDeck and !_inVehicle) then { player setpos [(getPosASL player select 0),(getPosASL player select 1),0.3]; diff --git a/dayz_code/compile/fnc_MapEventHandler.sqf b/dayz_code/compile/fnc_MapEventHandler.sqf index 2d62067c9..d880e630d 100644 --- a/dayz_code/compile/fnc_MapEventHandler.sqf +++ b/dayz_code/compile/fnc_MapEventHandler.sqf @@ -1,33 +1,31 @@ - -if ("ItemMap_Debug" in items player) then { - _world = toUpper(worldName); - _maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"]; - _config = configFile >> "CfgWorlds" >> worldName >> "Names"; - - for "_i" from 0 to (count _config -1) do { - _class = _config select _i; //Returns a conif - _name = getText (_class >> "name"); - _type = getText (_class >> "type"); - _position = getArray (_class >> "position"); - _radiusA = getNumber (_class >> "radiusA"); - _radiusB = getNumber (_class >> "radiusB"); - - - if (_type in _maptype) then { - diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]); - // _rnd = random 1; - // _chance = 0.6; - // if (_rnd < _chance) then { - _markerstr = createMarkerLocal ["markername_" +str (_name), _position]; - _markerstr setMarkerTextLocal _name; - _markerstr setMarkerColorLocal "ColorGreen"; - _markerstr setMarkerShapeLocal "ELLIPSE"; - _markerstr setMarkerBrushLocal "Grid"; - _markerstr setMarkerSizeLocal [_radiusA, _radiusB]; - // }; - }; - }; -}; - - - +private ["_markerstr","_class","_name","_type","_position","_radiusA","_radiusB","_maptype","_config"]; + +if ("ItemMap_Debug" in items player) then { + // _world = toUpper(worldName); + _maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"]; + _config = configFile >> "CfgWorlds" >> worldName >> "Names"; + + for "_i" from 0 to (count _config -1) do { + _class = _config select _i; //Returns a conif + _name = getText (_class >> "name"); + _type = getText (_class >> "type"); + _position = getArray (_class >> "position"); + _radiusA = getNumber (_class >> "radiusA"); + _radiusB = getNumber (_class >> "radiusB"); + + + if (_type in _maptype) then { + diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]); + // _rnd = random 1; + // _chance = 0.6; + // if (_rnd < _chance) then { + _markerstr = createMarkerLocal ["markername_" +str (_name), _position]; + _markerstr setMarkerTextLocal _name; + _markerstr setMarkerColorLocal "ColorGreen"; + _markerstr setMarkerShapeLocal "ELLIPSE"; + _markerstr setMarkerBrushLocal "Grid"; + _markerstr setMarkerSizeLocal [_radiusA, _radiusB]; + // }; + }; + }; +}; \ No newline at end of file diff --git a/dayz_code/compile/local_gutObjectZ.sqf b/dayz_code/compile/local_gutObjectZ.sqf index eaae065ce..34cdf82e9 100644 --- a/dayz_code/compile/local_gutObjectZ.sqf +++ b/dayz_code/compile/local_gutObjectZ.sqf @@ -1,6 +1,6 @@ -private["_zombiebody","_qty","_type","_meat","_loop"]; +private ["_zombiebody","_ehLoc"]; _zombiebody = _this select 0; -_qty = _this select 1; +// _qty = _this select 1; if (local _zombiebody) then { _zombiebody addMagazine "ItemZombieParts"; diff --git a/dayz_code/compile/object_cargoCheck.sqf b/dayz_code/compile/object_cargoCheck.sqf index 86dd801aa..83139f3bf 100644 --- a/dayz_code/compile/object_cargoCheck.sqf +++ b/dayz_code/compile/object_cargoCheck.sqf @@ -1,4 +1,4 @@ -private["_currentObjects","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial","_itemVal","_itemQty","_oldSerial","_oldQty"]; +private ["_currentObjects","_currentTypes","_currentQty","_previousTypes","_previousQty","_serial","_itemVal","_itemQty","_oldSerial","_oldQty","_change","_checkObjects"]; //_newObjects = [_previous,weapons player] call player_weaponCheck; _currentObjects = _this select 0; _checkObjects = _this select 1; diff --git a/dayz_code/compile/object_processHit.sqf b/dayz_code/compile/object_processHit.sqf index 3f3e70f34..dab19dcb7 100644 --- a/dayz_code/compile/object_processHit.sqf +++ b/dayz_code/compile/object_processHit.sqf @@ -1,4 +1,4 @@ -private["_unit","_hp","_selection","_strH","_dam","_display"]; +private ["_unit","_selection","_strH","_dam","_display","_id","_break","_ctrlFracture","_total","_damage"]; disableSerialization; _unit = _this select 0; _selection = _this select 1; diff --git a/dayz_code/compile/object_roadFlare.sqf b/dayz_code/compile/object_roadFlare.sqf index a5a918c29..15b418342 100644 --- a/dayz_code/compile/object_roadFlare.sqf +++ b/dayz_code/compile/object_roadFlare.sqf @@ -1,11 +1,11 @@ -private["_flare","_sfx","_isLocal","_lightArea","_lightSpark","_type","_color"]; +private ["_flare","_lightArea","_lightSpark","_type","_color"]; _flare = _this select 0; _type = _this select 1; -_sfx = objNull; +//_sfx = objNull; if (!isNull _flare) then { switch (_type) do { case 0: { - _isLocal = local _flare; + //_isLocal = local _flare; //Area Light _lightArea = "#lightpoint" createVehicleLocal (getPosATL _flare); _lightArea setLightColor [0.5,0,0]; //[0.1,0.005,0.005]; diff --git a/dayz_code/compile/object_setFixServer.sqf b/dayz_code/compile/object_setFixServer.sqf index 2d6ceb799..dd1bb8779 100644 --- a/dayz_code/compile/object_setFixServer.sqf +++ b/dayz_code/compile/object_setFixServer.sqf @@ -1,4 +1,4 @@ -private["_unit","_selection","_strH","_damage","_total"]; +private ["_unit","_selection","_strH","_damage"]; _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; diff --git a/dayz_code/compile/object_setHit.sqf b/dayz_code/compile/object_setHit.sqf index 48f8ab093..342d5d0ac 100644 --- a/dayz_code/compile/object_setHit.sqf +++ b/dayz_code/compile/object_setHit.sqf @@ -1,4 +1,4 @@ -private["_unit","_selection","_strH","_dam"]; +private ["_unit","_selection","_strH","_dam"]; _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; @@ -10,4 +10,4 @@ if (_selection != "") then { _unit setHit[_selection,(_dam + _damage)]; }; }; -_damage \ No newline at end of file +_damage; \ No newline at end of file diff --git a/dayz_code/compile/object_setHitLocal.sqf b/dayz_code/compile/object_setHitLocal.sqf index 493e35e38..dab5289c9 100644 --- a/dayz_code/compile/object_setHitLocal.sqf +++ b/dayz_code/compile/object_setHitLocal.sqf @@ -1,4 +1,4 @@ -private["_unit","_selection","_strH","_dam","_total"]; +private ["_unit","_selection","_strH","_dam","_total"]; _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; @@ -13,4 +13,4 @@ if ((_selection != "")) then { } else { _damage = 0; }; -_damage \ No newline at end of file +_damage; \ No newline at end of file diff --git a/dayz_code/compile/object_speak.sqf b/dayz_code/compile/object_speak.sqf index 7e65259d3..da84e5edb 100644 --- a/dayz_code/compile/object_speak.sqf +++ b/dayz_code/compile/object_speak.sqf @@ -1,4 +1,4 @@ -private["_unit","_type","_chance","_rnd","_sound","_local","_dis"]; +private ["_unit","_type","_chance","_rnd","_sound","_local","_dis","_num","_isWoman"]; _unit = _this select 0; _type = _this select 1; _chance = _this select 2; diff --git a/dayz_code/compile/object_vehicleKilled.sqf b/dayz_code/compile/object_vehicleKilled.sqf index e83d2b9b0..9f9f7172d 100644 --- a/dayz_code/compile/object_vehicleKilled.sqf +++ b/dayz_code/compile/object_vehicleKilled.sqf @@ -1,9 +1,9 @@ -private["_unit","_killer","_type","_pos","_dir"]; +private ["_unit"]; _unit = _this select 0; -_killer = _this select 1; -_type = typeOf _unit; -_pos = getposATL _unit; -_dir = direction _unit; +//_killer = _this select 1; +//_type = typeOf _unit; +//_pos = getposATL _unit; +//_dir = direction _unit; if (local _unit) then { deleteVehicle _unit; }; diff --git a/dayz_code/compile/player_alertZombies.sqf b/dayz_code/compile/player_alertZombies.sqf index 470d35489..5d520a482 100644 --- a/dayz_code/compile/player_alertZombies.sqf +++ b/dayz_code/compile/player_alertZombies.sqf @@ -1,4 +1,4 @@ -private["_unit","_distance","_i","_listTalk","_zombie","_targets","_pos"]; +private ["_unit","_distance","_listTalk","_zombie","_targets","_pos","_doRun"]; //Alert Zed's to noise of shot _unit = _this select 0; _distance = _this select 1; diff --git a/dayz_code/compile/player_animalCheck.sqf b/dayz_code/compile/player_animalCheck.sqf index f792a73c4..f72fefd18 100644 --- a/dayz_code/compile/player_animalCheck.sqf +++ b/dayz_code/compile/player_animalCheck.sqf @@ -1,5 +1,5 @@ -private["_list","_animalssupported","_type","_root","_favouritezones","_randrefpoint","_PosList","_PosSelect","_Pos","_agent","_id","_pos","_near"]; +private ["_list","_animalssupported","_type","_root","_favouritezones","_randrefpoint","_PosList","_PosSelect","_Pos","_agent","_id"]; _list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance]; if (count _list < dayz_maxAnimals) then { diff --git a/dayz_code/compile/player_checkStealth.sqf b/dayz_code/compile/player_checkStealth.sqf index eadb8e155..a10dfa705 100644 --- a/dayz_code/compile/player_checkStealth.sqf +++ b/dayz_code/compile/player_checkStealth.sqf @@ -1,11 +1,11 @@ -private["_lightOn","_vel","_speed","_pos","_scalePose","_scaleMvmt","_scaleLight","_scaleAlert","_anim","_anim4","_initial","_scaleSound","_nearFlare","_scaler","_nearLight","_nearFire","_building","_isPlayerInside","_audial"]; +private ["_vel","_speed","_pos","_scalePose","_scaleMvmt","_scaleLight","_anim","_anim4","_initial","_scaleSound","_nearFlare","_scaler","_nearLight","_nearFire","_building","_isPlayerInside","_audial","_isWater","_isPZombie"]; _vel = velocity (vehicle player); _speed = (_vel distance [0,0,0]); _pos = getPosATL player; _scalePose = 0.9; _scaleMvmt = 0.2; //0.4; _scaleLight = 0.5; -_scaleAlert = 1; +// _scaleAlert = 1; _isPZombie = player isKindOf "PZombie_VB"; if(_isPZombie) exitWith { DAYZ_disAudial = 0; DAYZ_disVisual = 0; }; diff --git a/dayz_code/compile/player_crossbowBolt.sqf b/dayz_code/compile/player_crossbowBolt.sqf index 0a7d6b5da..124bad5a6 100644 --- a/dayz_code/compile/player_crossbowBolt.sqf +++ b/dayz_code/compile/player_crossbowBolt.sqf @@ -1,4 +1,4 @@ -private["_unit","_ammo","_audible","_distance","_listTalk","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr"]; +private ["_unit","_ammo","_distance","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr","_magazine"]; _unit = _this select 0; _weapon = _this select 1; _ammo = _this select 4; diff --git a/dayz_code/compile/player_death.sqf b/dayz_code/compile/player_death.sqf index f08a3c878..c73e8fdc9 100644 --- a/dayz_code/compile/player_death.sqf +++ b/dayz_code/compile/player_death.sqf @@ -1,4 +1,4 @@ -private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_infected"]; +private ["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_infected","_canHitFree","_myHumanity","_method","_body","_playerID","_id","_myGroup"]; if (deathHandled) exitWith {}; deathHandled = true; diff --git a/dayz_code/compile/player_fired.sqf b/dayz_code/compile/player_fired.sqf index 2af4997ff..40b62d833 100644 --- a/dayz_code/compile/player_fired.sqf +++ b/dayz_code/compile/player_fired.sqf @@ -1,4 +1,4 @@ -private["_unit","_ammo","_audible","_distance","_listTalk","_weapon"]; +private ["_unit","_ammo","_audible","_distance","_listTalk","_weapon","_group","_targets","_i","_projectile","_id","_caliber"]; //[unit, weapon, muzzle, mode, ammo, magazine, projectile] _unit = _this select 0; _weapon = _this select 1; diff --git a/dayz_code/compile/player_friendliesCheck.sqf b/dayz_code/compile/player_friendliesCheck.sqf index 3ff993a78..da6388bd8 100644 --- a/dayz_code/compile/player_friendliesCheck.sqf +++ b/dayz_code/compile/player_friendliesCheck.sqf @@ -1,4 +1,4 @@ -private["_charID", "_friendlies", "_rcharID", "_rfriendlyTo", "_tag", "_player", "_newTagList"]; +private ["_charID","_friendlies","_rcharID","_rfriendlyTo","_tag","_player","_newTagList","_position","_rfriendlies","_tagList"]; _charID = player getVariable ["characterID", "0"]; _friendlies = player getVariable ["friendlies", []]; _tagList = player getVariable ["tagList", []]; diff --git a/dayz_code/compile/player_gearSet.sqf b/dayz_code/compile/player_gearSet.sqf index 9968fdd65..fa617eeb8 100644 --- a/dayz_code/compile/player_gearSet.sqf +++ b/dayz_code/compile/player_gearSet.sqf @@ -1,4 +1,4 @@ -private["_inventory","_wpns","_mags","_idc","_isOK","_val","_item","_x"]; +private ["_inventory","_wpns","_mags","_idc","_isOK"]; _inventory = _this; if (count _inventory > 0) then { _wpns = _inventory select 0; diff --git a/dayz_code/compile/player_humanityChange.sqf b/dayz_code/compile/player_humanityChange.sqf index 7bb29a798..1d908c39f 100644 --- a/dayz_code/compile/player_humanityChange.sqf +++ b/dayz_code/compile/player_humanityChange.sqf @@ -1,4 +1,4 @@ -private["_object","_change","_humanity","_timeStart"]; +private ["_object","_change","_humanity","_wait"]; //Set Variables _object = _this select 0; _change = _this select 1; @@ -14,7 +14,7 @@ if (_object == player) then { waitUntil{!(player getVariable ["freeTarget",false])}; }; player setVariable ["freeTarget",true,true]; - _timeStart = time; + //_timeStart = time; sleep _wait; player setVariable ["freeTarget",false,true]; diff --git a/dayz_code/compile/player_humanityMorph.sqf b/dayz_code/compile/player_humanityMorph.sqf index 149add3ab..529d9a757 100644 --- a/dayz_code/compile/player_humanityMorph.sqf +++ b/dayz_code/compile/player_humanityMorph.sqf @@ -1,4 +1,4 @@ -private["_updates","_playerUID","_charID","_humanity","_worldspace","_model","_friendlies"]; +private ["_updates","_playerUID","_charID","_humanity","_worldspace","_model","_friendlies","_fractures","_old","_medical","_zombieKills","_headShots","_humanKills","_banditKills","_tagList"]; _playerUID = _this select 0; _charID = _this select 1; _model = _this select 2; diff --git a/dayz_code/compile/player_login.sqf b/dayz_code/compile/player_login.sqf index da62e7185..7259e6775 100644 --- a/dayz_code/compile/player_login.sqf +++ b/dayz_code/compile/player_login.sqf @@ -1,4 +1,4 @@ -private["_unit","_move","_damage","_wound","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle"]; +private ["_unit","_detail"]; _unit = _this select 0; _detail = _this select 1; if(_unit == getPlayerUID player) then { diff --git a/dayz_code/compile/player_music.sqf b/dayz_code/compile/player_music.sqf index c0ac6ea75..c4644bad4 100644 --- a/dayz_code/compile/player_music.sqf +++ b/dayz_code/compile/player_music.sqf @@ -1,4 +1,4 @@ -private["_zombie","_type","_chance","_rnd","_sound"]; +private ["_sound","_num","_length","_pause"]; while {!r_player_dead} do { _num = round(random 35); _sound = "z_suspense_" + str(_num); diff --git a/dayz_code/compile/player_onPause.sqf b/dayz_code/compile/player_onPause.sqf index 87b94b6bd..a18660537 100644 --- a/dayz_code/compile/player_onPause.sqf +++ b/dayz_code/compile/player_onPause.sqf @@ -1,4 +1,4 @@ -private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"]; +private ["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax"]; disableSerialization; waitUntil { _display = findDisplay 49; @@ -24,7 +24,7 @@ private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"]; switch true do { case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : { _btnAbort ctrlEnable false; - cutText [format[localize "str_abort_playerclose",_text], "PLAIN DOWN"]; + cutText [localize "str_abort_playerclose", "PLAIN DOWN"]; }; case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : { _btnAbort ctrlEnable false; @@ -38,7 +38,7 @@ private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"]; case (player getVariable["combattimeout", 0] >= time) : { _btnAbort ctrlEnable false; //cutText ["Cannot Abort while in combat!", "PLAIN DOWN"]; - cutText [format[localize "str_abort_playerincombat",_text], "PLAIN DOWN"]; + cutText [localize "str_abort_playerincombat", "PLAIN DOWN"]; }; default { _btnAbort ctrlEnable true; diff --git a/dayz_code/compile/player_packTent.sqf b/dayz_code/compile/player_packTent.sqf index c264d5b49..4e469c30b 100644 --- a/dayz_code/compile/player_packTent.sqf +++ b/dayz_code/compile/player_packTent.sqf @@ -1,7 +1,7 @@ /* [_obj] spawn player_packTent; */ -private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"]; +private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_alreadyPacking","_dis","_sfx","_classname","_location"]; if(TradeInprogress) exitWith { cutText ["Pack tent already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; diff --git a/dayz_code/compile/player_projectileNear.sqf b/dayz_code/compile/player_projectileNear.sqf index 3f2bf55cf..c645d9ea7 100644 --- a/dayz_code/compile/player_projectileNear.sqf +++ b/dayz_code/compile/player_projectileNear.sqf @@ -1,10 +1,10 @@ -private["_unit","_projectile","_isInCombat"]; +private ["_unit","_projectile","_isInCombat","_currentNear","_projectilespeed","_projectflight","_listNear","_callCount","_nearVehicle"]; _unit = _this select 0; _projectile = _this select 6; diag_log ("0"); -_isInComat = _unit getVariable["startcombattimer",0]; +//_isInComat = _unit getVariable["startcombattimer",0]; diag_log ("Bullit Speed: " +str(Speed _projectile)); diag_log ("Bullit Velocity: " +str(velocity _projectile)); diff --git a/dayz_code/compile/player_spawnCheck.sqf b/dayz_code/compile/player_spawnCheck.sqf index 81dea4d14..2c738088c 100644 --- a/dayz_code/compile/player_spawnCheck.sqf +++ b/dayz_code/compile/player_spawnCheck.sqf @@ -1,6 +1,6 @@ -private["_type","_isAir","_inVehicle","_dateNow","_maxZombies","_maxWildZombies","_age","_nearbyBuildings","_radius","_locationstypes","_nearestCity","_position","_nearbytype"]; +private ["_type","_isAir","_inVehicle","_dateNow","_maxZombies","_maxWildZombies","_age","_radius","_position","_markerstr","_markerstr1","_markerstr2","_markerstr3","_nearByObj","_handle","_looted","_cleared","_zombied","_config","_canLoot","_dis","_players","_spawnZombies","_nearby","_nearbyCount"]; _type = _this select 0; -_Keepspawning = _this select 1; +//_Keepspawning = _this select 1; _isAir = vehicle player iskindof "Air"; _inVehicle = (vehicle player != player); _dateNow = (DateToNumber date); @@ -8,7 +8,7 @@ _maxZombies = dayz_maxLocalZombies; _maxWildZombies = 3; _age = -1; -_nearbyBuildings = []; +//_nearbyBuildings = []; _radius = 200; _position = getPosATL player; diff --git a/dayz_code/compile/player_spawnlootCheck.sqf b/dayz_code/compile/player_spawnlootCheck.sqf index 3af651896..6f3b2c89c 100644 --- a/dayz_code/compile/player_spawnlootCheck.sqf +++ b/dayz_code/compile/player_spawnlootCheck.sqf @@ -1,4 +1,4 @@ -private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_nearbyBuildings","_nearby","_type","_config","_canZombie","_canLoot","_dis","_keepAwayDist","_isNoone","_looted","_cleared"];//_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings +private ["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_type","_looted","_cleared","_nearByObj","_handle","_x"];//_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings _radius = _this select 0; _position = _this select 1; diff --git a/dayz_code/compile/player_spawnzedCheck.sqf b/dayz_code/compile/player_spawnzedCheck.sqf index c77d38649..b4ae03b4f 100644 --- a/dayz_code/compile/player_spawnzedCheck.sqf +++ b/dayz_code/compile/player_spawnzedCheck.sqf @@ -1,13 +1,13 @@ -private["_radius","_position","_inVehicle","_dateNow","_age","_locationstypes","_nearestCity","_maxZombies","_nearby","_maxWildZombies","_tooManyZs","_tooManyWildZs","_type","_config","_canZombie","_dis","_zombied","_bPos","_zombiesNum","_withinRange","_spawnWildZs"]; +private ["_dateNow","_age","_zombied","_x"]; -_radius = _this select 0; -_position = _this select 1; -_inVehicle = _this select 2; +//_radius = _this select 0; +//_position = _this select 1; +//_inVehicle = _this select 2; _dateNow = _this select 3; _age = _this select 4; -_locationstypes = _this select 5; -_nearestCity = _this select 6; -_maxZombies = _this select 7; +//_locationstypes = _this select 5; +//_nearestCity = _this select 6; +//_maxZombies = _this select 7; _zombied = (_x getVariable ["zombieSpawn",-0.1]); diff --git a/dayz_code/compile/player_switchModel.sqf b/dayz_code/compile/player_switchModel.sqf index 55773ce1f..d9cbb9fc4 100644 --- a/dayz_code/compile/player_switchModel.sqf +++ b/dayz_code/compile/player_switchModel.sqf @@ -1,4 +1,4 @@ -private["_class","_position","_dir","_group","_oldUnit","_newUnit","_currentWpn","_muzzles","_currentAnim","_currentCamera"]; +private ["_class","_position","_dir","_group","_oldUnit","_newUnit","_currentWpn","_muzzles","_currentAnim","_playerUID","_weapons","_magazines","_primweapon","_secweapon","_newBackpackType","_backpackWpn","_backpackMag","_backpackWpnTypes","_backpackWpnQtys","_countr","_backpackmagTypes","_backpackmagQtys","_playerObjName"]; _class = _this; _position = getPosATL player; @@ -128,7 +128,7 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"]; if (!isNil "_newBackpackType") then { if (_newBackpackType != "") then { _newUnit addBackpack _newBackpackType; - _oldBackpack = dayz_myBackpack; + //_oldBackpack = dayz_myBackpack; dayz_myBackpack = unitBackpack _newUnit; diff --git a/dayz_code/compile/player_tameDog.sqf b/dayz_code/compile/player_tameDog.sqf index 46feaaaff..627fea5cf 100644 --- a/dayz_code/compile/player_tameDog.sqf +++ b/dayz_code/compile/player_tameDog.sqf @@ -1,8 +1,8 @@ -private["_target", "_caller", "_id", "_params", "_pos"]; +private ["_target","_id","_pos","_dog","_fsmid","_hasRawMeat","_hasdog"]; _target = _this select 0; -_caller = _this select 1; +//_caller = _this select 1; _id = _this select 2; -_params = _this select 3; +//_params = _this select 3; _pos = position _target; _hasRawMeat = "FoodSteakRaw" in magazines player; _hasdog = player getVariable ["dogid", "false"]; @@ -11,11 +11,12 @@ if ((_hasRawMeat) && (_hasdog == "false")) then { player removeMagazine "FoodSteakRaw"; deleteVehicle (_this select 0); _dog = (group player) createUnit [typeOf _target, _pos, [], 0, "FORM"]; - player setvariable ["dogid", _fsmid]; + _dog disableAI "FSM"; _fsmid = [_dog, typeOf _target] execFSM "\z\addons\dayz_code\system\dog_agent.fsm"; _fsmid setFSMVariable ["_handle", _fsmid]; _target removeAction _id; + player setvariable ["dogid", _fsmid]; } else { cutText ["You must have RawMeat", "PLAIN DOWN"]; }; diff --git a/dayz_code/compile/player_throwObject.sqf b/dayz_code/compile/player_throwObject.sqf index d0493fee3..527e2e632 100644 --- a/dayz_code/compile/player_throwObject.sqf +++ b/dayz_code/compile/player_throwObject.sqf @@ -1,4 +1,4 @@ -private["_unit","_ammo","_audible","_distance","_listTalk","_weapon","_projectile","_vUp","_endPos","_dir","_height","_bolt","_hitArray","_hitObject","_hitSelection","_config","_hitMemoryPt","_variation","_val","_doLoop","_countr"]; +private ["_unit","_ammo","_distance","_weapon","_projectile","_endPos","_dir","_doWait","_vel"]; _unit = _this select 0; _weapon = _this select 1; _ammo = _this select 4; diff --git a/dayz_code/compile/player_updateGui.sqf b/dayz_code/compile/player_updateGui.sqf index 746284c64..94f18148c 100644 --- a/dayz_code/compile/player_updateGui.sqf +++ b/dayz_code/compile/player_updateGui.sqf @@ -1,4 +1,4 @@ -private["_display","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye"/*,"_ctrlHumanity"*/,"_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible"]; +private ["_display","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl"]; disableSerialization; _foodVal = 1 - (dayz_hunger / SleepFood); @@ -85,7 +85,7 @@ _ctrlTemp ctrlSetText _temp; Visual: */ _visualtext = ""; -_visual = round((dayz_disVisual / 100) * 4) min 5; + _visual = (round((dayz_disVisual / 100) * 4)) min 5; if (_visual > 0) then {_visualtext = "\z\addons\dayz_code\gui\val_" + str(_visual) + "_ca.paa"}; _ctrlEye ctrlSetText _visualtext; @@ -93,7 +93,7 @@ _ctrlEye ctrlSetText _visualtext; Audible: */ _audibletext = ""; -_audible = round((dayz_disAudial / 50) * 4) min 5; + _audible = (round((dayz_disAudial / 50) * 4)) min 5; if (_audible > 0) then {_audibletext = "\z\addons\dayz_code\gui\val_" + str(_audible) + "_ca.paa"}; _ctrlEar ctrlSetText _audibletext; diff --git a/dayz_code/compile/player_weaponCheck.sqf b/dayz_code/compile/player_weaponCheck.sqf index caaca2c4d..77cb14a94 100644 --- a/dayz_code/compile/player_weaponCheck.sqf +++ b/dayz_code/compile/player_weaponCheck.sqf @@ -1,4 +1,4 @@ -private["_currentObjects","_newObjects","_checkObjects"]; +private ["_currentObjects","_newObjects","_checkObjects","_type","_qtyNow","_qtyBefore"]; //_newObjects = [_previous,weapons player] call player_weaponCheck; _currentObjects = _this select 0; _checkObjects = _this select 1; @@ -33,4 +33,4 @@ _newObjects = []; }; } forEach _checkObjects; -_change \ No newline at end of file +_change; \ No newline at end of file diff --git a/dayz_code/compile/player_weaponFiredNear.sqf b/dayz_code/compile/player_weaponFiredNear.sqf index 2c519c0a9..b85199674 100644 --- a/dayz_code/compile/player_weaponFiredNear.sqf +++ b/dayz_code/compile/player_weaponFiredNear.sqf @@ -1,5 +1,5 @@ //[unit, weapon, muzzle, mode, ammo, magazine, projectile] -private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","_result","_evType","_recordable","_inVehicle","_isPlayer","_isRocket","_dmgDistance","_isBallistic","_handled"]; +private ["_unit","_evType","_recordable","_inVehicle","_isPlayer","_isRocket","_dmgDistance","_isBallistic","_handled","_id","_firer","_distance","_weapon","_ammo","_killerID","_arc","_turretDir","_weaponDir","_pos1","_pos2","_facing","_firingArc","_isInFront","_isInRear"]; //Init //[unit, firer, distance, weapon, muzzle, mode, ammo] _unit = _this select 0; diff --git a/dayz_code/compile/player_zombieAttack.sqf b/dayz_code/compile/player_zombieAttack.sqf index 2f6c6dd8f..de5bc39d0 100644 --- a/dayz_code/compile/player_zombieAttack.sqf +++ b/dayz_code/compile/player_zombieAttack.sqf @@ -1,18 +1,19 @@ -private["_unit","_targets","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle"]; +private ["_unit","_targets","_move","_damage","_wound","_index","_cnt","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle","_rnd","_openVehicles","_chance","_attackanimations","_type"]; _unit = _this select 0; _type = _this select 1; _vehicle = (vehicle player); _targets = _unit getVariable ["targets",[]]; -//if (!(_vehicle in _targets)) exitWith {}; + +if (dayz_zedsAttackVehicles and !(_vehicle in _targets)) exitWith {}; //Do the attack if (r_player_unconscious && _vehicle == player && _type == "zombie") then { - _rnd = round(random 4) + 1; + _rnd = (round(random 4)) + 1; _move = "ZombieFeed" + str(_rnd); } else { if (_type == "zombie") then { - _rnd = round(random 9) + 1; + _rnd = (round(random 9)) + 1; _move = "ZombieStandingAttack" + str(_rnd); } else { _move = "Dog_Attack"; diff --git a/dayz_code/compile/player_zombieCheck.sqf b/dayz_code/compile/player_zombieCheck.sqf index 68589551e..abe700b75 100644 --- a/dayz_code/compile/player_zombieCheck.sqf +++ b/dayz_code/compile/player_zombieCheck.sqf @@ -1,4 +1,4 @@ -private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_continue","_type","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"]; +private ["_listTalk","_group","_eyeDir","_attacked","_continue","_type","_chance","_last","_refObj","_inAngle","_tPos","_zPos","_cantSee","_entHeight","_delta","_targets","_lowBlood","_pHeight"]; _refObj = vehicle player; _listTalk = (getPos _refObj) nearEntities ["zZombie_Base",80]; _pHeight = (getPosATL _refObj) select 2; @@ -10,13 +10,14 @@ _attacked = false; { _continue = true; _type = "zombie"; - _targets = _group getVariable ["targets",[]]; if (alive _x && _continue) then { private["_dist"]; _dist = (_x distance _refObj); _group = _x; + _targets = _group getVariable ["targets",[]]; + _chance = 1; if ((_x distance player < dayz_areaAffect) and !(animationState _x == "ZombieFeed")) then { if (_type == "zombie") then { [_x,"attack",(_chance),true] call dayz_zombieSpeak; }; diff --git a/dayz_code/compile/server_updatePlayer.sqf b/dayz_code/compile/server_updatePlayer.sqf index a37f5ca58..2ab6d1bb4 100644 --- a/dayz_code/compile/server_updatePlayer.sqf +++ b/dayz_code/compile/server_updatePlayer.sqf @@ -1,4 +1,4 @@ -private["_characterID","_currentModelCheck","_temp","_isSync","_currentWpn","_currentMag","_magazines","_qty","_qtyT","_val","_isNewPos","_isNewBackp","_humanity","_isNewGear","_doUpdate","_currentModel","_modelChk","_playerPos","_playerGear","_playerBackp","_backpack","_updates","_killsB","_killsH","_medical","_isNewMed","_character","_timeSince","_charPos","_isInVehicle","_justAte","_justDrank","_distanceFoot","_lastPos","_legs","_arms","_kills","_headShots","_killsCHK","_headShotsCHK","_timeGross","_timeLeft","_onLadder","_isTerminal"]; +private ["_characterID","_temp","_isSync","_currentWpn","_currentMag","_magazines","_qty","_qtyT","_val","_isNewPos","_isNewBackp","_humanity","_isNewGear","_doUpdate","_currentModel","_modelChk","_playerPos","_playerGear","_playerBackp","_backpack","_updates","_killsB","_killsH","_medical","_isNewMed","_character","_timeSince","_charPos","_isInVehicle","_justAte","_justDrank","_distanceFoot","_lastPos","_kills","_headShots","_timeGross","_timeLeft","_onLadder","_isTerminal","_vehicle","_wounds","_currentAnim","_muzzles","_array","_key","_lastTime","_config","_currentState"]; _character = _this; _doUpdate = false; _characterID = _character getVariable ["characterID","0"]; diff --git a/dayz_code/compile/spawn_loot.sqf b/dayz_code/compile/spawn_loot.sqf index 5d8885516..53fca049e 100644 --- a/dayz_code/compile/spawn_loot.sqf +++ b/dayz_code/compile/spawn_loot.sqf @@ -1,4 +1,4 @@ -private["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow","_iPosZ"]; +private ["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow","_mags"]; _iItem = _this select 0; _iClass = _this select 1; _iPos = _this select 2; @@ -22,11 +22,11 @@ switch (_iClass) do { if(_iClass == "clothes" or _iClass == "militaryclothes" or _iClass == "specialclothes") then { _max = 1; } else { - _max = ceil(random 2) + 1; + _max = (ceil(random 2)) + 1; }; while {_qty < _max} do { - _tQty = round(random 1) + 1; + _tQty = (round(random 1)) + 1; _index = floor(random _cntWeights); _index = _weights select _index; _canType = _itemTypes select _index; diff --git a/dayz_code/compile/stream_locationCheck.sqf b/dayz_code/compile/stream_locationCheck.sqf index 55bd1f535..c3bd6c690 100644 --- a/dayz_code/compile/stream_locationCheck.sqf +++ b/dayz_code/compile/stream_locationCheck.sqf @@ -1,6 +1,5 @@ //diag_log "running location check..."; -{ - private ["_location","_distCfg","_configClass","_distAct","_config","_position"]; +{private ["_location","_distCfg","_configClass","_distAct","_config","_position"]; _location = _x select 0; _distCfg = (_x select 2) + 200; _configClass = _x select 1; diff --git a/dayz_code/compile/tame_dog.sqf b/dayz_code/compile/tame_dog.sqf index e4c399ad8..d45db533b 100644 --- a/dayz_code/compile/tame_dog.sqf +++ b/dayz_code/compile/tame_dog.sqf @@ -13,7 +13,7 @@ _dog = Intended target of the script. */ -private["_target", "_caller", "_id", "_dog", "_pos", "_fsmid"]; +private ["_target","_caller","_id","_dog","_fsmid","_animalID"]; _target = _this select 0; _caller = _this select 1; _id = _this select 2; diff --git a/dayz_code/compile/ui_selectSlot.sqf b/dayz_code/compile/ui_selectSlot.sqf index d2dab26aa..db5608777 100644 --- a/dayz_code/compile/ui_selectSlot.sqf +++ b/dayz_code/compile/ui_selectSlot.sqf @@ -1,4 +1,4 @@ -private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_uiControl"]; +private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType"]; disableSerialization; _control = _this select 0; _button = _this select 1; diff --git a/dayz_code/init/variables.sqf b/dayz_code/init/variables.sqf index cf5c6138a..68d9382c3 100644 --- a/dayz_code/init/variables.sqf +++ b/dayz_code/init/variables.sqf @@ -400,6 +400,10 @@ if(isNil "dayz_maxpos") then { dayz_maxpos = 20000; }; +if(isNil "dayz_zedsAttackVehicles") then { + dayz_zedsAttackVehicles = false; +}; + // update objects dayz_updateObjects = ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","M240Nest_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"]; dayz_disallowedVault = ["TentStorage", "BuiltItems"]; diff --git a/dayz_code/medical/transfusion.sqf b/dayz_code/medical/transfusion.sqf index 9b7130173..e3c83da25 100644 --- a/dayz_code/medical/transfusion.sqf +++ b/dayz_code/medical/transfusion.sqf @@ -1,11 +1,12 @@ +private ["_started","_finished","_animState","_isMedic","_num_removed","_unit","_lastused","_text"]; // bleed.sqf _unit = (_this select 3) select 0; -_lowBlood = _unit getVariable ["USEC_lowBlood", false]; -_injured = _unit getVariable ["USEC_injured", false]; -_inPain = _unit getVariable ["USEC_inPain", false]; +//_lowBlood = _unit getVariable ["USEC_lowBlood", false]; +//_injured = _unit getVariable ["USEC_injured", false]; +//_inPain = _unit getVariable ["USEC_inPain", false]; _lastused = _unit getVariable ["LastTransfusion", time]; -// if (_lastused - time < 600) exitwith {cutText [format[(localize "str_actions_medical_18"),_text] , "PLAIN DOWN"]}; +if (_lastused - time < 60) exitwith {cutText [format[(localize "str_actions_medical_18"),_text] , "PLAIN DOWN"]}; call fnc_usec_medic_removeActions; r_action = false; diff --git a/dayz_equip/textures/planks.rvmat b/dayz_equip/textures/planks.rvmat index c95a871ca..8b8f7ec46 100644 --- a/dayz_equip/textures/planks.rvmat +++ b/dayz_equip/textures/planks.rvmat @@ -25,4 +25,4 @@ up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/dayz_equip/textures/rod.rvmat b/dayz_equip/textures/rod.rvmat index a0d45fb43..c69cd1bd4 100644 --- a/dayz_equip/textures/rod.rvmat +++ b/dayz_equip/textures/rod.rvmat @@ -25,4 +25,4 @@ up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/dayz_equip/textures/spindle.rvmat b/dayz_equip/textures/spindle.rvmat index 17682a083..49633e434 100644 --- a/dayz_equip/textures/spindle.rvmat +++ b/dayz_equip/textures/spindle.rvmat @@ -25,4 +25,4 @@ up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; -} \ No newline at end of file +}; \ No newline at end of file diff --git a/dayz_server/compile/server_publishVehicle2.sqf b/dayz_server/compile/server_publishVehicle2.sqf index c061e4e46..ca60ead41 100644 --- a/dayz_server/compile/server_publishVehicle2.sqf +++ b/dayz_server/compile/server_publishVehicle2.sqf @@ -1,9 +1,9 @@ -private["_isOK","_object","_worldspace","_location","_dir","_character","_tent","_class","_id","_uid","_dam","_hitpoints","_selection","_array","_damage","_randFuel","_fuel","_key","_result","_outcome","_totaldam","_parts","_retry","_done","_spawnDMG"]; +private ["_isOK","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected","_characterID"]; _object = _this select 0; _worldspace = _this select 1; _class = _this select 2; -_spawnDMG = _this select 3; +// _spawnDMG = _this select 3; _keySelected = _this select 4; _isOK = isClass(configFile >> "CfgWeapons" >> _keySelected); @@ -27,13 +27,13 @@ _key call server_hiveWrite; // Switched to spawn so we can wait a bit for the ID [_object,_uid,_characterID,_class,_dir,_location] spawn { - private["_object","_uid","_characterID","_done","_retry","_key","_result","_outcome","_oid","_selection","_dam","_class"]; + private ["_object","_uid","_characterID","_done","_retry","_key","_result","_outcome","_oid","_class","_location","_object_para"]; _object = _this select 0; _uid = _this select 1; _characterID = _this select 2; _class = _this select 3; - _dir = _this select 4; + //_dir = _this select 4; _location = _this select 5; _done = false; diff --git a/dayz_server/compile/server_updateObject.sqf b/dayz_server/compile/server_updateObject.sqf index 405069ae9..919d3c7b2 100644 --- a/dayz_server/compile/server_updateObject.sqf +++ b/dayz_server/compile/server_updateObject.sqf @@ -1,16 +1,15 @@ /* [_object,_type] spawn server_updateObject; */ -private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk","_counter","_removeCounter","_parachuteWest","_firstTime","_object_killed","_object_repair"]; +private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk","_parachuteWest","_firstTime","_object_killed","_object_repair","_isbuildable"]; _object = _this select 0; _type = _this select 1; _parachuteWest = typeOf _object == "ParachuteWest"; +_isbuildable = (typeOf _object) in dayz_allowedObjects; _isNotOk = false; _firstTime = false; -_removeCounter = 0; - _objectID = _object getVariable ["ObjectID","0"]; _uid = _object getVariable ["ObjectUID","0"]; @@ -26,17 +25,14 @@ if (!_parachuteWest) then { { _object_position = getPosATL _object; _isNotOk = true; - - // Loop to wait it out - _counter = _object getVariable ["markedForRemoval",0]; - - _removeCounter = _counter + 1; - _object setVariable ["markedForRemoval",(_counter + 1)]; }; }; -if (_isNotOk and _removeCounter < 10) exitWith { diag_log(format["About to remove vehicle: %1 - %2 / 10", typeOf _object, _removeCounter]); }; -if (_isNotOk and _removeCounter >= 10) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); }; +// do not update if buildable and not ok +if (_isNotOk and _isbuildable) exitWith { }; + +// delete if still not ok +if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); }; _lastUpdate = _object getVariable ["lastUpdate",time];