Skip to content

Commit

Permalink
fix radius -> diameter
Browse files Browse the repository at this point in the history
  • Loading branch information
HailSanta authored and HailSanta committed Mar 3, 2024
1 parent f3e9b9c commit 430c3ed
Show file tree
Hide file tree
Showing 88 changed files with 181 additions and 181 deletions.
2 changes: 1 addition & 1 deletion include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,7 @@ typedef struct LavaReset {

typedef struct BombTrigger {
/* 0x00 */ Vec3f pos;
/* 0x0C */ s32 radius; // effective 'size' of the object, usually set to zero because bombettes explosion radius is large enough
/* 0x0C */ s32 diameter; // effective 'size' of the object, usually set to zero because bombettes explosion radius is large enough
} BombTrigger; // size = 0x10;

typedef struct AnimatedModel {
Expand Down
8 changes: 4 additions & 4 deletions src/trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,19 @@ void update_triggers(void) {
}

if (listTrigger->flags & TRIGGER_POINT_BOMB) {
Vec4f* triggerPos;
BombTrigger* bombPos;
f32 dist;

if (collisionStatus->bombetteExploded < 0) {
continue;
}

triggerPos = listTrigger->location.pos;
dist = dist3D(triggerPos->x, triggerPos->y, triggerPos->z,
bombPos = listTrigger->location.pos;
dist = dist3D(bombPos->pos.x, bombPos->pos.y, bombPos->pos.z,
collisionStatus->bombetteExplosionPos.x, collisionStatus->bombetteExplosionPos.y,
collisionStatus->bombetteExplosionPos.z);

if ((triggerPos->yaw * 0.5f) + 50.0f < dist) {
if ((bombPos->diameter * 0.5f) + 50.0f < dist) {
continue;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_dgb/dgb_09/dgb_09_3_breakable.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

BombTrigger N(BombPos_Wall) = {
.pos = { 300.0f, 0.0f, 88.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_BlastWall) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_dro/dro_01/dro_01_7_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 120.0f, 0.0f, -43.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_flo/flo_03/flo_03_4_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { -208.0f, 0.0f, -182.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_flo/flo_07/flo_07_3_npc.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ ShakeTreeConfig N(ShakeTree_CrystalTree) = {

BombTrigger N(BombPos_CrystalTree) = {
.pos = { -309.0f, 0.0f, 31.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_flo/flo_08/flo_08_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 391.0f, 0.0f, -102.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
6 changes: 3 additions & 3 deletions src/world/area_flo/flo_09/flo_09_4_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { -200.0f, 0.0f, 1.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o4, MODEL_o5);
Expand All @@ -79,7 +79,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = {

BombTrigger N(BombPos_Tree2) = {
.pos = { 0.0f, 0.0f, 1.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o14, MODEL_o15);
Expand All @@ -93,7 +93,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = {

BombTrigger N(BombPos_Tree3) = {
.pos = { 200.0f, 0.0f, 1.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_flo/flo_10/flo_10_7_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 137.0f, 0.0f, -283.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
8 changes: 4 additions & 4 deletions src/world/area_flo/flo_18/flo_18_3_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,22 +625,22 @@ EvtScript N(EVS_DamageMachine) = {

BombTrigger N(Machine_BombTrigger_01) = {
.pos = { 5.0f, 0.0f, -10.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(Machine_BombTrigger_02) = {
.pos = { -5.0f, 0.0f, -20.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(Machine_BombTrigger_03) = {
.pos = { 50.0f, 0.0f, -10.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(Machine_BombTrigger_04) = {
.pos = { 105.0f, 0.0f, -10.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupMachine) = {
Expand Down
8 changes: 4 additions & 4 deletions src/world/area_flo/flo_18/flo_18_4_npc.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,22 +467,22 @@ EvtScript N(EVS_BombReaction_Lakitu_03) = {

BombTrigger N(Npc_BombTrigger_01) = {
.pos = { 5.0f, 0.0f, -10.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(Npc_BombTrigger_02) = {
.pos = { -5.0f, 0.0f, -20.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(Npc_BombTrigger_03) = {
.pos = { 50.0f, 0.0f, -10.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(Npc_BombTrigger_04) = {
.pos = { 105.0f, 0.0f, -10.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupMachineDamageReactions) = {
Expand Down
4 changes: 2 additions & 2 deletions src/world/area_flo/flo_22/flo_22_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 93.0f, 0.0f, -89.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree2_TrunkModels) = FOLIAGE_MODEL_LIST(MODEL_o52, MODEL_o53, MODEL_o55);
Expand All @@ -21,7 +21,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = {

BombTrigger N(BombPos_Tree2) = {
.pos = { 150.0f, 0.0f, 135.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_flo/flo_24/flo_24_3_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 1.0f, 0.0f, -192.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_flo/flo_25/flo_25_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { -388.0f, 0.0f, -92.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
4 changes: 2 additions & 2 deletions src/world/area_hos/hos_03/hos_03_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { -629.0f, 35.0f, 296.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o43, MODEL_o44, MODEL_o45);
Expand All @@ -146,7 +146,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = {

BombTrigger N(BombPos_Tree2) = {
.pos = { -488.0f, 35.0f, 324.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_isk/isk_04/isk_04_3_obstructions.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ s32 N(ItemList_RuinsKey)[] = {

BombTrigger N(BombPos_Wall) = {
.pos = { 510.0f, 25.0f, -184.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_OnBlast_Wall) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_isk/isk_08/isk_08_3_entity.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ EvtScript N(EVS_SetupFlames) = {

BombTrigger N(BombPos_Wall) = {
.pos = { -569.0f, -520.0f, 207.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_OnBlast_Wall) = {
Expand Down
4 changes: 2 additions & 2 deletions src/world/area_isk/isk_10/isk_10_3_bombable.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

BombTrigger N(BombPos_UpperWall) = {
.pos = { -593.0f, -520.0f, 104.0f },
.radius = 0.0f
.diameter = 0.0f
};

BombTrigger N(BombPos_LowerWall) = {
.pos = { -569.0f, -780.0f, -99.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_OnBlast_UpperWall) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_jan/jan_00/jan_00_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(D_80247A1C_B27F5C) = {
.pos = { 481.0f, 0.0f, -165.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_80247A2C) = {
Expand Down
14 changes: 7 additions & 7 deletions src/world/area_jan/jan_01/jan_01_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 160.0f, 0.0f, -287.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o85, MODEL_o86);
Expand All @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = {

BombTrigger N(BombPos_Tree2) = {
.pos = { -628.0f, 0.0f, -95.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o79, MODEL_o80);
Expand All @@ -64,7 +64,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = {

BombTrigger N(BombPos_Tree3) = {
.pos = { -391.0f, 0.0f, -135.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o82, MODEL_o83);
Expand All @@ -90,7 +90,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = {

BombTrigger N(BombPos_Tree4) = {
.pos = { -341.0f, 0.0f, -115.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree5_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o88, MODEL_o89);
Expand All @@ -116,7 +116,7 @@ ShakeTreeConfig N(ShakeTree_Tree5) = {

BombTrigger N(BombPos_Tree5) = {
.pos = { 68.0f, 0.0f, -155.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree6_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o104, MODEL_o105);
Expand All @@ -142,7 +142,7 @@ ShakeTreeConfig N(ShakeTree_Tree6) = {

BombTrigger N(BombPos_Tree6) = {
.pos = { 251.0f, 0.0f, -135.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree7_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o113, MODEL_o114);
Expand Down Expand Up @@ -187,7 +187,7 @@ ShakeTreeConfig N(ShakeTree_Tree7B) = {

BombTrigger N(BombPos_Tree7) = {
.pos = { 431.0f, 0.0f, -155.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
8 changes: 4 additions & 4 deletions src/world/area_jan/jan_02/jan_02_5_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { -220.0f, 15.0f, 292.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree2_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o260, MODEL_o261);
Expand All @@ -38,7 +38,7 @@ ShakeTreeConfig N(ShakeTree_Tree2) = {

BombTrigger N(BombPos_Tree2) = {
.pos = { -586.0f, 0.0f, -215.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree3_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o281, MODEL_o282);
Expand All @@ -65,7 +65,7 @@ ShakeTreeConfig N(ShakeTree_Tree3) = {

BombTrigger N(BombPos_Tree3) = {
.pos = { 581.0f, 0.0f, -240.0f },
.radius = 0.0f
.diameter = 0.0f
};

FoliageModelList N(Tree4_LeafModels) = FOLIAGE_MODEL_LIST(MODEL_o257);
Expand All @@ -78,7 +78,7 @@ ShakeTreeConfig N(ShakeTree_Tree4) = {

BombTrigger N(BombPos_Tree4) = {
.pos = { -636.0f, 0.0f, -235.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_jan/jan_03/jan_03_7_foliage.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ShakeTreeConfig N(ShakeTree_Tree1) = {

BombTrigger N(BombPos_Tree1) = {
.pos = { 576.0f, 0.0f, -135.0f },
.radius = 0.0f
.diameter = 0.0f
};

EvtScript N(EVS_SetupFoliage) = {
Expand Down
2 changes: 1 addition & 1 deletion src/world/area_jan/jan_04/jan_04_4_npc.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ EvtScript N(EVS_Sushie_ShoutAtChildren) = {

BombTrigger N(BombPos_SushieTree) = {
.pos = { 30.0f, 0.0f, -110.0f },
.radius = 0.0f
.diameter = 0.0f
};

#include "world/common/util/ChangeNpcToPartner.inc.c"
Expand Down
Loading

0 comments on commit 430c3ed

Please sign in to comment.