]> git.jsancho.org Git - lugaru.git/commitdiff
Moved tempanimation init to Person constructor
authorCôme Chilliet <come@chilliet.eu>
Thu, 23 Mar 2017 14:48:07 +0000 (15:48 +0100)
committerCôme Chilliet <come@chilliet.eu>
Thu, 23 Mar 2017 14:48:07 +0000 (15:48 +0100)
Source/GameTick.cpp
Source/Objects/Person.cpp

index 92a36c992b99881b728470993711c5eb629f69c5..9994747a02b47eedb806697d27e141eb94a50412 100644 (file)
@@ -840,13 +840,11 @@ bool Game::LoadLevel(const std::string& name, bool tutorial)
             } else {
                 Person::players[i]->damagetolerance = 200;
             }
             } 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;
             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()->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;
             Person::players.back()->damagetolerance = 200;
 
             Person::players.back()->protectionhead = Person::players[0]->protectionhead;
index 47e2e520c0987665e3c9381d38e5559399c3983d..1187fb7ba76a6d3db2e29c4ece4ba1db35b17ebc 100644 (file)
@@ -336,16 +336,13 @@ Person::Person()
     , neckspurtdelay(0)
     , neckspurtparticledelay(0)
     , neckspurtamount(0)
     , neckspurtdelay(0)
     , neckspurtparticledelay(0)
     , neckspurtamount(0)
-    ,
 
 
-    whichskin(0)
+    whichskin(0)
     , rabbitkickragdoll(false)
     , rabbitkickragdoll(false)
-    ,
 
 
-    tempanimation()
-    ,
+    , tempanimation("Tempanim", lowheight, neutral)
 
 
-    jumpclimb(false)
+    jumpclimb(false)
 {
     damagetolerance = PersonType::types[creature].defaultDamageTolerance;
     setProportions(1, 1, 1, 1);
 {
     damagetolerance = PersonType::types[creature].defaultDamageTolerance;
     setProportions(1, 1, 1, 1);