1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-03 20:19:40 +00:00

Move the PtrMovementList typedef to MWWorld

Use it for the doPhysics parameter, too
This commit is contained in:
Chris Robinson 2013-02-05 11:03:39 -08:00
parent 2cdda96798
commit 0a4568bd11
6 changed files with 7 additions and 19 deletions

View file

@ -52,6 +52,8 @@ namespace MWWorld
class TimeStamp; class TimeStamp;
class ESMStore; class ESMStore;
class RefData; class RefData;
typedef std::vector<std::pair<MWWorld::Ptr,Ogre::Vector3> > PtrMovementList;
} }
namespace MWBase namespace MWBase
@ -233,8 +235,7 @@ namespace MWBase
virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const = 0; virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const = 0;
///< Convert position to cell numbers ///< Convert position to cell numbers
virtual void doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors, virtual void doPhysics (const MWWorld::PtrMovementList &actors, float duration) = 0;
float duration) = 0;
///< Run physics simulation and modify \a world accordingly. ///< Run physics simulation and modify \a world accordingly.
virtual bool toggleCollisionMode() = 0; virtual bool toggleCollisionMode() = 0;

View file

@ -7,6 +7,7 @@
#include <map> #include <map>
#include "character.hpp" #include "character.hpp"
#include "../mwbase/world.hpp"
namespace Ogre namespace Ogre
{ {
@ -26,8 +27,7 @@ namespace MWMechanics
typedef std::map<MWWorld::Ptr,CharacterController> PtrControllerMap; typedef std::map<MWWorld::Ptr,CharacterController> PtrControllerMap;
PtrControllerMap mActors; PtrControllerMap mActors;
typedef std::vector<std::pair<MWWorld::Ptr,Ogre::Vector3> > PtrMovementList; MWWorld::PtrMovementList mMovement;
PtrMovementList mMovement;
std::map<std::string, int> mDeathCount; std::map<std::string, int> mDeathCount;

View file

@ -185,13 +185,6 @@ namespace MWWorld
} }
} }
void PhysicsSystem::doPhysics(float dt, const std::vector<std::pair<std::string, Ogre::Vector3> >& actors)
{
//set the DebugRenderingMode. To disable it,set it to 0
//eng->setDebugRenderingMode(1);
}
void PhysicsSystem::addHeightField (float* heights, void PhysicsSystem::addHeightField (float* heights,
int x, int y, float yoffset, int x, int y, float yoffset,

View file

@ -14,9 +14,6 @@ namespace MWWorld
PhysicsSystem (OEngine::Render::OgreRenderer &_rend); PhysicsSystem (OEngine::Render::OgreRenderer &_rend);
~PhysicsSystem (); ~PhysicsSystem ();
void doPhysics(float duration, const std::vector<std::pair<std::string, Ogre::Vector3> >& actors);
///< do physics with dt - Usage: first call doPhysics with frame dt, then call doPhysicsFixed as often as time steps have passed
void addObject (const MWWorld::Ptr& ptr); void addObject (const MWWorld::Ptr& ptr);
void addActor (const MWWorld::Ptr& ptr); void addActor (const MWWorld::Ptr& ptr);

View file

@ -834,10 +834,8 @@ namespace MWWorld
--cellY; --cellY;
} }
void World::doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors, void World::doPhysics(const PtrMovementList &actors, float duration)
float duration)
{ {
mPhysics->doPhysics(duration, actors);
} }
bool World::toggleCollisionMode() bool World::toggleCollisionMode()

View file

@ -263,8 +263,7 @@ namespace MWWorld
virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const; virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const;
///< Convert position to cell numbers ///< Convert position to cell numbers
virtual void doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors, virtual void doPhysics(const PtrMovementList &actors, float duration);
float duration);
///< Run physics simulation and modify \a world accordingly. ///< Run physics simulation and modify \a world accordingly.
virtual bool toggleCollisionMode(); virtual bool toggleCollisionMode();