forked from teamnwah/openmw-tes3coop
a very little comments
This commit is contained in:
parent
288b63350c
commit
0e3f70413e
4 changed files with 7 additions and 4 deletions
|
@ -15,7 +15,7 @@ namespace MWRender{
|
|||
OEngine::Render::OgreRenderer &mRend;
|
||||
std::map<MWWorld::CellStore *, Ogre::SceneNode *> mCellSceneNodes;
|
||||
Ogre::SceneNode* mMwRoot;
|
||||
std::map<MWWorld::Ptr, Animation*> mAllActors;
|
||||
std::map<MWWorld::Ptr, Animation*> mAllActors;
|
||||
|
||||
|
||||
|
||||
|
@ -45,6 +45,7 @@ namespace MWRender{
|
|||
|
||||
void update (float duration);
|
||||
|
||||
/// Updates containing cell for object rendering data
|
||||
void updateObjectCell(const MWWorld::Ptr &ptr);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ public:
|
|||
|
||||
void rebuildStaticGeometry();
|
||||
|
||||
/// Updates containing cell for object rendering data
|
||||
void updateObjectCell(const MWWorld::Ptr &ptr);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ class RenderingManager: private RenderingInterface, public Ogre::WindowEventList
|
|||
void setWaterHeight(const float height);
|
||||
void toggleWater();
|
||||
|
||||
/// Moves object rendering part to proper container
|
||||
/// \param store Cell the object was in previously (\a ptr has already been updated to the new cell).
|
||||
void moveObjectToCell (const MWWorld::Ptr& ptr, const Ogre::Vector3& position, MWWorld::CellStore *store);
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ namespace MWWorld
|
|||
Ogre::Vector3 vec(x, y, z);
|
||||
|
||||
CellStore *currCell;
|
||||
// a bit ugly
|
||||
/// \todo fix assertion fail on player ptr.getCell() on start
|
||||
if (ptr == mPlayer->getPlayer()) {
|
||||
currCell = mWorldScene->getCurrentCell();
|
||||
} else {
|
||||
|
@ -574,6 +574,8 @@ namespace MWWorld
|
|||
CellStore *newCell =
|
||||
MWBase::Environment::get().getWorld()->getExterior(cellX, cellY);
|
||||
|
||||
// placeObject() handles both target cell states
|
||||
// with active current cell
|
||||
if (!mWorldScene->isCellActive(*currCell)) {
|
||||
placeObject(ptr, *newCell, pos);
|
||||
haveToMove = false;
|
||||
|
@ -589,8 +591,6 @@ namespace MWWorld
|
|||
|
||||
mRendering->moveObjectToCell(copy, vec, currCell);
|
||||
|
||||
/// \note Maybe mechanics actors change is redundant
|
||||
/// because of Ptr comparing operators
|
||||
if (MWWorld::Class::get(ptr).isActor()) {
|
||||
MWMechanics::MechanicsManager *mechMgr =
|
||||
MWBase::Environment::get().getMechanicsManager();
|
||||
|
|
Loading…
Reference in a new issue