Skip to content

Commit

Permalink
Update odoMeter.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
intns committed Jan 2, 2024
1 parent b2cba26 commit acfdff1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/plugPikiKando/odoMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ bool OdoMeter::moving(Vector3f& argA, Vector3f& argB)
float dummy[4]; // Match stack allocation
unknown1();
if (_00 < 100.0f) {
#ifdef __DECOMP_NON_MATCHING
Vector3f vec;
vec.sub2(argA, argB);
f32 distance = vec.length();
#else
vec.y = Vector3f_diffY(argA, argB);
vec.x = Vector3f_diffX(argA, argB);
vec.z = Vector3f_diffZ(argA, argB);
float distance = sqrtf(vec.x * vec.x + vec.y * vec.y + vec.z * vec.z);
#endif
_00 += distance;

}
return unknown2();

}

0 comments on commit acfdff1

Please sign in to comment.