Skip to content

Commit

Permalink
Collision Documentation (n64decomp#640)
Browse files Browse the repository at this point in the history
* Collision related renames
  • Loading branch information
MegaMech authored Jun 27, 2024
1 parent 975b962 commit 3d7cdce
Show file tree
Hide file tree
Showing 47 changed files with 2,458 additions and 2,438 deletions.
16 changes: 8 additions & 8 deletions asm/non_matchings/code_80005FD0/func_8000929C.s
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ glabel func_8000929C
/* 009F04 80009304 E7AC004C */ swc1 $f12, 0x4c($sp)
/* 009F08 80009308 0C003349 */ jal func_8000CD24
/* 009F0C 8000930C AFB80018 */ sw $t8, 0x18($sp)
/* 009F10 80009310 3C058016 */ lui $a1, %hi(D_80162FCE) # $a1, 0x8016
/* 009F14 80009314 24A52FCE */ addiu $a1, %lo(D_80162FCE) # addiu $a1, $a1, 0x2fce
/* 009F10 80009310 3C058016 */ lui $a1, %hi(sSomeNearestWaypoint) # $a1, 0x8016
/* 009F14 80009314 24A52FCE */ addiu $a1, %lo(sSomeNearestWaypoint) # addiu $a1, $a1, 0x2fce
/* 009F18 80009318 A4A20000 */ sh $v0, ($a1)
/* 009F1C 8000931C 84A70000 */ lh $a3, ($a1)
/* 009F20 80009320 8FA80030 */ lw $t0, 0x30($sp)
Expand All @@ -57,8 +57,8 @@ glabel func_8000929C
/* 009F50 80009350 AFA40050 */ sw $a0, 0x50($sp)
/* 009F54 80009354 0C0023CE */ jal func_80008F38
/* 009F58 80009358 E7AC004C */ swc1 $f12, 0x4c($sp)
/* 009F5C 8000935C 3C078016 */ lui $a3, %hi(D_80162FCE) # $a3, 0x8016
/* 009F60 80009360 84E72FCE */ lh $a3, %lo(D_80162FCE)($a3)
/* 009F5C 8000935C 3C078016 */ lui $a3, %hi(sSomeNearestWaypoint) # $a3, 0x8016
/* 009F60 80009360 84E72FCE */ lh $a3, %lo(sSomeNearestWaypoint)($a3)
/* 009F64 80009364 8FA40050 */ lw $a0, 0x50($sp)
/* 009F68 80009368 C7AC004C */ lwc1 $f12, 0x4c($sp)
.L8000936C:
Expand Down Expand Up @@ -321,7 +321,7 @@ glabel func_8000929C
/* 00A328 80009728 8FAA0054 */ lw $t2, 0x54($sp)
.L8000972C:
/* 00A32C 8000972C 3C068016 */ lui $a2, %hi(D_80163448) # 0x8016
/* 00A330 80009730 3C038016 */ lui $v1, %hi(D_80162FCE) # 0x8016
/* 00A330 80009730 3C038016 */ lui $v1, %hi(sSomeNearestWaypoint) # 0x8016
/* 00A334 80009734 95420000 */ lhu $v0, ($t2)
/* 00A338 80009738 304B4000 */ andi $t3, $v0, 0x4000
/* 00A33C 8000973C 11600020 */ beqz $t3, .L800097C0
Expand All @@ -335,7 +335,7 @@ glabel func_8000929C
/* 00A35C 8000975C 8FA40050 */ lw $a0, 0x50($sp)
/* 00A360 80009760 3C068016 */ lui $a2, %hi(D_80163448) # $a2, 0x8016
/* 00A364 80009764 15A00013 */ bnez $t5, .L800097B4
/* 00A368 80009768 3C038016 */ lui $v1, %hi(D_80162FCE) # $v1, 0x8016
/* 00A368 80009768 3C038016 */ lui $v1, %hi(sSomeNearestWaypoint) # $v1, 0x8016
/* 00A36C 8000976C 3C0E8019 */ lui $t6, %hi(gPlayerCount) # $t6, 0x8019
/* 00A370 80009770 81CEEDF3 */ lb $t6, %lo(gPlayerCount)($t6)
/* 00A374 80009774 24010002 */ li $at, 2
Expand All @@ -358,10 +358,10 @@ glabel func_8000929C
.L800097B4:
/* 00A3B4 800097B4 8CC63448 */ lw $a2, %lo(D_80163448)($a2)
/* 00A3B8 800097B8 10000003 */ b .L800097C8
/* 00A3BC 800097BC 84632FCE */ lh $v1, %lo(D_80162FCE)($v1)
/* 00A3BC 800097BC 84632FCE */ lh $v1, %lo(sSomeNearestWaypoint)($v1)
.L800097C0:
/* 00A3C0 800097C0 8CC63448 */ lw $a2, %lo(D_80163448)($a2) # 0x3448($a2)
/* 00A3C4 800097C4 84632FCE */ lh $v1, %lo(D_80162FCE)($v1)
/* 00A3C4 800097C4 84632FCE */ lh $v1, %lo(sSomeNearestWaypoint)($v1)
.L800097C8:
/* 00A3C8 800097C8 0C002E57 */ jal func_8000B95C
/* 00A3CC 800097CC 3065FFFF */ andi $a1, $v1, 0xffff
Expand Down
20 changes: 10 additions & 10 deletions asm/non_matchings/code_80005FD0/func_80009B60.s
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ glabel func_80009B60
/* 00AE78 8000A278 1000002C */ b .L8000A32C
/* 00AE7C 8000A27C E4700004 */ swc1 $f16, 4($v1)
.L8000A280:
/* 00AE80 8000A280 3C0F8016 */ lui $t7, %hi(D_80162FCE) # $t7, 0x8016
/* 00AE84 8000A284 85EF2FCE */ lh $t7, %lo(D_80162FCE)($t7)
/* 00AE80 8000A280 3C0F8016 */ lui $t7, %hi(sSomeNearestWaypoint) # $t7, 0x8016
/* 00AE84 8000A284 85EF2FCE */ lh $t7, %lo(sSomeNearestWaypoint)($t7)
/* 00AE88 8000A288 3C0B8016 */ lui $t3, %hi(D_801645E0) # $t3, 0x8016
/* 00AE8C 8000A28C 8D6B45E0 */ lw $t3, %lo(D_801645E0)($t3)
/* 00AE90 8000A290 000F7040 */ sll $t6, $t7, 1
Expand Down Expand Up @@ -560,7 +560,7 @@ glabel func_80009B60
/* 00AF28 8000A328 E5040000 */ swc1 $f4, ($t0)
.L8000A32C:
/* 00AF2C 8000A32C 8FA400D0 */ lw $a0, 0xd0($sp)
/* 00AF30 8000A330 0C004C77 */ jal func_800131DC
/* 00AF30 8000A330 0C004C77 */ jal check_ai_crossing_distance
/* 00AF34 8000A334 AFA8003C */ sw $t0, 0x3c($sp)
/* 00AF38 8000A338 0C0034EE */ jal func_8000D3B8
/* 00AF3C 8000A33C 8FA400D0 */ lw $a0, 0xd0($sp)
Expand Down Expand Up @@ -726,8 +726,8 @@ glabel func_80009B60
/* 00B18C 8000A58C 0002C823 */ negu $t9, $v0
/* 00B190 8000A590 01981821 */ addu $v1, $t4, $t8
/* 00B194 8000A594 A4790000 */ sh $t9, ($v1)
/* 00B198 8000A598 3C0F8016 */ lui $t7, %hi(D_80162FCE) # $t7, 0x8016
/* 00B19C 8000A59C 85EF2FCE */ lh $t7, %lo(D_80162FCE)($t7)
/* 00B198 8000A598 3C0F8016 */ lui $t7, %hi(sSomeNearestWaypoint) # $t7, 0x8016
/* 00B19C 8000A59C 85EF2FCE */ lh $t7, %lo(sSomeNearestWaypoint)($t7)
/* 00B1A0 8000A5A0 3C0D8016 */ lui $t5, %hi(D_80164430) # $t5, 0x8016
/* 00B1A4 8000A5A4 95AD4430 */ lhu $t5, %lo(D_80164430)($t5)
/* 00B1A8 8000A5A8 25EA0002 */ addiu $t2, $t7, 2
Expand Down Expand Up @@ -893,18 +893,18 @@ glabel func_80009B60
/* 00B3E8 8000A7E8 10000252 */ b .L8000B134
/* 00B3EC 8000A7EC 8FBF0014 */ lw $ra, 0x14($sp)
.L8000A7F0:
/* 00B3F0 8000A7F0 3C058016 */ lui $a1, %hi(D_80162FCE) # $a1, 0x8016
/* 00B3F0 8000A7F0 3C058016 */ lui $a1, %hi(sSomeNearestWaypoint) # $a1, 0x8016
/* 00B3F4 8000A7F4 254D0014 */ addiu $t5, $t2, 0x14
/* 00B3F8 8000A7F8 AFAD001C */ sw $t5, 0x1c($sp)
/* 00B3FC 8000A7FC 0C002DF9 */ jal func_8000B7E4
/* 00B400 8000A800 94A52FCE */ lhu $a1, %lo(D_80162FCE)($a1)
/* 00B400 8000A800 94A52FCE */ lhu $a1, %lo(sSomeNearestWaypoint)($a1)
/* 00B404 8000A804 8FAF0038 */ lw $t7, 0x38($sp)
/* 00B408 8000A808 3C0B8016 */ lui $t3, %hi(D_801630B8) # $t3, 0x8016
/* 00B40C 8000A80C 256B30B8 */ addiu $t3, %lo(D_801630B8) # addiu $t3, $t3, 0x30b8
/* 00B410 8000A810 01EB1821 */ addu $v1, $t7, $t3
/* 00B414 8000A814 AC620000 */ sw $v0, ($v1)
/* 00B418 8000A818 3C058016 */ lui $a1, %hi(D_80162FCE) # $a1, 0x8016
/* 00B41C 8000A81C 94A52FCE */ lhu $a1, %lo(D_80162FCE)($a1)
/* 00B418 8000A818 3C058016 */ lui $a1, %hi(sSomeNearestWaypoint) # $a1, 0x8016
/* 00B41C 8000A81C 94A52FCE */ lhu $a1, %lo(sSomeNearestWaypoint)($a1)
/* 00B420 8000A820 AFA30028 */ sw $v1, 0x28($sp)
/* 00B424 8000A824 0C00350E */ jal func_8000D438
/* 00B428 8000A828 8FA400D0 */ lw $a0, 0xd0($sp)
Expand Down Expand Up @@ -1520,7 +1520,7 @@ glabel func_80009B60
/* 00BD08 8000B108 3C018016 */ lui $at, %hi(D_80163210)
/* 00BD0C 8000B10C 002F0821 */ addu $at, $at, $t7
/* 00BD10 8000B110 8FA400D0 */ lw $a0, 0xd0($sp)
/* 00BD14 8000B114 0C004C77 */ jal func_800131DC
/* 00BD14 8000B114 0C004C77 */ jal check_ai_crossing_distance
/* 00BD18 8000B118 E4303210 */ swc1 $f16, %lo(D_80163210)($at)
/* 00BD1C 8000B11C 3C058016 */ lui $a1, %hi(D_8016320C) # $a1, 0x8016
/* 00BD20 8000B120 8CA5320C */ lw $a1, %lo(D_8016320C)($a1)
Expand Down
6 changes: 3 additions & 3 deletions asm/non_matchings/code_80005FD0/kart_ai_use_item_strategy.s
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ glabel L8001AFD8
/* 01BC94 8001B094 46283280 */ add.d $f10, $f6, $f8
/* 01BC98 8001B098 8D86001C */ lw $a2, 0x1c($t4)
/* 01BC9C 8001B09C AFA70028 */ sw $a3, 0x28($sp)
/* 01BCA0 8001B0A0 0C0AB870 */ jal func_802AE1C0
/* 01BCA0 8001B0A0 0C0AB870 */ jal spawn_actor_on_surface
/* 01BCA4 8001B0A4 462053A0 */ cvt.s.d $f14, $f10
/* 01BCA8 8001B0A8 8FA70028 */ lw $a3, 0x28($sp)
/* 01BCAC 8001B0AC 3C013F80 */ li $at, 0x3F800000 # 1.000000
Expand Down Expand Up @@ -582,7 +582,7 @@ glabel L8001B3B4
/* 01C054 8001B454 E4E00028 */ swc1 $f0, 0x28($a3)
/* 01C058 8001B458 E4E0002C */ swc1 $f0, 0x2c($a3)
/* 01C05C 8001B45C AFA70028 */ sw $a3, 0x28($sp)
/* 01C060 8001B460 0C0AB870 */ jal func_802AE1C0
/* 01C060 8001B460 0C0AB870 */ jal spawn_actor_on_surface
/* 01C064 8001B464 462033A0 */ cvt.s.d $f14, $f6
/* 01C068 8001B468 8FA70028 */ lw $a3, 0x28($sp)
/* 01C06C 8001B46C 3C013F80 */ li $at, 0x3F800000 # 1.000000
Expand Down Expand Up @@ -1122,7 +1122,7 @@ glabel L8001BB30
/* 01C7F4 8001BBF4 46249180 */ add.d $f6, $f18, $f4
/* 01C7F8 8001BBF8 8CE60020 */ lw $a2, 0x20($a3)
/* 01C7FC 8001BBFC AFA70028 */ sw $a3, 0x28($sp)
/* 01C800 8001BC00 0C0AB870 */ jal func_802AE1C0
/* 01C800 8001BC00 0C0AB870 */ jal spawn_actor_on_surface
/* 01C804 8001BC04 462033A0 */ cvt.s.d $f14, $f6
/* 01C808 8001BC08 8FA70028 */ lw $a3, 0x28($sp)
/* 01C80C 8001BC0C C4E8000C */ lwc1 $f8, 0xc($a3)
Expand Down
2 changes: 1 addition & 1 deletion enhancements/flycam.patch
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ index 0000000..5569838
+ f32 pitchChange = controller->rawStickY * SENSITIVITY_Y;
+ Vec3f forwardVector;
+
+ func_802ADDC8(&camera->unk_54, 50, camera->pos[0], camera->pos[1], camera->pos[2]);
+ check_bounding_collision(&camera->collision, 50, camera->pos[0], camera->pos[1], camera->pos[2]);
+
+ camera->rot[1] += (short)(yawChange * 65535.0f / (2 * M_PI)); // Convert radians to 0-65535 range
+
Expand Down
58 changes: 21 additions & 37 deletions include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ typedef struct {
/* 0x00 */ u16 unk30;
/* 0x02 */ u16 unk32;
/* 0x04 */ u16 unk34;
/* 0x06 */ u16 unk36;
/* 0x08 */ u16 unk38;
/* 0x06 */ u16 meshIndexYX;
/* 0x08 */ u16 meshIndexZY;
// This may be an index to the tilemap?
/* 0x0A */ u16 unk3A;
/* 0x0C */ Vec3f unk3C;
/* 0x0A */ u16 meshIndexZX;
/* 0x0C */ Vec3f surfaceDistance; // Appears to be distance from actor to surface for zx, yx, and zy planes.
/* 0x18 */ Vec3f unk48;
/* 0x24 */ Vec3f unk54;
/* 0x30 */ Vec3f orientationVector;
Expand Down Expand Up @@ -185,7 +185,6 @@ typedef struct {
s16 ob[3]; /* x, y, z */
s16 tc[2]; /* texture coord */
s8 ca[4]; /* color & alpha */

} CourseVtx;

/*
Expand Down Expand Up @@ -214,44 +213,29 @@ typedef struct {
/* 0x10 */ Vtx *vtx1; //pointer to the 3 vertices of this poly
Vtx *vtx2;
Vtx *vtx3;
//unsure why this exists along with a copy of two of the vertices.
//both are involved in hit detection.
/* 0x1C */ f32 height;
//normally 0; read at 0x802AB1A4. this value is added to the height Lakitu
//drops you at. changing it seems to make the surface intangible.
/* 0x20 */ f32 gravity;
//normally 1. The height Lakitu drops you off at is divided by this value
//(before adding the value at 0x1C), although if set to zero, he just tries
//to drop you at about the height of the finish line banner. Changing it
//has various unusual effects, making the polygon intangible or
//significantly reducing the gravity above it, probably depending on its Y
//position.
/* 0x24 */ f32 rotation; //normally about -0.001. no idea what this actually is.
/* 0x28 */ f32 height2; //changes Y position of all vertices (but not graphics or
//Lakitu drop position). Normally set to (track_height * -1) + about 6.
// Face normal. Should really be Vec3f normal
/* 0x1C */ f32 normalX;
/* 0x20 */ f32 normalY;
/* 0x24 */ f32 normalZ;
/* 0x28 */ f32 distance;
} CollisionTriangle; // size = 0x2C

typedef struct {
/* 0x00 */ Vec3f cornerPos;
// Type of surface the corner is above
/* 0x0C */ u8 surfaceType;
// Close to being a copy of the top byte of the CollisionTriangle "flags" member
/* 0x00 */ Vec3f pos;
/* 0x0C */ u8 surfaceType; // Surface type that the tyre is touching.
/* 0x0D */ u8 surfaceFlags;
// Don't know if "tile" is right the right term
// gCollisionMesh is a pointer to an array of "tile" structs. This is an index to that array
/* 0x0E */ u16 collisionMeshIndex;
// cornerPos places the corner "in the air" as it were, this member indicates the Y position of the corner's "on the ground" sibling
// On flat ground this value should be cornerY - gKartBoundingBoxTable[characterId]
/* 0x10 */ f32 cornerGroundY;
/* 0x0E */ u16 collisionMeshIndex; // Index into gCollisionMesh
// Height of tyre attached to ground. When flying it floats with the kart.
/* 0x10 */ f32 baseHeight;
// Something lighting related. 1 when in a shaded region, 2 when in a tree's shadow
// 3 when getting crushed by a whomp, but curiously only the front left tyre will ever have this value
/* 0x14 */ s32 unk_14;
} KartBoundingBoxCorner; // size = 0x18
} KartTyre; // size = 0x18

#define FRONT_LEFT_TYRE 0
#define FRONT_RIGHT_TYRE 1
#define BACK_LEFT_TYRE 2
#define BACK_RIGHT_TYRE 3
#define FRONT_LEFT 0
#define FRONT_RIGHT 1
#define BACK_LEFT 2
#define BACK_RIGHT 3

struct UnkPlayerInner {
/* 0xDB4 */ s16 unk0;
Expand Down Expand Up @@ -345,10 +329,10 @@ typedef struct {
/* 0x0108 */ f32 unk_108;
/* 0x010C */ s16 unk_10C;
/* 0x010E */ char unk_10E[0x2];
/* 0x0110 */ Collision unk_110;
/* 0x0110 */ Collision collision;
/* 0x0150 */ Mat3 unk_150;
/* 0x0174 */ Mat3 orientationMatrix;
/* 0x0198 */ KartBoundingBoxCorner boundingBoxCorners[4];
/* 0x0198 */ KartTyre tyres[4];
/* 0x01F8 */ f32 unk_1F8;
/* 0x01FC */ f32 unk_1FC;
/* 0x0200 */ u32 unk_200; // May be s32. but less casting required if u32
Expand Down
13 changes: 13 additions & 0 deletions include/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,16 @@ enum KART_AI_BEHAVIOURS {
#define COLOR_BLACK GPACK_RGB888(0, 0, 0)

#endif // DEFINES_H


/**
*
* Collision mesh flags
*
*/

#define GRID_SIZE 32

#define FACING_Y_AXIS 0x4000
#define FACING_X_AXIS 0x8000
#define FACING_Z_AXIS 0x2000
6 changes: 3 additions & 3 deletions include/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ typedef struct
/* 0x28 */ Vec3f offset;
/* 0x34 */ f32 unk_034;
/* 0x38 */ Vec3f velocity; // acceleration
/* 0x44 */ f32 unk_044;
/* 0x44 */ f32 surfaceHeight;
/* 0x48 */ s32 unk_048;
/* 0x4C */ s32 unk_04C;
/* 0x50 */ s32 unk_050;
Expand Down Expand Up @@ -79,9 +79,9 @@ typedef struct
/* 0xDD */ u8 unk_0DD;
/* 0xDE */ s8 unk_0DE;
/* 0xDF */ u8 unk_0DF;
} Objects; // size = 0xE0
} Object; // size = 0xE0

extern Objects gObjectList[];
extern Object gObjectList[];

typedef struct
{
Expand Down
11 changes: 11 additions & 0 deletions include/vehicles.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
#define NUM_TRAINS 2
#define LOCOMOTIVE_ONLY 0

#define NUM_CROSSINGS 2
// This allows karts to jump the train despite the crossing being activated.
// but still stop for the train once it's close
#define FRAMES_SINCE_CROSSING_ACTIVATED 240

// It seems like there's room for 2 Ferries, but only 1 is ever active
#define NUM_ACTIVE_PADDLE_BOATS 1
#define NUM_PADDLE_BOATS 2
Expand All @@ -24,6 +29,12 @@
#define NUM_TIME_TRIAL_TANKER_TRUCKS (NUM_RACE_TANKER_TRUCKS + 1)
#define NUM_TIME_TRIAL_CARS (NUM_RACE_CARS + 1)

#define TRAIN_SMOKE_RENDER_DISTANCE 2000.0f
#define TRAIN_CROSSING_AI_DISTANCE 1000.0f
#define BOAT_SMOKE_RENDER_DISTANCE 2000.0f

#define RENDER_VEHICLE 1

typedef struct {
/* 0x00 */ s16 isActive; // Only used for Tender and Passenger Cars, unused for Locomotives
/* 0x02 */ s16 compilerPadding;
Expand Down
2 changes: 1 addition & 1 deletion include/waypoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern s16 *D_801645A0[];
* a given player is on, the specific value may change
**/
// Shadows values from gNearestWaypointByPlayerId
extern s16 D_80162FCE;
extern s16 sSomeNearestWaypoint;
// Shadows values from gPathIndexByPlayerId
extern s32 D_80163448;
// Shadows values from D_80164560
Expand Down
16 changes: 8 additions & 8 deletions src/actors/banana/update.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void update_actor_banana(struct BananaActor *banana) {
banana->pos[1] = player->pos[1] - temp_f14 - 2.0f;
banana->pos[2] = player->pos[2] - temp_f16;
}
func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
check_bounding_collision(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
func_802B4E30((struct Actor *) banana);
if ((player->type & PLAYER_HUMAN) != 0) {
if (gDemoMode) {
Expand Down Expand Up @@ -99,15 +99,15 @@ void update_actor_banana(struct BananaActor *banana) {
if ((banana->pos[2] < (f32) gCourseMinZ) || ((f32) gCourseMaxZ < banana->pos[2]) || (banana->pos[0] < (f32) gCourseMinX) || ((f32) gCourseMaxX < banana->pos[0]) || (banana->pos[1] < (f32) gCourseMinY)) {
destroy_destructable_actor((struct Actor *) banana);
} else {
func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
check_bounding_collision(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
banana->unk30.unk34 = 1;
if ((banana->unk30.unk34 != 0) && (banana->unk30.unk3C[2] < 0.0f)) {
if ((banana->unk30.unk34 != 0) && (banana->unk30.surfaceDistance[2] < 0.0f)) {
someOtherVelocity[0] = -banana->unk30.orientationVector[0];
someOtherVelocity[1] = -banana->unk30.orientationVector[1];
someOtherVelocity[2] = -banana->unk30.orientationVector[2];
banana->pos[0] += someOtherVelocity[0] * banana->unk30.unk3C[2];
banana->pos[1] += someOtherVelocity[1] * banana->unk30.unk3C[2];
banana->pos[2] += someOtherVelocity[2] * banana->unk30.unk3C[2];
banana->pos[0] += someOtherVelocity[0] * banana->unk30.surfaceDistance[2];
banana->pos[1] += someOtherVelocity[1] * banana->unk30.surfaceDistance[2];
banana->pos[2] += someOtherVelocity[2] * banana->unk30.surfaceDistance[2];
banana->flags &= ~0x1000;
banana->state = 4;
}
Expand Down Expand Up @@ -137,7 +137,7 @@ void update_actor_banana(struct BananaActor *banana) {
banana->pos[1] = unkY - temp_f14 - 2.0f;
banana->pos[2] = unkZ - temp_f16;
}
func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
check_bounding_collision(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
func_802B4E30((struct Actor *) banana);
break;
case BANANA_BUNCH_BANANA:
Expand All @@ -159,7 +159,7 @@ void update_actor_banana(struct BananaActor *banana) {
banana->pos[2] = elderBanana->pos[2] - temp_f16;
}
var_f8 = banana->pos[2];
func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
check_bounding_collision(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
func_802B4E30((struct Actor *) banana);
break;
case DESTROYED_BANANA:
Expand Down
Loading

0 comments on commit 3d7cdce

Please sign in to comment.