aboutsummaryrefslogtreecommitdiffstats
path: root/src/player.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/player.c b/src/player.c
index 3720762..082c87d 100644
--- a/src/player.c
+++ b/src/player.c
@@ -347,13 +347,9 @@ bool playerCanEntityBeSelected(Player* player, Entity entity)
void playerEndInteraction(Player* player, Game* game)
{
+ endInteraction(game);
player->selectedEntity = ENTITY_NONE;
player->isInteracting = false;
-
- hideInteractionChat(&game->interactionChat);
- hideInteractionMenu(&game->interactionMenu);
- game->interactionChat.entityId = ENTITY_NONE;
- game->interactionMenu.entityId = ENTITY_NONE;
}
void playerInteractWithEntity(Player* player, WorldUID uid, Game* game,
@@ -368,10 +364,7 @@ void playerInteractWithEntity(Player* player, WorldUID uid, Game* game,
switch (selection)
{
case SELECTION_INTERACT:
- clearInteractionChat(chat);
- resetInteractionMenu(menu);
- chat->entityId = entity->id;
- menu->entityId = entity->id;
+ startInteraction(game, entity->id);
player->selectedEntity = uid;
player->isInteracting = true;
break;