From 9af31f6695a2f7474190b6d3dab0ddcf854bb95b Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 1 Dec 2023 21:45:52 +0100 Subject: [PATCH] feat: prop uses damage events --- game/src/Prop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game/src/Prop.c b/game/src/Prop.c index ebe27f9..5bea7a9 100644 --- a/game/src/Prop.c +++ b/game/src/Prop.c @@ -1,4 +1,5 @@ #include "Prop.h" +#include "DamageEvent.h" #include "debug.h" #include "game_world.h" #include "physics_world.h" @@ -61,9 +62,9 @@ RigidBody* PropGetRigidBody(Prop* self) { } void* PropReceiveMessage(Prop* self, MessageID message, uintptr_t data) { + DamageEventData* damage = (DamageEventData*)data; if(message == 1) { - unsigned damage = (int)data; - LOG_INFO("Punching bag took %u damage", damage); + LOG_INFO("Punching bag took %d damage", damage->damageAmount); } return 0; }