From 8adc09e313ab2cec1ba28ac9a929b90880d9b2b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Mon, 28 Nov 2016 18:28:26 +0700 Subject: [PATCH] Removed unused members of Person class --- Source/GameTick.cpp | 6 +----- Source/Person.cpp | 15 --------------- Source/Person.h | 15 --------------- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 37a4587..893a50e 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -954,7 +954,6 @@ void Game::Loadlevel(const char *name) funpackf(tfile, "Bf Bf Bf Bf Bf Bi", &Person::players[0]->coords.x, &Person::players[0]->coords.y, &Person::players[0]->coords.z, &Person::players[0]->yaw, &Person::players[0]->targetyaw, &Person::players[0]->num_weapons); if (stealthloading) funpackf(tfile, "Bf Bf Bf Bf Bf Bi", &lamefloat, &lamefloat, &lamefloat, &lamefloat, &lamefloat, &Person::players[0]->num_weapons); - Person::players[0]->originalcoords = Person::players[0]->coords; if (Person::players[0]->num_weapons > 0 && Person::players[0]->num_weapons < 5) for (int j = 0; j < Person::players[0]->num_weapons; j++) { Person::players[0]->weaponids[j] = weapons.size(); @@ -1324,7 +1323,6 @@ void Game::Loadlevel(const char *name) Person::players[i]->normalsupdatedelay = 0; Person::players[i]->aitype = passivetype; - Person::players[i]->madskills = 0; if (i == 0) { Person::players[i]->proportionhead = 1.2; @@ -2493,7 +2491,6 @@ void doDebugKeys() Person::players.back()->bleeding = 0; Person::players.back()->numwaypoints = 0; Person::players.back()->waypoint = 0; - Person::players.back()->jumppath = 0; Person::players.back()->weaponstuck = -1; Person::players.back()->weaponactive = -1; Person::players.back()->num_weapons = 0; @@ -3384,8 +3381,7 @@ void doAttacks() !Person::players[i]->skeleton.free && Person::players[i]->animTarget != getupfrombackanim && Person::players[i]->animTarget != getupfromfrontanim && - (Person::players[i]->stunned > 0 && Person::players[k]->madskills || - Person::players[i]->surprised > 0 || + (Person::players[i]->surprised > 0 || Person::players[i]->aitype == passivetype || attackweapon && Person::players[i]->stunned > 0) && normaldotproduct(Person::players[i]->facing, Person::players[i]->coords - Person::players[k]->coords) > 0) { diff --git a/Source/Person.cpp b/Source/Person.cpp index 4ccecd4..27f4ec9 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -105,7 +105,6 @@ Person::Person() : realoldcoords(), oldcoords(), coords(), - originalcoords(), velocity(), proportionhead(), @@ -149,14 +148,11 @@ Person::Person() : jumppower(0), onground(false), - madskills(0), wentforweapon(0), calcrot(false), - backwardsanim(false), - facing(), bleeding(0), @@ -207,7 +203,6 @@ Person::Person() : aiupdatedelay(0), losupdatedelay(0), ally(0), - movetarget(), collide(0), collided(0), avoidcollided(0), @@ -242,7 +237,6 @@ Person::Person() : weaponmissdelay(0), highreversaldelay(0), lowreversaldelay(0), - nocollidedelay(0), creature(rabbittype), @@ -273,10 +267,8 @@ Person::Person() : onfire(false), onfiredelay(0), burnt(0), - fireduration(0), flamedelay(0), - updatestuffdelay(0), playerdetail(0), @@ -287,8 +279,6 @@ Person::Person() : numwaypoints(0), pausetime(0), - hastempwaypoint(false), - tempwaypoint(), headtarget(), interestdelay(0), @@ -301,10 +291,8 @@ Person::Person() : lastpathfindpoint2(0), lastpathfindpoint3(0), lastpathfindpoint4(0), - onpath(false), waypoint(0), - jumppath(false), lastseen(), lastseentime(0), @@ -324,9 +312,6 @@ Person::Person() : whichskin(0), rabbitkickragdoll(false), - averageloc(), - oldaverageloc(), - tempanimation(), occluded(0), diff --git a/Source/Person.h b/Source/Person.h index e3598b0..0c030ab 100644 --- a/Source/Person.h +++ b/Source/Person.h @@ -88,7 +88,6 @@ public: XYZ realoldcoords; XYZ oldcoords; XYZ coords; - XYZ originalcoords; XYZ velocity; XYZ proportionhead; @@ -133,14 +132,11 @@ public: float jumppower; bool onground; - int madskills; int wentforweapon; bool calcrot; - bool backwardsanim; - XYZ facing; float bleeding; @@ -193,7 +189,6 @@ public: float aiupdatedelay; float losupdatedelay; int ally; - XYZ movetarget; float collide; float collided; float avoidcollided; @@ -228,7 +223,6 @@ public: float weaponmissdelay; float highreversaldelay; float lowreversaldelay; - float nocollidedelay; int creature; @@ -263,10 +257,8 @@ public: bool onfire; float onfiredelay; float burnt; - float fireduration; float flamedelay; - float updatestuffdelay; int playerdetail; @@ -283,8 +275,6 @@ public: XYZ waypoints[90]; int waypointtype[90]; float pausetime; - bool hastempwaypoint; - XYZ tempwaypoint; XYZ headtarget; float interestdelay; @@ -297,10 +287,8 @@ public: int lastpathfindpoint2; int lastpathfindpoint3; int lastpathfindpoint4; - bool onpath; int waypoint; - bool jumppath; XYZ lastseen; float lastseentime; @@ -320,9 +308,6 @@ public: int whichskin; bool rabbitkickragdoll; - XYZ averageloc; - XYZ oldaverageloc; - Animation tempanimation; float occluded; -- 2.39.5