Tuple operations
This commit is contained in:
@@ -161,7 +161,7 @@ void chmotzhand_update(Actor *this){
|
||||
sp3C[0] = sp30[0] - this->position_x;
|
||||
sp3C[1] = sp30[1] - this->position_y;
|
||||
sp3C[2] = sp30[2] - this->position_z;
|
||||
if(gu_sqrtf(sp3C[0]*sp3C[0] + sp3C[1]*sp3C[1] + sp3C[2]*sp3C[2]) < 5.0f){
|
||||
if(LENGTH_VEC3F(sp3C) < 5.0f){
|
||||
if(*local->pattern_ptr == 0xff){
|
||||
chMotzhand_setState(this, 1);
|
||||
}
|
||||
|
@@ -186,9 +186,8 @@ void chnapper_update(Actor *this){
|
||||
sp30[0] = player_position[0] - this->position_x;
|
||||
sp30[1] = player_position[1] - this->position_y;
|
||||
sp30[2] = player_position[2] - this->position_z;
|
||||
if( 0.0f < sp30[2]
|
||||
&& gu_sqrtf(sp30[0]*sp30[0] + sp30[1]*sp30[1] + sp30[2]*sp30[2]) < 600.0f
|
||||
){
|
||||
|
||||
if (0.0f < sp30[2] && LENGTH_VEC3F(sp30) < 600.0f) {
|
||||
__chnapper_setState(this, 5);
|
||||
}
|
||||
else{//L8038703C
|
||||
|
@@ -140,7 +140,7 @@ void func_8038AF90(Struct_MMM_47D0_0 *arg0, Struct68s *arg1, f32 arg2) {
|
||||
arg0->unkC[0] *= 0.7;
|
||||
arg0->unkC[2] *= 0.7;
|
||||
}
|
||||
if (gu_sqrtf(arg0->unkC[0]*arg0->unkC[0] + arg0->unkC[1]*arg0->unkC[1] + arg0->unkC[2]*arg0->unkC[2]) > 400.0f) {
|
||||
if (LENGTH_VEC3F(arg0->unkC) > 400.0f) {
|
||||
ml_vec3f_set_length(arg0->unkC, 400.0f);
|
||||
}
|
||||
sp54[0] += arg0->unkC[0] * arg2;
|
||||
@@ -173,7 +173,7 @@ void func_8038AF90(Struct_MMM_47D0_0 *arg0, Struct68s *arg1, f32 arg2) {
|
||||
sfxsource_setSampleRate(sp38, 0);
|
||||
} else {
|
||||
sp38 = func_80351758(arg1);
|
||||
sfxsource_setSampleRate(sp38, (s32) ((gu_sqrtf(arg0->unkC[0]*arg0->unkC[0] + arg0->unkC[1]*arg0->unkC[1] + arg0->unkC[2]*arg0->unkC[2]) / 400.0) * 15000.0));
|
||||
sfxsource_setSampleRate(sp38, (s32) ((LENGTH_VEC3F(arg0->unkC) / 400.0) * 15000.0));
|
||||
}
|
||||
player_getPosition(sp48);
|
||||
func_8035179C(arg1, sp54);
|
||||
|
Reference in New Issue
Block a user