| 590 | } |
| 591 | |
| 592 | void GameEntity::updateFromPacket(ODPacket& is) |
| 593 | { |
| 594 | uint32_t nbEffects; |
| 595 | OD_ASSERT_TRUE(is >> nbEffects); |
| 596 | // We copy the list of effects currently on this entity. That will allow to |
| 597 | // check if the effect is already on it and only display the effect if it is not |
| 598 | std::vector<EntityParticleEffect*> currentEffects = mEntityParticleEffects; |
| 599 | while(nbEffects > 0) |
| 600 | { |
| 601 | --nbEffects; |
| 602 | |
| 603 | EntityParticleEffect* effect = EntityParticleEffect::importParticleEffectFromPacketIfNotInList(currentEffects, is); |
| 604 | if(effect == nullptr) |
| 605 | continue; |
| 606 | |
| 607 | effect->mParticleSystem = RenderManager::getSingleton().rrEntityAddParticleEffect(this, |
| 608 | effect->mName, effect->mScript); |
| 609 | mEntityParticleEffects.push_back(effect); |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | void GameEntity::notifyFightPlayer(Tile* tile) |
| 614 | { |
nothing calls this directly
no test coverage detected