git repos / saland

commit 8e608edd

sago007 · 2018-09-30 11:49
8e608edda7b1fd199e2635766900927e52c02a7e patch · browse files
parent 69ef24eaae6d8b8b53cdd186f659bfde618494b9

USe the standing hair while spell casting

Changed files

M src/saland/Game.cpp before
diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 73ec216..f731544 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp
@@ -211,7 +211,11 @@ static void DrawHumanEntity(SDL_Renderer* target, sago::SagoSpriteHolder* sHolde
mySprite.Draw(target, time, std::round(entity->X) - offsetX, std::round(entity->Y) - offsetY);
}
if (entity->hair.length() > 0) {
- const sago::SagoSprite &myHair = sHolder->GetSprite(entity->race + "_"+animation+"_"+entity->hair+"_"+std::string(1,entity->direction));
+ std::string hairAnimation = animation;
+ if (hairAnimation == "spellcast") {
+ hairAnimation = "standing";
+ }
+ const sago::SagoSprite &myHair = sHolder->GetSprite(entity->race + "_"+hairAnimation+"_"+entity->hair+"_"+std::string(1,entity->direction));
myHair.Draw(target, time, std::round(entity->X) - offsetX, std::round(entity->Y) - offsetY);
}
}