Fix death when changing clothes + minor changes

removing the Respawn EH fixes this, I haven't noticed any adverse
effects from removing it yet.

Also changing groups now deletes the old group. The machine which the
group is local to must execute the deleteGroup command, the server
previously had to wait until the player disconnects to delete their
empty groups.
This commit is contained in:
icomrade
2016-05-09 00:27:34 -04:00
parent 875b63027a
commit 72f3779edb
3 changed files with 4 additions and 3 deletions

View File

@@ -27,8 +27,7 @@ _friendlies = player getVariable ["friendlies",[]];
_tagSetting = player getVariable ["DZE_display_name",false]; _tagSetting = player getVariable ["DZE_display_name",false];
//Switch //Switch
_switch = _model spawn player_switchModel; _model call player_switchModel; //Already spawned thread, no need to spawn and waitUntil script is done
waitUntil { scriptDone _switch };
//Login //Login

View File

@@ -54,6 +54,7 @@ if (count _muzzles > 1) then {_currentWpn = currentMuzzle player;};
_display = findDisplay 106; _display = findDisplay 106;
_display closeDisplay 0; _display closeDisplay 0;
_oldGroup = group player;
//BackUp Player Object //BackUp Player Object
_oldUnit = player; _oldUnit = player;
@@ -151,6 +152,7 @@ _newUnit setPosATL _position;
removeAllWeapons _oldUnit; removeAllWeapons _oldUnit;
{_oldUnit removeMagazine _x;} count magazines _oldUnit; {_oldUnit removeMagazine _x;} count magazines _oldUnit;
if !(isNull _oldUnit) then {deleteVehicle _oldUnit;}; if !(isNull _oldUnit) then {deleteVehicle _oldUnit;};
deleteGroup _oldGroup;
// player switchCamera = _currentCamera; // player switchCamera = _currentCamera;
if (_currentWpn != "") then {_newUnit selectWeapon _currentWpn;}; if (_currentWpn != "") then {_newUnit selectWeapon _currentWpn;};

View File

@@ -1058,7 +1058,7 @@ class FSM
"player disableConversation true;" \n "player disableConversation true;" \n
"" \n "" \n
"eh_player_killed = player addeventhandler [""FiredNear"",{_this call player_weaponFiredNear;} ];" \n "eh_player_killed = player addeventhandler [""FiredNear"",{_this call player_weaponFiredNear;} ];" \n
"player addEventHandler ['Respawn', player_death];" \n "//player addEventHandler ['Respawn', player_death];" \n
"" \n "" \n
"//_state = player getVariable[""state"",[]];" \n "//_state = player getVariable[""state"",[]];" \n
"_currentWpn = """";" \n "_currentWpn = """";" \n