XRogue: fix some uses of entire structs instead of their members.

Some calls to runto() were given a pointer to the player struct instead
of to the player's coordinates.  A call to death() was passed a pointer
to a monster instead of the monster's type number.
This commit is contained in:
John "Elwin" Edwards 2016-03-08 20:47:57 -05:00
parent e9c84b2637
commit dafa5cc722
2 changed files with 3 additions and 3 deletions

View file

@ -510,7 +510,7 @@ give(struct thing *th)
/* just let him roam around */ /* just let him roam around */
turn_on(*th, ISRUN); turn_on(*th, ISRUN);
if (on(*th, ISFLEE)) turn_off(*th, ISFLEE); if (on(*th, ISFLEE)) turn_off(*th, ISFLEE);
runto(th, &player); runto(th, &hero);
th->t_action = A_NIL; th->t_action = A_NIL;
return; return;
} }
@ -537,7 +537,7 @@ give(struct thing *th)
turn_on(*th, ISRUN); turn_on(*th, ISRUN);
if (on(*th, ISFLEE)) if (on(*th, ISFLEE))
turn_off(*th, ISFLEE); turn_off(*th, ISFLEE);
runto(th, &player); runto(th, &hero);
th->t_action = A_NIL; th->t_action = A_NIL;
return; return;
} }

View file

@ -513,7 +513,7 @@ do_zap(struct thing *zapper, struct object *obj, coord *direction, int which,
pstats.s_hpt = -1; pstats.s_hpt = -1;
msg("Your life has been sucked out from you! --More--"); msg("Your life has been sucked out from you! --More--");
wait_for(' '); wait_for(' ');
death(zapper); death(zapper->t_index);
} }
else else
msg("You feel a great drain on your system."); msg("You feel a great drain on your system.");