fix(types): removed implicit type casts

This commit is contained in:
Sara 2023-11-29 14:12:44 +01:00
parent f76cb2d57b
commit 2bf6bea14f
9 changed files with 21 additions and 19 deletions

View file

@ -1,5 +1,6 @@
#include "PlayerStates.h"
#include "Player.h"
#include "Layers.h"
#include "physics_world.h"
static inline
@ -53,7 +54,7 @@ void PlayerAttackEnter(Player* self) {
static
void PlayerAttackTrigger(Player* self) {
Collider* found = physics_world_box_query(vaddf(self->transform.position, MakeVector(self->facing * (0.2f + 0.1f), 0.f)),
MakeVector(0.1f, 0.06f), PHYSICS_LAYER_DEFAULT, self->rigidbody);
MakeVector(0.1f, 0.06f), PHYSICS_LAYER_COMBAT, self->rigidbody);
if(found != NULL) {
PhysicsEntity entity = collider_get_owner(found);
entity.message_receiver->handle_message(entity.data, 1, (void*)1u);

View file

@ -9,10 +9,10 @@ void play() {
SpawnProp(MakeVector(2.f, 0.f),
sprite_from_spritesheet(spritesheet_load("assets/bag.png", IVectorFrom(512)), 0),
shape_new((Vector[]){
MakeVector(-0.2, -0.075),
MakeVector( 0.2, -0.075),
MakeVector( 0.2, 0.075),
MakeVector(-0.2, 0.075)
MakeVector(-0.2f, -0.075f),
MakeVector( 0.2f, -0.075f),
MakeVector( 0.2f, 0.075f),
MakeVector(-0.2f, 0.075f)
}, 4),
MakeVector(0.5f, .93f)
);