Fixed streaming logic to only happen when we are not editing a mission, also some issues with objects that cannot be streamed eg camera, and player.

Reverted limits
This commit is contained in:
marauder2k7 2026-02-20 16:33:36 +00:00
parent eecc2bdaee
commit 1fed963d82
5 changed files with 37 additions and 23 deletions

View file

@ -44,6 +44,8 @@
#include "sim/netObject.h"
#include "scene/sceneObject.h"
#include "T3D/camera.h"
#include "T3D/player.h"
ImplementBitfieldType(GameTypeMasksType,
"The type of animation effect to apply to this material.\n"
@ -114,7 +116,7 @@ namespace Sim
extern SimIdDictionary *gIdDictionary;
extern U32 gNextObjectId;
}
extern bool gEditingMission;
//-----------------------------------------------------------------------------
@ -723,15 +725,21 @@ bool SimObject::registerObject()
AssertFatal(Sim::gIdDictionary && Sim::gNameDictionary,
"SimObject::registerObject - tried to register an object before Sim::init()!");
Sim::gIdDictionary->insert(this);
Sim::gNameDictionary->insert(this);
if (Sim::sgStreamingInstance->smStreaming && dynamic_cast<SceneObject*>(this))
if (true && dynamic_cast<SceneObject*>(this) &&
!(dynamic_cast<Camera*>(this) || dynamic_cast<Player*>(this)) &&
!gEditingMission
)
{
Sim::sgStreamingInstance->smPendingRegister.push_back(this);
return true; // pretend success
}
else
{
Sim::gIdDictionary->insert(this);
Sim::gNameDictionary->insert(this);
}
// Notify object
bool ret = onAdd();