From 8640ee7897d31a329c2404b843a3ae46b261bfc4 Mon Sep 17 00:00:00 2001 From: iWas-Coder Date: Sun, 28 Apr 2024 00:39:59 +0200 Subject: [PATCH] fix: add log msg when new player is created --- src/sk_player.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sk_player.c b/src/sk_player.c index ca0cc54..132b84d 100644 --- a/src/sk_player.c +++ b/src/sk_player.c @@ -21,6 +21,7 @@ #include #include +#include #include #define PLAYER_HEIGHT 2 @@ -33,7 +34,7 @@ sk_player sk_player_create(i8 lobby_id, i8 lobby_slot_idx, sk_player_kind kind, sk_config *config) { assert(lobby_id != -1); assert(lobby_slot_idx != -1); - return (sk_player) { + sk_player p = { .id = sk_uuid_gen(), .lobby_id = lobby_id, .lobby_slot_idx = lobby_slot_idx, @@ -47,6 +48,8 @@ sk_player sk_player_create(i8 lobby_id, i8 lobby_slot_idx, sk_player_kind kind, }, .hp = 100 }; + SK_LOG_INFO("sk_player_create :: created new player (%s)", p.id.value); + return p; } void sk_player_destroy(sk_player *p) {