| 723 | } |
| 724 | |
| 725 | void 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 | |
| 755 | void Trigger::processTick(const Move* move) |
no test coverage detected