Skip to content

Commit 9784b28

Browse files
emre1702ccw808
authored andcommitted
(#8696) Fix cloned elements not getting removed on resource stop. (#165)
* Fix cloned elements not getting removed on resource stop. * Use same curly brace style.
1 parent a009ddd commit 9784b28

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,11 @@ int CLuaElementDefs::cloneElement ( lua_State* luaVM )
296296

297297
if ( pNewElement )
298298
{
299+
CElementGroup * pGroup = pResource->GetElementGroup ();
300+
if ( pGroup )
301+
{
302+
pGroup->Add ( pNewElement );
303+
}
299304
lua_pushelement ( luaVM, pNewElement );
300305
return 1;
301306
}

0 commit comments

Comments
 (0)