Page MenuHomeFeedback Tracker

Warlords not deleting player bodies upon disconnect.
New, NormalPublic

Description

Bodies of players are not deleted after disconnecting from a server, I have noticed this on USw01 and USe01. This needs to be fixed soon.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 8 x64
Operating System Version
8.1
Category
Scripting
Steps To Reproduce

Play a Warlords server after players have been playing and leaving for a long while, the bodies stay at the spawn point for a long time and reduce FPS. This can be fixed with a handleDisconnect event handler to delete the player bodies after disconnect.

This code in initServer.sqf does work to reduce the impact on FPS by deleting player bodies when they disconnect.

handleDisconnect = {
        _unit = _this select 0;
        _containers = nearestObjects[_unit,["WeaponHolderSimulated"],8];
        {deleteVehicle _x;} foreach _containers;
        deleteVehicle _unit;
};

addMissionEventHandler ["HandleDisconnect",{_this call handleDisconnect; false}];

This has been tested and makes a big difference to the mission on a dedicated server. I believe it would really help out. As the bodies do pile up quite a bit and anything that helps is good.

Event Timeline