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

Method rrDropHand

source/render/RenderManager.cpp:1000–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

998}
999
1000void RenderManager::rrDropHand(GameEntity* curEntity, Player* localPlayer)
1001{
1002 Ogre::Entity* ent = mSceneManager->getEntity("keeperHandEnt");
1003 if(ent->hasAnimationState("Drop"))
1004 mHandAnimationState = setEntityAnimation(ent, "Drop", false);
1005
1006 // Detach the entity from the "hand" scene node
1007 Ogre::SceneNode* curEntityNode = curEntity->getEntityNode();
1008 mHandKeeperNode->removeChild(curEntityNode);
1009
1010 // We put the creature back to the default render queue
1011 changeRenderQueueRecursive(curEntityNode, Ogre::RenderQueueGroupID::RENDER_QUEUE_MAIN);
1012
1013 // Attach the creature from the creature scene node
1014 curEntity->setParentNodeDetachFlags(
1015 EntityParentNodeAttach::DETACH_PICKEDUP, false);
1016 Ogre::Vector3 position = curEntity->getPosition();
1017 curEntityNode->setPosition(position);
1018 if(curEntity->resizeMeshAfterDrop())
1019 curEntityNode->scale(Ogre::Vector3::UNIT_SCALE / KEEPER_HAND_CREATURE_PICKED_SCALE);
1020
1021 rrOrderHand(localPlayer);
1022}
1023
1024void RenderManager::rrOrderHand(Player* localPlayer)
1025{

Callers 1

dropHandMethod · 0.80

Calls 4

getEntityNodeMethod · 0.80
setPositionMethod · 0.45
resizeMeshAfterDropMethod · 0.45

Tested by

no test coverage detected