From dafa5cc722780c67e2b506559943549cd6d43b1e Mon Sep 17 00:00:00 2001 From: "John \"Elwin\" Edwards" Date: Tue, 8 Mar 2016 20:47:57 -0500 Subject: [PATCH] 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. --- xrogue/player.c | 4 ++-- xrogue/sticks.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xrogue/player.c b/xrogue/player.c index 5045ac2..e6c73fa 100644 --- a/xrogue/player.c +++ b/xrogue/player.c @@ -510,7 +510,7 @@ give(struct thing *th) /* just let him roam around */ turn_on(*th, ISRUN); if (on(*th, ISFLEE)) turn_off(*th, ISFLEE); - runto(th, &player); + runto(th, &hero); th->t_action = A_NIL; return; } @@ -537,7 +537,7 @@ give(struct thing *th) turn_on(*th, ISRUN); if (on(*th, ISFLEE)) turn_off(*th, ISFLEE); - runto(th, &player); + runto(th, &hero); th->t_action = A_NIL; return; } diff --git a/xrogue/sticks.c b/xrogue/sticks.c index e2ad563..df2a0a7 100644 --- a/xrogue/sticks.c +++ b/xrogue/sticks.c @@ -513,7 +513,7 @@ do_zap(struct thing *zapper, struct object *obj, coord *direction, int which, pstats.s_hpt = -1; msg("Your life has been sucked out from you! --More--"); wait_for(' '); - death(zapper); + death(zapper->t_index); } else msg("You feel a great drain on your system.");