mirror of
https://github.com/open-goal/jak-project
synced 2026-07-09 06:53:45 -04:00
A few overlord fixes (#1273)
* Fix RPC Player buffer size * Fix calculateFallofVolume * Fix CalculateAngle
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user