ref: 1d7c76df1905d7f15eb8763920b8795890a21d1f
parent: e82877d3f91bf6031dfdf1c9d925a55ead8e338c
author: Marc-Alexandre Espiaut <marcalexandre@member.fsf.org>
date: Tue Jun 5 07:33:34 EDT 2018
Removing unused but set variables in rt_actor.c
--- a/rott/rt_actor.c
+++ b/rott/rt_actor.c
@@ -2240,7 +2240,6 @@
void T_Count(objtype*ob)
{
int index;
- wall_t* tswitch;
touchplatetype *temp;
objtype* tempactor;
@@ -2318,16 +2317,6 @@
tempactor = (objtype*)(temp->whichobj);
tempactor->flags &= ~FL_ACTIVE;
}
-
- tswitch = (wall_t*)actorat[ob->temp1][ob->temp2];
- /*
- if (tswitch && (tswitch->which != ACTOR))
- {
- tilemap[ob->temp1][ob->temp2]--;
- tswitch->flags &= ~FL_ON;
- }
- */
-
}
}
@@ -2789,7 +2778,7 @@
void MissileHit (objtype *ob,void *hitwhat)
{
- int damage=0, random,tcl=0,ocl,fireweapon=0,sound,hitmomx,hitmomy;
+ int damage=0, random,tcl=0,ocl,sound,hitmomx,hitmomy;
objtype* tempactor=NULL,*owner;
@@ -2910,7 +2899,6 @@
case fireballobj:
NewState(ob,&s_explosion1);
damage = (random >> 3) + 10;
- fireweapon = 1;
break;
case missileobj:
@@ -2932,7 +2920,6 @@
else if (M_ISWALL(tempactor) || (tempactor->which == DOOR))
NewState(ob,&s_crossdone1);
damage = EnvironmentDamage(ob);
- fireweapon = 1;
break;
@@ -3018,7 +3005,6 @@
case dmfballobj:
NewState(ob,&s_explosion1);
damage = (random >>3) + 20;
- fireweapon = 1;
break;
case h_mineobj:
@@ -3111,7 +3097,7 @@
void T_CrushUp(objtype*ob)
-{ int dx, dy,dist,dz,i,playeron;
+{ int dx, dy,dist,dz,i;
if ((!ob->ticcount) && (ob->state->condition & SF_SOUND) &&
@@ -3134,7 +3120,6 @@
ob->temp2 = maxheight - ob->temp1 + 32;
- playeron = 0;
for(i=0; i<numplayers; i++)
{ dx = abs(PLAYER[i]->x - ob->x);
dy = abs(PLAYER[i]->y - ob->y);
@@ -3143,7 +3128,6 @@
if ((dx < dist) && (dy < dist) && (dz < 65))
{ ob->flags &= ~FL_BLOCK;
//player->temp2 = 0;
- playeron = 1;
if ((!ob->ticcount) && (ob->state->condition & SF_CRUSH) &&
(levelheight<2) && (!(ob->flags & FL_DYING)))
{ DamageThing(PLAYER[i],EnvironmentDamage(ob));
@@ -3175,20 +3159,16 @@
}
- //if (!playeron)
- { if (ob->state->condition & SF_BLOCK)
+ if (ob->state->condition & SF_BLOCK)
ob->flags |= FL_BLOCK;
else
ob->flags &= ~FL_BLOCK;
- }
-
-
}
void T_CrushDown(objtype*ob)
-{ int dx,dy,dz,i,playeron;
+{ int dx,dy,dz,i;
if ((!ob->ticcount) && (ob->state->condition & SF_SOUND)&&
@@ -3196,7 +3176,6 @@
SD_PlaySoundRTP(BAS[ob->obclass].operate,ob->x,ob->y);
ob->temp2 = ob->z;
- playeron = 0;
for(i=0; i<numplayers; i++)
{ dx = abs(PLAYER[i]->x - ob->x);
dy = abs(PLAYER[i]->y - ob->y);
@@ -3204,7 +3183,6 @@
if ((dx < STANDDIST) && (dy < STANDDIST) && (dz < 20))
{ //PLAYER[i]->temp2 = 0;
- playeron = 1;
ob->flags &= ~FL_BLOCK;
if ((!ob->ticcount) && (ob->state->condition & SF_CRUSH) &&
(!(ob->flags & FL_DYING)))
@@ -3225,14 +3203,10 @@
}
}
- //if (!playeron)
- { if (ob->state->condition & SF_BLOCK)
+ if (ob->state->condition & SF_BLOCK)
ob->flags |= FL_BLOCK;
else
ob->flags &= ~FL_BLOCK;
- }
-
-
}
@@ -5966,11 +5940,9 @@
void MoveActor(objtype*ob)
{
- int linked,oldarea,newarea,
+ int oldarea,newarea,
tilex,tiley,oldtilex,oldtiley;
- linked = 0;
-
ResolveRide(ob);
oldtilex = ob->tilex;
@@ -6783,8 +6755,6 @@
int dzt,dztp1,checkz;
int x,y,dx,dy;
int ocl,tcl;
- int ISPLAYER = 0;
- int hoffset;
ocl = ob->obclass;
@@ -6818,15 +6788,6 @@
radius -= 0x2000;
}
- else
- {
- ISPLAYER = 1;
- if (ob->flags & FL_DOGMODE)
- hoffset = 10;
- }
-
-
-
tilexlow = (int)((tryx-radius) >>TILESHIFT);
tileylow = (int)((tryy-radius) >>TILESHIFT);
@@ -7015,7 +6976,7 @@
{
int tilexlow,tilexhigh,tileylow,tileyhigh,x,y,radius;
classtype ocl;
- boolean WALLSTOP,ISPLAYER=false;
+ boolean ISPLAYER=false;
ocl = ob->obclass;
tryz=tryz;
@@ -7050,17 +7011,12 @@
tilexhigh = (int)((tryx+radius) >>TILESHIFT);
tileyhigh = (int)((tryy+radius) >>TILESHIFT);
-
- WALLSTOP = false;
-
for (y=tileylow; y<=tileyhigh; y++)
for (x=tilexlow; x<=tilexhigh; x++)
{
wall_t *tempwall;
- int wall;
tempwall = (wall_t*)actorat[x][y];
- wall=tilemap[x][y];
if (tempwall)
{
if (tempwall->which==WALL)// && IsWindow(x,y)==false)
@@ -7083,7 +7039,6 @@
}
//return false;
- WALLSTOP = true;
if ((ocl == inertobj) &&
(ob->dirchoosetime == GIBVALUE) &&
@@ -8763,7 +8718,7 @@
void SelectTouchDir (objtype *ob)
{
- int dx,dy,noneleft,invisible;
+ int dx,dy;
hiding_status hole;
@@ -8774,10 +8729,6 @@
olddir=ob->dir;
turnaround= opposite[olddir];
-
- invisible = 0;
- noneleft = 1;
-
if (!MISCVARS->notouch)
{
if (!FindTouch(ob))
@@ -12830,8 +12781,6 @@
else
turnaround=nodir;
*/
- dummy.which = ACTOR;
- dummy.z = ob->z;
if (ob->targettilex || ob->targettiley)
{
tx = ob->targettilex;
@@ -12838,8 +12787,6 @@
ty = ob->targettiley;
dx= tx - ob->x;
dy= ob->y - ty;
- dummy.x = tx;
- dummy.y = ty;
if ((abs(dx) < 0x2000) && (abs(dy) < 0x2000))
ChasePlayer(ob);
}