fp: Add projectile attack

This commit is contained in:
2023-10-05 21:10:50 +11:00
parent aed29a9f50
commit 5f8344ddda
7 changed files with 103 additions and 23 deletions
+1 -1
View File
@@ -388,7 +388,7 @@ static Dqn_Rect FP_Game_CalcEntityWorldHitBox(FP_Game const *game, FP_GameEntity
static Dqn_Rect FP_Game_CalcEntityAttackWorldHitBox(FP_Game const *game, FP_GameEntityHandle handle)
{
FP_GameEntity *entity = FP_Game_GetEntity(DQN_CAST(FP_Game *) game, handle);
FP_GameEntity *entity = FP_Game_GetEntity(DQN_CAST(FP_Game *) game, handle);
Dqn_V2 world_pos = FP_Game_CalcEntityWorldPos(game, handle);
Dqn_V2 half_hit_box_size = entity->attack_box_size * .5f;
Dqn_Rect result = Dqn_Rect_InitV2x2(world_pos + entity->attack_box_offset - half_hit_box_size, entity->attack_box_size);