Accept a ConstPtr in RippleSimulation

openmw-38
scrawl 9 years ago
parent 53f4b92426
commit 7a2ca5580a

@ -40,7 +40,7 @@ namespace MWClass
/// stay stacked when equipped?
virtual int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const;
/// Return the index of the skill this item corresponds to when equiopped or -1, if there is
/// Return the index of the skill this item corresponds to when equipped or -1, if there is
/// no such skill.
virtual bool hasToolTip (const MWWorld::Ptr& ptr) const;

@ -32,7 +32,7 @@ namespace MWClass
/// stay stacked when equipped?
virtual int getEquipmentSkill (const MWWorld::ConstPtr& ptr) const;
/// Return the index of the skill this item corresponds to when equiopped or -1, if there is
/// Return the index of the skill this item corresponds to when equipped or -1, if there is
/// no such skill.
virtual bool hasToolTip (const MWWorld::Ptr& ptr) const;

@ -146,7 +146,7 @@ void RippleSimulation::update(float dt)
}
void RippleSimulation::addEmitter(const MWWorld::Ptr& ptr, float scale, float force)
void RippleSimulation::addEmitter(const MWWorld::ConstPtr& ptr, float scale, float force)
{
Emitter newEmitter;
newEmitter.mPtr = ptr;
@ -156,7 +156,7 @@ void RippleSimulation::addEmitter(const MWWorld::Ptr& ptr, float scale, float fo
mEmitters.push_back (newEmitter);
}
void RippleSimulation::removeEmitter (const MWWorld::Ptr& ptr)
void RippleSimulation::removeEmitter (const MWWorld::ConstPtr& ptr)
{
for (std::vector<Emitter>::iterator it = mEmitters.begin(); it != mEmitters.end(); ++it)
{
@ -168,7 +168,7 @@ void RippleSimulation::removeEmitter (const MWWorld::Ptr& ptr)
}
}
void RippleSimulation::updateEmitterPtr (const MWWorld::Ptr& old, const MWWorld::Ptr& ptr)
void RippleSimulation::updateEmitterPtr (const MWWorld::ConstPtr& old, const MWWorld::ConstPtr& ptr)
{
for (std::vector<Emitter>::iterator it = mEmitters.begin(); it != mEmitters.end(); ++it)
{

@ -31,7 +31,7 @@ namespace MWRender
struct Emitter
{
MWWorld::Ptr mPtr;
MWWorld::ConstPtr mPtr;
osg::Vec3f mLastEmitPosition;
float mScale;
float mForce;
@ -47,9 +47,9 @@ namespace MWRender
void update(float dt);
/// adds an emitter, position will be tracked automatically
void addEmitter (const MWWorld::Ptr& ptr, float scale = 1.f, float force = 1.f);
void removeEmitter (const MWWorld::Ptr& ptr);
void updateEmitterPtr (const MWWorld::Ptr& old, const MWWorld::Ptr& ptr);
void addEmitter (const MWWorld::ConstPtr& ptr, float scale = 1.f, float force = 1.f);
void removeEmitter (const MWWorld::ConstPtr& ptr);
void updateEmitterPtr (const MWWorld::ConstPtr& old, const MWWorld::ConstPtr& ptr);
void removeCell(const MWWorld::CellStore* store);
void emitRipple(const osg::Vec3f& pos);

@ -482,7 +482,7 @@ void MWState::StateManager::loadGame (const Character *character, const std::str
if (firstPersonCam != MWBase::Environment::get().getWorld()->isFirstPerson())
MWBase::Environment::get().getWorld()->togglePOV();
MWWorld::Ptr ptr = MWMechanics::getPlayer();
MWWorld::ConstPtr ptr = MWMechanics::getPlayer();
const ESM::CellId& cellId = ptr.getCell()->getCell()->getCellId();
@ -529,7 +529,7 @@ void MWState::StateManager::deleteGame(const MWState::Character *character, cons
MWState::Character *MWState::StateManager::getCurrentCharacter (bool create)
{
MWWorld::Ptr player = MWMechanics::getPlayer();
MWWorld::ConstPtr player = MWMechanics::getPlayer();
std::string name = player.get<ESM::NPC>()->mBase->mName;
return mCharacterManager.getCurrentCharacter (create, name);

@ -189,7 +189,7 @@ namespace MWWorld
virtual int getEquipmentSkill (const ConstPtr& ptr)
const;
/// Return the index of the skill this item corresponds to when equiopped or -1, if there is
/// Return the index of the skill this item corresponds to when equipped or -1, if there is
/// no such skill.
/// (default implementation: return -1)

@ -623,7 +623,7 @@ void WeatherManager::playerTeleported()
void WeatherManager::update(float duration, bool paused)
{
MWWorld::Ptr player = MWMechanics::getPlayer();
MWWorld::ConstPtr player = MWMechanics::getPlayer();
MWBase::World& world = *MWBase::Environment::get().getWorld();
TimeStamp time = world.getTimeStamp();
@ -885,7 +885,7 @@ inline void WeatherManager::importRegions()
inline void WeatherManager::regionalWeatherChanged(const std::string& regionID, RegionWeather& region)
{
// If the region is current, then add a weather transition for it.
MWWorld::Ptr player = MWMechanics::getPlayer();
MWWorld::ConstPtr player = MWMechanics::getPlayer();
if(player.isInCell())
{
std::string playerRegion = Misc::StringUtils::lowerCase(player.getCell()->getCell()->mRegion);

Loading…
Cancel
Save