Remove duplicate code + other fix

I'm not sure if dayz_DisplayGenderSelect is supposed to be in this, but
I didn't remove the waitUntil since it can be added by a server admin I
suppose.

Anyway, this should fix most RPT spam on 108074...
This commit is contained in:
icomrade
2014-01-30 15:00:25 -05:00
parent 0590c000b4
commit 860243e870

View File

@@ -412,15 +412,16 @@ if (!isDedicated) then {
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
};
waitUntil {!dayz_DisplayGenderSelect};
if (!isNil "dayz_DisplayGenderSelect") then {
waitUntil {!dayz_DisplayGenderSelect};
};
// 120 sec timeout (12000 * 0.01)
while { _timeOut < 12000 } do {
if (dayz_clientPreload && dayz_authed) exitWith { diag_log "PLOGIN: Login loop completed!"; };
if (!isNil "_display") then {
if ( isNull _display ) then {
waitUntil { !dialog; };
if ( isNull _display ) then {
waitUntil { !dialog; };
startLoadingScreen ["","RscDisplayLoadCustom"];
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
@@ -448,39 +449,6 @@ if (!isDedicated) then {
};
};
// TODO: need move it in player_monitor.fsm
// allow player disconnect from server, if loading hang, kicked by BE etc.
[] spawn {
private["_timeOut","_display","_control1","_control2"];
disableSerialization;
_timeOut = 0;
dayz_loadScreenMsg = "";
diag_log "DEBUG: loadscreen guard started.";
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
// 120 sec timeout
while { _timeOut < 3000 && !dayz_clientPreload && !dayz_authed } do {
if ( isNull _display ) then {
waitUntil { !dialog; };
startLoadingScreen ["","RscDisplayLoadCustom"];
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
};
if ( dayz_loadScreenMsg != "" ) then {
_control1 ctrlSetText dayz_loadScreenMsg;
dayz_loadScreenMsg = "";
};
_control2 ctrlSetText format["%1",round(_timeOut*0.01)];
_timeOut = _timeOut + 1;
sleep 0.01;
};
endLoadingScreen;
};
dayz_meleeMagazineCheck = {
private["_meleeNum","_magType"];
_magType = ([] + getArray (configFile >> "CfgWeapons" >> _wpnType >> "magazines")) select 0;