mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Clear the edict model when freeing the edict
This fixes an issue where configstrings or game state chars would overflow when many models (such as actors with random headmodels/headskins) are spawned
This commit is contained in:
parent
ee385abfef
commit
c77fcd2cbc
1 changed files with 4 additions and 0 deletions
|
@ -1754,6 +1754,10 @@ void Level::FreeEdict(gentity_t *ed)
|
||||||
{
|
{
|
||||||
gclient_t *client;
|
gclient_t *client;
|
||||||
|
|
||||||
|
// clear the model so it decreases the user count
|
||||||
|
// and free memory if the model is not used anywhere
|
||||||
|
gi.clearmodel(ed);
|
||||||
|
|
||||||
// unlink from world
|
// unlink from world
|
||||||
gi.unlinkentity(ed);
|
gi.unlinkentity(ed);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue