diff options
author | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-11-15 16:25:54 -0700 |
---|---|---|
committer | nathansmithsmith <thenathansmithsmith@gmail.com> | 2023-11-15 16:25:54 -0700 |
commit | 581ea4aaf1acefa663446faa32a480bbcc3e084c (patch) | |
tree | 47e05bab3da699d707d0af089f8b8287fbda38fd /src/world.c | |
parent | 22535c8b18cda1d5a1ee771616425fc3941a801c (diff) |
Kill log only shows stuff you killed
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c index f104ec1..2764b32 100644 --- a/src/world.c +++ b/src/world.c @@ -348,7 +348,11 @@ void updateWorld(World * world, Game * game) { // "bring out your dead!" for (i = 0; i < killCount; ++i) { - pushKill(&game->killLog, *getEntityFromWorld(*world, kills[i])); + entity = getEntityFromWorld(*world, kills[i]); + + if (entity->killedByPlayer) + pushKill(&game->killLog, *entity); + removeEntityFromWorld(world, kills[i]); } |