From: Côme Chilliet Date: Thu, 23 Mar 2017 14:48:07 +0000 (+0100) Subject: Moved tempanimation init to Person constructor X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=35048f2f8374d1457a5cef19ea3af599037b6935;p=lugaru.git Moved tempanimation init to Person constructor --- diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 92a36c9..9994747 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -840,13 +840,11 @@ bool Game::LoadLevel(const std::string& name, bool tutorial) } else { Person::players[i]->damagetolerance = 200; } - } - Game::LoadingScreen(); + Game::LoadingScreen(); - Person::players[i]->tempanimation = Animation("Tempanim", lowheight, neutral); + Person::players[i]->tempanimation = Animation("Tempanim", lowheight, neutral); - if (i == 0) { Person::players[i]->headmorphness = 0; Person::players[i]->targetheadmorphness = 1; Person::players[i]->headmorphstart = 0; @@ -1448,8 +1446,6 @@ void Game::ProcessDevInput() Person::players.back()->setProportions(1, 1, 1, 1); - Person::players.back()->tempanimation = Animation("Tempanim", lowheight, neutral); - Person::players.back()->damagetolerance = 200; Person::players.back()->protectionhead = Person::players[0]->protectionhead; diff --git a/Source/Objects/Person.cpp b/Source/Objects/Person.cpp index 47e2e52..1187fb7 100644 --- a/Source/Objects/Person.cpp +++ b/Source/Objects/Person.cpp @@ -336,16 +336,13 @@ Person::Person() , neckspurtdelay(0) , neckspurtparticledelay(0) , neckspurtamount(0) - , - whichskin(0) + , whichskin(0) , rabbitkickragdoll(false) - , - tempanimation() - , + , tempanimation("Tempanim", lowheight, neutral) - jumpclimb(false) + , jumpclimb(false) { damagetolerance = PersonType::types[creature].defaultDamageTolerance; setProportions(1, 1, 1, 1);