mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:19:40 +00:00
Move the PtrMovementList typedef to MWWorld
Use it for the doPhysics parameter, too
This commit is contained in:
parent
2cdda96798
commit
0a4568bd11
6 changed files with 7 additions and 19 deletions
|
@ -52,6 +52,8 @@ namespace MWWorld
|
|||
class TimeStamp;
|
||||
class ESMStore;
|
||||
class RefData;
|
||||
|
||||
typedef std::vector<std::pair<MWWorld::Ptr,Ogre::Vector3> > PtrMovementList;
|
||||
}
|
||||
|
||||
namespace MWBase
|
||||
|
@ -233,8 +235,7 @@ namespace MWBase
|
|||
virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const = 0;
|
||||
///< Convert position to cell numbers
|
||||
|
||||
virtual void doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors,
|
||||
float duration) = 0;
|
||||
virtual void doPhysics (const MWWorld::PtrMovementList &actors, float duration) = 0;
|
||||
///< Run physics simulation and modify \a world accordingly.
|
||||
|
||||
virtual bool toggleCollisionMode() = 0;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <map>
|
||||
|
||||
#include "character.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
|
@ -26,8 +27,7 @@ namespace MWMechanics
|
|||
typedef std::map<MWWorld::Ptr,CharacterController> PtrControllerMap;
|
||||
PtrControllerMap mActors;
|
||||
|
||||
typedef std::vector<std::pair<MWWorld::Ptr,Ogre::Vector3> > PtrMovementList;
|
||||
PtrMovementList mMovement;
|
||||
MWWorld::PtrMovementList mMovement;
|
||||
|
||||
std::map<std::string, int> mDeathCount;
|
||||
|
||||
|
|
|
@ -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,
|
||||
int x, int y, float yoffset,
|
||||
|
|
|
@ -14,9 +14,6 @@ namespace MWWorld
|
|||
PhysicsSystem (OEngine::Render::OgreRenderer &_rend);
|
||||
~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 addActor (const MWWorld::Ptr& ptr);
|
||||
|
|
|
@ -834,10 +834,8 @@ namespace MWWorld
|
|||
--cellY;
|
||||
}
|
||||
|
||||
void World::doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors,
|
||||
float duration)
|
||||
void World::doPhysics(const PtrMovementList &actors, float duration)
|
||||
{
|
||||
mPhysics->doPhysics(duration, actors);
|
||||
}
|
||||
|
||||
bool World::toggleCollisionMode()
|
||||
|
|
|
@ -263,8 +263,7 @@ namespace MWWorld
|
|||
virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const;
|
||||
///< Convert position to cell numbers
|
||||
|
||||
virtual void doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors,
|
||||
float duration);
|
||||
virtual void doPhysics(const PtrMovementList &actors, float duration);
|
||||
///< Run physics simulation and modify \a world accordingly.
|
||||
|
||||
virtual bool toggleCollisionMode();
|
||||
|
|
Loading…
Reference in a new issue