Merge branch 'mr-origin-96'
This commit is contained in:
@@ -45,7 +45,7 @@ void func_803878A0(Actor *this, s32 next_state) {
|
||||
local->unkC[0] = randf2(-500.0f, 500.0f);
|
||||
local->unkC[1] = randf2(400.0f, 900.0f);
|
||||
local->unkC[2] = randf2(-400.0f, 700.0f);
|
||||
if(ml_distance_vec3f(this->position, local->unkC) > 800.0f)
|
||||
if(ml_vec3f_distance(this->position, local->unkC) > 800.0f)
|
||||
break;
|
||||
}
|
||||
local->unk8 = randf2(500.0f, 1000.0f);
|
||||
@@ -90,7 +90,7 @@ void CCW_func_80387A40(Actor *this) {
|
||||
sp5C[0] = local->unkC[0] - this->position[0];
|
||||
sp5C[1] = local->unkC[1] - this->position[1];
|
||||
sp5C[2] = local->unkC[2] - this->position[2];
|
||||
if (ml_distance_vec3f(this->position, local->unkC) < 500.0f) {
|
||||
if (ml_vec3f_distance(this->position, local->unkC) < 500.0f) {
|
||||
ml_vec3f_set_length(sp5C, local->unk8 * 8.0f);
|
||||
} else {
|
||||
ml_vec3f_set_length(sp5C, local->unk8 * 2);
|
||||
@@ -106,7 +106,7 @@ void CCW_func_80387A40(Actor *this) {
|
||||
}
|
||||
func_80258A4C(this->position, this->yaw - 90.0f, local->unkC, &sp58, &sp54, &sp50);
|
||||
this->yaw += 140.0f * sp50 * sp68;
|
||||
if (ml_distance_vec3f(this->position, local->unkC) < 100.0f) {
|
||||
if (ml_vec3f_distance(this->position, local->unkC) < 100.0f) {
|
||||
func_803878A0(this, 1);
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
|
||||
#include <core1/viewport.h>
|
||||
|
||||
|
||||
typedef struct{
|
||||
@@ -183,10 +183,10 @@ void func_8038687C(Actor *this) {
|
||||
sp4C[1] = -100.0f;
|
||||
sp4C[2] = randf2(-500.0f, 900.0f);
|
||||
|
||||
if(ml_distance_vec3f(this->position, sp4C) < 400.0f)
|
||||
if(ml_vec3f_distance(this->position, sp4C) < 400.0f)
|
||||
continue;
|
||||
|
||||
tmp = ml_distance_vec3f(sp5C, sp4C);
|
||||
tmp = ml_vec3f_distance(sp5C, sp4C);
|
||||
phi_v0 = (phi_s0 < 0xA) ? 500 : 200;
|
||||
if(tmp < (f32) phi_v0)
|
||||
continue;
|
||||
@@ -207,7 +207,7 @@ void func_8038687C(Actor *this) {
|
||||
func_803865F4(this, 3);
|
||||
} else if ((local->unk0 != NULL) && (map_get() == MAP_5A_CCW_SUMMER_ZUBBA_HIVE)) {
|
||||
player_getPosition(sp40);
|
||||
if ((ml_distance_vec3f(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) {
|
||||
if ((ml_vec3f_distance(this->position, sp40) < 300.0f) && (player_getTransformation() == TRANSFORM_1_BANJO)) {
|
||||
func_803865F4(this, 2);
|
||||
}
|
||||
}
|
||||
|
@@ -161,7 +161,7 @@ void chGobiCCW_update(Actor *this) {
|
||||
if(this->state == 1){
|
||||
if (!this->has_met_before) {
|
||||
player_getPosition(sp48);
|
||||
if (ml_distance_vec3f(this->position, sp48) < 600.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp48) < 600.0f) {
|
||||
if (local->unk0->unk2 != 0) {
|
||||
gcdialog_showText((s32) local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
@@ -271,7 +271,7 @@ void CCW_func_80389BFC(Actor *this) {
|
||||
}
|
||||
if ((local->unk0->map_id != MAP_43_CCW_SPRING) && ((this->position[0] + 500.0f) < sp4C[0])) {
|
||||
player_setCarryObjectPoseInCylinder(this->position, 1110.0f, 200.0f, ACTOR_2A2_CATERPILLAR, &this);
|
||||
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_distance_vec3f(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) {
|
||||
if ((local->unk0->unkE != 0) && (carriedObj_getActorId() == ACTOR_2A2_CATERPILLAR) && (ml_vec3f_distance(this->position, sp4C) < 1010.0f) && (player_throwCarriedObject() != 0)) {
|
||||
player_setThrowTargetPosition(D_8038FDE0);
|
||||
if ((local->unk0->map_id == MAP_44_CCW_SUMMER) && (local->unk4 == 0)) {
|
||||
gcdialog_showText(0xCD8, 4, NULL, NULL, NULL, NULL);
|
||||
|
@@ -111,13 +111,13 @@ void chcaterpillar_update(Actor *this){
|
||||
if(this->state == 1){
|
||||
skeletalAnim_getProgressRange(this->unk148, &sp64, &sp60);
|
||||
player_getPosition(sp74);
|
||||
if(ml_distance_vec3f(this->position, local->unk0) < 10.0f){
|
||||
if(ml_vec3f_distance(this->position, local->unk0) < 10.0f){
|
||||
for(i = 0; i < 10; i++){
|
||||
|
||||
local->unk0[0] = randf2(-300.0f, 300.0f) + this->position_x;
|
||||
local->unk0[1] = this->position_y;
|
||||
local->unk0[2] = randf2(-300.0f, 300.0f) + this->position_z;
|
||||
if( !(ml_distance_vec3f(local->unk0, this->position) < 50.0f) && func_80329210(this, local->unk0))
|
||||
if( !(ml_vec3f_distance(local->unk0, this->position) < 50.0f) && func_80329210(this, local->unk0))
|
||||
break;
|
||||
}//L8038A544
|
||||
if(i == 10){
|
||||
@@ -150,7 +150,7 @@ void chcaterpillar_update(Actor *this){
|
||||
}
|
||||
}//L8038A714
|
||||
|
||||
if(ml_distance_vec3f(this->position, sp74) < 50.0f){
|
||||
if(ml_vec3f_distance(this->position, sp74) < 50.0f){
|
||||
func_8028F030(ACTOR_2A2_CATERPILLAR);
|
||||
if(!volatileFlag_get(VOLATILE_FLAG_B2)){
|
||||
gcdialog_showText(ASSET_CC7_TEXT_UNKNOWN, 4, NULL, NULL, NULL, NULL);
|
||||
@@ -177,7 +177,7 @@ void chcaterpillar_update(Actor *this){
|
||||
local->unk24 += 3.3333333333333335*sp84;
|
||||
|
||||
local->unk24 = (1.0 < local->unk24) ? 1.0 : local->unk24;
|
||||
ml_interpolate_vec3f(this->position, local->unkC, local->unk18, local->unk24);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unkC, local->unk18, local->unk24);
|
||||
|
||||
this->position[1] += 50.0f*sinf(local->unk24*3.141592654);
|
||||
if(1.0 == local->unk24){
|
||||
|
@@ -101,7 +101,7 @@ void func_8038AA8C(Actor *this) {
|
||||
}
|
||||
|
||||
player_getPosition(sp54);
|
||||
if (ml_distance_vec3f(this->position, sp54) < 850.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp54) < 850.0f) {
|
||||
func_8038A950(this, 2);
|
||||
}
|
||||
}
|
||||
|
@@ -133,7 +133,7 @@ void chnabnut_update(Actor *this) {
|
||||
|
||||
if (this->state == NABNUT_STATE_1_SAD) {
|
||||
player_getPosition(sp30);
|
||||
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp30) < 400.0f)) {
|
||||
if (!this->has_met_before && (ml_vec3f_distance(this->position, sp30) < 400.0f)) {
|
||||
this->has_met_before = TRUE;
|
||||
gcdialog_showText(0xCCA, 0xE, this->position, NULL, NULL, NULL);
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void chnabnut_update(Actor *this) {
|
||||
}
|
||||
if (this->has_met_before && !func_803114B0()) {
|
||||
player_setCarryObjectPoseInCylinder(this->position, 500.0f, 200.0f, ACTOR_2A9_ACORN, &this);
|
||||
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_distance_vec3f(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
|
||||
if ((carriedObj_getActorId() == ACTOR_2A9_ACORN) && (ml_vec3f_distance(this->position, sp30) < 300.0f) && player_throwCarriedObject()) {
|
||||
player_setThrowTargetPosition(D_8038F350);
|
||||
local->returned_acorn_count++;
|
||||
if (local->returned_acorn_count == 6) {
|
||||
|
@@ -114,7 +114,7 @@ void func_8038C41C(Actor *this) {
|
||||
|
||||
if ((this->marker->id == 0x1CB) && (this->state == 2)) {
|
||||
player_getPosition(sp2C);
|
||||
if (!this->has_met_before && (ml_distance_vec3f(this->position, sp2C) < 400.0f)) {
|
||||
if (!this->has_met_before && (ml_vec3f_distance(this->position, sp2C) < 400.0f)) {
|
||||
this->has_met_before = TRUE;
|
||||
gcdialog_showText(0xCCD, 0, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ void func_8038C7A8(Actor *this) {
|
||||
|
||||
if (this->state == 1) {
|
||||
player_getPosition(sp38);
|
||||
if (ml_distance_vec3f(this->position, sp38) < 50.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp38) < 50.0f) {
|
||||
func_8028F030(0x2A9);
|
||||
FUNC_8030E8B4(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 500, 2500);
|
||||
CCW_func_8038C6A0(this, 5);
|
||||
@@ -91,7 +91,7 @@ void func_8038C7A8(Actor *this) {
|
||||
if (this->state == 3) {
|
||||
local->unk18 += 3.3333333333333333 * sp44;
|
||||
local->unk18 = (local->unk18 > 1.0) ? 1.0 : local->unk18;
|
||||
ml_interpolate_vec3f(this->position, local->unk0, local->unkC, local->unk18);
|
||||
ml_vec3f_interpolate_fast(this->position, local->unk0, local->unkC, local->unk18);
|
||||
this->position[1] += 50.0f * sinf(local->unk18 * BAD_PI);
|
||||
if (local->unk18 == 1.0) {
|
||||
CCW_func_8038C6A0(this, 4);
|
||||
|
@@ -118,7 +118,7 @@ void func_8038CC4C(Actor *this) {
|
||||
}
|
||||
if (!this->has_met_before) {
|
||||
player_getPosition(sp38);
|
||||
if (ml_distance_vec3f(this->position, sp38) < 900.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp38) < 900.0f) {
|
||||
if (local->unk0->map_id != MAP_46_CCW_WINTER || func_8028F2FC()) {
|
||||
gcdialog_showText(local->unk0->unk4, 4, NULL, NULL, NULL, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
|
@@ -116,7 +116,7 @@ void func_8038CFB4(Actor *this) {
|
||||
if (this->state == 1) {
|
||||
if (!this->has_met_before) {
|
||||
player_getPosition(sp60);
|
||||
if (ml_distance_vec3f(this->position, sp60) < 900.0f) {
|
||||
if (ml_vec3f_distance(this->position, sp60) < 900.0f) {
|
||||
gcdialog_showText(0xCCF, 4, NULL, NULL, NULL, NULL);
|
||||
this->has_met_before = TRUE;
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ void func_8038D368(Actor *this) {
|
||||
|
||||
if(!this->has_met_before){
|
||||
player_getPosition(plyr_pos);
|
||||
if (ml_distance_vec3f(this->position, plyr_pos) < 600.0f) {
|
||||
if (ml_vec3f_distance(this->position, plyr_pos) < 600.0f) {
|
||||
if (!jiggyscore_isCollected(JIGGY_4B_CCW_GNAWTY)) {
|
||||
gcdialog_showText(local->unk0->unk2, 4, NULL, NULL, NULL, NULL);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user