feat: Prop now detects damage with #define-d message constant
As opposed to a magic number 1
This commit is contained in:
parent
9af31f6695
commit
39f89d5127
|
@ -1,5 +1,6 @@
|
|||
#include "Prop.h"
|
||||
#include "DamageEvent.h"
|
||||
#include "Messages.h"
|
||||
#include "debug.h"
|
||||
#include "game_world.h"
|
||||
#include "physics_world.h"
|
||||
|
@ -63,7 +64,7 @@ RigidBody* PropGetRigidBody(Prop* self) {
|
|||
|
||||
void* PropReceiveMessage(Prop* self, MessageID message, uintptr_t data) {
|
||||
DamageEventData* damage = (DamageEventData*)data;
|
||||
if(message == 1) {
|
||||
if(message == MESSAGE_DEAL_DAMAGE) {
|
||||
LOG_INFO("Punching bag took %d damage", damage->damageAmount);
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue