summaryrefslogtreecommitdiff
path: root/src/spells1.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2017-05-02 19:20:57 +0200
committerBardur Arantsson <bardur@scientician.net>2017-05-02 19:20:57 +0200
commit0f37adeca0e2facfcb32f30e285048fac23c8845 (patch)
treeafd03e3d5b92f2936e0606c52d20e3704e16295f /src/spells1.cc
parent2bf6a6ce72bf3f2038cd383fb7c6d35679ef9341 (diff)
Move died_from to Game struct
Diffstat (limited to 'src/spells1.cc')
-rw-r--r--src/spells1.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/spells1.cc b/src/spells1.cc
index fe620256..5217a803 100644
--- a/src/spells1.cc
+++ b/src/spells1.cc
@@ -1334,9 +1334,11 @@ void take_hit(int damage, cptr hit_from)
}
/* Note cause of death */
- (void)strcpy(died_from, hit_from);
-
- if (p_ptr->image) strcat(died_from, "(?)");
+ game->died_from = hit_from;
+ if (p_ptr->image)
+ {
+ game->died_from = "(?)";
+ }
/* Leaving */
p_ptr->leaving = TRUE;
@@ -1508,9 +1510,11 @@ void take_sanity_hit(int damage, cptr hit_from)
}
/* Note cause of death */
- (void)strcpy(died_from, hit_from);
-
- if (p_ptr->image) strcat(died_from, "(?)");
+ game->died_from = hit_from;
+ if (p_ptr->image)
+ {
+ game->died_from = "(?)";
+ }
/* Leaving */
p_ptr->leaving = TRUE;