mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-20 04:40:54 +00:00
updates
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:
parent
eecc2bdaee
commit
1fed963d82
5 changed files with 37 additions and 23 deletions
|
|
@ -267,17 +267,3 @@ DefineEngineFunction( isValidObjectName, bool, (const char * name), , "( string
|
|||
|
||||
ConsoleFunctionGroupEnd( SimFunctions );
|
||||
|
||||
void SceneStreaming::processTick()
|
||||
{
|
||||
if (smStreaming)
|
||||
{
|
||||
for (U32 i = 0; i < mMaxObjects && !smPendingRegister.empty(); i++)
|
||||
{
|
||||
SimObject* obj = smPendingRegister.first();
|
||||
smPendingRegister.pop_front();
|
||||
|
||||
if (!obj->onAdd())
|
||||
obj->unregisterObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -628,3 +628,23 @@ void SimDataBlockGroup::sort()
|
|||
dQsort(mObjectList.address(), mObjectList.size(),sizeof(SimObject *),compareModifiedKey);
|
||||
}
|
||||
}
|
||||
|
||||
void SceneStreaming::processTick()
|
||||
{
|
||||
if (true)
|
||||
{
|
||||
for (U32 i = 0; i < mMaxObjects && !smPendingRegister.empty(); i++)
|
||||
{
|
||||
SimObject* obj = smPendingRegister.first();
|
||||
smPendingRegister.pop_front();
|
||||
|
||||
Sim::gIdDictionary->insert(obj);
|
||||
|
||||
Sim::gNameDictionary->insert(obj);
|
||||
|
||||
|
||||
if (!obj->onAdd())
|
||||
obj->unregisterObject();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue