Skip to content

Commit 1f89e8f

Browse files
JoshSanchSquareMan
authored andcommitted
Fix weird assignment in xSndPlay3D weak func in zEnt
1 parent 13daf52 commit 1f89e8f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/SB/Game/zEnt.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,7 @@ xMat4x3* xEntGetFrame(const xEnt* ent)
925925
void xSndPlay3D(U32 id, F32 vol, F32 pitch, U32 priority, U32 flags, const xVec3* pos, F32 radius,
926926
sound_category category, F32 delay)
927927
{
928-
// This is UB to assign radius in the function call like this, but the assembly matches a *=
929-
// so maybe HI made a mistake here.
930-
xSndPlay3D(id, vol, pitch, priority, flags, pos, radius *= 0.25f, radius, category, delay);
928+
xSndPlay3D(id, vol, pitch, priority, flags, pos, radius / 4.0f, radius, category, delay);
931929
}
932930

933931
S32 xNPCBasic::SelfType() const

0 commit comments

Comments
 (0)