From 58bb0b8773bfbe0ba832590d12fdf17ebd65e109 Mon Sep 17 00:00:00 2001 From: Xethik Date: Fri, 20 Sep 2013 21:26:12 -0400 Subject: [PATCH 1/2] Bug #907 Added a check to make sure playerview is allowed when attempting to scroll, locking out zooming before character creation. --- apps/openmw/mwinput/inputmanagerimp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 1039a0dced..430a5d8430 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -585,7 +585,7 @@ namespace MWInput mPlayer->pitch(-y/scale); } - if (arg.zrel) + if (arg.zrel && mControlSwitch["playerviewswitch"]) //Check to make sure you are allowed to zoomout and there is a change { MWBase::Environment::get().getWorld()->changeVanityModeScale(arg.zrel); MWBase::Environment::get().getWorld()->setCameraDistance(arg.zrel, true, true); From 094e4d93b7ac90ab0a688140a6ad2f4588687a9b Mon Sep 17 00:00:00 2001 From: Xethik Date: Fri, 20 Sep 2013 21:38:10 -0400 Subject: [PATCH 2/2] Generally speaking, you should never compare iterators from two different compilers http://stackoverflow.com/questions/4657513/comparing-iterators-from-different-containers It seems like this was just an overlook that happened to work on most systems. I was not able to thoroughly test this change, but it fixed an issue I was having in VC10. It's possible the prev.end() was a copy paste error that was meant to be new.end() anyways. --- apps/openmw/mwmechanics/magiceffects.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/magiceffects.cpp b/apps/openmw/mwmechanics/magiceffects.cpp index 1a7b348170..32ac1e0881 100644 --- a/apps/openmw/mwmechanics/magiceffects.cpp +++ b/apps/openmw/mwmechanics/magiceffects.cpp @@ -151,8 +151,7 @@ namespace MWMechanics for (Collection::const_iterator iter (prev.begin()); iter!=prev.end(); ++iter) { Collection::const_iterator other = now.mCollection.find (iter->first); - - if (other==prev.end()) + if (other==now.end()) { result.add (iter->first, EffectParam() - iter->second); }