summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/am_map.c4
-rw-r--r--src/hexen/mn_menu.c9
-rw-r--r--src/hexen/p_doors.c2
-rw-r--r--src/hexen/p_enemy.c35
-rw-r--r--src/hexen/p_pspr.c10
-rw-r--r--src/hexen/po_man.c6
-rw-r--r--src/hexen/r_data.c4
7 files changed, 18 insertions, 52 deletions
diff --git a/src/hexen/am_map.c b/src/hexen/am_map.c
index 458ee449..05d03d8f 100644
--- a/src/hexen/am_map.c
+++ b/src/hexen/am_map.c
@@ -275,7 +275,6 @@ void AM_initVariables(void)
{
int pnum;
thinker_t *think;
- mobj_t *mo;
//static event_t st_notify = { ev_keyup, AM_MSGENTERED };
@@ -323,7 +322,6 @@ void AM_initVariables(void)
{ //not a mobj
continue;
}
- mo = (mobj_t *) think;
}
}
@@ -424,7 +422,6 @@ boolean AM_Responder(event_t * ev)
{
int rc;
int key;
- static int cheatstate = 0;
static int bigstate = 0;
key = ev->data1;
@@ -511,7 +508,6 @@ boolean AM_Responder(event_t * ev)
}
else
{
- cheatstate = 0;
rc = false;
}
diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
index 301c5c1d..3d068b0e 100644
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1133,7 +1133,6 @@ boolean MN_Responder(event_t * event)
int i;
MenuItem_t *item;
extern boolean automapactive;
- static boolean shiftdown;
extern void H2_StartTitle(void);
extern void G_CheckDemoStatus(void);
char *textBuffer;
@@ -1175,13 +1174,9 @@ boolean MN_Responder(event_t * event)
return true;
}
- if (event->data1 == KEY_RSHIFT)
+ if (event->data1 != KEY_RSHIFT && event->type != ev_keydown)
{
- shiftdown = (event->type == ev_keydown);
- }
- if (event->type != ev_keydown)
- {
- return (false);
+ return false;
}
key = event->data1;
diff --git a/src/hexen/p_doors.c b/src/hexen/p_doors.c
index 8193b4ab..92ccec8a 100644
--- a/src/hexen/p_doors.c
+++ b/src/hexen/p_doors.c
@@ -206,7 +206,6 @@ int EV_DoDoor(line_t * line, byte * args, vldoor_e type)
//==================================================================
boolean EV_VerticalDoor(line_t * line, mobj_t * thing)
{
- int secnum;
sector_t *sec;
vldoor_t *door;
int side;
@@ -215,7 +214,6 @@ boolean EV_VerticalDoor(line_t * line, mobj_t * thing)
// if the sector has an active thinker, use it
sec = sides[line->sidenum[side ^ 1]].sector;
- secnum = sec - sectors;
if (sec->specialdata)
{
return false;
diff --git a/src/hexen/p_enemy.c b/src/hexen/p_enemy.c
index 69dabbc9..da987f16 100644
--- a/src/hexen/p_enemy.c
+++ b/src/hexen/p_enemy.c
@@ -529,7 +529,6 @@ boolean P_LookForPlayers(mobj_t * actor, boolean allaround)
int c;
int stop;
player_t *player;
- sector_t *sector;
angle_t an;
fixed_t dist;
@@ -537,7 +536,6 @@ boolean P_LookForPlayers(mobj_t * actor, boolean allaround)
{ // Single player game and player is dead, look for monsters
return (P_LookForMonsters(actor));
}
- sector = actor->subsector->sector;
c = 0;
// NOTE: This behavior has been changed from the Vanilla behavior, where
@@ -2366,13 +2364,12 @@ void A_SerpentMeleeAttack(mobj_t * actor)
void A_SerpentMissileAttack(mobj_t * actor)
{
- mobj_t *mo;
-
if (!actor->target)
{
return;
}
- mo = P_SpawnMissile(actor, actor->target, MT_SERPENTFX);
+
+ P_SpawnMissile(actor, actor->target, MT_SERPENTFX);
}
//============================================================================
@@ -3002,9 +2999,7 @@ void A_DragonFlap(mobj_t * actor)
void A_DragonAttack(mobj_t * actor)
{
- mobj_t *mo;
-
- mo = P_SpawnMissile(actor, actor->target, MT_DRAGON_FX);
+ P_SpawnMissile(actor, actor->target, MT_DRAGON_FX);
}
//============================================================================
@@ -3816,9 +3811,7 @@ void A_IceGuyAttack(mobj_t * actor)
void A_IceGuyMissilePuff(mobj_t * actor)
{
- mobj_t *mo;
- mo = P_SpawnMobj(actor->x, actor->y, actor->z + 2 * FRACUNIT,
- MT_ICEFX_PUFF);
+ P_SpawnMobj(actor->x, actor->y, actor->z + 2 * FRACUNIT, MT_ICEFX_PUFF);
}
//============================================================================
@@ -4983,12 +4976,10 @@ void A_KoraxStep2(mobj_t * actor)
void A_KoraxBonePop(mobj_t * actor)
{
- fixed_t x, y, z;
mobj_t *mo;
byte args[5];
args[0] = args[1] = args[2] = args[3] = args[4] = 0;
- x = actor->x, y = actor->y, z = actor->z;
// Spawn 6 spirits equalangularly
mo = P_SpawnMissileAngle(actor, MT_KORAX_SPIRIT1, ANG60 * 0,
@@ -5176,7 +5167,6 @@ void A_KoraxCommand(mobj_t * actor)
// Arm 1 projectile
void KoraxFire1(mobj_t * actor, int type)
{
- mobj_t *mo;
angle_t ang;
fixed_t x, y, z;
@@ -5184,14 +5174,13 @@ void KoraxFire1(mobj_t * actor, int type)
x = actor->x + FixedMul(KORAX_ARM_EXTENSION_SHORT, finecosine[ang]);
y = actor->y + FixedMul(KORAX_ARM_EXTENSION_SHORT, finesine[ang]);
z = actor->z - actor->floorclip + KORAX_ARM1_HEIGHT;
- mo = P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
+ P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
}
// Arm 2 projectile
void KoraxFire2(mobj_t * actor, int type)
{
- mobj_t *mo;
angle_t ang;
fixed_t x, y, z;
@@ -5199,13 +5188,12 @@ void KoraxFire2(mobj_t * actor, int type)
x = actor->x + FixedMul(KORAX_ARM_EXTENSION_LONG, finecosine[ang]);
y = actor->y + FixedMul(KORAX_ARM_EXTENSION_LONG, finesine[ang]);
z = actor->z - actor->floorclip + KORAX_ARM2_HEIGHT;
- mo = P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
+ P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
}
// Arm 3 projectile
void KoraxFire3(mobj_t * actor, int type)
{
- mobj_t *mo;
angle_t ang;
fixed_t x, y, z;
@@ -5213,13 +5201,12 @@ void KoraxFire3(mobj_t * actor, int type)
x = actor->x + FixedMul(KORAX_ARM_EXTENSION_LONG, finecosine[ang]);
y = actor->y + FixedMul(KORAX_ARM_EXTENSION_LONG, finesine[ang]);
z = actor->z - actor->floorclip + KORAX_ARM3_HEIGHT;
- mo = P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
+ P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
}
// Arm 4 projectile
void KoraxFire4(mobj_t * actor, int type)
{
- mobj_t *mo;
angle_t ang;
fixed_t x, y, z;
@@ -5227,13 +5214,12 @@ void KoraxFire4(mobj_t * actor, int type)
x = actor->x + FixedMul(KORAX_ARM_EXTENSION_SHORT, finecosine[ang]);
y = actor->y + FixedMul(KORAX_ARM_EXTENSION_SHORT, finesine[ang]);
z = actor->z - actor->floorclip + KORAX_ARM4_HEIGHT;
- mo = P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
+ P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
}
// Arm 5 projectile
void KoraxFire5(mobj_t * actor, int type)
{
- mobj_t *mo;
angle_t ang;
fixed_t x, y, z;
@@ -5241,13 +5227,12 @@ void KoraxFire5(mobj_t * actor, int type)
x = actor->x + FixedMul(KORAX_ARM_EXTENSION_LONG, finecosine[ang]);
y = actor->y + FixedMul(KORAX_ARM_EXTENSION_LONG, finesine[ang]);
z = actor->z - actor->floorclip + KORAX_ARM5_HEIGHT;
- mo = P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
+ P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
}
// Arm 6 projectile
void KoraxFire6(mobj_t * actor, int type)
{
- mobj_t *mo;
angle_t ang;
fixed_t x, y, z;
@@ -5255,7 +5240,7 @@ void KoraxFire6(mobj_t * actor, int type)
x = actor->x + FixedMul(KORAX_ARM_EXTENSION_LONG, finecosine[ang]);
y = actor->y + FixedMul(KORAX_ARM_EXTENSION_LONG, finesine[ang]);
z = actor->z - actor->floorclip + KORAX_ARM6_HEIGHT;
- mo = P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
+ P_SpawnKoraxMissile(x, y, z, actor, actor->target, type);
}
diff --git a/src/hexen/p_pspr.c b/src/hexen/p_pspr.c
index 5cb02029..7617e3f0 100644
--- a/src/hexen/p_pspr.c
+++ b/src/hexen/p_pspr.c
@@ -1691,7 +1691,7 @@ void A_CFlamePuff(mobj_t * actor)
void A_CFlameMissile(mobj_t * actor)
{
int i;
- int an, an90;
+ int an;
fixed_t dist;
mobj_t *mo;
@@ -1703,7 +1703,6 @@ void A_CFlameMissile(mobj_t * actor)
for (i = 0; i < 4; i++)
{
an = (i * ANG45) >> ANGLETOFINESHIFT;
- an90 = (i * ANG45 + ANG90) >> ANGLETOFINESHIFT;
mo = P_SpawnMobj(BlockingMobj->x + FixedMul(dist, finecosine[an]),
BlockingMobj->y + FixedMul(dist, finesine[an]),
BlockingMobj->z + 5 * FRACUNIT, MT_CIRCLEFLAME);
@@ -1923,11 +1922,9 @@ void A_CHolyAttack2(mobj_t * actor)
void A_CHolyAttack(player_t * player, pspdef_t * psp)
{
- mobj_t *mo;
-
player->mana[MANA_1] -= WeaponManaUse[player->class][player->readyweapon];
player->mana[MANA_2] -= WeaponManaUse[player->class][player->readyweapon];
- mo = P_SpawnPlayerMissile(player->mo, MT_HOLY_MISSILE);
+ P_SpawnPlayerMissile(player->mo, MT_HOLY_MISSILE);
if (player == &players[consoleplayer])
{
player->damagecount = 0;
@@ -2262,7 +2259,6 @@ void A_FireConePL1(player_t * player, pspdef_t * psp)
{
angle_t angle;
int damage;
- int slope;
int i;
mobj_t *pmo, *mo;
int conedone = false;
@@ -2275,7 +2271,7 @@ void A_FireConePL1(player_t * player, pspdef_t * psp)
for (i = 0; i < 16; i++)
{
angle = pmo->angle + i * (ANG45 / 16);
- slope = P_AimLineAttack(pmo, angle, MELEERANGE);
+ P_AimLineAttack(pmo, angle, MELEERANGE);
if (linetarget)
{
pmo->flags2 |= MF2_ICEDAMAGE;
diff --git a/src/hexen/po_man.c b/src/hexen/po_man.c
index 4429c3e0..196f20d3 100644
--- a/src/hexen/po_man.c
+++ b/src/hexen/po_man.c
@@ -1119,10 +1119,8 @@ static boolean CheckMobjBlocking(seg_t * seg, polyobj_t * po)
static void InitBlockMap(void)
{
int i;
-
int j;
seg_t **segList;
- int area;
int leftX, rightX;
int topY, bottomY;
@@ -1158,8 +1156,8 @@ static void InitBlockMap(void)
topY = (*segList)->v1->y;
}
}
- area = ((rightX >> FRACBITS) - (leftX >> FRACBITS)) *
- ((topY >> FRACBITS) - (bottomY >> FRACBITS));
+// area = ((rightX >> FRACBITS) - (leftX >> FRACBITS)) *
+// ((topY >> FRACBITS) - (bottomY >> FRACBITS));
// fprintf(stdaux, "Area of Polyobj[%d]: %d\n", polyobjs[i].tag, area);
// fprintf(stdaux, "\t[%d]\n[%d]\t\t[%d]\n\t[%d]\n", topY>>FRACBITS,
diff --git a/src/hexen/r_data.c b/src/hexen/r_data.c
index b82c0ff6..0565c891 100644
--- a/src/hexen/r_data.c
+++ b/src/hexen/r_data.c
@@ -101,9 +101,7 @@ void R_DrawColumnInCache(column_t * patch, byte * cache, int originy,
int cacheheight)
{
int count, position;
- byte *source, *dest;
-
- dest = (byte *) cache + 3;
+ byte *source;
while (patch->topdelta != 0xff)
{