Skip to content

Commit

Permalink
fix: add log msg when new player is created
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Apr 27, 2024
1 parent aeebe0d commit 8640ee7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sk_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <stdio.h>
#include <assert.h>
#include <sk_log.h>
#include <sk_player.h>

#define PLAYER_HEIGHT 2
Expand All @@ -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,
Expand All @@ -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) {
Expand Down

0 comments on commit 8640ee7

Please sign in to comment.