set humanity early

This commit is contained in:
icomrade
2017-08-01 19:34:15 -04:00
parent fbfb124296
commit 9cc3c82d5d
2 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ if (Z_SingleCurrency) then {
};
//Switch
[_model, _charID] call player_switchModel; //Already spawned thread, no need to spawn and waitUntil script is done
[_model, _charID, _humanity] call player_switchModel; //Already spawned thread, no need to spawn and waitUntil script is done
//Login
@@ -113,7 +113,7 @@ player removeEventHandler ["HandleDamage",mydamage_eh1];
eh_player_killed = player addeventhandler ["FiredNear",{_this call player_weaponFiredNear;}];
[player] call fnc_usec_damageHandle;
player allowDamage true;
call player_forceSave;
uiSleep 0.1;
if !(isNull _old) then {deleteVehicle _old;};
if !(isNull _old) then {deleteVehicle _old;};
call player_forceSave;

View File

@@ -1,8 +1,7 @@
private ["_weapons","_isArray","_CID","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_oldGroup","_idc","_display","_switchUnit","_leader","_currentCamera"];
private ["_weapons","_isArray","_backpackWpn","_backpackMag","_currentWpn","_isWeapon","_backpackWpnTypes","_backpackWpnQtys","_countr","_class","_position","_dir","_currentAnim","_playerUID","_countMags","_magazines","_primweapon","_secweapon","_newBackpackType","_muzzles","_oldUnit","_group","_newUnit","_oldGroup","_idc","_display","_switchUnit","_leader","_currentCamera"];
_isArray = typeName _this == "ARRAY";
if (_isArray) then {
_class = _this select 0;
_CID = _this select 1;
} else {
_class = _this;
};
@@ -84,7 +83,8 @@ _newUnit = _group createUnit [_class,respawn_west_original,[],0,"NONE"];
if (_isArray) then {
_newUnit allowDamage false;
mydamage_eh1 = _newUnit AddEventHandler ["HandleDamage", {False}];
_newUnit setVariable ["characterID",_CID,true];
_newUnit setVariable ["characterID",(_this select 1),true];
_newUnit setVariable ["humanity",(_this select 2),true];
};
_newUnit setDir _dir;
{_newUnit removeMagazine _x;} count magazines _newUnit;