changeset 237:2236ef808bcb

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.
author John "Elwin" Edwards
date Tue, 08 Mar 2016 20:47:57 -0500
parents 7c1cb43f346e
children e1cd27c5464f
files xrogue/player.c xrogue/sticks.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/xrogue/player.c	Mon Mar 07 20:44:01 2016 -0500
+++ b/xrogue/player.c	Tue Mar 08 20:47:57 2016 -0500
@@ -510,7 +510,7 @@
                 /* 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 @@
                             turn_on(*th, ISRUN);
                         if (on(*th, ISFLEE))
                                         turn_off(*th, ISFLEE);
-                        runto(th, &player);
+                        runto(th, &hero);
                         th->t_action = A_NIL;
                         return;
                         }
--- a/xrogue/sticks.c	Mon Mar 07 20:44:01 2016 -0500
+++ b/xrogue/sticks.c	Tue Mar 08 20:47:57 2016 -0500
@@ -513,7 +513,7 @@
             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.");