Fixed rotation speed

This commit is contained in:
Glorf 2013-04-15 17:45:18 +02:00
parent 972481f63f
commit 763308868d
4 changed files with 2 additions and 12 deletions

View File

@ -251,8 +251,6 @@ namespace MWBase
virtual void changePointer (const std::string& name) = 0; virtual void changePointer (const std::string& name) = 0;
virtual const Translation::Storage& getTranslationDataStorage() const = 0; virtual const Translation::Storage& getTranslationDataStorage() const = 0;
virtual int getFPS() const = 0;
}; };
} }

View File

@ -1200,8 +1200,3 @@ void WindowManager::frameStarted (float dt)
{ {
mInventoryWindow->doRenderUpdate (); mInventoryWindow->doRenderUpdate ();
} }
int WindowManager::getFPS() const
{
return mFPS;
}

View File

@ -248,8 +248,6 @@ namespace MWGui
void onSoulgemDialogButtonPressed (int button); void onSoulgemDialogButtonPressed (int button);
virtual int getFPS() const;
private: private:
OEngine::GUI::MyGUIManager *mGuiManager; OEngine::GUI::MyGUIManager *mGuiManager;
OEngine::Render::OgreRenderer *mRendering; OEngine::Render::OgreRenderer *mRendering;

View File

@ -13,7 +13,6 @@
#include <components/interpreter/opcodes.hpp> #include <components/interpreter/opcodes.hpp>
#include "../mwbase/environment.hpp" #include "../mwbase/environment.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwworld/class.hpp" #include "../mwworld/class.hpp"
#include "../mwworld/player.hpp" #include "../mwworld/player.hpp"
@ -554,7 +553,7 @@ namespace MWScript
std::string axis = runtime.getStringLiteral (runtime[0].mInteger); std::string axis = runtime.getStringLiteral (runtime[0].mInteger);
runtime.pop(); runtime.pop();
Interpreter::Type_Float rotation = (runtime[0].mFloat/MWBase::Environment::get().getWindowManager()->getFPS()); Interpreter::Type_Float rotation = (runtime[0].mFloat*MWBase::Environment::get().getFrameDuration());
runtime.pop(); runtime.pop();
float *objRot = ptr.getRefData().getPosition().rot; float *objRot = ptr.getRefData().getPosition().rot;
@ -597,7 +596,7 @@ namespace MWScript
std::string axis = runtime.getStringLiteral (runtime[0].mInteger); std::string axis = runtime.getStringLiteral (runtime[0].mInteger);
runtime.pop(); runtime.pop();
Interpreter::Type_Float rotation = (runtime[0].mFloat/MWBase::Environment::get().getWindowManager()->getFPS()); Interpreter::Type_Float rotation = (runtime[0].mFloat*MWBase::Environment::get().getFrameDuration());
runtime.pop(); runtime.pop();
float *objRot = ptr.getRefData().getPosition().rot; float *objRot = ptr.getRefData().getPosition().rot;