fixed collision mode interface and redirected collision mode script instruction from Player class to MWScene class

actorid
Marc Zinnschlag 14 years ago
parent a14db99aa8
commit eb93ef68f1

@ -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…
Cancel
Save