Default for twoFrameAnimation smoothing is false.

This commit is contained in:
Titus Tscharntke 2013-04-17 00:56:04 +00:00
parent 88e2756ac2
commit 883cfbbd27
2 changed files with 2 additions and 7 deletions

View File

@ -141,8 +141,7 @@ void Object::update() {
const float speedDivider= 100.f; const float speedDivider= 100.f;
float speedDenominator = (speedDivider * GameConstants::updateFps); float speedDenominator = (speedDivider * GameConstants::updateFps);
// // smooth TwoFrameanimations
//float f= 2.1-4*abs(animProgress-.5f);
float f=1.0f; float f=1.0f;
if(objectType->getTilesetModelType(variation)->getSmoothTwoFrameAnim()==true){ if(objectType->getTilesetModelType(variation)->getSmoothTwoFrameAnim()==true){
f=abs(std::sin(animProgress*2*3.16))+0.4f; f=abs(std::sin(animProgress*2*3.16))+0.4f;

View File

@ -315,12 +315,8 @@ void Tileset::load(const string &dir, Checksum *checksum, Checksum *tilesetCheck
if(modelNode->hasAttribute("smoothTwoFrameAnim") == true) { if(modelNode->hasAttribute("smoothTwoFrameAnim") == true) {
tmt->setSmoothTwoFrameAnim(modelNode->getAttribute("smoothTwoFrameAnim")->getBoolValue()); tmt->setSmoothTwoFrameAnim(modelNode->getAttribute("smoothTwoFrameAnim")->getBoolValue());
} }
else if(modelNode->hasChild("smoothTwoFrameAnim")){
const XmlNode *smoothTwoFrameAnimNode= modelNode->getChild("smoothTwoFrameAnim");
tmt->setSmoothTwoFrameAnim(smoothTwoFrameAnimNode->getAttribute("value")->getBoolValue());
}
else{ else{
tmt->setSmoothTwoFrameAnim(true); tmt->setSmoothTwoFrameAnim(false);
} }
} }
} }