]> git.localhorst.tv Git - l2e.git/blobdiff - src/app/Application.cpp
added Maxim's melee animation
[l2e.git] / src / app / Application.cpp
index 819882e7251f43e66b7ed77311f97c498e74d456..6e46203aa94184de00c55d90ff41025b7433d12d 100644 (file)
@@ -28,7 +28,7 @@ Application::~Application() {
 
 
 State *Application::CurrentState() {
-       return states.top();
+       return states.empty() ? 0 : states.top();
 }
 
 void Application::UpdateState() {
@@ -121,7 +121,7 @@ void Application::Loop() {
        Uint32 now(SDL_GetTicks());
        Uint32 deltaT(now - last);
        GlobalTimers().Update(deltaT);
-       if (deltaT > 34) deltaT = 34;
+       if (deltaT > 30) deltaT = 30;
 
        if (CurrentState()) {
                CurrentState()->GraphicsTimers().Update(deltaT);