CLiftableObject::CLiftableObject(Ogre::SceneNode *pNode, CObjectManager &objectManager, btCollisionObject *pCollisionObject, ELiftableObjectTypes eLiftableObjectType, bool bRecreateOnLift, const UserData &userData) : CObject(objectManager,LIFTABLE_OBJECT, pCollisionObject, userData.getStringUserData("id")), m_eLiftableObjectType(eLiftableObjectType), m_bRecreateOnLift(bRecreateOnLift) { m_eState = LOS_AT_DEFAULT_LOCATION; m_InnerObject = InnerObjectGenerator::getInnerObjectByName(userData.getStringUserData("innerObject", "default")); switch (eLiftableObjectType) { case LOT_VASE: m_uiInnerObjectCreateEvent = IOCE_DESTROYED; break; case LOT_SIGN: case LOT_BOMB: m_uiInnerObjectCreateEvent = IOCE_NEVER; break; default: m_uiInnerObjectCreateEvent = IOCE_DESTROYED | IOCE_LIFT; break; } }
CDoor::CDoor(Ogre::SceneNode *pDoorNode, CMapManager &mapManager, CObjectManager &objectManager, const UserData &userData, const Ogre::String &id) : CObject(objectManager, DOOR_OBJECT), CMapLinkInterface(mapManager, MapLocalisationData(userData.getStringUserData("link_path"), userData.getStringUserData("link_name")), userData.getStringUserData("link_id"), id), m_vPosition(pDoorNode->getPosition()), m_rYaw(pDoorNode->getOrientation().getYaw()) { m_PlayerPosition = pDoorNode->getPosition() + 0.5f * pDoorNode->getOrientation().zAxis(); m_PlayerLookDirection = -pDoorNode->getOrientation().zAxis(); m_CameraYaw = pDoorNode->getOrientation().getYaw().valueRadians(); m_CameraPitch = -Ogre::Math::PI * 0.1; }