diff --git a/game/overlord/srpc.cpp b/game/overlord/srpc.cpp index 7aa54f2897..2e594d28fb 100644 --- a/game/overlord/srpc.cpp +++ b/game/overlord/srpc.cpp @@ -16,7 +16,7 @@ using namespace iop; MusicTweaks gMusicTweakInfo; constexpr int SRPC_MESSAGE_SIZE = 0x50; static uint8_t gLoaderBuf[SRPC_MESSAGE_SIZE]; -static uint8_t gPlayerBuf[SRPC_MESSAGE_SIZE * 127]; +static uint8_t gPlayerBuf[SRPC_MESSAGE_SIZE * 128]; int32_t gSoundEnable = 1; static u32 gInfoEE = 0; // EE address where we should send info on each frame. s16 gFlava; diff --git a/game/overlord/ssound.cpp b/game/overlord/ssound.cpp index a79efef572..51e368beab 100644 --- a/game/overlord/ssound.cpp +++ b/game/overlord/ssound.cpp @@ -252,7 +252,7 @@ s32 CalculateFallofVolume(Vec3w* pos, s32 volume, s32 fo_curve, s32 fo_min, s32 s32 distance = xdiff * xdiff + ydiff * ydiff + zdiff * zdiff; if (distance != 0) { s32 steps = 0; - while ((steps & 0xc0000000) == 0) { + while ((distance & 0xc0000000) == 0) { distance <<= 2; steps++; } @@ -292,7 +292,7 @@ s32 CalculateFallofVolume(Vec3w* pos, s32 volume, s32 fo_curve, s32 fo_min, s32 factor = 0x10000; } - return factor; // TODO + return (factor * volume) >> 16; } s32 CalculateAngle(Vec3w* trans) { @@ -303,7 +303,7 @@ s32 CalculateAngle(Vec3w* trans) { s32 lookupZ = diffZ; if (diffX < 0) { - lookupZ = trans->x - gCamTrans.x; + lookupX = trans->x - gCamTrans.x; } if (diffZ < 0) {