Add ClientObjectRef:remove and return true in on_object_add callback to remove newly added object
This commit is contained in:
@@ -822,8 +822,11 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
|
||||
setNodeLight(m_last_light);
|
||||
updateMeshCulling();
|
||||
|
||||
if (m_client->modsLoaded())
|
||||
m_client->getScript()->on_object_add(m_id);
|
||||
if (m_client->modsLoaded() && m_client->getScript()->on_object_add(m_id)) {
|
||||
removeFromScene(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (m_client->modsLoaded())
|
||||
m_client->getScript()->on_object_properties_change(m_id);
|
||||
|
Reference in New Issue
Block a user