Description:
Remove survivor dead body entity in seconds after player dies.
Reason for creation:
My server always has more than 20 players,
(1) player dies and respawns over and over again during the game => create lots of dead bodies.
(2) a dead player changes team or leaves the game and his bot was kicked => dead body still exists.
(3) nobody uses defib => dead body behind
It causes too many dead body model entitiy on the ground.
The total number of map entities is too large, so write this plugin to reduce the possibility of server crashes.
-Convar-
Spoiler
cfg/sourcemod/clear_dead_body.cfg
PHP Code:
// 0=Plugin off, 1=Plugin on.
sm_clear_dead_body_allow "1"
// clear dead body in seconds
sm_clear_dead_body_time "100.0"
Changes:
Code:
Changes:
1.1 (2021-3-8)
- check IsValidEntityIndex in OnEntityCreated and request a frame safely.
1.0 (2020-7-21)
- Initial release.