From bae5ba2d7244756f7fa577d02c59e9eee55461d2 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sat, 26 Jan 2013 17:13:46 -0600 Subject: [PATCH] 0.792 --- dayz_code/actions/cook.sqf | 4 +- dayz_code/actions/pzombie/pz_feed.sqf | 169 ++++++++++++++------------ dayz_code/config.cpp | 36 +++++- dayz_code/rscTitles.hpp | 2 +- dayz_code/system/player_monitor.fsm | 10 +- 5 files changed, 128 insertions(+), 93 deletions(-) diff --git a/dayz_code/actions/cook.sqf b/dayz_code/actions/cook.sqf index eaa146fd8..c7d657fe7 100644 --- a/dayz_code/actions/cook.sqf +++ b/dayz_code/actions/cook.sqf @@ -67,7 +67,7 @@ _qty = {_x == "FoodrabbitRaw"} count magazines player; _hasFoodMeat = "FoodrabbitRaw" in magazines player; if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]}; player removeMagazine "FoodrabbitRaw"; - player addMagazine "FoodBaconCooked"; + player addMagazine "FoodRabbitCooked"; sleep 1; }; cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; @@ -84,7 +84,7 @@ _qty = {_x == "FoodbaconRaw"} count magazines player; _hasFoodMeat = "FoodbaconRaw" in magazines player; if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]}; player removeMagazine "FoodbaconRaw"; - player addMagazine "FoodRabbitCooked"; + player addMagazine "FoodBaconCooked"; sleep 1; }; cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"]; diff --git a/dayz_code/actions/pzombie/pz_feed.sqf b/dayz_code/actions/pzombie/pz_feed.sqf index 8e38239c9..d07beb435 100644 --- a/dayz_code/actions/pzombie/pz_feed.sqf +++ b/dayz_code/actions/pzombie/pz_feed.sqf @@ -1,89 +1,98 @@ -private["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty"]; +private["_item","_id","_regen","_isAnimal","_animalType","_isMan","_config","_isListed","_qty","_ent"]; _item = _this select 3; +_ent = _item; player removeAction s_player_butcher; -_item setDammage 1; - -// wait until dead -waitUntil {not alive _item}; - -s_player_butcher = -1; - -// player playActionNow "PutDown"; -_id = [player,50,true,(getPosATL player)] spawn player_alertZombies; - -[player,"gut",0,false] call dayz_zombieSpeak; - -_item setVariable["meatHarvested",true,true]; - -sleep 1; - -_regen = 200; - -_isAnimal = _item isKindOf "Animal"; -_animalType = typeOf _item; -_isMan = _item isKindOf "Man"; - -if(_isAnimal) then { - _config = configFile >> "CfgSurvival" >> "Meat" >> _animalType; - _isListed = isClass (_config); - - _qty = 1; - if (_isListed) then { - _qty = getNumber (_config >> "yield"); - _regen = _qty * 200; - }; - +if (_ent isKindOf "Animal") then { + _ent setDamage 1; } else { + _ent setHit ["legs",1]; + _ent setVariable ["hit_legs",2,true]; +}; - if(_isMan) then { - _regen == 12000; +_rnd = round(random 4) + 1; +_move = "ZombieFeed" + str(_rnd); + +[nil, player, rSWITCHMOVE,_move] call RE; + +sleep 5; + +if(not alive _item) then { + + + // player playActionNow "PutDown"; + _id = [player,50,true,(getPosATL player)] spawn player_alertZombies; + + [player,"gut",0,false] call dayz_zombieSpeak; + + _item setVariable["meatHarvested",true,true]; + + sleep 1; + + _regen = 200; + + _isAnimal = _item isKindOf "Animal"; + _animalType = typeOf _item; + _isMan = _item isKindOf "Man"; + + if(_isAnimal) then { + _config = configFile >> "CfgSurvival" >> "Meat" >> _animalType; + _isListed = isClass (_config); + + _qty = 1; + if (_isListed) then { + _qty = getNumber (_config >> "yield"); + _regen = _qty * 200; + }; + + } else { + + if(_isMan) then { + _regen == 12000; + }; }; + + + r_player_blood = r_player_blood + _regen; + if (r_player_blood > r_player_bloodTotal) then { + r_player_blood = r_player_bloodTotal; + }; + + player setVariable ["messing",[dayz_hunger,dayz_thirst],true]; + player setVariable["USEC_BloodQty",r_player_blood,true]; + player setVariable["medForceUpdate",true]; + + dayz_lastDrink = time; + dayz_thirst = 0; + + dayz_lastMeal = time; + dayz_hunger = 0; + + ["dayzPlayerSave",[player,[],true]] call callRpcProcedure; + + [player,"eat",0,false] call dayz_zombieSpeak; + + // todo: dump loot on ground and then remove + + //Ensure Control is visible + _display = uiNamespace getVariable 'DAYZ_GUI_display'; + _control = _display displayCtrl 1301; + _control ctrlShow true; + + _bloodVal = r_player_blood / r_player_bloodTotal; + if (_bloodVal >= 0.2) then { + _ctrlBlood ctrlShow true; + }; + + //Ensure Control is visible + _display = uiNamespace getVariable 'DAYZ_GUI_display'; + _control = _display displayCtrl 1302; + _control ctrlShow true; + + + cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"]; + }; - -r_player_blood = r_player_blood + _regen; -if (r_player_blood > r_player_bloodTotal) then { - r_player_blood = r_player_bloodTotal; -}; - -player setVariable ["messing",[dayz_hunger,dayz_thirst],true]; -player setVariable["USEC_BloodQty",r_player_blood,true]; -player setVariable["medForceUpdate",true]; - -dayz_lastDrink = time; -dayz_thirst = 0; - -dayz_lastMeal = time; -dayz_hunger = 0; - -["dayzPlayerSave",[player,[],true]] call callRpcProcedure; - -[player,"eat",0,false] call dayz_zombieSpeak; - -// todo: dump loot on ground and then remove - -//Ensure Control is visible -_display = uiNamespace getVariable 'DAYZ_GUI_display'; -_control = _display displayCtrl 1301; -_control ctrlShow true; - -_bloodVal = r_player_blood / r_player_bloodTotal; -if (_bloodVal >= 0.2) then { - _ctrlBlood ctrlShow true; -}; - -//Ensure Control is visible -_display = uiNamespace getVariable 'DAYZ_GUI_display'; -_control = _display displayCtrl 1302; -_control ctrlShow true; - -// Remove body -["dayzHideBody",_item] call broadcastRpcCallAll; - - -cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"]; - -sleep 10; -deleteVehicle _item; \ No newline at end of file +s_player_butcher = -1; \ No newline at end of file diff --git a/dayz_code/config.cpp b/dayz_code/config.cpp index 25f9e178e..369b3f42d 100644 --- a/dayz_code/config.cpp +++ b/dayz_code/config.cpp @@ -33,7 +33,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayepoch.com"; - version = "0.791"; + version = "0.792"; hiveVersion = 0.96; //0.93 }; }; @@ -233,6 +233,10 @@ class CfgSurvival { sex = "male"; playerModel = "Sniper1_DZ"; }; + class Skin_Camo1_DZ: Default { + sex = "male"; + playerModel = "Camo1_DZ"; + }; class Skin_Rocket_DZ: Default { sex = "male"; playerModel = "Rocket_DZ"; @@ -355,7 +359,13 @@ class CfgBuildingLoot { { "Skin_Camo1_DZ","magazine" }, { "Skin_Sniper1_DZ","magazine" }, { "WeaponHolder_MeleeCrowbar","object" }, - {"MR43","weapon"} + {"MR43","weapon"}, + { "Skin_RU_Policeman_DZ","magazine" }, + { "Skin_Pilot_EP1_DZ","magazine" }, + { "Skin_Functionary1_EP1_DZ","magazine" }, + { "Skin_Priest_DZ","magazine" }, + { "Skin_Rocker2_DZ","magazine" }, + { "Skin_SurvivorW3_DZ","magazine" }, }; itemChance[] = { 0.01, @@ -384,7 +394,13 @@ class CfgBuildingLoot { 0.01, 0.01, 0.08, - 0.03 + 0.03, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, + 0.05, }; }; class Office: Residential { @@ -819,7 +835,12 @@ class HeliCrash_No50s: Default { {"G36_C_SD_camo","weapon"}, {"M40A3","weapon"}, {"100Rnd_762x54_PK","magazine"}, - { "Skin_Soldier1_DZ","magazine" } + { "Skin_Soldier1_DZ","magazine" }, + { "Skin_Ins_Soldier_GL_DZ","magazine" }, + { "Skin_GUE_Commander_DZ","magazine" }, + { "Skin_Bandit1_DZ","magazine" }, + { "Skin_BanditW1_DZ","magazine" }, + { "Skin_BanditW2_DZ","magazine" }, }; itemChance[] = { 0.10, @@ -873,7 +894,12 @@ class HeliCrash_No50s: Default { 0.01, //{"G36_C_SD_camo","weapon"}, 0.02, // M40A3 0.01, //("100Rnd_762x54_PK","magazine"} - 0.05 + 0.05, + 0.01, + 0.01, + 0.01, + 0.01, + 0.01, }; }; class Church: Residential { diff --git a/dayz_code/rscTitles.hpp b/dayz_code/rscTitles.hpp index 286bca1eb..d9f2fe40e 100644 --- a/dayz_code/rscTitles.hpp +++ b/dayz_code/rscTitles.hpp @@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 0.79 (1.7.5.M1D25)"; + text = "DayZ Epoch 0.792 (1.7.5.M1D25)"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; class CA_TitleMainMenu; diff --git a/dayz_code/system/player_monitor.fsm b/dayz_code/system/player_monitor.fsm index b4531b50f..ef2624f06 100644 --- a/dayz_code/system/player_monitor.fsm +++ b/dayz_code/system/player_monitor.fsm @@ -456,9 +456,8 @@ class FSM "_version = _msg select 5;" \n "_model = _msg select 6;" \n "" \n - "_isHiveOk = false; // _msg select 7;" \n - "_newPlayer = false; // _msg select 8;" \n - "" \n + "_isHiveOk = false;" \n + "_newPlayer = false;" \n "_isInfected = _msg select 9;" \n "" \n "if (count _msg > 7) then {" \n @@ -1079,9 +1078,10 @@ class FSM "dayz_slowCheck = [] spawn player_spawn_2;" \n "" \n "_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n - "_nearestCity = (nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000] select 0);" \n + "_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n "_town = ""Wilderness"";" \n - "if (!isNil ""_nearestCity"") then {_town = text _nearestCity};" \n + "" \n + "if (count _nearestCity > 0) then {_town = text (_nearestCity select 0)};" \n "" \n "_strTime = call curTimeStr;" \n "_strDate = date;" \n