Remove PVDZ_playerMedicalSync and server_medicalSync

Both should no longer be needed. All medical variables are global setVariables already so there should be no need to update them every 30s to the server.
This commit is contained in:
A Man
2022-06-03 20:38:50 +02:00
parent 09ce7d8ff6
commit abce13a659
4 changed files with 3 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
private ["_isOK", "_startcombattimer", "_myPos", "_wpnType", "_ismelee","_radsound", "_bloodloss","_NutritionLoss", "_Nutrition","_outsideMap","_lastUpdate","_tempPos","_lowBlood","_refObj", "_size", "_vel", "_speed","_isPZombie", "_radTimer", "_timer", "_timer30", "_timer150", "_hunger","_thirst","_result","_randomSpot","_distance","_mylastPos","_lastTemp","_rnd","_messTimer","_saveTime"];
private ["_isOK", "_startcombattimer", "_myPos", "_wpnType", "_ismelee","_radsound", "_bloodloss","_NutritionLoss", "_Nutrition","_outsideMap","_lastUpdate","_tempPos","_lowBlood","_refObj", "_size", "_vel", "_speed","_isPZombie", "_radTimer", "_timer", "_timer150", "_hunger","_thirst","_result","_randomSpot","_distance","_mylastPos","_lastTemp","_rnd","_messTimer","_saveTime"];
disableSerialization;
_messTimer = 0;
@@ -7,7 +7,6 @@ _isPZombie = player isKindOf "PZombie_VB";
_radTimer = 0;
_timer = diag_tickTime;
_timer30 = diag_Ticktime;
_timer150 = diag_ticktime;
//_timerMonitor = diag_ticktime;
@@ -65,19 +64,6 @@ while {1 == 1} do {
_timer = diag_tickTime;
};
//Every 30 seconds force the client to update the server of all medical Values
if ((diag_tickTime - _timer30) > 30) then {
[] spawn {
private "_medical";
_medical = player call player_sumMedical;
PVDZ_playerMedicalSync = [player,_medical];
publicVariableServer "PVDZ_playerMedicalSync";
};
_timer30 = diag_tickTime;
};
//Record Check
_lastUpdate = diag_ticktime - dayZ_lastPlayerUpdate;
if (_lastUpdate > 8) then {

View File

@@ -7,11 +7,9 @@
"PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
"PVDZ_plr_LoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
"PVDZ_obj_Destroy" addPublicVariableEventHandler {(_this select 1) call server_deleteObj};
"PVDZ_plr_Delete" addPublicVariableEventHandler {(_this select 1) spawn sched_co_deleteVehicle}; // Delete hided players
"PVDZ_plr_Delete" addPublicVariableEventHandler {(_this select 1) setVariable ["sched_co_fliesDeleted", true];(_this select 1) spawn sched_co_deleteVehicle}; // Delete hided players
"PVDZ_send" addPublicVariableEventHandler {(_this select 1) call server_sendToClient};
//"PVDZ_dayzCarBomb" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\actions\detonate_bomb.sqf";};
//[player,[medical Array]];
"PVDZ_playerMedicalSync" addPublicVariableEventHandler { (_this select 1) call server_medicalSync; ((_this select 1) select 0) setVariable["Medical",((_this select 1) select 1),false]; }; //diag_log format["%1 - %2",((_this select 1) select 0),((_this select 1) select 1)]; };
// EPOCH ADDITIONS
"PVDZE_maintainArea" addPublicVariableEventHandler {(_this select 1) spawn server_maintainArea};

View File

@@ -63,27 +63,6 @@ if (DZE_Virtual_Garage) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\init.sqf";
};
server_medicalSync = {
local _player = _this select 0;
local _array = _this select 1;
_player setVariable ["USEC_isDead",(_array select 0)]; //0
_player setVariable ["NORRN_unconscious",(_array select 1)]; //1
_player setVariable ["USEC_infected",(_array select 2)]; //2
_player setVariable ["USEC_injured",(_array select 3)]; //3
_player setVariable ["USEC_inPain",(_array select 4)]; //4
_player setVariable ["USEC_isCardiac",(_array select 5)]; //5
_player setVariable ["USEC_lowBlood",(_array select 6)]; //6
_player setVariable ["USEC_BloodQty",(_array select 7)]; //7
// _wounds; //8
// [_legs,_arms]; //9
_player setVariable ["unconsciousTime",(_array select 10)]; //10
_player setVariable ["blood_type",(_array select 11)]; //11
_player setVariable ["rh_factor",(_array select 12)]; //12
_player setVariable ["messing",(_array select 13)]; //13
_player setVariable ["blood_testdone",(_array select 14)]; //14
};
vehicle_handleServerKilled = {
local _unit = _this select 0;

View File

@@ -1,5 +1,5 @@
//new
5 !=remEx(Field|FP) !=(PVCDZ_obj_GutBody|BIS_effects_gepv) !=PVDZ_(hlt_Bleed|obj_(Delete|Publish|RoadFlare|Destroy|Fire)|veh_Save|veh_SF) !=PVDZ_(plr_(Death|Login[12]|LoginRecord|Save|SwitchMove|Delete)|Server(_Simulation|StoreVar|_UpdateGroup)) !=PVDZ_(playerMedicalSync|groupInvite|send|sec_atp) !=PVDZ_objgather_(Delete|Knockdown) !=PVDZE_(obj_(Swap|Trade)|maintainArea|PingSend|veh_(Lock|Publish2|Upgrade)|handleSafeGear|plr_(DeathB|FriendRQ)) !=SK_changeCode !=PVDZE_(query|store|spawn)Vehicle !=PVDZE_maintainGarage
1 !=remEx(Field|FP) !=(PVCDZ_obj_GutBody|BIS_effects_gepv) !=PVDZ_(hlt_Bleed|obj_(Delete|Publish|RoadFlare|Destroy|Fire)|veh_Save|veh_SF) !=PVDZ_(plr_(Death|Login[12]|LoginRecord|Save|SwitchMove|Delete)|Server(_Simulation|StoreVar|_UpdateGroup)) !=PVDZ_(groupInvite|send|sec_atp) !=PVDZ_objgather_(Delete|Knockdown) !=PVDZE_(obj_(Swap|Trade)|maintainArea|PingSend|veh_(Lock|Publish2|Upgrade)|handleSafeGear|plr_(DeathB|FriendRQ)) !=SK_changeCode !=PVDZE_(query|store|spawn)Vehicle !=PVDZE_maintainGarage
1=BIS_effects_gepv|PVDZ_(hlt_Bleed|obj_Delete|obj_Destroy|obj_Publish|plr_Death|plr_LoginRecord|sec_atp|send)
1=PVDZ_veh_(Save|SF)
1=PVDZE_obj_Swap