X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FAnimation%2FJoint.cpp;h=87d0a33678821f28b40f110ad2548b2eeb516fb6;hb=be5fc624393b132863a7d9a97c811bc695b86e5b;hp=4428cb816cfdc2227425dc6d329d04db442bc62a;hpb=b84825978803615f45a9f128232e62431042aec0;p=lugaru.git
diff --git a/Source/Animation/Joint.cpp b/Source/Animation/Joint.cpp
index 4428cb8..87d0a33 100644
--- a/Source/Animation/Joint.cpp
+++ b/Source/Animation/Joint.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
@@ -18,23 +18,24 @@ You should have received a copy of the GNU General Public License
along with Lugaru. If not, see .
*/
-#include "Animation/Joint.h"
+#include "Animation/Joint.hpp"
+
#include "Utils/binio.h"
-Joint::Joint() :
- blurred(0),
- length(0),
- mass(0),
- lower(false),
- hasparent(false),
- locked(false),
- modelnum(0),
- visible(false),
- parent(nullptr),
- sametwist(false),
- label(head),
- hasgun(0),
- delay(0)
+Joint::Joint()
+ : blurred(0)
+ , length(0)
+ , mass(0)
+ , lower(false)
+ , hasparent(false)
+ , locked(false)
+ , modelnum(0)
+ , visible(false)
+ , parent(nullptr)
+ , sametwist(false)
+ , label(head)
+ , hasgun(0)
+ , delay(0)
{
}
@@ -51,6 +52,8 @@ void Joint::load(FILE* tfile, std::vector& joints)
funpackf(tfile, "Bi", &parentID);
if (hasparent) {
parent = &joints[parentID];
+ } else {
+ parent = nullptr;
}
velocity = 0;
oldposition = position;