MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / rrScaleCreature

Method rrScaleCreature

source/render/RenderManager.cpp:852–863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850}
851
852void RenderManager::rrScaleCreature(Creature& creature)
853{
854 if(creature.getEntityNode() == nullptr)
855 {
856 OD_LOG_ERR("creature=" + creature.getName());
857 return;
858 }
859
860 Ogre::Real scaleFactor = static_cast<Ogre::Real>(
861 1.0 + 0.02 * static_cast<double>(creature.getLevel()));
862 creature.getEntityNode()->setScale(Ogre::Vector3::UNIT_SCALE * scaleFactor);
863}
864
865void RenderManager::rrCreateWeapon(Creature* curCreature, const Weapon* curWeapon, const std::string& hand)
866{

Callers 2

updateFromPacketMethod · 0.80
resizeMeshAfterDropMethod · 0.80

Calls 2

getEntityNodeMethod · 0.80
getLevelMethod · 0.80

Tested by

no test coverage detected