Remove unnecessary key event handler reset

No need to reset the key event handler again in player_monitor.fsm, it
is already done onPreloadFinished.
This commit is contained in:
ebaydayz
2016-04-15 20:16:13 -04:00
parent 110befba7f
commit 993ce14da6
5 changed files with 8 additions and 11 deletions

View File

@@ -65,6 +65,11 @@ class Category_541 {
buy[] = {2,"ItemSilverBar"};
sell[] = {1,"ItemSilverBar"};
};
class emptyBloodBag {
type = "trade_items";
buy[] = {2,"ItemSilverBar"};
sell[] = {1,"ItemSilverBar"};
};
class ItemEpinephrine {
type = "trade_items";
buy[] = {2,"ItemSilverBar"};

View File

@@ -349,6 +349,7 @@ if (isNil "keyboard_keys") then {
(findDisplay 46) displayRemoveAllEventHandlers "KeyUp";
(findDisplay 46) displayRemoveAllEventHandlers "KeyDown";
(findDisplay 46) displayAddEventHandler ["KeyDown", preprocessFileLineNumbers (MISSION_ROOT+'keyboard.sqf')];
if (!isNil "bis_fnc_halo_para_keydown_eh") then {bis_fnc_halo_para_keydown_eh = (finddisplay 46) displayAddEventHandler ["keydown","_this call bis_fnc_halo_keydown;"];}; // halo in progress
//diag_log [diag_ticktime, __FILE__, "eh reset" ];
};

View File

@@ -3,20 +3,17 @@ disableSerialization;
_control = _this select 0;
_button = _this select 1;
_parent = findDisplay 106;
_itemData = gearSlotData _control;
if (carryClick) then {carryClick = false;};
// No right click option on bloodbags if DZE_SelfTransfuse = false;
if (!DZE_SelfTransfuse && {(_itemData == "ItemBloodbag") or (_itemData in dayz_typedBags)}) exitWith {};
if (_button == 1) then {
private ["_conf","_name","_compile","_height","_item"];
_group = _parent displayCtrl 6902;
_pos = ctrlPosition _group;
_item = gearSlotData _control;
_item = gearSlotData _control;
if (!DZE_SelfTransfuse && {_item == "ItemBloodbag" or _item in ["wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"]}) exitWith {}; // No right click option on bloodbags if DZE_SelfTransfuse = false;
if (mouseOverCarry) then {
_item = DayZ_onBack;
carryClick = true;

View File

@@ -87,7 +87,6 @@ while {r_doLoop and (_i < 12)} do {
};
if (!_bagFound) then {_forceClose = true;} else { player removeMagazine _bagToRemove;};
cutText [localize "str_actions_medical_transfusion_start", "PLAIN DOWN"];
[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_start","PLAIN DOWN"] call RE;
_started = true;
};
@@ -132,7 +131,6 @@ while {r_doLoop and (_i < 12)} do {
_unit setVariable ["LastTransfusion",time];
if (_TransfusionInfection) then {r_player_infected = true; player setVariable["USEC_infected",true,true];};
cutText [localize "str_actions_medical_transfusion_successful", "PLAIN DOWN"];
[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_successful","PLAIN DOWN"] call RE;
r_doLoop = false;
};
@@ -141,7 +139,6 @@ while {r_doLoop and (_i < 12)} do {
if (r_interrupt or !_isClose or _forceClose) then {
diag_log format ["TRANSFUSION: transfusion was interrupted (r_interrupt: %1 | distance: %2 (%3) | _i = %4)", r_interrupt, player distance _unit, _isClose, _i];
cutText [localize "str_actions_medical_transfusion_interrupted", "PLAIN DOWN"];
[player,_unit,"loc",rTITLETEXT,localize "str_actions_medical_transfusion_interrupted","PLAIN DOWN"] call RE;
r_doLoop = false;
};

View File

@@ -988,9 +988,6 @@ class FSM
" };" \n
"} count allMissionObjects ""SpawnableWreck"";" \n
"{deleteVehicle _x} count (_setPos nearEntities [""zZombie_Base"",30]);" \n
"diag_log [ 'resetting keyboard events',(MISSION_ROOT+'keyboard.sqf')];" \n
"keyboard_keys = nil;" \n
"[controlNull, 1, false,false,false] call compile preprocessFileLineNumbers (MISSION_ROOT+'keyboard.sqf');" \n
"" \n
"if(dayz_paraSpawn && (freshSpawn == 2)) then {" \n
" player setDir _setDir;" \n