This commit is contained in:
A Clark
2012-12-20 15:04:59 -06:00
parent 0faab1b8ff
commit e222efa642
9 changed files with 156 additions and 130 deletions

View File

@@ -165,6 +165,8 @@ if (_damage > 0.4) then { //0.25
};
};
if(!_isHit) then {
_isPZombie = player isKindOf "PZombie_VB";
if(!_isPZombie) then {
//Create Wound
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
@@ -189,6 +191,7 @@ if (_damage > 0.4) then { //0.25
};
};
};
};
if (_type == 1) then {
/*
BALISTIC DAMAGE

View File

@@ -8,7 +8,7 @@ _scaleLight = 0.5;
_scaleAlert = 1;
_isPZombie = player isKindOf "PZombie_VB";
if(_isPZombie) exitWith {};
if(_isPZombie) exitWith { DAYZ_disAudial = 0; DAYZ_disVisual = 0; };
//Assess Players Position
_anim = animationState player;

View File

@@ -1,63 +1,19 @@
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_dont_kill","_model"];
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_infected"];
if (deathHandled) exitWith {};
deathHandled = true;
//Death
_dont_kill = false;
_body = player;
_playerID = getPlayerUID player;
// If player was infected resurect as a zombie before death
_infected = 0;
if (r_player_infected) then {
if(player isKindOf "PZombie_VB") then {
// do nothing kill anyways
} else {
_model = ["pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"] select floor (random 11);
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
r_player_inpain = false;
r_player_dead = false;
r_player_injured = false;
r_player_cardiac = false;
//Give Blood
r_player_blood = r_player_bloodTotal;
player setVariable["USEC_lowBlood",false,true];
usecMorphine = [player,player];
publicVariable "usecMorphine";
player setVariable ["USEC_inPain", false, true];
usecBandage = [player,player];
publicVariable "usecBandage";
player setdamage 0;
{player setVariable[_x,false,true];} forEach USEC_woundHit;
player setVariable ["USEC_injured",false,true];
sleep 1;
r_player_handler = false;
nul = [] spawn fnc_usec_recoverUncons;
disableUserInput false;
// player setVariable ["medForceUpdate",true,true];
if (!(player getVariable ["NORRN_unconscious", true])) then {
nul = [] spawn fnc_usec_recoverUncons;
_infected = 1;
};
if(animationState player == "AmovPpneMstpSnonWnonDnon_healed") then {
nul = [] spawn fnc_usec_recoverUncons;
};
_dont_kill = true;
};
};
if (_dont_kill) exitWith {};
//Send Death Notice
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName];
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
publicVariableServer "dayzDeath";
if (isServer) then {
_id = dayzDeath spawn server_playerDied;
@@ -67,7 +23,6 @@ _id = [player,50,true,getPosATL player] spawn player_alertZombies;
sleep 0.5;
player setDamage 1;
0.1 fadeSound 0;

View File

@@ -7,6 +7,7 @@ _range = 300;
_manDis = 0;
_targets = _agent getVariable ["targets",[]];
/*
//Search for fires
if (count _targets == 0) then {
_fires = nearestObjects [_agent,["Land_Fire"],_range];
@@ -20,6 +21,7 @@ if (count _targets == 0) then {
};
} forEach _fires;
};
*/
if (isNil "_targets") exitWith {};
//Search for objects

View File

@@ -1,4 +1,4 @@
/*%FSM<COMPILE "D:\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Player Monitor">*/
/*%FSM<COMPILE "F:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Player Monitor">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-75.000000,-350.000000,25.000000,-300.000000,0.000000,"init"};
@@ -36,7 +36,7 @@ item31[] = {"ERROR__Bad_Versi",2,250,175.000000,650.000000,275.000000,700.000000
item32[] = {"Display_Ready",4,218,-175.000000,900.000000,-75.000000,950.000000,0.000000,"Display" \n "Ready"};
item33[] = {"Preload_Display",2,250,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"};
item34[] = {"Preload_Done",4,218,-175.000000,1000.000000,-75.000000,1050.000000,0.000000,"Preload" \n "Done"};
item35[] = {"Initialize",2,4346,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
item35[] = {"Initialize",2,250,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
item36[] = {"Finish",1,250,-75.000000,1150.000000,25.000000,1200.000000,0.000000,"Finish"};
item37[] = {"True",8,218,25.000000,1100.000000,125.000000,1150.000000,0.000000,"True"};
item38[] = {"Too_Long",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"Too" \n "Long"};
@@ -45,15 +45,17 @@ item40[] = {"Too_Long",4,218,300.000000,550.000000,400.000000,600.000000,0.00000
item41[] = {"Too_Long",4,218,300.000000,650.000000,400.000000,700.000000,0.000000,"Too" \n "Long"};
item42[] = {"Enable_Sim",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"Enable Sim"};
item43[] = {"Initialized",4,218,-175.000000,-150.000000,-75.000000,-100.000000,0.000000,"Initialized"};
item44[] = {"New_Character",4,218,-275.000000,350.000000,-175.000000,400.000000,5.000000,"New" \n "Character"};
item45[] = {"Gender_Selection",2,250,-400.000000,350.000000,-300.000000,400.000000,0.000000,"Gender Selection" \n "Dialog"};
item46[] = {"Selected",4,218,-400.000000,450.000000,-300.000000,500.000000,0.000000,"Selected"};
item47[] = {"Process",2,250,-275.000000,450.000000,-175.000000,500.000000,0.000000,"Process"};
item44[] = {"New_Character",4,4314,-425.000000,275.000000,-325.000000,325.000000,5.000000,"New" \n "Character"};
item45[] = {"Gender_Selection",2,250,-500.000000,350.000000,-400.000000,400.000000,0.000000,"Gender Selection" \n "Dialog"};
item46[] = {"Selected",4,218,-450.000000,450.000000,-350.000000,500.000000,0.000000,"Selected"};
item47[] = {"Process",2,250,-300.000000,475.000000,-200.000000,525.000000,0.000000,"Process"};
item48[] = {"no_PlayerID",4,218,50.000000,-100.000000,150.000000,-50.000000,2.000000,"no PlayerID"};
item49[] = {"ERROR__No_Player_1",2,250,175.000000,-100.000000,275.000000,-50.000000,0.000000,"ERROR:" \n "No PlayerID"};
item50[] = {"Too_Long",4,218,300.000000,-100.000000,400.000000,-50.000000,0.000000,"Too" \n "Long"};
item51[] = {"Stream",2,250,-75.000000,750.000000,25.000000,800.000000,0.000000,"Stream"};
item52[] = {"Preloaded",4,218,-175.000000,800.000000,-75.000000,850.000000,0.000000,"Preloaded"};
item53[] = {"Pzombie_Characte",4,218,-250.000000,350.000000,-150.000000,400.000000,5.000000,"Pzombie" \n "Character"};
item54[] = {"PZombie_Selectio",2,250,-375.000000,375.000000,-275.000000,425.000000,0.000000,"PZombie Selection"};
link0[] = {0,1};
link1[] = {0,5};
link2[] = {1,2};
@@ -77,45 +79,48 @@ link19[] = {16,17};
link20[] = {17,18};
link21[] = {17,20};
link22[] = {17,44};
link23[] = {18,19};
link24[] = {19,39};
link25[] = {20,21};
link26[] = {21,22};
link27[] = {22,23};
link28[] = {23,24};
link29[] = {23,26};
link30[] = {24,25};
link31[] = {25,40};
link32[] = {26,27};
link33[] = {27,28};
link34[] = {27,30};
link35[] = {28,51};
link36[] = {29,32};
link37[] = {30,31};
link38[] = {31,41};
link39[] = {32,33};
link40[] = {33,34};
link41[] = {34,35};
link42[] = {35,37};
link43[] = {37,36};
link44[] = {38,14};
link45[] = {39,19};
link46[] = {40,25};
link47[] = {41,31};
link48[] = {42,6};
link49[] = {42,48};
link50[] = {43,42};
link51[] = {44,45};
link52[] = {45,46};
link53[] = {46,47};
link54[] = {47,20};
link55[] = {48,49};
link56[] = {49,50};
link57[] = {50,49};
link58[] = {51,52};
link59[] = {52,29};
globals[] = {25.000000,1,0,0,0,640,480,1,81,6316128,1,-561.815979,576.218079,1244.091797,527.904846,613,601,1};
window[] = {2,-1,-1,-32000,-32000,890,110,1081,110,3,630};
link23[] = {17,53};
link24[] = {18,19};
link25[] = {19,39};
link26[] = {20,21};
link27[] = {21,22};
link28[] = {22,23};
link29[] = {23,24};
link30[] = {23,26};
link31[] = {24,25};
link32[] = {25,40};
link33[] = {26,27};
link34[] = {27,28};
link35[] = {27,30};
link36[] = {28,51};
link37[] = {29,32};
link38[] = {30,31};
link39[] = {31,41};
link40[] = {32,33};
link41[] = {33,34};
link42[] = {34,35};
link43[] = {35,37};
link44[] = {37,36};
link45[] = {38,14};
link46[] = {39,19};
link47[] = {40,25};
link48[] = {41,31};
link49[] = {42,6};
link50[] = {42,48};
link51[] = {43,42};
link52[] = {44,45};
link53[] = {45,46};
link54[] = {46,47};
link55[] = {47,20};
link56[] = {48,49};
link57[] = {49,50};
link58[] = {50,49};
link59[] = {51,52};
link60[] = {52,29};
link61[] = {53,54};
link62[] = {54,20};
globals[] = {25.000000,1,0,0,0,640,480,1,85,6316128,1,-783.086182,670.969788,890.729858,-115.220749,1272,880,1};
window[] = {2,-1,-1,-1,-1,806,1706,2677,26,3,1290};
*//*%FSM</HEAD>*/
class FSM
{
@@ -456,8 +461,10 @@ class FSM
"_version = _msg select 5;" \n
"_model = _msg select 6;" \n
"" \n
"_isHiveOk = false;" \n
"_newPlayer = false;" \n
"_isHiveOk = false; // _msg select 7;" \n
"_newPlayer = false; // _msg select 8;" \n
"" \n
"_isInfected = _msg select 9;" \n
"" \n
"if (count _msg > 7) then {" \n
" _isHiveOk = _msg select 7;" \n
@@ -508,7 +515,17 @@ class FSM
priority = 5.000000;
to="Gender_Selection";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isNew"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isNew && _isInfected == 0"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Pzombie_Characte">*/
class Pzombie_Characte
{
priority = 5.000000;
to="PZombie_Selectio";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isNew && _isInfected == 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@@ -1276,6 +1293,27 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "PZombie_Selectio">*/
class PZombie_Selectio
{
name = "PZombie_Selectio";
init = /*%FSM<STATEINIT""">*/"_model = ""pz_villager1"";"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Hive_Ok">*/
class Hive_Ok
{
priority = 0.000000;
to="Phase_One";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =

View File

@@ -1071,13 +1071,13 @@ class CfgMagazines
{
scope = 2;
displayName = "Business Suit";
descriptionShort = "Rebel Uniform;
descriptionShort = "Business Suit;
};
class Skin_Priest_DZ: SkinBase
{
scope = 2;
displayName = "Priest Outfit";
descriptionShort = "Rebel Uniform;
descriptionShort = "Priest Outfit;
};
class Skin_Rocker2_DZ: SkinBase
{

View File

@@ -5,6 +5,7 @@ _minutes = _this select 1;
_newObject = _this select 2;
_playerID = _this select 3;
_playerName = _this select 4;
_infected = _this select 5;
dayz_disco = dayz_disco - [_playerID];
_newObject setVariable["processedDeath",time];
@@ -23,7 +24,7 @@ if (typeName _minutes == "STRING") then
if (_characterID != "0") then
{
_key = format["CHILD:202:%1:%2:",_characterID,_minutes];
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;
}

View File

@@ -1,4 +1,4 @@
private["_botActive","_int","_newModel","_doLoop","_wait","_hiveVer","_isHiveOk","_playerID","_playerObj","_randomSpot","_publishTo","_primary","_secondary","_key","_result","_charID","_playerObj","_playerName","_finished","_spawnPos","_spawnDir","_items","_counter","_magazines","_weapons","_group","_backpack","_worldspace","_direction","_newUnit","_score","_position","_isNew","_inventory","_backpack","_medical","_survival","_stats","_state"];
private["_isInfected","_botActive","_int","_newModel","_doLoop","_wait","_hiveVer","_isHiveOk","_playerID","_playerObj","_randomSpot","_publishTo","_primary","_secondary","_key","_result","_charID","_playerObj","_playerName","_finished","_spawnPos","_spawnDir","_items","_counter","_magazines","_weapons","_group","_backpack","_worldspace","_direction","_newUnit","_score","_position","_isNew","_inventory","_backpack","_medical","_survival","_stats","_state"];
//Set Variables
diag_log ("STARTING LOGIN: " + str(_this));
@@ -25,6 +25,7 @@ _survival = [0,0,0];
_tent = [];
_state = [];
_direction = 0;
_isInfected = 0;
_model = "";
_newUnit = objNull;
_botActive = false;
@@ -63,7 +64,7 @@ if ((_primary select 0) == "ERROR") exitWith {
//Process request
_newPlayer = _primary select 1;
_isNew = count _primary < 6; //_result select 1;
_isNew = count _primary < 7; //_result select 1;
_charID = _primary select 2;
_randomSpot = false;
@@ -85,8 +86,10 @@ if (!_isNew) then {
};
} else {
_model = _primary select 3;
_hiveVer = _primary select 4;
_isInfected = _primary select 3;
_model = _primary select 4;
_hiveVer = _primary select 5;
if (isNil "_model") then {
_model = "Survivor2_DZ";
} else {
@@ -118,5 +121,5 @@ if (_hiveVer >= dayz_hiveVersionNo) then {
//Server publishes variable to clients and WAITS
//_playerObj setVariable ["publish",[_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer],true];
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer];
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
(owner _playerObj) publicVariableClient "dayzPlayerLogin";

View File

@@ -473,7 +473,7 @@ class cfgWeapons
recoil = "recoil_single_primary_4outof10";
recoilProne = "recoil_single_primary_prone_4outof10";
};
magazines[] = {"BoltSteel"};
magazines[] = {"BoltSteel", "BoltSteel4pack", "BoltSteel8pack"};
bullet1[] = {"dayz_weapons\sounds\crossbow_bolt",0.177828,1,15};
soundBullet[] = {"bullet1",1};
};
@@ -709,6 +709,30 @@ class cfgMagazines
descriptionShort = "$STR_MAG_DESC_3";
displayNameShort = "$STR_MAG_ACTION_3";
};
class BoltSteel4pack: CA_Magazine
{
scope = 2;
displayName = "$STR_MAG_NAME_3";
model = "\dayz_weapons\models\bolt_gear";
picture = "\dayz_weapons\textures\equip_bolt_ca.paa";
ammo = "BoltSteel";
count = 4;
initSpeed = 150;
descriptionShort = "$STR_MAG_DESC_3";
displayNameShort = "$STR_MAG_ACTION_3";
};
class BoltSteel8pack: CA_Magazine
{
scope = 2;
displayName = "$STR_MAG_NAME_3";
model = "\dayz_weapons\models\bolt_gear";
picture = "\dayz_weapons\textures\equip_bolt_ca.paa";
ammo = "BoltSteel";
count = 8;
initSpeed = 150;
descriptionShort = "$STR_MAG_DESC_3";
displayNameShort = "$STR_MAG_ACTION_3";
};
};
class CfgCloudlets
{