From 0f55d45a36065ca1dc79c6e34476ebf684fd1d98 Mon Sep 17 00:00:00 2001 From: icculus Date: Sat, 18 Jan 2003 06:54:38 +0000 Subject: Initialized some uninitialized locals. git-svn-id: svn://svn.icculus.org/blackshades/trunk@88 5198baeb-e213-0410-be47-fc2ff85ca46f --- Source/GameTick.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'Source/GameTick.cpp') diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 9bef972..8e307df 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1437,9 +1437,9 @@ void Game::Tick(){ XYZ blah; - int closesttarget; + int closesttarget = 0; - float leastdistance; + float leastdistance = 0.0; @@ -1723,10 +1723,9 @@ void Game::Tick(){ - bool realcheck; + bool realcheck = false; //Pathfinding - if(i>0&&person[i].targetanimation!=getupfrontanim&&person[i].targetanimation!=thrownanim&&person[i].targetanimation!=getupbackanim&&person[i].currentanimation!=getupfrontanim&&person[i].currentanimation!=getupbackanim){ person[i].pathcheckdelay-=multiplier; @@ -1835,7 +1834,7 @@ void Game::Tick(){ //Check other blocks? - if((closesttarget==person[i].pathnum)){ + if ((closesttarget==person[i].pathnum)){ beginx=person[i].whichblockx-2; @@ -2411,8 +2410,6 @@ void Game::Tick(){ } - - person[i].whichblockx=((person[i].playercoords.x+block_spacing/2)/block_spacing); person[i].whichblocky=((person[i].playercoords.z+block_spacing/2)/block_spacing); @@ -3057,7 +3054,7 @@ void Game::Tick(){ bool firing; - float inaccuracy; + float inaccuracy = 0.0; int numshots; @@ -3067,9 +3064,9 @@ void Game::Tick(){ int hitpoly=0; - float hitrotation; + float hitrotation = 0.0f; - Model *model; + Model *model = NULL; for(int j=0;j