This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit 6d88dd59572fdf6587ea535848e7bce548edd120
Author: krzys-h <krzy...@interia.pl>
Date:   Fri Apr 17 21:11:07 2015 +0200

    Allow autosave only in missions, free game and userlevels (fixes #457)
---
 src/object/robotmain.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index 65a7d29..e56ee09 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -2607,8 +2607,12 @@ bool CRobotMain::EventFrame(const Event &event)
         m_missionTimer += event.rTime;
     
     if(m_pause->GetPause() == PAUSE_NONE && m_autosave && m_gameTime >= 
m_autosaveLast+(m_autosaveInterval*60) && m_phase == PHASE_SIMUL) {
-        m_autosaveLast = m_gameTime;
-        Autosave();
+        std::string base = m_dialog->GetSceneName();
+        if(base == "missions" || base == "freemissions" || base == "custom")
+        {
+            m_autosaveLast = m_gameTime;
+            Autosave();
+        }
     }
     //CLogger::GetInstancePointer()->Debug("%f %f %d\n", m_gameTime, 
m_autosaveLast, m_autosaveInterval);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/colobot.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to