void TSStatic::_updateShouldTick() { bool shouldTick = mPlayAmbient && mAmbientThread; if ( isTicking() != shouldTick ) setProcessTick( shouldTick ); }
bool NavPath::finalise() { setProcessTick(false); resize(); return success(); }
void PhysicsForce::onRemove() { mWorld = NULL; mBody = NULL; getProcessList()->preTickSignal().remove( this, &PhysicsForce::_preTick ); setProcessTick( false ); Parent::onRemove(); }
bool NavPath::planSliced() { bool visited = visitNext(); if(visited) setProcessTick(true); return visited; }
bool NavPath::planInstant() { setProcessTick(false); visitNext(); S32 store = mMaxIterations; mMaxIterations = INT_MAX; while(update()); mMaxIterations = store; return finalise(); }
bool GameBase::onAdd() { if ( !Parent::onAdd() ) return false; // Datablock must be initialized on the server. // Client datablock are initialized by the initial update. if ( isServerObject() && mDataBlock && !onNewDataBlock( mDataBlock, false ) ) return false; setProcessTick( true ); return true; }
bool PhysicsForce::onAdd() { if ( !Parent::onAdd() ) return false; // Find the physics world we're in. if ( PHYSICSMGR ) mWorld = PHYSICSMGR->getWorld( isServerObject() ? "server" : "client" ); setProcessTick( true ); getProcessList()->preTickSignal().notify( this, &PhysicsForce::_preTick ); return true; }
void VolumetricFog::onRemove() { if (isClientObject()) { if (isTicking()) { setProcessTick(false); if (mGlowing != 0) { mGlowing = 0; glowFX->disable(); } _leaveFog(static_cast<ShapeBase*>(conn->getControlObject())); } VolumetricFogRTManager::getVolumetricFogRTMResizeSignal().remove(this, &VolumetricFog::handleResize); GuiCanvas::getCanvasSizeChangeSignal().remove(this, &VolumetricFog::handleCanvasResize); } removeFromScene(); VFRTM->DecFogObjects(); Parent::onRemove(); }
bool PxCloth::onAdd() { if ( !Parent::onAdd() ) return false; // Cloth is only created on the client. if ( isClientObject() ) { mWorld = dynamic_cast<PxWorld*>( PHYSICSMGR->getWorld( "client" ) ); if ( !mWorld || !mWorld->getScene() ) { Con::errorf( "PxCloth::onAdd() - PhysXWorld not initialized... cloth disabled!" ); return true; } mScene = mWorld->getScene(); mResetXfm = getTransform(); _createClothPatch(); PhysicsPlugin::getPhysicsResetSignal().notify( this, &PxCloth::onPhysicsReset, 1053.0f ); } // On the server we use the static update // to setup the bounds of the cloth. if ( isServerObject() ) _updateStaticCloth(); addToScene(); // Also the server object never ticks. if ( isServerObject() ) setProcessTick( false ); return true; }
bool Sun::onAdd() { if ( !Parent::onAdd() ) return false; // Register as listener to TimeOfDay update events TimeOfDay::getTimeOfDayUpdateSignal().notify( this, &Sun::_updateTimeOfDay ); // Make this thing have a global bounds so that its // always returned from spatial light queries. setGlobalBounds(); resetWorldBox(); setRenderTransform( mObjToWorld ); addToScene(); _initCorona(); // Update the light parameters. _conformLights(); setProcessTick( true ); return true; }
bool NavPath::onAdd() { if(!Parent::onAdd()) return false; if(gEditingMission) mNetFlags.set(Ghostable); resize(); addToScene(); if(isServerObject()) { mQuery = dtAllocNavMeshQuery(); if(!mQuery) return false; checkAutoUpdate(); if(!plan()) setProcessTick(true); } return true; }