diff options
| author | icculus <icculus@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-18 06:54:38 +0000 |
|---|---|---|
| committer | icculus <icculus@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-18 06:54:38 +0000 |
| commit | 0f55d45a36065ca1dc79c6e34476ebf684fd1d98 (patch) | |
| tree | 418a1fa14124befe311add1b6087e2761761c652 /Source/GameTick.cpp | |
| parent | f47ec462ca7e63d141beb13685bf8c78893f4539 (diff) | |
| download | blackshades-0f55d45a36065ca1dc79c6e34476ebf684fd1d98.tar.gz | |
Initialized some uninitialized locals.
git-svn-id: svn://svn.icculus.org/blackshades/trunk@88 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source/GameTick.cpp')
| -rw-r--r-- | Source/GameTick.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
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<numpeople;j++){ @@ -3163,11 +3160,11 @@ void Game::Tick(){ HitStruct hitstruct,temphitstruct; - float olddistance; + float olddistance = 0.0f; - float distance; + float distance = 0.0f; - float totalarea; + float totalarea = 0.0f; int whichhit=-1; |
