From 35048f2f8374d1457a5cef19ea3af599037b6935 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 23 Mar 2017 15:48:07 +0100 Subject: [PATCH] Moved tempanimation init to Person constructor --- Source/GameTick.cpp | 8 ++------ Source/Objects/Person.cpp | 9 +++------ 2 files changed, 5 insertions(+), 12 deletions(-) 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); -- 2.39.5