| 111 | } |
| 112 | |
| 113 | void MovableGameEntity::clearDestinations(const std::string& animation, bool loopAnim, bool playIdleWhenAnimationEnds) |
| 114 | { |
| 115 | mWalkQueue.clear(); |
| 116 | stopWalking(); |
| 117 | |
| 118 | for(Seat* seat : mSeatsWithVisionNotified) |
| 119 | { |
| 120 | if(seat->getPlayer() == nullptr) |
| 121 | continue; |
| 122 | if(!seat->getPlayer()->getIsHuman()) |
| 123 | continue; |
| 124 | |
| 125 | const std::string& name = getName(); |
| 126 | const std::string emptyString; |
| 127 | uint32_t nbDest = 0; |
| 128 | ServerNotification *serverNotification = new ServerNotification( |
| 129 | ServerNotificationType::animatedObjectSetWalkPath, seat->getPlayer()); |
| 130 | serverNotification->mPacket << name << emptyString << animation |
| 131 | << loopAnim << playIdleWhenAnimationEnds << nbDest; |
| 132 | ODServer::getSingleton().queueServerNotification(serverNotification); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | void MovableGameEntity::stopWalking() |
| 137 | { |
no test coverage detected