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

Method rrDestroyWeapon

source/render/RenderManager.cpp:891–900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889}
890
891void RenderManager::rrDestroyWeapon(Creature* curCreature, const Weapon* curWeapon, const std::string& hand)
892{
893 std::string weaponEntityName = curWeapon->getOgreNamePrefix() + hand + "_" + curCreature->getName();
894 if(mSceneManager->hasEntity(weaponEntityName))
895 {
896 Ogre::Entity* weaponEntity = mSceneManager->getEntity(weaponEntityName);
897 weaponEntity->detachFromParent();
898 mSceneManager->destroyEntity(weaponEntity);
899 }
900}
901
902void RenderManager::rrCreateMapLight(MapLight* curMapLight, bool displayVisual)
903{

Callers 1

destroyMeshWeaponsMethod · 0.80

Calls 1

getOgreNamePrefixMethod · 0.45

Tested by

no test coverage detected