mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 17:09:40 +00:00
cmake fix; silenced some warnings
This commit is contained in:
parent
164a5c8fe4
commit
f11bf49a90
3 changed files with 24 additions and 25 deletions
|
@ -39,7 +39,7 @@ add_openmw_dir (mwscript
|
||||||
locals scriptmanager compilercontext interpretercontext cellextensions miscextensions
|
locals scriptmanager compilercontext interpretercontext cellextensions miscextensions
|
||||||
guiextensions soundextensions skyextensions statsextensions containerextensions
|
guiextensions soundextensions skyextensions statsextensions containerextensions
|
||||||
aiextensions controlextensions extensions globalscripts ref dialogueextensions
|
aiextensions controlextensions extensions globalscripts ref dialogueextensions
|
||||||
animationextensions
|
animationextensions transformationextensions
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwsound
|
add_openmw_dir (mwsound
|
||||||
|
|
|
@ -165,7 +165,6 @@ namespace MWWorld
|
||||||
for (std::vector<std::pair<std::string, Ogre::Vector3> >::const_iterator iter (actors.begin());
|
for (std::vector<std::pair<std::string, Ogre::Vector3> >::const_iterator iter (actors.begin());
|
||||||
iter!=actors.end(); ++iter)
|
iter!=actors.end(); ++iter)
|
||||||
{
|
{
|
||||||
OEngine::Physic::PhysicActor* act = mEngine->getCharacter(iter->first);
|
|
||||||
//dirty stuff to get the camera orientation. Must be changed!
|
//dirty stuff to get the camera orientation. Must be changed!
|
||||||
|
|
||||||
Ogre::SceneNode *sceneNode = mRender.getScene()->getSceneNode (iter->first);
|
Ogre::SceneNode *sceneNode = mRender.getScene()->getSceneNode (iter->first);
|
||||||
|
@ -175,10 +174,10 @@ namespace MWWorld
|
||||||
Ogre::Quaternion yawQuat = yawNode->getOrientation();
|
Ogre::Quaternion yawQuat = yawNode->getOrientation();
|
||||||
Ogre::Quaternion pitchQuat = pitchNode->getOrientation();
|
Ogre::Quaternion pitchQuat = pitchNode->getOrientation();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
playerphysics->ps.viewangles.x = pitchQuat.getPitch().valueDegrees();
|
playerphysics->ps.viewangles.x = pitchQuat.getPitch().valueDegrees();
|
||||||
|
|
||||||
playerphysics->ps.viewangles.y = yawQuat.getYaw().valueDegrees() *-1 + 90;
|
playerphysics->ps.viewangles.y = yawQuat.getYaw().valueDegrees() *-1 + 90;
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,9 +193,9 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mEngine->stepSimulation(dt);
|
mEngine->stepSimulation(dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,7 +306,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
btTransform transform = mEngine->getRigidBody(handle)->getWorldTransform();
|
btTransform transform = mEngine->getRigidBody(handle)->getWorldTransform();
|
||||||
removeObject(handle);
|
removeObject(handle);
|
||||||
|
|
||||||
Ogre::Quaternion quat = Ogre::Quaternion(transform.getRotation().getW(), transform.getRotation().getX(), transform.getRotation().getY(), transform.getRotation().getZ());
|
Ogre::Quaternion quat = Ogre::Quaternion(transform.getRotation().getW(), transform.getRotation().getX(), transform.getRotation().getY(), transform.getRotation().getZ());
|
||||||
Ogre::Vector3 vec = Ogre::Vector3(transform.getOrigin().getX(), transform.getOrigin().getY(), transform.getOrigin().getZ());
|
Ogre::Vector3 vec = Ogre::Vector3(transform.getOrigin().getX(), transform.getOrigin().getY(), transform.getOrigin().getZ());
|
||||||
addObject(handle, handleToMesh[handle], quat, scale, vec);
|
addObject(handle, handleToMesh[handle], quat, scale, vec);
|
||||||
|
|
|
@ -82,17 +82,17 @@ static void vectorMulAdd(const Matrix &A, const Vector &B, float *C, float scale
|
||||||
}
|
}
|
||||||
|
|
||||||
// Computes B = AxB (matrix*vector)
|
// Computes B = AxB (matrix*vector)
|
||||||
static void vectorMul(const Matrix &A, float *C)
|
//static void vectorMul(const Matrix &A, float *C)
|
||||||
{
|
//{
|
||||||
// Keep the original values
|
// // Keep the original values
|
||||||
float a = C[0];
|
// float a = C[0];
|
||||||
float b = C[1];
|
// float b = C[1];
|
||||||
float c = C[2];
|
// float c = C[2];
|
||||||
|
|
||||||
// Perform matrix multiplication, scaling and addition
|
// // Perform matrix multiplication, scaling and addition
|
||||||
for (int i=0;i<3;i++)
|
// for (int i=0;i<3;i++)
|
||||||
C[i] = a*A.v[i].array[0] + b*A.v[i].array[1] + c*A.v[i].array[2];
|
// C[i] = a*A.v[i].array[0] + b*A.v[i].array[1] + c*A.v[i].array[2];
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
ManualBulletShapeLoader::~ManualBulletShapeLoader()
|
ManualBulletShapeLoader::~ManualBulletShapeLoader()
|
||||||
|
@ -233,7 +233,7 @@ bool ManualBulletShapeLoader::hasRootCollisionNode(Nif::Node* node)
|
||||||
void ManualBulletShapeLoader::handleNode(Nif::Node *node, int flags,
|
void ManualBulletShapeLoader::handleNode(Nif::Node *node, int flags,
|
||||||
const Nif::Transformation *trafo,bool hasCollisionNode,bool isCollisionNode,bool raycastingOnly)
|
const Nif::Transformation *trafo,bool hasCollisionNode,bool isCollisionNode,bool raycastingOnly)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Accumulate the flags from all the child nodes. This works for all
|
// Accumulate the flags from all the child nodes. This works for all
|
||||||
// the flags we currently use, at least.
|
// the flags we currently use, at least.
|
||||||
flags |= node->flags;
|
flags |= node->flags;
|
||||||
|
@ -267,11 +267,11 @@ void ManualBulletShapeLoader::handleNode(Nif::Node *node, int flags,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (trafo)
|
if (trafo)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get a non-const reference to the node's data, since we're
|
// Get a non-const reference to the node's data, since we're
|
||||||
// overwriting it. TODO: Is this necessary?
|
// overwriting it. TODO: Is this necessary?
|
||||||
Transformation &final = *((Transformation*)node->trafo);
|
Transformation &final = *((Transformation*)node->trafo);
|
||||||
|
@ -287,9 +287,9 @@ void ManualBulletShapeLoader::handleNode(Nif::Node *node, int flags,
|
||||||
// Scalar values are so nice to deal with. Why can't everything
|
// Scalar values are so nice to deal with. Why can't everything
|
||||||
// just be scalar?
|
// just be scalar?
|
||||||
final.scale *= trafo->scale;
|
final.scale *= trafo->scale;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// For NiNodes, loop through children
|
// For NiNodes, loop through children
|
||||||
if (node->recType == Nif::RC_NiNode)
|
if (node->recType == Nif::RC_NiNode)
|
||||||
|
@ -304,7 +304,7 @@ void ManualBulletShapeLoader::handleNode(Nif::Node *node, int flags,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (node->recType == Nif::RC_NiTriShape && (isCollisionNode || !hasCollisionNode))
|
else if (node->recType == Nif::RC_NiTriShape && (isCollisionNode || !hasCollisionNode))
|
||||||
{
|
{
|
||||||
cShape->collide = true;
|
cShape->collide = true;
|
||||||
handleNiTriShape(dynamic_cast<Nif::NiTriShape*>(node), flags,getMatrix(node->trafo),getVector(node->trafo),node->trafo->scale,raycastingOnly);
|
handleNiTriShape(dynamic_cast<Nif::NiTriShape*>(node), flags,getMatrix(node->trafo),getVector(node->trafo),node->trafo->scale,raycastingOnly);
|
||||||
|
|
Loading…
Reference in a new issue