mirror of
https://github.com/zoriya/ForecastingVillage.git
synced 2026-05-28 08:57:52 +00:00
Merge branch 'master' of github.com:AnonymusRaccoon/ForecastingVillage
This commit is contained in:
@@ -40,8 +40,8 @@ SRC = src/main.c \
|
||||
src/enemy_dataloader.c \
|
||||
src/combat/attacks.c \
|
||||
src/player_utilities.c \
|
||||
src/systems/inventory.c \
|
||||
src/systems/game_over.c \
|
||||
src/inventory.c \
|
||||
src/game_over.c \
|
||||
src/npc/mia.c \
|
||||
src/npc/fisherman.c \
|
||||
src/npc/lumberjack.c \
|
||||
|
||||
+1
-1
Submodule lib/gamacon updated: 6d10f5d03d...800efd3c0f
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <systems/combat_manager.h>
|
||||
#include <components/player_component.h>
|
||||
#include "components//health_component.h"
|
||||
#include "entity.h"
|
||||
|
||||
@@ -13,6 +14,8 @@ void set_combat_player(gc_engine *engine, gc_entity *player, gc_entity *cbt)
|
||||
{
|
||||
struct health_component *main;
|
||||
struct health_component *combat;
|
||||
struct player_component *minv;
|
||||
struct player_component *inv;
|
||||
struct combat_manager *this;
|
||||
|
||||
if (!engine || !player || !cbt)
|
||||
@@ -20,12 +23,14 @@ void set_combat_player(gc_engine *engine, gc_entity *player, gc_entity *cbt)
|
||||
main = GETCMP(player, health_component);
|
||||
combat = GETCMP(cbt, health_component);
|
||||
this = GETSYS(engine, combat_manager);
|
||||
minv = GETCMP(player, player_component);
|
||||
inv = GETCMP(cbt, player_component);
|
||||
this->last_attack = NULL;
|
||||
this->last_damage = 0;
|
||||
if (!main || !combat)
|
||||
if (!main || !combat || !inv || !minv)
|
||||
return;
|
||||
combat->health_max = main->health_max;
|
||||
combat->health = main->health;
|
||||
combat->dead = main->dead;
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
inv->inventory_upgrades[i] = minv->inventory_upgrades[i];
|
||||
}
|
||||
@@ -105,17 +105,17 @@ void dialog_next(gc_engine *engine)
|
||||
{
|
||||
struct dialog_manager *this = GETSYS(engine, dialog_manager);
|
||||
gc_scene *scene = engine->scene;
|
||||
gc_entity *entity = scene->get_entity(scene, 50);
|
||||
gc_entity *ent = scene->get_entity(scene, 50);
|
||||
gc_entity *holder_name;
|
||||
|
||||
if (!entity || this->dialog_id == -1 && !load_dialog(this, engine, entity))
|
||||
if (!ent || (this->dialog_id == -1 && !load_dialog(this, engine, ent)))
|
||||
return;
|
||||
if (this->input_id >= 0)
|
||||
run_input_func(this, engine);
|
||||
controllable_set_can_move(scene, false);
|
||||
holder_name = scene->get_entity(scene, 1336);
|
||||
entity = scene->get_entity(scene, 1337);
|
||||
if (!entity || !holder_name || (!update_dialog(this, entity, \
|
||||
ent = scene->get_entity(scene, 1337);
|
||||
if (!ent || !holder_name || (!update_dialog(this, ent, \
|
||||
holder_name, engine) && handle_input(engine, this)))
|
||||
return;
|
||||
prefab_destroy(scene, this->dialog_id);
|
||||
|
||||
Reference in New Issue
Block a user