Skip to content

Commit

Permalink
dropoff is actually type int, not boolean
Browse files Browse the repository at this point in the history
Fixes desync in evit32x333.lmp
  • Loading branch information
fabiangreffrath committed Jan 12, 2025
1 parent 6cd8c4e commit 982c75a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/p_enemy.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ static int P_IsUnderDamage(mobj_t *actor)
static fixed_t xspeed[8] = {FRACUNIT,47000,0,-47000,-FRACUNIT,-47000,0,47000};
static fixed_t yspeed[8] = {0,47000,FRACUNIT,47000,0,-47000,-FRACUNIT,-47000};

static boolean P_Move(mobj_t *actor, boolean dropoff) // killough 9/12/98
static boolean P_Move(mobj_t *actor, int dropoff) // killough 9/12/98
{
fixed_t tryx, tryy, deltax, deltay;
boolean try_ok;
Expand Down Expand Up @@ -497,7 +497,7 @@ static boolean P_SmartMove(mobj_t *actor)
P_Random(pr_dropoff) < 235)
dropoff = 2;

if (!P_Move(actor, !!dropoff))
if (!P_Move(actor, dropoff))
return false;

// killough 9/9/98: avoid crushing ceilings or other damaging areas
Expand Down
2 changes: 1 addition & 1 deletion src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
//
// killough 3/15/98: allow dropoff as option

boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean dropoff)
boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, int dropoff)
{
fixed_t oldx, oldy;

Expand Down
2 changes: 1 addition & 1 deletion src/p_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct sector_s;
#define CROSSHAIR_AIM 1

// killough 3/15/98: add fourth argument to P_TryMove
boolean P_TryMove(struct mobj_s *thing, fixed_t x, fixed_t y, boolean dropoff);
boolean P_TryMove(struct mobj_s *thing, fixed_t x, fixed_t y, int dropoff);

// killough 8/9/98: extra argument for telefragging
boolean P_TeleportMove(struct mobj_s *thing, fixed_t x, fixed_t y, boolean boss);
Expand Down

0 comments on commit 982c75a

Please sign in to comment.