mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
fixed collision mode interface and redirected collision mode script instruction from Player class to MWScene class
This commit is contained in:
parent
a14db99aa8
commit
eb93ef68f1
5 changed files with 13 additions and 4 deletions
|
@ -200,7 +200,7 @@ void MWScene::scaleObject (const std::string& handle, float scale)
|
|||
|
||||
}
|
||||
|
||||
void MWScene::setCollsionMode (bool enabled)
|
||||
void MWScene::toggleCollisionMode()
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -87,9 +87,9 @@ namespace MWRender
|
|||
/// Change object's scale.
|
||||
void scaleObject (const std::string& handle, float scale);
|
||||
|
||||
/// Set collision mode for player. If disabled player object should ignore
|
||||
/// Toggle collision mode for player. If disabled player object should ignore
|
||||
/// collisions and gravity.
|
||||
void setCollsionMode (bool enabled);
|
||||
void toggleCollisionMode();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MWScript
|
|||
InterpreterContext& context
|
||||
= static_cast<InterpreterContext&> (runtime.getContext());
|
||||
|
||||
context.getWorld().getPlayer().toggleCollisionMode();
|
||||
context.getWorld().toggleCollisionMode();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -855,4 +855,9 @@ namespace MWWorld
|
|||
{
|
||||
mScene.doPhysics (duration, *this, actors);
|
||||
}
|
||||
|
||||
void World::toggleCollisionMode()
|
||||
{
|
||||
mScene.toggleCollisionMode();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,6 +179,10 @@ namespace MWWorld
|
|||
void doPhysics (const std::vector<std::pair<std::string, Ogre::Vector3> >& actors,
|
||||
float duration);
|
||||
///< Run physics simulation and modify \a world accordingly.
|
||||
|
||||
void toggleCollisionMode();
|
||||
///< Toggle collision mode for player. If disabled player object should ignore
|
||||
/// collisions and gravity.
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue