fixing the health doesn't get affected by the health lost in combat

This commit is contained in:
Clément Le Bihan
2020-04-29 00:43:52 +02:00
parent b3bfba6e4a
commit 2ac7007cb8
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -10,6 +10,7 @@
#include "engine.h"
#include <stdbool.h>
#include "renderer.h"
void display_inv_slot(gc_scene *scene, struct renderer *rend, int nb);
bool toggle_inventory(gc_engine *engine);
+2 -2
View File
@@ -33,8 +33,8 @@ void entity_moved(gc_engine *engine, va_list args)
void combat_end(gc_engine *engine, bool has_won)
{
struct combat_manager *this = GETSYS(engine, combat_manager);
gc_entity *player = engine->scene->get_entity(engine->scene, 50);
gc_entity *player_combat = this->game_scene->get_entity(this->game_scene, 50);
gc_entity *player_combat = engine->scene->get_entity(engine->scene, 50);
gc_entity *player = this->game_scene->get_entity(this->game_scene, 50);
struct dialog_manager *dialog = GETSYS(engine, dialog_manager);
if (!this->current_enemy || !player || ! player_combat || !dialog)