Blood bag issue #1310

Needs a test.
Fixed timer.
This commit is contained in:
icomrade
2014-06-04 20:26:31 -04:00
parent d6a5b6ae67
commit 40b1063fa9
3 changed files with 16 additions and 15 deletions

View File

@@ -436,7 +436,6 @@ dayz_spawnArea = 200; // radius around player where we can spawn loot & Z
dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing && angle checks dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing && angle checks
dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted
selfTransfusionTime = time; //time to keep for last self transfusion.
if(isNil "DZE_SelfTransfuse") then { if(isNil "DZE_SelfTransfuse") then {
DZE_SelfTransfuse = false; DZE_SelfTransfuse = false;
@@ -469,7 +468,7 @@ if(isNil "DZEdebug") then {
DZEdebug = false; DZEdebug = false;
}; };
if (isNil "DZE_Debug_Damage") then { if (isNil "DZE_Debug_Damage") then {
DZE_Debug_Damage = true; //enable by default DZE_Debug_Damage = true;
}; };
if(isNil "DZE_TRADER_SPAWNMODE") then { if(isNil "DZE_TRADER_SPAWNMODE") then {
DZE_TRADER_SPAWNMODE = false; DZE_TRADER_SPAWNMODE = false;

View File

@@ -5,9 +5,10 @@ _unit = _this select 0;
_rndInfection = (random 15); _rndInfection = (random 15);
_TransfusionInfection = (_rndInfection < 1); _TransfusionInfection = (_rndInfection < 1);
if (_unit == player) then { if (_unit == player) then {
if ((count _this) > 1) then { if (((count _this) > 1) && {(typeName (_this select 1)) == "ARRAY"}) then { //DO NOT TOUCH THE CODE BRACKETS!
_selfTransValues = _this select 1; _selfTransValues = _this select 1;
r_player_blood = (_selfTransValues select 0); r_player_blood = r_player_blood + (_selfTransValues select 0);
if (r_player_blood > 12000) then {r_player_blood = 12000;};
_TransfusionInfection = ((random (_selfTransValues select 1)) < 1); _TransfusionInfection = ((random (_selfTransValues select 1)) < 1);
} else { } else {
r_player_blood = r_player_bloodTotal; r_player_blood = r_player_bloodTotal;
@@ -27,5 +28,5 @@ if (_unit == player) then {
_control = _display displayCtrl 1300; _control = _display displayCtrl 1300;
_control ctrlShow true; _control ctrlShow true;
player setVariable["USEC_BloodQty",r_player_bloodTotal,true]; player setVariable["USEC_BloodQty",r_player_blood,true];
}; };

View File

@@ -20,7 +20,7 @@ item15[] = {"Parse_Login",2,250,-75.000000,500.000000,25.000000,550.000000,0.000
item16[] = {"Hive_Bad",4,218,50.000000,500.000000,150.000000,550.000000,10.000000,"Hive" \n "Bad"}; item16[] = {"Hive_Bad",4,218,50.000000,500.000000,150.000000,550.000000,10.000000,"Hive" \n "Bad"};
item17[] = {"ERROR__Wrong_HIVE",2,250,175.000000,500.000000,275.000000,550.000000,0.000000,"ERROR:" \n "Wrong HIVE" \n "Version"}; item17[] = {"ERROR__Wrong_HIVE",2,250,175.000000,500.000000,275.000000,550.000000,0.000000,"ERROR:" \n "Wrong HIVE" \n "Version"};
item18[] = {"Hive_Ok",4,218,-175.000000,550.000000,-75.000000,600.000000,0.000000,"Hive" \n "Ok"}; item18[] = {"Hive_Ok",4,218,-175.000000,550.000000,-75.000000,600.000000,0.000000,"Hive" \n "Ok"};
item19[] = {"Phase_One",2,4346,-75.000000,600.000000,25.000000,650.000000,0.000000,"Phase One"}; item19[] = {"Phase_One",2,250,-75.000000,600.000000,25.000000,650.000000,0.000000,"Phase One"};
item20[] = {"Response",4,218,-175.000000,650.000000,-75.000000,700.000000,0.000000,"Response"}; item20[] = {"Response",4,218,-175.000000,650.000000,-75.000000,700.000000,0.000000,"Response"};
item21[] = {"Phase_Two",2,250,-75.000000,700.000000,25.000000,750.000000,0.000000,"Phase Two"}; item21[] = {"Phase_Two",2,250,-75.000000,700.000000,25.000000,750.000000,0.000000,"Phase Two"};
item22[] = {"Dead_Player",4,218,50.000000,700.000000,150.000000,750.000000,0.000000,"Dead" \n "Player"}; item22[] = {"Dead_Player",4,218,50.000000,700.000000,150.000000,750.000000,0.000000,"Dead" \n "Player"};
@@ -34,7 +34,7 @@ item29[] = {"ERROR__Bad_Versi",2,250,175.000000,800.000000,275.000000,850.000000
item30[] = {"Display_Ready",4,218,-175.000000,1050.000000,-75.000000,1100.000000,0.000000,"Display" \n "Ready"}; item30[] = {"Display_Ready",4,218,-175.000000,1050.000000,-75.000000,1100.000000,0.000000,"Display" \n "Ready"};
item31[] = {"Preload_Display",2,250,-75.000000,1100.000000,25.000000,1150.000000,0.000000,"Preload" \n "Display"}; item31[] = {"Preload_Display",2,250,-75.000000,1100.000000,25.000000,1150.000000,0.000000,"Preload" \n "Display"};
item32[] = {"Preload_Done",4,218,-175.000000,1150.000000,-75.000000,1200.000000,0.000000,"Preload" \n "Done"}; item32[] = {"Preload_Done",4,218,-175.000000,1150.000000,-75.000000,1200.000000,0.000000,"Preload" \n "Done"};
item33[] = {"Initialize",2,250,-75.000000,1200.000000,25.000000,1250.000000,0.000000,"Initialize"}; item33[] = {"Initialize",2,4346,-75.000000,1200.000000,25.000000,1250.000000,0.000000,"Initialize"};
item34[] = {"Finish",1,250,-75.000000,1300.000000,25.000000,1350.000000,0.000000,"Finish"}; item34[] = {"Finish",1,250,-75.000000,1300.000000,25.000000,1350.000000,0.000000,"Finish"};
item35[] = {"True",8,218,25.000000,1250.000000,125.000000,1300.000000,0.000000,"True"}; item35[] = {"True",8,218,25.000000,1250.000000,125.000000,1300.000000,0.000000,"True"};
item36[] = {"Too_Long",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"Too" \n "Long"}; item36[] = {"Too_Long",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"Too" \n "Long"};
@@ -60,7 +60,7 @@ item55[] = {"get_ready_to_clo",2,250,400.000000,400.000000,500.000000,450.000000
item56[] = {"sleep_",4,218,550.000000,400.000000,650.000000,450.000000,0.000000,"sleep" \n ""}; item56[] = {"sleep_",4,218,550.000000,400.000000,650.000000,450.000000,0.000000,"sleep" \n ""};
item57[] = {"Disconnect",2,250,825.000000,400.000000,925.000000,450.000000,0.000000,"Disconnect"}; item57[] = {"Disconnect",2,250,825.000000,400.000000,925.000000,450.000000,0.000000,"Disconnect"};
item58[] = {"No_time_date",4,218,25.000000,1150.000000,125.000000,1200.000000,0.000000,"No time/date"}; item58[] = {"No_time_date",4,218,25.000000,1150.000000,125.000000,1200.000000,0.000000,"No time/date"};
item59[] = {"ERROR__No_Date_or",2,250,175.000000,1150.000000,275.000000,1200.000000,0.000000,"ERROR:" \n "No Date || Time"}; item59[] = {"ERROR__No_Date_",2,250,175.000000,1150.000000,275.000000,1200.000000,0.000000,"ERROR:" \n "No Date || Time"};
item60[] = {"Too_Long",4,218,300.000000,1150.000000,400.000000,1200.000000,0.000000,"Too" \n "Long"}; item60[] = {"Too_Long",4,218,300.000000,1150.000000,400.000000,1200.000000,0.000000,"Too" \n "Long"};
item61[] = {"get_ready_to_clo_1",2,250,450.000000,800.000000,550.000000,850.000000,0.000000,"get ready to close"}; item61[] = {"get_ready_to_clo_1",2,250,450.000000,800.000000,550.000000,850.000000,0.000000,"get ready to close"};
item62[] = {"sleep_",4,218,600.000000,800.000000,700.000000,850.000000,0.000000,"sleep" \n ""}; item62[] = {"sleep_",4,218,600.000000,800.000000,700.000000,850.000000,0.000000,"sleep" \n ""};
@@ -169,8 +169,8 @@ link85[] = {75,57};
link86[] = {76,78}; link86[] = {76,78};
link87[] = {77,76}; link87[] = {77,76};
link88[] = {78,57}; link88[] = {78,57};
globals[] = {25.000000,1,0,0,0,640,480,1,143,6316128,1,-772.896301,771.877197,613.135803,-671.376831,864,612,1}; globals[] = {25.000000,1,0,0,0,640,480,1,143,6316128,1,-406.882782,405.863464,1403.492432,827.797180,864,612,1};
window[] = {0,-1,-1,-1,-1,862,104,1593,104,1,882}; window[] = {0,-1,-1,-1,-1,940,182,1671,182,1,882};
*//*%FSM</HEAD>*/ *//*%FSM</HEAD>*/
class FSM class FSM
{ {
@@ -1212,6 +1212,7 @@ class FSM
"r_player_cardiac = player getVariable[""USEC_isCardiac"",false];" \n "r_player_cardiac = player getVariable[""USEC_isCardiac"",false];" \n
"r_player_lowblood = player getVariable[""USEC_lowBlood"",false];" \n "r_player_lowblood = player getVariable[""USEC_lowBlood"",false];" \n
"r_player_blood = player getVariable[""USEC_BloodQty"",r_player_bloodTotal];" \n "r_player_blood = player getVariable[""USEC_BloodQty"",r_player_bloodTotal];" \n
"selfTransfusionTime = time; //time to keep for last self transfusion." \n
"" \n "" \n
"""colorCorrections"" ppEffectEnable true;" \n """colorCorrections"" ppEffectEnable true;" \n
"""colorCorrections"" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1 min (4*r_player_blood/3/r_player_bloodTotal)], [1, 1, 1, 0.0]];" \n """colorCorrections"" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1 min (4*r_player_blood/3/r_player_bloodTotal)], [1, 1, 1, 0.0]];" \n
@@ -1312,7 +1313,7 @@ class FSM
class No_time_date class No_time_date
{ {
priority = 0.000000; priority = 0.000000;
to="ERROR__No_Date_or"; to="ERROR__No_Date_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!isNil ""PVDZE_plr_SetDate"""/*%FSM</CONDITION""">*/; condition=/*%FSM<CONDITION""">*/"!isNil ""PVDZE_plr_SetDate"""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
@@ -1575,10 +1576,10 @@ class FSM
}; };
}; };
/*%FSM</STATE>*/ /*%FSM</STATE>*/
/*%FSM<STATE "ERROR__No_Date_or">*/ /*%FSM<STATE "ERROR__No_Date_">*/
class ERROR__No_Date_or class ERROR__No_Date_
{ {
name = "ERROR__No_Date_or"; name = "ERROR__No_Date_";
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
"selectNoPlayer;" \n "selectNoPlayer;" \n
"_myTime = diag_tickTime;" \n "_myTime = diag_tickTime;" \n