MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / potentialEnterObject

Method potentialEnterObject

Engine/source/T3D/trigger.cpp:725–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723}
724
725void Trigger::potentialEnterObject(GameBase* enter)
726{
727 if( (!mDataBlock || mDataBlock->isClientSide) && isServerObject() )
728 return;
729 if( (mDataBlock && !mDataBlock->isClientSide) && isGhost() )
730 return;
731
732 for (U32 i = 0; i < mObjects.size(); i++) {
733 if (mObjects[i] == enter)
734 return;
735 }
736
737 if (testObject(enter) == true) {
738 mObjects.push_back(enter);
739 deleteNotify(enter);
740
741 if(evalCmD(&mEnterCommand))
742 {
743 String command = String("%obj = ") + enter->getIdString() + ";";
744 command = command + String("%this = ") + getIdString() + ";" + mEnterCommand;
745 Con::evaluate(command.c_str());
746 }
747
748 if( mDataBlock && testTrippable() && testCondition())
749 mDataBlock->onEnterTrigger_callback( this, enter );
750 mTripped = true;
751 }
752}
753
754
755void Trigger::processTick(const Move* move)

Callers 4

collisionFilterFunction · 0.80
findCallbackMethod · 0.80
findContactMethod · 0.80
findCallbackMethod · 0.80

Calls 6

evaluateFunction · 0.85
getIdStringMethod · 0.80
StringClass · 0.50
sizeMethod · 0.45
push_backMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected