From 883cfbbd276c6d52bdb402e1679c6b507b70fbec Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Wed, 17 Apr 2013 00:56:04 +0000 Subject: [PATCH] Default for twoFrameAnimation smoothing is false. --- source/glest_game/type_instances/object.cpp | 3 +-- source/glest_game/world/tileset.cpp | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/source/glest_game/type_instances/object.cpp b/source/glest_game/type_instances/object.cpp index 08800f56..540982fe 100644 --- a/source/glest_game/type_instances/object.cpp +++ b/source/glest_game/type_instances/object.cpp @@ -141,8 +141,7 @@ void Object::update() { const float speedDivider= 100.f; float speedDenominator = (speedDivider * GameConstants::updateFps); - // - //float f= 2.1-4*abs(animProgress-.5f); + // smooth TwoFrameanimations float f=1.0f; if(objectType->getTilesetModelType(variation)->getSmoothTwoFrameAnim()==true){ f=abs(std::sin(animProgress*2*3.16))+0.4f; diff --git a/source/glest_game/world/tileset.cpp b/source/glest_game/world/tileset.cpp index 2cf0f0c7..1ad4dbab 100644 --- a/source/glest_game/world/tileset.cpp +++ b/source/glest_game/world/tileset.cpp @@ -315,12 +315,8 @@ void Tileset::load(const string &dir, Checksum *checksum, Checksum *tilesetCheck if(modelNode->hasAttribute("smoothTwoFrameAnim") == true) { tmt->setSmoothTwoFrameAnim(modelNode->getAttribute("smoothTwoFrameAnim")->getBoolValue()); } - else if(modelNode->hasChild("smoothTwoFrameAnim")){ - const XmlNode *smoothTwoFrameAnimNode= modelNode->getChild("smoothTwoFrameAnim"); - tmt->setSmoothTwoFrameAnim(smoothTwoFrameAnimNode->getAttribute("value")->getBoolValue()); - } else{ - tmt->setSmoothTwoFrameAnim(true); + tmt->setSmoothTwoFrameAnim(false); } } }