mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-07-09 13:35:22 -04:00
Give better names to timing variables
This commit is contained in:
@@ -1359,7 +1359,7 @@ void amTick(void)
|
||||
|
||||
// Update alpha of slots so they fade in
|
||||
if (g_AmMenus[g_AmIndex].alphafrac < 1) {
|
||||
g_AmMenus[g_AmIndex].alphafrac += LVUPDATE240FREAL() / 30.0f;
|
||||
g_AmMenus[g_AmIndex].alphafrac += LVUPDATE60FREAL() / 30.0f;
|
||||
}
|
||||
|
||||
if (g_AmMenus[g_AmIndex].alphafrac > 1) {
|
||||
@@ -1367,7 +1367,7 @@ void amTick(void)
|
||||
}
|
||||
|
||||
// Make selection border pulsate
|
||||
g_AmMenus[g_AmIndex].selpulse += LVUPDATE240FREAL() / 5.0f;
|
||||
g_AmMenus[g_AmIndex].selpulse += LVUPDATE60FREAL() / 5.0f;
|
||||
|
||||
if (g_AmMenus[g_AmIndex].selpulse > 18.849555969238f) {
|
||||
g_AmMenus[g_AmIndex].selpulse -= 18.849555969238f;
|
||||
|
||||
+14
-14
@@ -216,16 +216,16 @@ void bbikeApplyMoveData(struct movedata *data)
|
||||
if (data->digitalstepforward) {
|
||||
value1 = 1.0f - g_Vars.currentplayer->speedforwards;
|
||||
|
||||
if (value1 > 0.1f * g_Vars.lvupdate240freal) {
|
||||
value1 = 0.1f * g_Vars.lvupdate240freal;
|
||||
if (value1 > 0.1f * g_Vars.lvupdate60freal) {
|
||||
value1 = 0.1f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->speedforwards += value1;
|
||||
} else if (data->digitalstepback) {
|
||||
value1 = -1.0f - g_Vars.currentplayer->speedforwards;
|
||||
|
||||
if (value1 < -0.1f * g_Vars.lvupdate240freal) {
|
||||
value1 = -0.1f * g_Vars.lvupdate240freal;
|
||||
if (value1 < -0.1f * g_Vars.lvupdate60freal) {
|
||||
value1 = -0.1f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->speedforwards += value1;
|
||||
@@ -336,11 +336,11 @@ void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct
|
||||
}
|
||||
|
||||
if (arg1->x) {
|
||||
sp84.x += arg1->x / g_Vars.lvupdate240freal;
|
||||
sp84.x += arg1->x / g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (arg1->z) {
|
||||
sp84.z += arg1->z / g_Vars.lvupdate240freal;
|
||||
sp84.z += arg1->z / g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
func0f082e84(obstacle, &sp9c, &sp90, &sp84, false);
|
||||
@@ -356,7 +356,7 @@ void bbike0f0d2b40(struct defaultobj *bike, struct coord *arg1, f32 arg2, struct
|
||||
xdiff *= tmp;
|
||||
zdiff *= tmp;
|
||||
|
||||
arg2 = arg2 / g_Vars.lvupdate240freal;
|
||||
arg2 = arg2 / g_Vars.lvupdate60freal;
|
||||
|
||||
speed.x += -zdiff * arg2 * 40;
|
||||
speed.z += xdiff * arg2 * 40;
|
||||
@@ -836,7 +836,7 @@ void bbikeTick(void)
|
||||
g_Vars.currentplayer->bondprevpos.y = g_Vars.currentplayer->prop->pos.y;
|
||||
g_Vars.currentplayer->bondprevpos.z = g_Vars.currentplayer->prop->pos.z;
|
||||
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f * g_Vars.lvupdate240freal) / 2700.0f;
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f * g_Vars.lvupdate60freal) / 2700.0f;
|
||||
|
||||
if (g_Vars.currentplayer->bondbreathing < 0.0f) {
|
||||
g_Vars.currentplayer->bondbreathing = 0.0f;
|
||||
@@ -885,19 +885,19 @@ void bbikeTick(void)
|
||||
|
||||
if (1);
|
||||
|
||||
bbike0f0d363c(bike->w * g_Vars.lvupdate240freal);
|
||||
bbike0f0d363c(bike->w * g_Vars.lvupdate60freal);
|
||||
|
||||
sp20c.x = bike->speed[0] * g_Vars.lvupdate240freal;
|
||||
sp20c.x = bike->speed[0] * g_Vars.lvupdate60freal;
|
||||
sp20c.y = 0.0f;
|
||||
sp20c.z = bike->speed[1] * g_Vars.lvupdate240freal;
|
||||
sp20c.z = bike->speed[1] * g_Vars.lvupdate60freal;
|
||||
|
||||
bike->prevpos[0] = bike->base.prop->pos.x;
|
||||
bike->prevpos[1] = bike->base.prop->pos.z;
|
||||
|
||||
bbike0f0d3c60(&sp20c);
|
||||
|
||||
sp1f8 = (bike->base.prop->pos.x - bike->prevpos[0]) / g_Vars.lvupdate240freal;
|
||||
sp1f4 = (bike->base.prop->pos.z - bike->prevpos[1]) / g_Vars.lvupdate240freal;
|
||||
sp1f8 = (bike->base.prop->pos.x - bike->prevpos[0]) / g_Vars.lvupdate60freal;
|
||||
sp1f4 = (bike->base.prop->pos.z - bike->prevpos[1]) / g_Vars.lvupdate60freal;
|
||||
|
||||
if (sp1f8 != 0.0f || sp1f4 != 0.0f) {
|
||||
f32 tmp = sp1f8 * sp1f8 + sp1f4 * sp1f4;
|
||||
@@ -957,7 +957,7 @@ void bbikeTick(void)
|
||||
mtx4MultMtx4InPlace(&sp124, &sp164);
|
||||
|
||||
if (g_Vars.currentplayer->bondvehiclemode == VEHICLEMODE_OFF) {
|
||||
g_Vars.currentplayer->bondentert += g_Vars.lvupdate240freal / 60.0f;
|
||||
g_Vars.currentplayer->bondentert += g_Vars.lvupdate60freal / 60.0f;
|
||||
|
||||
if (g_Vars.currentplayer->bondentert >= 1.0f) {
|
||||
g_Vars.currentplayer->bondentert = 1.0f;
|
||||
|
||||
+21
-21
@@ -852,17 +852,17 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
g_EyespyPickup = false;
|
||||
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
for (f = 1; f < g_Vars.lvupdate240_60; f++) {
|
||||
for (f = 1; f < g_Vars.lvupdate60; f++) {
|
||||
spe0 *= PAL ? 0.952f : 0.96f;
|
||||
}
|
||||
#else
|
||||
for (f = 1; f < g_Vars.lvupdate240freal; f++) {
|
||||
for (f = 1; f < g_Vars.lvupdate60freal; f++) {
|
||||
spe0 *= 0.96f;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->startuptimer60 < TICKS(50)) {
|
||||
g_Vars.currentplayer->eyespy->startuptimer60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->eyespy->startuptimer60 += g_Vars.lvupdate60;
|
||||
} else {
|
||||
g_Vars.currentplayer->eyespy->startuptimer60 = TICKS(50);
|
||||
}
|
||||
@@ -899,7 +899,7 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
#endif
|
||||
|
||||
// Update theta
|
||||
g_Vars.currentplayer->eyespy->theta += c1stickx * 0.0625f * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->eyespy->theta += c1stickx * 0.0625f * g_Vars.lvupdate60freal;
|
||||
|
||||
while (g_Vars.currentplayer->eyespy->theta < 0.0f) {
|
||||
g_Vars.currentplayer->eyespy->theta += 360.0f;
|
||||
@@ -913,7 +913,7 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
g_Vars.currentplayer->eyespy->sintheta = sinf(g_Vars.currentplayer->eyespy->theta * 0.017453292384744f);
|
||||
|
||||
// Update verta
|
||||
g_Vars.currentplayer->eyespy->verta -= pitchspeed * 0.0625f * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->eyespy->verta -= pitchspeed * 0.0625f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (prevverta != g_Vars.currentplayer->eyespy->verta) {
|
||||
while (g_Vars.currentplayer->eyespy->verta < 0.0f) {
|
||||
@@ -940,14 +940,14 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
if (g_Vars.currentplayer->eyespy->verta < 180.0f) {
|
||||
tmp = g_Vars.currentplayer->eyespy->verta;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
tmp *= 0.04f;
|
||||
g_Vars.currentplayer->eyespy->verta -= tmp;
|
||||
}
|
||||
} else {
|
||||
tmp = 360.0f - g_Vars.currentplayer->eyespy->verta;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
tmp *= 0.04f;
|
||||
g_Vars.currentplayer->eyespy->verta += tmp;
|
||||
}
|
||||
@@ -957,17 +957,17 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
g_Vars.currentplayer->eyespy->sinverta = sinf(g_Vars.currentplayer->eyespy->verta * 0.017453292384744f);
|
||||
}
|
||||
|
||||
spcc += forwardspeed * g_Vars.currentplayer->eyespy->sintheta * 0.15f * g_Vars.lvupdate240freal;
|
||||
spc8 += -forwardspeed * g_Vars.currentplayer->eyespy->costheta * 0.15f * g_Vars.lvupdate240freal;
|
||||
spcc += forwardspeed * g_Vars.currentplayer->eyespy->sintheta * 0.15f * g_Vars.lvupdate60freal;
|
||||
spc8 += -forwardspeed * g_Vars.currentplayer->eyespy->costheta * 0.15f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (sidespeed != 0) {
|
||||
spd4 += sidespeed * 5 * g_Vars.currentplayer->eyespy->costheta * 0.15f * g_Vars.lvupdate240freal;
|
||||
spd0 += sidespeed * 5 * g_Vars.currentplayer->eyespy->sintheta * 0.15f * g_Vars.lvupdate240freal;
|
||||
spd4 += sidespeed * 5 * g_Vars.currentplayer->eyespy->costheta * 0.15f * g_Vars.lvupdate60freal;
|
||||
spd0 += sidespeed * 5 * g_Vars.currentplayer->eyespy->sintheta * 0.15f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (ascendspeed != 0) {
|
||||
spc4 += ascendspeed * 3 * 0.15f * g_Vars.lvupdate240freal;
|
||||
spc4 += ascendspeed * 3 * 0.15f * g_Vars.lvupdate60freal;
|
||||
|
||||
g_Vars.currentplayer->eyespy->bobdir = (ascendspeed < 0.0f) ? -1 : 1;
|
||||
g_Vars.currentplayer->eyespy->bobtimer = 0;
|
||||
@@ -982,8 +982,8 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
spcc = g_Vars.currentplayer->eyespy->velf[0] * g_Vars.currentplayer->eyespy->velf[0]
|
||||
+ g_Vars.currentplayer->eyespy->velf[1] * g_Vars.currentplayer->eyespy->velf[1];
|
||||
|
||||
if (spcc > 90.25f * g_Vars.lvupdate240freal * g_Vars.lvupdate240freal) {
|
||||
spcc = 9.5f * g_Vars.lvupdate240freal / sqrtf(spcc);
|
||||
if (spcc > 90.25f * g_Vars.lvupdate60freal * g_Vars.lvupdate60freal) {
|
||||
spcc = 9.5f * g_Vars.lvupdate60freal / sqrtf(spcc);
|
||||
|
||||
g_Vars.currentplayer->eyespy->velf[0] *= spcc;
|
||||
g_Vars.currentplayer->eyespy->velf[1] *= spcc;
|
||||
@@ -992,8 +992,8 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
spd4 = g_Vars.currentplayer->eyespy->vels[0] * g_Vars.currentplayer->eyespy->vels[0]
|
||||
+ g_Vars.currentplayer->eyespy->vels[1] * g_Vars.currentplayer->eyespy->vels[1];
|
||||
|
||||
if (spd4 > 225.0f * g_Vars.lvupdate240freal * g_Vars.lvupdate240freal) {
|
||||
spd4 = 15.0f * g_Vars.lvupdate240freal / sqrtf(spd4);
|
||||
if (spd4 > 225.0f * g_Vars.lvupdate60freal * g_Vars.lvupdate60freal) {
|
||||
spd4 = 15.0f * g_Vars.lvupdate60freal / sqrtf(spd4);
|
||||
|
||||
g_Vars.currentplayer->eyespy->vels[0] *= spd4;
|
||||
g_Vars.currentplayer->eyespy->vels[1] *= spd4;
|
||||
@@ -1001,12 +1001,12 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
|
||||
g_Vars.currentplayer->eyespy->vel.y += spc4;
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->vel.y < -(5 * g_Vars.lvupdate240freal)) {
|
||||
g_Vars.currentplayer->eyespy->vel.y = -(5 * g_Vars.lvupdate240freal);
|
||||
if (g_Vars.currentplayer->eyespy->vel.y < -(5 * g_Vars.lvupdate60freal)) {
|
||||
g_Vars.currentplayer->eyespy->vel.y = -(5 * g_Vars.lvupdate60freal);
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->vel.y > 5 * g_Vars.lvupdate240freal) {
|
||||
g_Vars.currentplayer->eyespy->vel.y = 5 * g_Vars.lvupdate240freal;
|
||||
if (g_Vars.currentplayer->eyespy->vel.y > 5 * g_Vars.lvupdate60freal) {
|
||||
g_Vars.currentplayer->eyespy->vel.y = 5 * g_Vars.lvupdate60freal;
|
||||
}
|
||||
} else {
|
||||
g_Vars.currentplayer->eyespy->bobactive = true;
|
||||
@@ -1016,7 +1016,7 @@ void eyespyProcessInput(bool allowbuttons)
|
||||
if (spc4 == 0.0f) {
|
||||
if (g_Vars.currentplayer->eyespy->bobactive || ABS(g_Vars.currentplayer->eyespy->vel.y) < 0.1f) {
|
||||
g_Vars.currentplayer->eyespy->bobactive = true;
|
||||
g_Vars.currentplayer->eyespy->bobtimer += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->eyespy->bobtimer += g_Vars.lvupdate60;
|
||||
g_Vars.currentplayer->eyespy->vel.y += 0.025f * g_Vars.currentplayer->eyespy->bobdir;
|
||||
|
||||
if (g_Vars.currentplayer->eyespy->bobtimer > TICKS(120)) {
|
||||
|
||||
+22
-22
@@ -146,9 +146,9 @@ void bgrabExit(void)
|
||||
obj->hidden &= ~OBJHFLAG_GRABBED;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
moveamount.x = (g_Vars.currentplayer->grabbedprop->pos.x - g_Vars.currentplayer->grabbedprevpos.x) / g_Vars.lvupdate240freal;
|
||||
moveamount.x = (g_Vars.currentplayer->grabbedprop->pos.x - g_Vars.currentplayer->grabbedprevpos.x) / g_Vars.lvupdate60freal;
|
||||
moveamount.y = 0;
|
||||
moveamount.z = (g_Vars.currentplayer->grabbedprop->pos.z - g_Vars.currentplayer->grabbedprevpos.z) / g_Vars.lvupdate240freal;
|
||||
moveamount.z = (g_Vars.currentplayer->grabbedprop->pos.z - g_Vars.currentplayer->grabbedprevpos.z) / g_Vars.lvupdate60freal;
|
||||
|
||||
rotateamount = -(g_Vars.currentplayer->vv_theta - g_Vars.currentplayer->bondprevtheta)
|
||||
* M_BADTAU / 360;
|
||||
@@ -159,7 +159,7 @@ void bgrabExit(void)
|
||||
rotateamount -= M_BADTAU;
|
||||
}
|
||||
|
||||
rotateamount /= g_Vars.lvupdate240freal;
|
||||
rotateamount /= g_Vars.lvupdate60freal;
|
||||
|
||||
objApplyMomentum(g_Vars.currentplayer->grabbedprop->obj, &moveamount,
|
||||
rotateamount, 0, 0);
|
||||
@@ -202,9 +202,9 @@ void bgrab0f0ccbf0(struct coord *delta, f32 angle, struct defaultobj *obj)
|
||||
|
||||
func0f02e3dc(&spb0, &spa4, &sp98, &spc8, &spd4);
|
||||
|
||||
spbc.x = (sp98.x - g_Vars.currentplayer->prop->pos.x) / g_Vars.lvupdate240freal;
|
||||
spbc.x = (sp98.x - g_Vars.currentplayer->prop->pos.x) / g_Vars.lvupdate60freal;
|
||||
spbc.y = 0.0f;
|
||||
spbc.z = (sp98.z - g_Vars.currentplayer->prop->pos.z) / g_Vars.lvupdate240freal;
|
||||
spbc.z = (sp98.z - g_Vars.currentplayer->prop->pos.z) / g_Vars.lvupdate60freal;
|
||||
|
||||
func0f082e84(obj, &spd4, &spc8, &spbc, false);
|
||||
} else {
|
||||
@@ -249,11 +249,11 @@ void bgrab0f0ccbf0(struct coord *delta, f32 angle, struct defaultobj *obj)
|
||||
}
|
||||
|
||||
if (delta->x != 0.0f) {
|
||||
sp74.x += delta->x / g_Vars.lvupdate240freal;
|
||||
sp74.x += delta->x / g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (delta->z != 0.0f) {
|
||||
sp74.z += delta->z / g_Vars.lvupdate240freal;
|
||||
sp74.z += delta->z / g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
func0f082e84(obj, &sp8c, &sp80, &sp74, false);
|
||||
@@ -267,7 +267,7 @@ void bgrab0f0ccbf0(struct coord *delta, f32 angle, struct defaultobj *obj)
|
||||
|
||||
sp40 *= mult;
|
||||
sp3c *= mult;
|
||||
angle = angle / g_Vars.lvupdate240freal;
|
||||
angle = angle / g_Vars.lvupdate60freal;
|
||||
|
||||
sp2c.x += -sp3c * angle * 40.0f;
|
||||
sp2c.z += sp40 * angle * 40.0f;
|
||||
@@ -720,7 +720,7 @@ bool bgrab0f0cdb68(f32 angle)
|
||||
void bgrab0f0cdef0(void)
|
||||
{
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
f32 angle = g_Vars.currentplayer->speedtheta * g_Vars.lvupdate240freal * 0.017450513318181f * 3.5f;
|
||||
f32 angle = g_Vars.currentplayer->speedtheta * g_Vars.lvupdate60freal * 0.017450513318181f * 3.5f;
|
||||
|
||||
if (bgrab0f0cdb04(angle, true) == 0) {
|
||||
bgrab0f0cdb68(angle);
|
||||
@@ -920,13 +920,13 @@ void bgrabUpdateSpeedSideways(f32 targetspeed, f32 accelspeed, s32 mult)
|
||||
void bgrabUpdateSpeedForwards(f32 target, f32 speed)
|
||||
{
|
||||
if (g_Vars.currentplayer->speedgo < target) {
|
||||
g_Vars.currentplayer->speedgo += speed * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->speedgo += speed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->speedgo > target) {
|
||||
g_Vars.currentplayer->speedgo = target;
|
||||
}
|
||||
} else if (g_Vars.currentplayer->speedgo > target) {
|
||||
g_Vars.currentplayer->speedgo -= speed * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->speedgo -= speed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->speedgo < target) {
|
||||
g_Vars.currentplayer->speedgo = target;
|
||||
@@ -944,17 +944,17 @@ void bgrabApplyMoveData(struct movedata *data)
|
||||
} else if (data->digitalstepright) {
|
||||
bgrabUpdateSpeedSideways(1, 0.2f / 3.0f, data->digitalstepright);
|
||||
} else if (data->unk14 == 0) {
|
||||
bgrabUpdateSpeedSideways(0, 0.2f / 3.0f, g_Vars.lvupdate240_60);
|
||||
bgrabUpdateSpeedSideways(0, 0.2f / 3.0f, g_Vars.lvupdate60);
|
||||
}
|
||||
|
||||
if (data->unk14) {
|
||||
bgrabUpdateSpeedSideways(data->analogstrafe * 0.014285714365542f, 0.2f / 3.0f, g_Vars.lvupdate240_60);
|
||||
bgrabUpdateSpeedSideways(data->analogstrafe * 0.014285714365542f, 0.2f / 3.0f, g_Vars.lvupdate60);
|
||||
}
|
||||
|
||||
// Forward/back
|
||||
if (data->digitalstepforward) {
|
||||
bgrabUpdateSpeedForwards(1, 0.2f / 3.0f);
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate60;
|
||||
} else if (data->digitalstepback) {
|
||||
bgrabUpdateSpeedForwards(-1, 0.2f / 3.0f);
|
||||
} else if (data->canlookahead == false) {
|
||||
@@ -965,7 +965,7 @@ void bgrabApplyMoveData(struct movedata *data)
|
||||
bgrabUpdateSpeedForwards(data->analogwalk * 0.014285714365542f, 0.2f / 3.0f);
|
||||
|
||||
if (data->analogwalk > 60) {
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate60;
|
||||
} else {
|
||||
g_Vars.currentplayer->speedmaxtime60 = 0;
|
||||
}
|
||||
@@ -1038,7 +1038,7 @@ void bgrab0f0ce924(void)
|
||||
g_Vars.currentplayer->speedforwards += sp70;
|
||||
g_Vars.currentplayer->speedsideways += sp6c;
|
||||
|
||||
mult = var80075c00[1].unk0c * 0.5f * g_Vars.lvupdate240freal;
|
||||
mult = var80075c00[1].unk0c * 0.5f * g_Vars.lvupdate60freal;
|
||||
sp88 = mult * g_Vars.currentplayer->speedsideways;
|
||||
|
||||
speedsideways = g_Vars.currentplayer->speedsideways * 0.8f;
|
||||
@@ -1068,9 +1068,9 @@ void bgrab0f0ce924(void)
|
||||
}
|
||||
|
||||
if (maxspeed >= 0.75f) {
|
||||
g_Vars.currentplayer->bondbreathing += (maxspeed - 0.75f) * g_Vars.lvupdate240freal / 900.0f;
|
||||
g_Vars.currentplayer->bondbreathing += (maxspeed - 0.75f) * g_Vars.lvupdate60freal / 900.0f;
|
||||
} else {
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f - maxspeed) * g_Vars.lvupdate240freal / 2700.0f;
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f - maxspeed) * g_Vars.lvupdate60freal / 2700.0f;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->bondbreathing < 0.0f) {
|
||||
@@ -1093,14 +1093,14 @@ void bgrab0f0ce924(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
sp74.x += (sp80 * g_Vars.currentplayer->bond2.unk00.f[0] - sp84 * g_Vars.currentplayer->bond2.unk00.f[2]) * g_Vars.lvupdate240freal;
|
||||
sp74.z += (sp80 * g_Vars.currentplayer->bond2.unk00.f[2] + sp84 * g_Vars.currentplayer->bond2.unk00.f[0]) * g_Vars.lvupdate240freal;
|
||||
sp74.x += (sp80 * g_Vars.currentplayer->bond2.unk00.f[0] - sp84 * g_Vars.currentplayer->bond2.unk00.f[2]) * g_Vars.lvupdate60freal;
|
||||
sp74.z += (sp80 * g_Vars.currentplayer->bond2.unk00.f[2] + sp84 * g_Vars.currentplayer->bond2.unk00.f[0]) * g_Vars.lvupdate60freal;
|
||||
|
||||
bmoveUpdateMoveInitSpeed(&sp74);
|
||||
|
||||
if (debugIsTurboModeEnabled()) {
|
||||
sp74.x += (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedforwards - (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedsideways)) * g_Vars.lvupdate240freal * 10.0f;
|
||||
sp74.z += (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedforwards + (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedsideways)) * g_Vars.lvupdate240freal * 10.0f;
|
||||
sp74.x += (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedforwards - (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedsideways)) * g_Vars.lvupdate60freal * 10.0f;
|
||||
sp74.z += (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedforwards + (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedsideways)) * g_Vars.lvupdate60freal * 10.0f;
|
||||
}
|
||||
|
||||
bgrab0f0ce0bc(&sp74);
|
||||
|
||||
+54
-54
@@ -442,8 +442,8 @@ void bgunTickUnequippedReload(void)
|
||||
for (j = 0; j < 4; j++) {
|
||||
u16 spent = g_Vars.currentplayer->hands[i].gunroundsspent[j];
|
||||
|
||||
if (spent > g_Vars.lvupdate240_60) {
|
||||
spent -= g_Vars.lvupdate240_60;
|
||||
if (spent > g_Vars.lvupdate60) {
|
||||
spent -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
spent = 0;
|
||||
}
|
||||
@@ -3402,7 +3402,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func)
|
||||
|
||||
if (autofunc->unk50 > 0) {
|
||||
if (hand->gs_float1 < 1) {
|
||||
hand->gs_float1 += LVUPDATE240FREAL() / autofunc->unk50;
|
||||
hand->gs_float1 += LVUPDATE60FREAL() / autofunc->unk50;
|
||||
|
||||
if (hand->gs_float1 > 1) {
|
||||
hand->gs_float1 = 1;
|
||||
@@ -3460,7 +3460,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func)
|
||||
|
||||
if (autofunc->unk51 > 0) {
|
||||
if (hand->gs_float1 > 0) {
|
||||
hand->gs_float1 -= LVUPDATE240FREAL() / autofunc->unk51;
|
||||
hand->gs_float1 -= LVUPDATE60FREAL() / autofunc->unk51;
|
||||
|
||||
if (hand->gs_float1 < 0) {
|
||||
hand->gs_float1 = 0;
|
||||
@@ -3497,7 +3497,7 @@ void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, s
|
||||
f32 tmp2;
|
||||
|
||||
tmp = autofunc->initialfirerate + (autofunc->maxfirerate - autofunc->initialfirerate) * hand->gs_float1;
|
||||
tmp2 = tmp / 60.0f * (LVUPDATE240FREAL() / 60.0f) + hand->shotremainder;
|
||||
tmp2 = tmp / 60.0f * (LVUPDATE60FREAL() / 60.0f) + hand->shotremainder;
|
||||
|
||||
hand->shotstotake = tmp2;
|
||||
hand->shotremainder = tmp2 - hand->shotstotake;
|
||||
@@ -4009,7 +4009,7 @@ bool bgunTickIncAttackingClose(s32 handnum, struct hand *hand)
|
||||
hand->burstbullets++;
|
||||
|
||||
if (hand->triggeron) {
|
||||
hand->matmot2 += 0.01f * LVUPDATE240FREAL();
|
||||
hand->matmot2 += 0.01f * LVUPDATE60FREAL();
|
||||
|
||||
if (hand->matmot2 > 1) {
|
||||
hand->matmot2 = 1;
|
||||
@@ -4794,7 +4794,7 @@ s32 bgunTickInc(struct handweaponinfo *info, s32 handnum, s32 lvupdate)
|
||||
hand->stateframes += lvupdate;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
hand->count60 += g_Vars.lvupdate240_60;
|
||||
hand->count60 += g_Vars.lvupdate60;
|
||||
hand->count++;
|
||||
}
|
||||
|
||||
@@ -4879,13 +4879,13 @@ void bgunTickHand(s32 handnum)
|
||||
|
||||
bgunGetWeaponInfo(&info, handnum);
|
||||
|
||||
lvupdate = g_Vars.lvupdate240_60;
|
||||
lvupdate = g_Vars.lvupdate60;
|
||||
|
||||
hand->animframeinc = g_Vars.lvupdate240_60;
|
||||
hand->animframeinc = g_Vars.lvupdate60;
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
hand->animframeincfreal = modelGetAbsAnimSpeed(&hand->gunmodel) * PALUPF(hand->animframeinc);
|
||||
#else
|
||||
hand->animframeincfreal += PALUPF(g_Vars.lvupdate240_60);
|
||||
hand->animframeincfreal += PALUPF(g_Vars.lvupdate60);
|
||||
#endif
|
||||
|
||||
while (i >= 0) {
|
||||
@@ -4957,8 +4957,8 @@ void bgunDecreaseNoiseRadius(void)
|
||||
}
|
||||
}
|
||||
|
||||
subamount = g_Vars.lvupdate240freal * noisesettingsright.incradius / (noisesettingsright.unk0c * 60.0f);
|
||||
consideramount = (player->hands[HAND_RIGHT].noiseradius - noisesettingsright.minradius) * g_Vars.lvupdate240freal / (noisesettingsright.unk10 * 60.0f);
|
||||
subamount = g_Vars.lvupdate60freal * noisesettingsright.incradius / (noisesettingsright.unk0c * 60.0f);
|
||||
consideramount = (player->hands[HAND_RIGHT].noiseradius - noisesettingsright.minradius) * g_Vars.lvupdate60freal / (noisesettingsright.unk10 * 60.0f);
|
||||
|
||||
if (consideramount > subamount) {
|
||||
subamount = consideramount;
|
||||
@@ -4979,8 +4979,8 @@ void bgunDecreaseNoiseRadius(void)
|
||||
}
|
||||
}
|
||||
|
||||
subamount = g_Vars.lvupdate240freal * noisesettingsleft.incradius / (noisesettingsleft.unk0c * 60.0f);
|
||||
consideramount = (player->hands[HAND_LEFT].noiseradius - noisesettingsleft.minradius) * g_Vars.lvupdate240freal / (noisesettingsleft.unk10 * 60.0f);
|
||||
subamount = g_Vars.lvupdate60freal * noisesettingsleft.incradius / (noisesettingsleft.unk0c * 60.0f);
|
||||
consideramount = (player->hands[HAND_LEFT].noiseradius - noisesettingsleft.minradius) * g_Vars.lvupdate60freal / (noisesettingsleft.unk10 * 60.0f);
|
||||
|
||||
if (consideramount > subamount) {
|
||||
subamount = consideramount;
|
||||
@@ -5158,7 +5158,7 @@ void bgun0f09d8dc(f32 breathing, f32 arg1, f32 arg2, f32 arg3, f32 arg4)
|
||||
}
|
||||
|
||||
breathing = player->cyclesum * (PAL ? 0.01529997587204f : 0.012799978256226f);
|
||||
sp4c = breathing * g_Vars.lvupdate240freal;
|
||||
sp4c = breathing * g_Vars.lvupdate60freal;
|
||||
dampt[0] = player->hands[0].dampt + sp4c;
|
||||
|
||||
while (dampt[0] >= 1.0f) {
|
||||
@@ -5167,7 +5167,7 @@ void bgun0f09d8dc(f32 breathing, f32 arg1, f32 arg2, f32 arg3, f32 arg4)
|
||||
player->syncoffset++;
|
||||
}
|
||||
|
||||
player->synccount += g_Vars.lvupdate240freal;
|
||||
player->synccount += g_Vars.lvupdate60freal;
|
||||
|
||||
if (player->synccount > 60.0f) {
|
||||
player->synccount = 0.0f;
|
||||
@@ -6191,9 +6191,9 @@ void bgunCreateThrownProjectile(s32 handnum, struct gset *gset)
|
||||
|
||||
// Add player movement to velocity
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
velocity.x += (playerprop->pos.x - prevpos->x + extrapos->x) / g_Vars.lvupdate240freal;
|
||||
velocity.y += (playerprop->pos.y - prevpos->y + extrapos->y) / g_Vars.lvupdate240freal;
|
||||
velocity.z += (playerprop->pos.z - prevpos->z + extrapos->z) / g_Vars.lvupdate240freal;
|
||||
velocity.x += (playerprop->pos.x - prevpos->x + extrapos->x) / g_Vars.lvupdate60freal;
|
||||
velocity.y += (playerprop->pos.y - prevpos->y + extrapos->y) / g_Vars.lvupdate60freal;
|
||||
velocity.z += (playerprop->pos.z - prevpos->z + extrapos->z) / g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
obj = bgunCreateThrownProjectile2(g_Vars.currentplayer->prop->chr, gset, &spawnpos, spawnrooms, &sp1f4, &velocity);
|
||||
@@ -6417,14 +6417,14 @@ void bgunCreateFiredProjectile(s32 handnum)
|
||||
sp250.y = sp1f8.y * sp260;
|
||||
sp250.z = sp1f8.z * sp260;
|
||||
|
||||
sp264.x = sp250.f[0] * g_Vars.lvupdate240freal + sp1f8.f[0] * sp25c;
|
||||
sp264.y = sp250.f[1] * g_Vars.lvupdate240freal + sp1f8.f[1] * sp25c;
|
||||
sp264.z = sp250.f[2] * g_Vars.lvupdate240freal + sp1f8.f[2] * sp25c;
|
||||
sp264.x = sp250.f[0] * g_Vars.lvupdate60freal + sp1f8.f[0] * sp25c;
|
||||
sp264.y = sp250.f[1] * g_Vars.lvupdate60freal + sp1f8.f[1] * sp25c;
|
||||
sp264.z = sp250.f[2] * g_Vars.lvupdate60freal + sp1f8.f[2] * sp25c;
|
||||
|
||||
if ((funcdef->base.base.flags & FUNCFLAG_FLYBYWIRE) == 0 && g_Vars.lvupdate240 > 0) {
|
||||
sp264.x += (playerprop->pos.x - prevpos->x + extrapos->x) / g_Vars.lvupdate240freal;
|
||||
sp264.y += (playerprop->pos.y - prevpos->y + extrapos->y) / g_Vars.lvupdate240freal;
|
||||
sp264.z += (playerprop->pos.z - prevpos->z + extrapos->z) / g_Vars.lvupdate240freal;
|
||||
sp264.x += (playerprop->pos.x - prevpos->x + extrapos->x) / g_Vars.lvupdate60freal;
|
||||
sp264.y += (playerprop->pos.y - prevpos->y + extrapos->y) / g_Vars.lvupdate60freal;
|
||||
sp264.z += (playerprop->pos.z - prevpos->z + extrapos->z) / g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
mtx4Copy(&g_Vars.currentplayer->hands[handnum].posmtx, &sp210);
|
||||
@@ -7644,7 +7644,7 @@ void bgunUpdateSlide(s32 handnum)
|
||||
if (player->hands[handnum].slideinc) {
|
||||
// Slide is moving backwards
|
||||
if (player->hands[handnum].slidetrans < slidemax) {
|
||||
player->hands[handnum].slidetrans += slidemax * 0.25f * g_Vars.lvupdate240freal;
|
||||
player->hands[handnum].slidetrans += slidemax * 0.25f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (player->hands[handnum].slidetrans >= slidemax) {
|
||||
@@ -7655,7 +7655,7 @@ void bgunUpdateSlide(s32 handnum)
|
||||
if (bgun0f098a44(&player->hands[handnum], 3)) {
|
||||
// Slide is moving forwards
|
||||
if (player->hands[handnum].slidetrans > 0.0f) {
|
||||
player->hands[handnum].slidetrans -= slidemax * 0.16666667f * g_Vars.lvupdate240freal;
|
||||
player->hands[handnum].slidetrans -= slidemax * 0.16666667f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (player->hands[handnum].slidetrans < 0.0f) {
|
||||
@@ -8184,7 +8184,7 @@ void bgunUpdateGangsta(struct hand *hand, s32 handnum, struct coord *arg2, struc
|
||||
hand->ispare1 += g_Vars.lvupdate240;
|
||||
|
||||
if (hand->ispare1 > TICKS(60)) {
|
||||
hand->gangstarot += LVUPDATE240FREAL() / 30.0f;
|
||||
hand->gangstarot += LVUPDATE60FREAL() / 30.0f;
|
||||
|
||||
if (hand->gangstarot > 1.0f) {
|
||||
hand->gangstarot = 1.0f;
|
||||
@@ -8229,7 +8229,7 @@ void bgunUpdateGangsta(struct hand *hand, s32 handnum, struct coord *arg2, struc
|
||||
}
|
||||
|
||||
if (revert) {
|
||||
hand->gangstarot -= LVUPDATE240FREAL() / inversespeed;
|
||||
hand->gangstarot -= LVUPDATE60FREAL() / inversespeed;
|
||||
}
|
||||
|
||||
if (hand->gangstarot < 0.0f) {
|
||||
@@ -8275,7 +8275,7 @@ void bgunUpdateSmoke(struct hand *hand, s32 handnum, s32 weaponnum, struct weapo
|
||||
}
|
||||
}
|
||||
|
||||
hand->gunsmokepoint -= LVUPDATE240FREAL() / 120.0f;
|
||||
hand->gunsmokepoint -= LVUPDATE60FREAL() / 120.0f;
|
||||
|
||||
if (hand->gunsmokepoint < 0.0f) {
|
||||
hand->gunsmokepoint = 0.0f;
|
||||
@@ -8497,7 +8497,7 @@ void bgunUpdateReaper(struct hand *hand, struct modelfiledata *modeldef)
|
||||
|
||||
if (hand->matmot3 <= hand->matmot2) {
|
||||
if (hand->matmot2 < 0.0f) {
|
||||
hand->matmot2 += 0.01f * LVUPDATE240FREAL();
|
||||
hand->matmot2 += 0.01f * LVUPDATE60FREAL();
|
||||
|
||||
if (hand->matmot2 > 0.0f) {
|
||||
hand->matmot2 = 0.0f;
|
||||
@@ -8506,7 +8506,7 @@ void bgunUpdateReaper(struct hand *hand, struct modelfiledata *modeldef)
|
||||
|
||||
hand->matmot3 = hand->matmot2;
|
||||
} else {
|
||||
f12 = LVUPDATE240FREAL() * 0.005;
|
||||
f12 = LVUPDATE60FREAL() * 0.005;
|
||||
|
||||
if (hand->matmot2 < 0.0000001f) {
|
||||
hand->matmot2 = -0.14f;
|
||||
@@ -8526,9 +8526,9 @@ void bgunUpdateReaper(struct hand *hand, struct modelfiledata *modeldef)
|
||||
}
|
||||
|
||||
if (hand->matmot3 < 0.0f) {
|
||||
hand->matmot1 = hand->matmot1 - (1.0f - cosf(hand->matmot3 * M_PI)) * 0.5f * LVUPDATE240FREAL() * 0.2f;
|
||||
hand->matmot1 = hand->matmot1 - (1.0f - cosf(hand->matmot3 * M_PI)) * 0.5f * LVUPDATE60FREAL() * 0.2f;
|
||||
} else {
|
||||
hand->matmot1 = hand->matmot1 + (1.0f - cosf(hand->matmot3 * M_PI)) * 0.5f * LVUPDATE240FREAL() * 0.2f;
|
||||
hand->matmot1 = hand->matmot1 + (1.0f - cosf(hand->matmot3 * M_PI)) * 0.5f * LVUPDATE60FREAL() * 0.2f;
|
||||
}
|
||||
|
||||
tmp = hand->matmot1 / 6.2831802368164f;
|
||||
@@ -8635,7 +8635,7 @@ void bgunUpdateDevastator(struct hand *hand, u8 *allocation, struct modelfiledat
|
||||
s32 mtxindex = model0001a524(node, 0);
|
||||
struct coord sp24;
|
||||
|
||||
hand->loadslide += 0.01f * LVUPDATE240FREAL();
|
||||
hand->loadslide += 0.01f * LVUPDATE60FREAL();
|
||||
|
||||
if (hand->loadslide > 1.0f) {
|
||||
hand->loadslide = 1.0f;
|
||||
@@ -8667,7 +8667,7 @@ void bgunUpdateShotgun(struct hand *hand, u8 *allocation, bool *arg2, struct mod
|
||||
}
|
||||
|
||||
if (hand->matmot1 > 0.0f) {
|
||||
hand->matmot1 -= LVUPDATE240FREAL() / 6.0f;
|
||||
hand->matmot1 -= LVUPDATE60FREAL() / 6.0f;
|
||||
|
||||
if (hand->matmot1 < 0.01f) {
|
||||
hand->matmot1 = 0.0f;
|
||||
@@ -8703,7 +8703,7 @@ void bgunUpdateLaser(struct hand *hand)
|
||||
}
|
||||
|
||||
if (hand->matmot1 > 0) {
|
||||
hand->matmot1 -= LVUPDATE240FREAL() / 10.0f;
|
||||
hand->matmot1 -= LVUPDATE60FREAL() / 10.0f;
|
||||
} else if (hand->audiohandle != NULL && sndGetState(hand->audiohandle) != AL_STOPPED) {
|
||||
audioStop(hand->audiohandle);
|
||||
}
|
||||
@@ -8847,9 +8847,9 @@ void bgunTickEject(struct hand *hand, struct modelfiledata *modeldef, bool isdet
|
||||
mtx4ToMtx3(&sp90, hand->unk0d50);
|
||||
|
||||
if (g_Vars.lvupdate240 > 0 && hand->ejecttype != EJECTTYPE_GUN) {
|
||||
sp84.f[0] = (hand->posmtx.m[3][0] - hand->prevmtx.m[3][0]) / g_Vars.lvupdate240freal;
|
||||
sp84.f[1] = (hand->posmtx.m[3][1] - hand->prevmtx.m[3][1]) / g_Vars.lvupdate240freal;
|
||||
sp84.f[2] = (hand->posmtx.m[3][2] - hand->prevmtx.m[3][2]) / g_Vars.lvupdate240freal;
|
||||
sp84.f[0] = (hand->posmtx.m[3][0] - hand->prevmtx.m[3][0]) / g_Vars.lvupdate60freal;
|
||||
sp84.f[1] = (hand->posmtx.m[3][1] - hand->prevmtx.m[3][1]) / g_Vars.lvupdate60freal;
|
||||
sp84.f[2] = (hand->posmtx.m[3][2] - hand->prevmtx.m[3][2]) / g_Vars.lvupdate60freal;
|
||||
|
||||
mtx00017588(hand->posmtx.m, sp44.m);
|
||||
mtx4RotateVecInPlace(&sp44, &sp84);
|
||||
@@ -8862,7 +8862,7 @@ void bgunTickEject(struct hand *hand, struct modelfiledata *modeldef, bool isdet
|
||||
hand->ejectstate = EJECTSTATE_AIRBORNE;
|
||||
break;
|
||||
case EJECTSTATE_AIRBORNE:
|
||||
lvupdate = g_Vars.lvupdate240freal;
|
||||
lvupdate = g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->isdead && lvupdate > 1.5f) {
|
||||
lvupdate = 1.5f;
|
||||
@@ -9129,13 +9129,13 @@ void bgun0f0a5550(s32 handnum)
|
||||
|
||||
if (handnum == HAND_RIGHT) {
|
||||
if (weaponHasFlag(bgunGetWeaponNum2(HAND_LEFT), WEAPONFLAG_00000040)) {
|
||||
hand->xshift += 2.0f * g_Vars.lvupdate240freal / 240.0f;
|
||||
hand->xshift += 2.0f * g_Vars.lvupdate60freal / 240.0f;
|
||||
|
||||
if (hand->xshift > 2.0f) {
|
||||
hand->xshift = 2.0f;
|
||||
}
|
||||
} else {
|
||||
hand->xshift -= 2.0f * g_Vars.lvupdate240freal / 240.0f;
|
||||
hand->xshift -= 2.0f * g_Vars.lvupdate60freal / 240.0f;
|
||||
|
||||
if (hand->xshift < 0.0f) {
|
||||
hand->xshift = 0.0f;
|
||||
@@ -9143,13 +9143,13 @@ void bgun0f0a5550(s32 handnum)
|
||||
}
|
||||
} else {
|
||||
if (weaponHasFlag(bgunGetWeaponNum2(HAND_RIGHT), WEAPONFLAG_00000040)) {
|
||||
hand->xshift -= 2.0f * g_Vars.lvupdate240freal / 240.0f;
|
||||
hand->xshift -= 2.0f * g_Vars.lvupdate60freal / 240.0f;
|
||||
|
||||
if (hand->xshift < -2.0f) {
|
||||
hand->xshift = -2.0f;
|
||||
}
|
||||
} else {
|
||||
hand->xshift += 2.0f * g_Vars.lvupdate240freal / 240.0f;
|
||||
hand->xshift += 2.0f * g_Vars.lvupdate60freal / 240.0f;
|
||||
|
||||
if (hand->xshift > 0.0f) {
|
||||
hand->xshift = 0.0f;
|
||||
@@ -9654,7 +9654,7 @@ void bgunTickMaulerCharge(void)
|
||||
|
||||
if (hand->loadedammo[0] >= 2 && hand->matmot1 < 5) {
|
||||
charging = true;
|
||||
hand->matmot1 += g_Vars.lvupdate240freal * 0.05f;
|
||||
hand->matmot1 += g_Vars.lvupdate60freal * 0.05f;
|
||||
}
|
||||
|
||||
if (hand->matmot1 > 5) {
|
||||
@@ -9668,7 +9668,7 @@ void bgunTickMaulerCharge(void)
|
||||
}
|
||||
} else {
|
||||
// Using primary function - make the charge wear off slowly
|
||||
hand->matmot1 -= g_Vars.lvupdate240freal * 0.005f;
|
||||
hand->matmot1 -= g_Vars.lvupdate60freal * 0.005f;
|
||||
|
||||
if (hand->matmot1 < 0) {
|
||||
hand->matmot1 = 0;
|
||||
@@ -9805,7 +9805,7 @@ void bgunTickGameplay2(void)
|
||||
// Handle RCP120 cloak ammo usage
|
||||
if ((chr->hidden & CHRHFLAG_CLOAKED) && chr->cloakfadefinished == true) {
|
||||
hand = &player->hands[HAND_RIGHT];
|
||||
hand->matmot1 += LVUPDATE240FREAL() * 0.4f;
|
||||
hand->matmot1 += LVUPDATE60FREAL() * 0.4f;
|
||||
|
||||
if (hand->matmot1 > 1.0f) {
|
||||
s32 usedqty = hand->matmot1;
|
||||
@@ -13948,7 +13948,7 @@ void bgun0f0a9da8(struct abmag *mag, s32 remaining, s32 capacity, s32 height)
|
||||
}
|
||||
|
||||
if (mag->change != 0) {
|
||||
mag->timer60 += (s16)g_Vars.lvupdate240_60 * height;
|
||||
mag->timer60 += (s16)g_Vars.lvupdate60 * height;
|
||||
|
||||
if (mag->timer60 > TICKS(255)) {
|
||||
if (mag->change > 0) {
|
||||
@@ -14368,10 +14368,10 @@ Gfx *bgunDrawHud(Gfx *gdl)
|
||||
|
||||
if (ctrl->guntypetimer);
|
||||
|
||||
if (ctrl->guntypetimer + g_Vars.lvupdate240_60 > 255) {
|
||||
if (ctrl->guntypetimer + g_Vars.lvupdate60 > 255) {
|
||||
ctrl->guntypetimer = 255;
|
||||
} else {
|
||||
ctrl->guntypetimer += (u16) g_Vars.lvupdate240_60;
|
||||
ctrl->guntypetimer += (u16) g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
textMeasure(&textheight, &textwidth, str, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0);
|
||||
@@ -14423,10 +14423,10 @@ Gfx *bgunDrawHud(Gfx *gdl)
|
||||
str = langGet(ctrl->curfnstr);
|
||||
|
||||
if (ctrl->fnstrtimer < 255) {
|
||||
if (ctrl->fnstrtimer + g_Vars.lvupdate240_60 > 255) {
|
||||
if (ctrl->fnstrtimer + g_Vars.lvupdate60 > 255) {
|
||||
ctrl->fnstrtimer = 255;
|
||||
} else {
|
||||
ctrl->fnstrtimer += (u16) g_Vars.lvupdate240_60;
|
||||
ctrl->fnstrtimer += (u16) g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -14668,7 +14668,7 @@ void bgunRevertBoost(void)
|
||||
void bgunTickBoost(void)
|
||||
{
|
||||
if (g_Vars.speedpillon && g_Vars.speedpilltime > 0 && !g_Vars.in_cutscene) {
|
||||
g_Vars.speedpilltime -= g_Vars.lvupdate240_60;
|
||||
g_Vars.speedpilltime -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.speedpilltime <= 0) {
|
||||
g_Vars.speedpilltime = 0;
|
||||
|
||||
+4
-4
@@ -176,8 +176,8 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
g_Vars.currentplayer->bondheadmatrices[0].m[3][2] *= arg0;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
g_Vars.currentplayer->bondheadmatrices[0].m[3][0] /= g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->bondheadmatrices[0].m[3][2] /= g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->bondheadmatrices[0].m[3][0] /= g_Vars.lvupdate60freal;
|
||||
g_Vars.currentplayer->bondheadmatrices[0].m[3][2] /= g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
headpos.x = g_Vars.currentplayer->bondheadmatrices[0].m[3][0] * g_Vars.currentplayer->headamplitude;
|
||||
@@ -194,7 +194,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
upvel.y = (g_Vars.currentplayer->bondheadmatrices[0].m[1][1] - 1.0f) * g_Vars.currentplayer->headamplitude + 1.0f;
|
||||
upvel.z = g_Vars.currentplayer->bondheadmatrices[0].m[1][2] * g_Vars.currentplayer->headamplitude;
|
||||
|
||||
g_Vars.currentplayer->headwalkingtime60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->headwalkingtime60 += g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->headwalkingtime60 > TICKS(60)) {
|
||||
bheadSetdamp(PAL ? 0.9785f : 0.982f);
|
||||
@@ -227,7 +227,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
if (bmoveGetCrouchPos() != CROUCHPOS_SQUAT) {
|
||||
g_Vars.currentplayer->standfrac +=
|
||||
(0.0083333337679505f + 0.025000002235174f * g_Vars.currentplayer->bondbreathing)
|
||||
* g_Vars.lvupdate240freal;
|
||||
* g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->standfrac >= 1) {
|
||||
bheadUpdateIdleRoll();
|
||||
|
||||
+24
-24
@@ -97,7 +97,7 @@ bool bmoveIsInSightAimMode(void)
|
||||
void bmoveUpdateAutoAimYProp(struct prop *prop, f32 autoaimy)
|
||||
{
|
||||
if (g_Vars.currentplayer->autoyaimtime60 >= 0) {
|
||||
g_Vars.currentplayer->autoyaimtime60 -= g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->autoyaimtime60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (prop != g_Vars.currentplayer->autoyaimprop) {
|
||||
@@ -150,7 +150,7 @@ bool bmoveIsAutoAimXEnabledForCurrentWeapon(void)
|
||||
void bmoveUpdateAutoAimXProp(struct prop *prop, f32 autoaimx)
|
||||
{
|
||||
if (g_Vars.currentplayer->autoxaimtime60 >= 0) {
|
||||
g_Vars.currentplayer->autoxaimtime60 -= g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->autoxaimtime60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (prop != g_Vars.currentplayer->autoxaimprop) {
|
||||
@@ -278,9 +278,9 @@ void bmoveUpdateSpeedVerta(f32 value)
|
||||
|
||||
if (value > 0) {
|
||||
if (g_Vars.currentplayer->speedverta > 0) {
|
||||
g_Vars.currentplayer->speedverta -= 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedverta -= 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
} else {
|
||||
g_Vars.currentplayer->speedverta -= 0.0125f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedverta -= 0.0125f * g_Vars.lvupdate60freal * mult;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedverta < limit) {
|
||||
@@ -288,9 +288,9 @@ void bmoveUpdateSpeedVerta(f32 value)
|
||||
}
|
||||
} else if (value < 0) {
|
||||
if (g_Vars.currentplayer->speedverta < 0) {
|
||||
g_Vars.currentplayer->speedverta += 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedverta += 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
} else {
|
||||
g_Vars.currentplayer->speedverta += 0.0125f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedverta += 0.0125f * g_Vars.lvupdate60freal * mult;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedverta > limit) {
|
||||
@@ -298,13 +298,13 @@ void bmoveUpdateSpeedVerta(f32 value)
|
||||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->speedverta > limit) {
|
||||
g_Vars.currentplayer->speedverta -= 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedverta -= 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
|
||||
if (g_Vars.currentplayer->speedverta < limit) {
|
||||
g_Vars.currentplayer->speedverta = limit;
|
||||
}
|
||||
} else {
|
||||
g_Vars.currentplayer->speedverta += 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedverta += 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
|
||||
if (g_Vars.currentplayer->speedverta > limit) {
|
||||
g_Vars.currentplayer->speedverta = limit;
|
||||
@@ -333,9 +333,9 @@ void bmoveUpdateSpeedThetaControl(f32 value)
|
||||
|
||||
if (value > 0) {
|
||||
if (g_Vars.currentplayer->speedthetacontrol > 0) {
|
||||
g_Vars.currentplayer->speedthetacontrol -= 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedthetacontrol -= 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
} else {
|
||||
g_Vars.currentplayer->speedthetacontrol -= 0.0125f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedthetacontrol -= 0.0125f * g_Vars.lvupdate60freal * mult;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedthetacontrol < limit) {
|
||||
@@ -343,9 +343,9 @@ void bmoveUpdateSpeedThetaControl(f32 value)
|
||||
}
|
||||
} else if (value < 0) {
|
||||
if (g_Vars.currentplayer->speedthetacontrol < 0.0f) {
|
||||
g_Vars.currentplayer->speedthetacontrol += 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedthetacontrol += 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
} else {
|
||||
g_Vars.currentplayer->speedthetacontrol += 0.0125f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedthetacontrol += 0.0125f * g_Vars.lvupdate60freal * mult;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedthetacontrol > limit) {
|
||||
@@ -353,13 +353,13 @@ void bmoveUpdateSpeedThetaControl(f32 value)
|
||||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->speedthetacontrol > limit) {
|
||||
g_Vars.currentplayer->speedthetacontrol -= 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedthetacontrol -= 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
|
||||
if (g_Vars.currentplayer->speedthetacontrol < limit) {
|
||||
g_Vars.currentplayer->speedthetacontrol = limit;
|
||||
}
|
||||
} else {
|
||||
g_Vars.currentplayer->speedthetacontrol += 0.05f * g_Vars.lvupdate240freal * mult;
|
||||
g_Vars.currentplayer->speedthetacontrol += 0.05f * g_Vars.lvupdate60freal * mult;
|
||||
|
||||
if (g_Vars.currentplayer->speedthetacontrol > limit) {
|
||||
g_Vars.currentplayer->speedthetacontrol = limit;
|
||||
@@ -1546,7 +1546,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
// The multiplier starts at 1 and reaches 1.25 after about 0.1 seconds.
|
||||
if (g_Vars.currentplayer->speedmaxtime60 >= TICKS(180)) {
|
||||
if (g_Vars.currentplayer->speedboost < 1.25f) {
|
||||
g_Vars.currentplayer->speedboost += 0.01f * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->speedboost += 0.01f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedboost > 1.25f) {
|
||||
@@ -1557,7 +1557,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->speedboost > 1) {
|
||||
g_Vars.currentplayer->speedboost -= 0.01f * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->speedboost -= 0.01f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedboost < 1) {
|
||||
@@ -1636,7 +1636,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
|
||||
// Calculate new verta
|
||||
newverta = g_Vars.currentplayer->vv_verta + (g_Vars.currentplayer->speedverta * g_Vars.lvupdate240freal + g_Vars.currentplayer->speedverta * g_Vars.lvupdate240freal);
|
||||
newverta = g_Vars.currentplayer->vv_verta + (g_Vars.currentplayer->speedverta * g_Vars.lvupdate60freal + g_Vars.currentplayer->speedverta * g_Vars.lvupdate60freal);
|
||||
|
||||
if (g_Vars.currentplayer->vv_verta > lookahead && newverta > lookahead) {
|
||||
g_Vars.currentplayer->vv_verta = newverta;
|
||||
@@ -1685,7 +1685,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
bmoveUpdateSpeedVerta(0);
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->vv_verta += g_Vars.currentplayer->speedverta * g_Vars.lvupdate240freal * 3.5f;
|
||||
g_Vars.currentplayer->vv_verta += g_Vars.currentplayer->speedverta * g_Vars.lvupdate60freal * 3.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1769,7 +1769,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->autoaimdamp > (PAL ? 0.955f : 0.963f)) {
|
||||
g_Vars.currentplayer->autoaimdamp -= (PAL ? 0.00037999986670911f : 0.00031999943894334f) * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->autoaimdamp -= (PAL ? 0.00037999986670911f : 0.00031999943894334f) * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->autoaimdamp < (PAL ? 0.955f : 0.963f)) {
|
||||
@@ -1788,7 +1788,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
|
||||
// This code moves the crosshair as the player turns and makes
|
||||
// it return to the centre when not affected by anything else.
|
||||
if (g_Vars.currentplayer->autoaimdamp < (PAL ? 0.974f : 0.979f)) {
|
||||
g_Vars.currentplayer->autoaimdamp += (PAL ? 0.00037999986670911f : 0.00031999943894334f) * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->autoaimdamp += (PAL ? 0.00037999986670911f : 0.00031999943894334f) * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->autoaimdamp > (PAL ? 0.974f : 0.979f)) {
|
||||
@@ -1854,13 +1854,13 @@ void bmove0f0cb904(struct coord *arg0)
|
||||
if (hypotenuse > 0.0001f) {
|
||||
if (arg0->f[i] != 0) {
|
||||
if (arg0->f[i] > 0) {
|
||||
arg0->f[i] -= (1.0f / 30.0f) * g_Vars.lvupdate240freal * arg0->f[i] / hypotenuse;
|
||||
arg0->f[i] -= (1.0f / 30.0f) * g_Vars.lvupdate60freal * arg0->f[i] / hypotenuse;
|
||||
|
||||
if (arg0->f[i] < 0) {
|
||||
arg0->f[i] = 0;
|
||||
}
|
||||
} else if (arg0->f[i] < 0) {
|
||||
arg0->f[i] -= (1.0f / 30.0f) * g_Vars.lvupdate240freal * arg0->f[i] / hypotenuse;
|
||||
arg0->f[i] -= (1.0f / 30.0f) * g_Vars.lvupdate60freal * arg0->f[i] / hypotenuse;
|
||||
|
||||
if (arg0->f[i] > 0) {
|
||||
arg0->f[i] = 0;
|
||||
@@ -1893,7 +1893,7 @@ void bmoveUpdateMoveInitSpeed(struct coord *newpos)
|
||||
g_Vars.currentplayer->moveinitspeed.x = 0;
|
||||
} else {
|
||||
g_Vars.currentplayer->moveinitspeed.x *= 0.9f;
|
||||
newpos->x += g_Vars.currentplayer->moveinitspeed.x * g_Vars.lvupdate240freal;
|
||||
newpos->x += g_Vars.currentplayer->moveinitspeed.x * g_Vars.lvupdate60freal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1902,7 +1902,7 @@ void bmoveUpdateMoveInitSpeed(struct coord *newpos)
|
||||
g_Vars.currentplayer->moveinitspeed.z = 0;
|
||||
} else {
|
||||
g_Vars.currentplayer->moveinitspeed.z *= 0.9f;
|
||||
newpos->z += g_Vars.currentplayer->moveinitspeed.z * g_Vars.lvupdate240freal;
|
||||
newpos->z += g_Vars.currentplayer->moveinitspeed.z * g_Vars.lvupdate60freal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+31
-31
@@ -167,9 +167,9 @@ void bwalk0f0c3b38(struct coord *reltarget, struct defaultobj *obj)
|
||||
|
||||
func0f02e3dc(&globalthinga, &globalthingb, &abstarget, &vector, &posunk);
|
||||
|
||||
tween.x = (abstarget.x - g_Vars.currentplayer->prop->pos.x) / g_Vars.lvupdate240freal;
|
||||
tween.x = (abstarget.x - g_Vars.currentplayer->prop->pos.x) / g_Vars.lvupdate60freal;
|
||||
tween.y = 0;
|
||||
tween.z = (abstarget.z - g_Vars.currentplayer->prop->pos.z) / g_Vars.lvupdate240freal;
|
||||
tween.z = (abstarget.z - g_Vars.currentplayer->prop->pos.z) / g_Vars.lvupdate60freal;
|
||||
|
||||
func0f082e84(obj, &posunk, &vector, &tween, false);
|
||||
}
|
||||
@@ -413,7 +413,7 @@ bool bwalkCalculateNewPositionWithPush(struct coord *delta, f32 rotateamount, bo
|
||||
}
|
||||
|
||||
if (canpush) {
|
||||
movingdist = sqrtf(delta->f[0] * delta->f[0] + delta->f[2] * delta->f[2]) / LVUPDATE240FREAL();
|
||||
movingdist = sqrtf(delta->f[0] * delta->f[0] + delta->f[2] * delta->f[2]) / LVUPDATE60FREAL();
|
||||
|
||||
xdist = obstacle->pos.x - g_Vars.currentplayer->prop->pos.x;
|
||||
zdist = obstacle->pos.z - g_Vars.currentplayer->prop->pos.z;
|
||||
@@ -430,9 +430,9 @@ bool bwalkCalculateNewPositionWithPush(struct coord *delta, f32 rotateamount, bo
|
||||
chr->pushspeed[0] = 0.5f * xdist;
|
||||
chr->pushspeed[1] = 0.5f * zdist;
|
||||
|
||||
newpos.x = obstacle->pos.x + chr->pushspeed[0] * LVUPDATE240FREAL();
|
||||
newpos.x = obstacle->pos.x + chr->pushspeed[0] * LVUPDATE60FREAL();
|
||||
newpos.y = obstacle->pos.y;
|
||||
newpos.z = obstacle->pos.z + chr->pushspeed[1] * LVUPDATE240FREAL();
|
||||
newpos.z = obstacle->pos.z + chr->pushspeed[1] * LVUPDATE60FREAL();
|
||||
|
||||
chrCalculatePushPos(chr, &newpos, newrooms, false);
|
||||
|
||||
@@ -687,13 +687,13 @@ void bwalkUpdateSpeedForwards(f32 targetspeed, f32 accelspeed)
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->speedgo < targetspeed) {
|
||||
g_Vars.currentplayer->speedgo += accelspeed * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->speedgo += accelspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->speedgo > targetspeed) {
|
||||
g_Vars.currentplayer->speedgo = targetspeed;
|
||||
}
|
||||
} else if (g_Vars.currentplayer->speedgo > targetspeed) {
|
||||
g_Vars.currentplayer->speedgo -= accelspeed * g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->speedgo -= accelspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->speedgo < targetspeed) {
|
||||
g_Vars.currentplayer->speedgo = targetspeed;
|
||||
@@ -930,8 +930,8 @@ void bwalkUpdateVertical(void)
|
||||
multiplier = 0.277777777f;
|
||||
}
|
||||
|
||||
newfallspeed = fallspeed - g_Vars.lvupdate240freal * multiplier;
|
||||
newmanground += g_Vars.lvupdate240freal * (fallspeed + newfallspeed) * 0.5f;
|
||||
newfallspeed = fallspeed - g_Vars.lvupdate60freal * multiplier;
|
||||
newmanground += g_Vars.lvupdate60freal * (fallspeed + newfallspeed) * 0.5f;
|
||||
fallspeed = newfallspeed;
|
||||
|
||||
if (newmanground < g_Vars.currentplayer->vv_ground) {
|
||||
@@ -1212,7 +1212,7 @@ void bwalkUpdateTheta(void)
|
||||
// Turn speed is calculated from the chr's height
|
||||
mult = 159.0f / g_Vars.currentplayer->vv_eyeheight;
|
||||
rotateamount = g_Vars.currentplayer->speedtheta * mult
|
||||
* g_Vars.lvupdate240freal * 0.0174505133f * 3.5f;
|
||||
* g_Vars.lvupdate60freal * 0.0174505133f * 3.5f;
|
||||
|
||||
bwalkCalculateNewPositionWithPush(&delta, rotateamount, true, 0, CDTYPE_ALL);
|
||||
}
|
||||
@@ -1288,17 +1288,17 @@ void bwalkApplyMoveData(struct movedata *data)
|
||||
} else if (data->digitalstepright) {
|
||||
bwalkUpdateSpeedSideways(1, 0.2f, data->digitalstepright);
|
||||
} else if (data->unk14 == false) {
|
||||
bwalkUpdateSpeedSideways(0, 0.2f, g_Vars.lvupdate240_60);
|
||||
bwalkUpdateSpeedSideways(0, 0.2f, g_Vars.lvupdate60);
|
||||
}
|
||||
|
||||
if (data->unk14) {
|
||||
bwalkUpdateSpeedSideways(data->analogstrafe * 0.014285714365542f, 0.2f, g_Vars.lvupdate240_60);
|
||||
bwalkUpdateSpeedSideways(data->analogstrafe * 0.014285714365542f, 0.2f, g_Vars.lvupdate60);
|
||||
}
|
||||
|
||||
// Forward/back
|
||||
if (data->digitalstepforward) {
|
||||
bwalkUpdateSpeedForwards(1, 1);
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate60;
|
||||
} else if (data->digitalstepback) {
|
||||
bwalkUpdateSpeedForwards(-1, 1);
|
||||
} else if (data->canlookahead == false) {
|
||||
@@ -1309,7 +1309,7 @@ void bwalkApplyMoveData(struct movedata *data)
|
||||
bwalkUpdateSpeedForwards(data->analogwalk * 0.014285714365542f, 1);
|
||||
|
||||
if (data->analogwalk > 60) {
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->speedmaxtime60 += g_Vars.lvupdate60;
|
||||
} else {
|
||||
g_Vars.currentplayer->speedmaxtime60 = 0;
|
||||
}
|
||||
@@ -1387,7 +1387,7 @@ void bwalk0f0c69b8(void)
|
||||
f32 spa8;
|
||||
f32 mult;
|
||||
f32 f0;
|
||||
f32 lvupdate240f;
|
||||
f32 lvupdate60f;
|
||||
s32 lvupdate240;
|
||||
s32 cdresult;
|
||||
struct escalatorobj *esc;
|
||||
@@ -1433,7 +1433,7 @@ void bwalk0f0c69b8(void)
|
||||
#endif
|
||||
|
||||
if (g_Vars.currentplayer->walkinitmove) {
|
||||
g_Vars.currentplayer->walkinitt += g_Vars.lvupdate240freal * (1.0f / 60.0f);
|
||||
g_Vars.currentplayer->walkinitt += g_Vars.lvupdate60freal * (1.0f / 60.0f);
|
||||
|
||||
if (g_Vars.currentplayer->walkinitt >= 1.0f) {
|
||||
g_Vars.currentplayer->walkinitt = 1.0f;
|
||||
@@ -1475,19 +1475,19 @@ void bwalk0f0c69b8(void)
|
||||
|
||||
dist = sqrtf(spb4 * spb4 + spb0 * spb0);
|
||||
|
||||
if (g_Vars.lvupdate240freal > PALUPF(4)) {
|
||||
lvupdate240f = PALUPF(4);
|
||||
if (g_Vars.lvupdate60freal > PALUPF(4)) {
|
||||
lvupdate60f = PALUPF(4);
|
||||
lvupdate240 = 4;
|
||||
} else {
|
||||
lvupdate240f = g_Vars.lvupdate240freal;
|
||||
lvupdate240 = g_Vars.lvupdate240_60;
|
||||
lvupdate60f = g_Vars.lvupdate60freal;
|
||||
lvupdate240 = g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
for (i = 0; i < lvupdate240; i++) {
|
||||
spa8 += (dist - spa8) * PALUPF(0.1f);
|
||||
}
|
||||
|
||||
spa8 += 3.75f * lvupdate240f;
|
||||
spa8 += 3.75f * lvupdate60f;
|
||||
|
||||
if (g_Vars.currentplayer->crouchoffset < -45.0f) {
|
||||
spa8 *= 0.35f;
|
||||
@@ -1532,9 +1532,9 @@ void bwalk0f0c69b8(void)
|
||||
}
|
||||
|
||||
if (maxspeed >= 0.75f) {
|
||||
g_Vars.currentplayer->bondbreathing += (maxspeed - 0.75f) * g_Vars.lvupdate240freal / 900;
|
||||
g_Vars.currentplayer->bondbreathing += (maxspeed - 0.75f) * g_Vars.lvupdate60freal / 900;
|
||||
} else {
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f - maxspeed) * g_Vars.lvupdate240freal / 2700;
|
||||
g_Vars.currentplayer->bondbreathing -= (0.75f - maxspeed) * g_Vars.lvupdate60freal / 2700;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->bondbreathing < 0.0f) {
|
||||
@@ -1543,7 +1543,7 @@ void bwalk0f0c69b8(void)
|
||||
g_Vars.currentplayer->bondbreathing = 1.0f;
|
||||
}
|
||||
|
||||
mult = var80075c00[1].unk0c * 0.5f * g_Vars.lvupdate240freal;
|
||||
mult = var80075c00[1].unk0c * 0.5f * g_Vars.lvupdate60freal;
|
||||
spe0 = (g_Vars.currentplayer->speedsideways * spc0 + spc4) * mult;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -1565,21 +1565,21 @@ void bwalk0f0c69b8(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
spcc.f[0] += (spd8 * g_Vars.currentplayer->bond2.unk00.f[0] - spdc * g_Vars.currentplayer->bond2.unk00.f[2]) * g_Vars.lvupdate240freal;
|
||||
spcc.f[2] += (spd8 * g_Vars.currentplayer->bond2.unk00.f[2] + spdc * g_Vars.currentplayer->bond2.unk00.f[0]) * g_Vars.lvupdate240freal;
|
||||
spcc.f[0] += (spd8 * g_Vars.currentplayer->bond2.unk00.f[0] - spdc * g_Vars.currentplayer->bond2.unk00.f[2]) * g_Vars.lvupdate60freal;
|
||||
spcc.f[2] += (spd8 * g_Vars.currentplayer->bond2.unk00.f[2] + spdc * g_Vars.currentplayer->bond2.unk00.f[0]) * g_Vars.lvupdate60freal;
|
||||
spcc.f[0] += spb4;
|
||||
spcc.f[2] += spb0;
|
||||
|
||||
bmoveUpdateMoveInitSpeed(&spcc);
|
||||
|
||||
if (debugIsTurboModeEnabled()) {
|
||||
spcc.f[0] += (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedforwards - g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedsideways) * g_Vars.lvupdate240freal * 10.0f;
|
||||
spcc.f[2] += (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedforwards + g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedsideways) * g_Vars.lvupdate240freal * 10.0f;
|
||||
spcc.f[0] += (g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedforwards - g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedsideways) * g_Vars.lvupdate60freal * 10.0f;
|
||||
spcc.f[2] += (g_Vars.currentplayer->bond2.unk00.f[2] * g_Vars.currentplayer->speedforwards + g_Vars.currentplayer->bond2.unk00.f[0] * g_Vars.currentplayer->speedsideways) * g_Vars.lvupdate60freal * 10.0f;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->bondforcespeed.f[0] != 0.0f || g_Vars.currentplayer->bondforcespeed.f[2] != 0.0f) {
|
||||
spcc.f[0] += g_Vars.currentplayer->bondforcespeed.f[0] * g_Vars.lvupdate240freal;
|
||||
spcc.f[2] += g_Vars.currentplayer->bondforcespeed.f[2] * g_Vars.lvupdate240freal;
|
||||
spcc.f[0] += g_Vars.currentplayer->bondforcespeed.f[0] * g_Vars.lvupdate60freal;
|
||||
spcc.f[2] += g_Vars.currentplayer->bondforcespeed.f[2] * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->onladder) {
|
||||
@@ -1587,7 +1587,7 @@ void bwalk0f0c69b8(void)
|
||||
|
||||
sp74 = -(spcc.f[0] * g_Vars.currentplayer->laddernormal.f[0] + spcc.f[2] * g_Vars.currentplayer->laddernormal.f[2]);
|
||||
|
||||
if (-4.0f * g_Vars.lvupdate240freal < sp74) {
|
||||
if (-4.0f * g_Vars.lvupdate60freal < sp74) {
|
||||
if (sp74 < 0.0f) {
|
||||
spcc.f[0] += sp74 * g_Vars.currentplayer->laddernormal.f[0];
|
||||
spcc.f[2] += sp74 * g_Vars.currentplayer->laddernormal.f[2];
|
||||
|
||||
+19
-19
@@ -1258,7 +1258,7 @@ s32 botTick(struct prop *prop)
|
||||
chr->blurdrugamount = TICKS(5000);
|
||||
}
|
||||
|
||||
chr->blurdrugamount -= g_Vars.lvupdate240_60 * (chr->blurnumtimesdied + 1);
|
||||
chr->blurdrugamount -= g_Vars.lvupdate60 * (chr->blurnumtimesdied + 1);
|
||||
|
||||
if (chr->blurdrugamount <= 0) {
|
||||
chr->blurdrugamount = 0;
|
||||
@@ -1312,7 +1312,7 @@ s32 botTick(struct prop *prop)
|
||||
targetangle += M_BADTAU;
|
||||
}
|
||||
|
||||
tweenangle = g_Vars.lvupdate240freal * 0.061590049415827f;
|
||||
tweenangle = g_Vars.lvupdate60freal * 0.061590049415827f;
|
||||
diffangle = targetangle - oldangle;
|
||||
|
||||
if (diffangle < -M_PI) {
|
||||
@@ -1353,7 +1353,7 @@ s32 botTick(struct prop *prop)
|
||||
aibot->speedtheta -= M_BADTAU;
|
||||
}
|
||||
|
||||
aibot->speedtheta /= g_Vars.lvupdate240freal;
|
||||
aibot->speedtheta /= g_Vars.lvupdate60freal;
|
||||
aibot->speedtheta *= 16.236389160156f;
|
||||
|
||||
while (newangle >= M_BADTAU) {
|
||||
@@ -1521,7 +1521,7 @@ void bot0f1921f8(struct chrdata *chr, f32 *move)
|
||||
move[1] += chr->aibot->unk0b8 * tmp;
|
||||
}
|
||||
#else
|
||||
tmp = (PAL ? 0.065f : 0.055000007152557f) * g_Vars.lvupdate240freal / g_Vars.lvupdate240;
|
||||
tmp = (PAL ? 0.065f : 0.055000007152557f) * g_Vars.lvupdate60freal / g_Vars.lvupdate240;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240; i++) {
|
||||
chr->aibot->unk0b4 = (PAL ? 0.935f : 0.945f) * chr->aibot->unk0b4 + sp30[0];
|
||||
@@ -1712,7 +1712,7 @@ void botSetTarget(struct chrdata *botchr, s32 propnum)
|
||||
botchr->aibot->targetcloaktimer60 = TICKS(120);
|
||||
} else {
|
||||
if (botchr->aibot->targetcloaktimer60 > 0) {
|
||||
botchr->aibot->targetcloaktimer60 -= g_Vars.lvupdate240_60;
|
||||
botchr->aibot->targetcloaktimer60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1763,7 +1763,7 @@ void bot0f192a74(struct chrdata *chr)
|
||||
f32 fVar11;
|
||||
f32 tmp;
|
||||
|
||||
aibot->unk1cc -= g_Vars.lvupdate240_60;
|
||||
aibot->unk1cc -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->unk1cc <= 0) {
|
||||
aibot->unk1d0 = random();
|
||||
@@ -1777,7 +1777,7 @@ void bot0f192a74(struct chrdata *chr)
|
||||
aibot->unk1d4 -= g_Vars.diffframe60;
|
||||
}
|
||||
|
||||
tmp = g_BotDifficulties[diff].unk10 * (aibot->speedtheta * g_Vars.lvupdate240f);
|
||||
tmp = g_BotDifficulties[diff].unk10 * (aibot->speedtheta * g_Vars.lvupdate60f);
|
||||
|
||||
if (tmp < 0) {
|
||||
tmp = -tmp;
|
||||
@@ -1908,7 +1908,7 @@ void botChooseGeneralTarget(struct chrdata *botchr)
|
||||
// However, the usage of canseecloaked appears to be botched.
|
||||
// It is implemented in botIsTargetInvisible, but that function is not
|
||||
// called here while canseecloaked is true.
|
||||
if (random() % TICKS(4 * 60 * 60) < g_MpNumChrs * g_Vars.lvupdate240_60) {
|
||||
if (random() % TICKS(4 * 60 * 60) < g_MpNumChrs * g_Vars.lvupdate60) {
|
||||
aibot->canseecloaked = true;
|
||||
}
|
||||
|
||||
@@ -8782,7 +8782,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
s32 i;
|
||||
|
||||
// Consider updating random values
|
||||
aibot->random2ttl60 -= g_Vars.lvupdate240_60;
|
||||
aibot->random2ttl60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->random2ttl60 < 0) {
|
||||
aibot->random2ttl60 = 1800 + random() % 14400;
|
||||
@@ -8794,7 +8794,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
for (i = 0; i != 2; i++) {
|
||||
// Reload if timer has reached 0
|
||||
if (aibot->timeuntilreload60[i] > 0) {
|
||||
aibot->timeuntilreload60[i] -= g_Vars.lvupdate240_60;
|
||||
aibot->timeuntilreload60[i] -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->timeuntilreload60[i] <= 0) {
|
||||
botactReload(chr, i, true);
|
||||
@@ -8816,7 +8816,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
|
||||
// Handle switching weapons
|
||||
if (aibot->changeguntimer60 > 0) {
|
||||
aibot->changeguntimer60 -= g_Vars.lvupdate240_60;
|
||||
aibot->changeguntimer60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->changeguntimer60 <= 0) {
|
||||
struct invitem *item = botinvGetItem(chr, aibot->weaponnum);
|
||||
@@ -8898,7 +8898,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
// out which commands to apply automatically based on the scenario.
|
||||
if (aibot->teamisonlyai) {
|
||||
if (aibot->commandtimer60 > 0) {
|
||||
aibot->commandtimer60 -= g_Vars.lvupdate240_60;
|
||||
aibot->commandtimer60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (aibot->commandtimer60 <= 0) {
|
||||
@@ -9619,7 +9619,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
}
|
||||
|
||||
if (aibot->returntodefendtimer60 > 0) {
|
||||
aibot->returntodefendtimer60 -= g_Vars.lvupdate240_60;
|
||||
aibot->returntodefendtimer60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (xdist > 40 || zdist > 40 || (ydist > 200 && !chr->inlift)) {
|
||||
@@ -9714,7 +9714,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
// nextbullettimer60 is positive if the chr is firing
|
||||
// It's used to implement the weapon's fire rate correctly
|
||||
if (aibot->nextbullettimer60[i] > 0) {
|
||||
aibot->nextbullettimer60[i] -= g_Vars.lvupdate240_60;
|
||||
aibot->nextbullettimer60[i] -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
// Don't shoot the left hand on the same frame as the right
|
||||
@@ -9743,7 +9743,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
// This seems a bit backwards in that the timer
|
||||
// is set to negative (ie. punch) then the check
|
||||
// below has to cancel it by setting it back to 0.
|
||||
aibot->punchtimer60[i] -= g_Vars.lvupdate240_60;
|
||||
aibot->punchtimer60[i] -= g_Vars.lvupdate60;
|
||||
|
||||
if (chr->target != -1
|
||||
&& aibot->targetinsight
|
||||
@@ -9846,7 +9846,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
// Hand throwing a weapon
|
||||
if (i == HAND_RIGHT) {
|
||||
if (aibot->throwtimer60 > 0) {
|
||||
aibot->throwtimer60 -= g_Vars.lvupdate240_60;
|
||||
aibot->throwtimer60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (chr->aibot->throwtimer60 <= 0) {
|
||||
@@ -9895,7 +9895,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
s32 newchargei;
|
||||
s32 oldchargei = aibot->maulercharge[i];
|
||||
|
||||
aibot->maulercharge[i] += g_Vars.lvupdate240freal * 0.05f;
|
||||
aibot->maulercharge[i] += g_Vars.lvupdate60freal * 0.05f;
|
||||
|
||||
if (aibot->maulercharge[i] > 5) {
|
||||
aibot->maulercharge[i] = 5;
|
||||
@@ -9928,7 +9928,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
if (aibot->weaponnum == WEAPON_CYCLONE && aibot->gunfunc == FUNC_SECONDARY) {
|
||||
aibot->cyclonedischarging[i] = true;
|
||||
} else if (aibot->weaponnum == WEAPON_REAPER) {
|
||||
aibot->reaperspeed[i] += g_Vars.lvupdate240_60;
|
||||
aibot->reaperspeed[i] += g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->reaperspeed[i] > 90) {
|
||||
aibot->reaperspeed[i] = 90;
|
||||
@@ -9941,7 +9941,7 @@ void botTickUnpaused(struct chrdata *chr)
|
||||
if (!firing && aibot->reaperspeed[i] > 0) {
|
||||
firing = true;
|
||||
|
||||
aibot->reaperspeed[i] -= g_Vars.lvupdate240_60;
|
||||
aibot->reaperspeed[i] -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->reaperspeed[i] < 0) {
|
||||
aibot->reaperspeed[i] = 0;
|
||||
|
||||
+3
-3
@@ -142,8 +142,8 @@ void botcmdTickDistMode(struct chrdata *chr)
|
||||
aibot->unk050 = targetprop;
|
||||
aibot->unk09d = TICKS(20) + (random() % TICKS(120));
|
||||
} else if (aibot->unk050) {
|
||||
if (aibot->unk09d > g_Vars.lvupdate240_60) {
|
||||
aibot->unk09d -= g_Vars.lvupdate240_60;
|
||||
if (aibot->unk09d > g_Vars.lvupdate60) {
|
||||
aibot->unk09d -= g_Vars.lvupdate60;
|
||||
newmode = BOTDISTMODE_OK;
|
||||
} else {
|
||||
aibot->unk050 = NULL;
|
||||
@@ -160,7 +160,7 @@ void botcmdTickDistMode(struct chrdata *chr)
|
||||
aibot->distmode = newmode;
|
||||
|
||||
if (aibot->distmodettl60 >= 0) {
|
||||
aibot->distmodettl60 -= g_Vars.lvupdate240_60;
|
||||
aibot->distmodettl60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (newmode != prevmode
|
||||
|
||||
+4
-4
@@ -884,13 +884,13 @@ void botinvTick(struct chrdata *chr)
|
||||
weaponindex = mpGetWeaponSlotByWeaponNum(aibot->weaponnum);
|
||||
|
||||
if (weaponindex >= 0) {
|
||||
aibot->equipdurations60[weaponindex][aibot->gunfunc] += g_Vars.lvupdate240_60;
|
||||
aibot->equipdurations60[weaponindex][aibot->gunfunc] += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
// Every 60-61 seconds, decrease suicide values. These values are used when
|
||||
// determining which gun to use. The more suicides with a particular gun and
|
||||
// function, the less likely the aibot is to use it. This value cools off.
|
||||
aibot->dampensuicidesttl60 -= g_Vars.lvupdate240_60;
|
||||
aibot->dampensuicidesttl60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->dampensuicidesttl60 < 0) {
|
||||
aibot->dampensuicidesttl60 = TICKS(3600) + random() % TICKS(60);
|
||||
@@ -902,7 +902,7 @@ void botinvTick(struct chrdata *chr)
|
||||
}
|
||||
|
||||
// Every 10-60 seconds, generate new unk2a8 values
|
||||
aibot->unk2a4 -= g_Vars.lvupdate240_60;
|
||||
aibot->unk2a4 -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->unk2a4 < 0) {
|
||||
aibot->unk2a4 = TICKS(600) + random() % TICKS(3000);
|
||||
@@ -920,7 +920,7 @@ void botinvTick(struct chrdata *chr)
|
||||
|
||||
// Every 2-12 seconds, generate a new random value which is used as a factor
|
||||
// in various aibot logic.
|
||||
aibot->random1ttl60 -= g_Vars.lvupdate240_60;
|
||||
aibot->random1ttl60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (aibot->random1ttl60 < 0) {
|
||||
aibot->random1ttl60 = TICKS(120) + random() % TICKS(600);
|
||||
|
||||
@@ -17,7 +17,7 @@ void casingTick(struct casing *casing)
|
||||
f32 sp68[3][3];
|
||||
s32 i;
|
||||
s32 j;
|
||||
f32 lvupdate = g_Vars.lvupdate240freal;
|
||||
f32 lvupdate = g_Vars.lvupdate60freal;
|
||||
f32 sp58;
|
||||
|
||||
tmp2 = lvupdate * (1.0f / 3.6f);
|
||||
|
||||
+43
-43
@@ -526,8 +526,8 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
u16 floorflags = 0;
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
s32 lvupdate240;
|
||||
f32 lvupdate240f;
|
||||
f32 lvupdate240freal;
|
||||
f32 lvupdate60f;
|
||||
f32 lvupdate60freal;
|
||||
struct coord spd0;
|
||||
s16 spc0[8];
|
||||
#endif
|
||||
@@ -537,8 +537,8 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
// A macro is used here for readability
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
lvupdate240 = g_Vars.lvupdate240;
|
||||
lvupdate240f = g_Vars.lvupdate240f;
|
||||
lvupdate240freal = g_Vars.lvupdate240freal;
|
||||
lvupdate60f = g_Vars.lvupdate60f;
|
||||
lvupdate60freal = g_Vars.lvupdate60freal;
|
||||
|
||||
#define VAR(property) property
|
||||
#else
|
||||
@@ -581,20 +581,20 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
chr->aibot->unk078--;
|
||||
|
||||
if (lvupdate240 >= 25) {
|
||||
lvupdate240f = 4.0f;
|
||||
lvupdate240freal = PALUPF(4.0f);
|
||||
lvupdate60f = 4.0f;
|
||||
lvupdate60freal = PALUPF(4.0f);
|
||||
lvupdate240 = 16;
|
||||
}
|
||||
}
|
||||
} else if (chr->onladder
|
||||
&& ((chr->prop->flags & (PROPFLAG_ONANYSCREENTHISTICK | PROPFLAG_ONANYSCREENPREVTICK)) == 0)
|
||||
&& lvupdate240 >= 25) {
|
||||
lvupdate240f = 4.0f;
|
||||
lvupdate240freal = PALUPF(4.0f);
|
||||
lvupdate60f = 4.0f;
|
||||
lvupdate60freal = PALUPF(4.0f);
|
||||
lvupdate240 = 16;
|
||||
}
|
||||
|
||||
bot0f1921f8(chr, move, lvupdate240, lvupdate240freal);
|
||||
bot0f1921f8(chr, move, lvupdate240, lvupdate60freal);
|
||||
#else
|
||||
bot0f1921f8(chr, move);
|
||||
#endif
|
||||
@@ -634,32 +634,32 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
|
||||
bmove0f0cb904(&chr->aibot->shotspeed);
|
||||
|
||||
arg2->x += chr->aibot->shotspeed.x * var80075c00[1].unk0c * VAR(lvupdate240freal) * 0.5f;
|
||||
arg2->z += chr->aibot->shotspeed.z * var80075c00[1].unk0c * VAR(lvupdate240freal) * 0.5f;
|
||||
arg2->x += chr->aibot->shotspeed.x * var80075c00[1].unk0c * VAR(lvupdate60freal) * 0.5f;
|
||||
arg2->z += chr->aibot->shotspeed.z * var80075c00[1].unk0c * VAR(lvupdate60freal) * 0.5f;
|
||||
}
|
||||
|
||||
if (chr->actiontype == ACT_DIE && chr->act_die.timeextra > 0.0f) {
|
||||
f32 speed = model->anim->playspeed * VAR(lvupdate240f) * (chr->act_die.timeextra - chr->act_die.elapseextra) / chr->act_die.timeextra;
|
||||
f32 speed = model->anim->playspeed * VAR(lvupdate60f) * (chr->act_die.timeextra - chr->act_die.elapseextra) / chr->act_die.timeextra;
|
||||
|
||||
arg2->x += chr->act_die.extraspeed.x * speed;
|
||||
arg2->z += chr->act_die.extraspeed.z * speed;
|
||||
|
||||
yincrement += chr->act_die.extraspeed.y * speed;
|
||||
|
||||
chr->act_die.elapseextra += VAR(lvupdate240f) * model->anim->playspeed;
|
||||
chr->act_die.elapseextra += VAR(lvupdate60f) * model->anim->playspeed;
|
||||
|
||||
if (chr->act_die.elapseextra > chr->act_die.timeextra) {
|
||||
chr->act_die.timeextra = 0.0f;
|
||||
}
|
||||
} else if (chr->timeextra > 0.0f) {
|
||||
f32 speed = model->anim->playspeed * VAR(lvupdate240f) * (chr->timeextra - chr->elapseextra) / chr->timeextra;
|
||||
f32 speed = model->anim->playspeed * VAR(lvupdate60f) * (chr->timeextra - chr->elapseextra) / chr->timeextra;
|
||||
|
||||
arg2->x += chr->extraspeed.x * speed;
|
||||
arg2->z += chr->extraspeed.z * speed;
|
||||
|
||||
yincrement += chr->extraspeed.y * speed;
|
||||
|
||||
chr->elapseextra += VAR(lvupdate240f) * model->anim->playspeed;
|
||||
chr->elapseextra += VAR(lvupdate60f) * model->anim->playspeed;
|
||||
|
||||
if (chr->elapseextra > chr->timeextra) {
|
||||
chr->timeextra = 0.0f;
|
||||
@@ -667,8 +667,8 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
}
|
||||
|
||||
if (chr->pushspeed[0] != 0.0f || chr->pushspeed[1] != 0.0f) {
|
||||
arg2->x += chr->pushspeed[0] * VAR(lvupdate240freal);
|
||||
arg2->z += chr->pushspeed[1] * VAR(lvupdate240freal);
|
||||
arg2->x += chr->pushspeed[0] * VAR(lvupdate60freal);
|
||||
arg2->z += chr->pushspeed[1] * VAR(lvupdate60freal);
|
||||
|
||||
chr->pushspeed[0] *= 0.9f;
|
||||
chr->pushspeed[1] *= 0.9f;
|
||||
@@ -677,7 +677,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
f32 pushdist = sqrtf(chr->pushspeed[0] * chr->pushspeed[0] + chr->pushspeed[1] * chr->pushspeed[1]);
|
||||
|
||||
if (pushdist > 0.0f) {
|
||||
pushdist = 0.1f * VAR(lvupdate240freal) / pushdist;
|
||||
pushdist = 0.1f * VAR(lvupdate60freal) / pushdist;
|
||||
|
||||
if (pushdist >= 1.0f) {
|
||||
chr->pushspeed[0] = 0.0f;
|
||||
@@ -693,8 +693,8 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
}
|
||||
}
|
||||
|
||||
arg2->x += chr->fallspeed.x * VAR(lvupdate240freal);
|
||||
arg2->z += chr->fallspeed.z * VAR(lvupdate240freal);
|
||||
arg2->x += chr->fallspeed.x * VAR(lvupdate60freal);
|
||||
arg2->z += chr->fallspeed.z * VAR(lvupdate60freal);
|
||||
|
||||
if (race == RACE_EYESPY) {
|
||||
struct eyespy *eyespy = chrToEyespy(chr);
|
||||
@@ -707,7 +707,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
} else if (chr->actiontype == ACT_SKJUMP
|
||||
&& chr->act_skjump.state == SKJUMPSTATE_AIRBORNE
|
||||
&& !chr->act_skjump.needsnewanim
|
||||
&& g_Vars.lvupdate240_60 != 0) {
|
||||
&& g_Vars.lvupdate60 != 0) {
|
||||
arg2->x = chr->act_skjump.pos.x;
|
||||
yincrement = chr->act_skjump.pos.y;
|
||||
arg2->z = chr->act_skjump.pos.z;
|
||||
@@ -752,7 +752,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
if (chr->actiontype == ACT_SKJUMP
|
||||
&& chr->act_skjump.state == SKJUMPSTATE_AIRBORNE
|
||||
&& !chr->act_skjump.needsnewanim
|
||||
&& g_Vars.lvupdate240_60 != 0) {
|
||||
&& g_Vars.lvupdate60 != 0) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (chr0f01f264(chr, arg2, spfc, yincrement, true)) {
|
||||
chr->manground += yincrement;
|
||||
@@ -824,7 +824,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
if (chr->aibot
|
||||
&& chr->aibot->unk078 == 0
|
||||
&& ground < -100000
|
||||
&& g_Vars.lvupdate240_60 >= 5
|
||||
&& g_Vars.lvupdate60 >= 5
|
||||
&& (chr->prop->flags & PROPFLAG_ONANYSCREENPREVTICK) == 0) {
|
||||
chr->aibot->unk078 = 10;
|
||||
|
||||
@@ -834,7 +834,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
|
||||
roomsCopy(prop->rooms, spfc);
|
||||
|
||||
lvupdate240freal = 0.0f;
|
||||
lvupdate60freal = 0.0f;
|
||||
|
||||
ground = cdFindGroundInfoAtCyl(arg2, chr->radius, spfc, &chr->floorcol, &chr->floortype, &floorflags, &chr->floorroom, &inlift, &lift);
|
||||
}
|
||||
@@ -881,7 +881,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
|
||||
sp68 = chr->fallspeed.y;
|
||||
|
||||
func0f0965e4(&yincrement, &sp68, VAR(lvupdate240freal));
|
||||
func0f0965e4(&yincrement, &sp68, VAR(lvupdate60freal));
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (chr0f01f264(chr, arg2, spfc, yincrement, false))
|
||||
@@ -919,7 +919,7 @@ bool chr0f01f378(struct model *model, struct coord *arg1, struct coord *arg2, f3
|
||||
}
|
||||
}
|
||||
} else if (chr->manground <= chr->ground) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
chr->sumground = chr->sumground * (PAL ? 0.88120001554489f : 0.9f) + chr->ground;
|
||||
chr->fallspeed.x *= (PAL ? 0.88120001554489f : 0.9f);
|
||||
chr->fallspeed.z *= (PAL ? 0.88120001554489f : 0.9f);
|
||||
@@ -1476,7 +1476,7 @@ f32 chr0f02124c(void)
|
||||
void chrUpdateAimProperties(struct chrdata *chr)
|
||||
{
|
||||
if (chr->aimendcount >= 2) {
|
||||
f32 mult = g_Vars.lvupdate240f / chr->aimendcount;
|
||||
f32 mult = g_Vars.lvupdate60f / chr->aimendcount;
|
||||
|
||||
if (mult > 1) {
|
||||
mult = 1;
|
||||
@@ -1487,7 +1487,7 @@ void chrUpdateAimProperties(struct chrdata *chr)
|
||||
chr->aimupback += (chr->aimendback - chr->aimupback) * mult;
|
||||
chr->aimsideback += (chr->aimendsideback - chr->aimsideback) * mult;
|
||||
|
||||
chr->aimendcount -= g_Vars.lvupdate240_60;
|
||||
chr->aimendcount -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
chr->aimuplshoulder = chr->aimendlshoulder;
|
||||
chr->aimuprshoulder = chr->aimendrshoulder;
|
||||
@@ -2062,7 +2062,7 @@ void chrUpdateCloak(struct chrdata *chr)
|
||||
|
||||
// Decrement cloakpause
|
||||
if (chr->cloakpause > 0) {
|
||||
chr->cloakpause -= g_Vars.lvupdate240_60;
|
||||
chr->cloakpause -= g_Vars.lvupdate60;
|
||||
|
||||
if (chr->cloakpause < 1) {
|
||||
chr->cloakpause = 0;
|
||||
@@ -2076,7 +2076,7 @@ void chrUpdateCloak(struct chrdata *chr)
|
||||
|
||||
if (qty > 0 && !chrIsDead(chr)) {
|
||||
if (chr->hidden & CHRHFLAG_CLOAKED) {
|
||||
qty -= g_Vars.lvupdate240_60;
|
||||
qty -= g_Vars.lvupdate60;
|
||||
|
||||
if (qty <= 0) {
|
||||
qty = 0;
|
||||
@@ -2092,7 +2092,7 @@ void chrUpdateCloak(struct chrdata *chr)
|
||||
&& !chrIsDead(chr)
|
||||
&& botactGetAmmoQuantityByWeapon(chr->aibot, WEAPON_RCP120, 0, 1) > 0) {
|
||||
if (chr->hidden & CHRHFLAG_CLOAKED) {
|
||||
chr->aibot->unk2c4 += LVUPDATE240FREAL() * 0.4f;
|
||||
chr->aibot->unk2c4 += LVUPDATE60FREAL() * 0.4f;
|
||||
|
||||
if (chr->aibot->unk2c4 >= 1) {
|
||||
qty = chr->aibot->unk2c4;
|
||||
@@ -2142,7 +2142,7 @@ void chrUpdateCloak(struct chrdata *chr)
|
||||
if (qty > 0) {
|
||||
if (chr->hidden & CHRHFLAG_CLOAKED) {
|
||||
// Cloak is effective
|
||||
qty -= g_Vars.lvupdate240_60;
|
||||
qty -= g_Vars.lvupdate60;
|
||||
|
||||
if (qty < 1) {
|
||||
qty = 0;
|
||||
@@ -2185,7 +2185,7 @@ void chrUpdateCloak(struct chrdata *chr)
|
||||
chr->cloakfadefrac = fadefrac;
|
||||
}
|
||||
} else {
|
||||
s32 tmp = chr->cloakfadefrac + g_Vars.lvupdate240_60;
|
||||
s32 tmp = chr->cloakfadefrac + g_Vars.lvupdate60;
|
||||
chr->cloakfadefrac = tmp % 127;
|
||||
}
|
||||
} else {
|
||||
@@ -2321,8 +2321,8 @@ bool chrTickBeams(struct prop *prop)
|
||||
}
|
||||
|
||||
if (chr->aibot && chr->aibot->unk058 > 0) {
|
||||
if (chr->aibot->unk058 > g_Vars.lvupdate240_60) {
|
||||
chr->aibot->unk058 -= g_Vars.lvupdate240_60;
|
||||
if (chr->aibot->unk058 > g_Vars.lvupdate60) {
|
||||
chr->aibot->unk058 -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
chr->aibot->unk058 = 0;
|
||||
}
|
||||
@@ -2387,7 +2387,7 @@ s32 chrTick(struct prop *prop)
|
||||
|
||||
if (chr->drugheadsway > 0.0f) {
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
chr->drugheadsway -= 0.175f * g_Vars.lvupdate240freal;
|
||||
chr->drugheadsway -= 0.175f * g_Vars.lvupdate60freal;
|
||||
#else
|
||||
chr->drugheadsway -= 0.04375f * g_Vars.lvupdate240;
|
||||
#endif
|
||||
@@ -2397,7 +2397,7 @@ s32 chrTick(struct prop *prop)
|
||||
}
|
||||
} else if (chr->drugheadsway < 0.0f) {
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
chr->drugheadsway += 0.175f * g_Vars.lvupdate240freal;
|
||||
chr->drugheadsway += 0.175f * g_Vars.lvupdate60freal;
|
||||
#else
|
||||
chr->drugheadsway += 0.04375f * g_Vars.lvupdate240;
|
||||
#endif
|
||||
@@ -2689,7 +2689,7 @@ s32 chrTick(struct prop *prop)
|
||||
sp210.unk10 = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
|
||||
if (fulltick && g_CurModelChr->flinchcnt >= 0) {
|
||||
g_CurModelChr->flinchcnt += g_Vars.lvupdate240_60;
|
||||
g_CurModelChr->flinchcnt += g_Vars.lvupdate60;
|
||||
|
||||
if (g_CurModelChr->flinchcnt >= (PAL ? 24 : 30)) {
|
||||
g_CurModelChr->flinchcnt = -1;
|
||||
@@ -6177,8 +6177,8 @@ Gfx *chrRenderShieldComponent(Gfx *gdl, struct shieldhit *hit, struct prop *prop
|
||||
blue3 = 0;
|
||||
}
|
||||
|
||||
st1 = (sinf((g_Vars.thisframe240 % TICKS(1200)) * PALUPF(0.005235154f)) + 1.0f) * 0.5f * 32.0f * 32.0f;
|
||||
st2 = (cosf((g_Vars.thisframe240 % TICKS(1200)) * PALUPF(0.005235154f)) + 1.0f) * 0.5f * 32.0f * 32.0f;
|
||||
st1 = (sinf((g_Vars.thisframestart240 % TICKS(1200)) * PALUPF(0.005235154f)) + 1.0f) * 0.5f * 32.0f * 32.0f;
|
||||
st2 = (cosf((g_Vars.thisframestart240 % TICKS(1200)) * PALUPF(0.005235154f)) + 1.0f) * 0.5f * 32.0f * 32.0f;
|
||||
st3 = st1 + 512;
|
||||
st4 = st2 + 512;
|
||||
|
||||
@@ -6214,7 +6214,7 @@ Gfx *chrRenderShieldComponent(Gfx *gdl, struct shieldhit *hit, struct prop *prop
|
||||
|
||||
if ((prop->type == PROPTYPE_OBJ || prop->type == PROPTYPE_WEAPON || prop->type == PROPTYPE_DOOR)
|
||||
&& (prop->obj->flags3 & OBJFLAG3_SHOWSHIELD)) {
|
||||
f32 mult = (sinf((g_Vars.thisframe240 % TICKS(350)) * (PAL ? 0.021588264033198f : 0.0179491f)) + 1.0f) * 0.5f;
|
||||
f32 mult = (sinf((g_Vars.thisframestart240 % TICKS(350)) * (PAL ? 0.021588264033198f : 0.0179491f)) + 1.0f) * 0.5f;
|
||||
|
||||
colours->a = 50 + (u8) (s32) (120.0f * mult);
|
||||
colours->r = (u8) red2 + 50.0f * mult;
|
||||
@@ -7095,13 +7095,13 @@ void shieldhitsTick(void)
|
||||
if (g_ShieldHits[i].prop) {
|
||||
if (g_ShieldHits[i].lvframe60 >= g_Vars.lvframe60 - TICKS(80)) {
|
||||
changed = true;
|
||||
g_ShieldHits[i].shield += (propGetShieldThing(&g_ShieldHits[i].prop) - g_ShieldHits[i].shield) * g_Vars.lvupdate240f * (PAL ? 0.0151515156f : 0.0125f);
|
||||
g_ShieldHits[i].shield += (propGetShieldThing(&g_ShieldHits[i].prop) - g_ShieldHits[i].shield) * g_Vars.lvupdate60f * (PAL ? 0.0151515156f : 0.0125f);
|
||||
}
|
||||
|
||||
for (j = 0; j < 32; j++) {
|
||||
if (g_ShieldHits[i].unk018[j] >= 0) {
|
||||
changed = true;
|
||||
time60 = g_ShieldHits[i].unk018[j] + g_Vars.lvupdate240_60;
|
||||
time60 = g_ShieldHits[i].unk018[j] + g_Vars.lvupdate60;
|
||||
|
||||
if (g_ShieldHits[i].unk018[j] < 1 && time60 > 0) {
|
||||
index = chr0f02932c(g_ShieldHits[i].prop, j);
|
||||
|
||||
+33
-33
@@ -5471,14 +5471,14 @@ void chrGoPosConsiderRestart(struct chrdata *chr)
|
||||
}
|
||||
|
||||
chr->act_gopos.restartttl = value;
|
||||
} else if (chr->act_gopos.restartttl <= (u16)g_Vars.lvupdate240_60) {
|
||||
} else if (chr->act_gopos.restartttl <= (u16)g_Vars.lvupdate60) {
|
||||
if (chr->aibot) {
|
||||
botCheckFetch(chr);
|
||||
} else {
|
||||
chrGoToRoomPos(chr, &chr->act_gopos.endpos, chr->act_gopos.endrooms, chr->act_gopos.flags);
|
||||
}
|
||||
} else {
|
||||
chr->act_gopos.restartttl -= (u16)g_Vars.lvupdate240_60;
|
||||
chr->act_gopos.restartttl -= (u16)g_Vars.lvupdate60;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5671,7 +5671,7 @@ void chrNavTickMagic(struct chrdata *chr, struct waydata *waydata, f32 speed, st
|
||||
chr->invalidmove = 0;
|
||||
chr->lastmoveok60 = g_Vars.lvframe60;
|
||||
|
||||
waydata->magicdone += speed * modelGetAbsAnimSpeed(chr->model) * g_Vars.lvupdate240freal;
|
||||
waydata->magicdone += speed * modelGetAbsAnimSpeed(chr->model) * g_Vars.lvupdate60freal;
|
||||
|
||||
if (waydata->magicdone >= waydata->magictotal) {
|
||||
// Reached end of segment
|
||||
@@ -8182,7 +8182,7 @@ void chrTickDead(struct chrdata *chr)
|
||||
|
||||
// If fade is active, handle it
|
||||
if (chr->act_dead.fadetimer60 >= 0) {
|
||||
chr->act_dead.fadetimer60 += g_Vars.lvupdate240_60;
|
||||
chr->act_dead.fadetimer60 += g_Vars.lvupdate60;
|
||||
|
||||
if (chr->act_dead.fadetimer60 >= TICKS(90)) {
|
||||
// Fade finished
|
||||
@@ -8209,7 +8209,7 @@ void chrTickDead(struct chrdata *chr)
|
||||
// Keep corpse for now
|
||||
chr->act_dead.invistimer60 = 0;
|
||||
} else {
|
||||
chr->act_dead.invistimer60 += g_Vars.lvupdate240_60;
|
||||
chr->act_dead.invistimer60 += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (chr->act_dead.fadewheninvis && chr->act_dead.invistimer60 >= TICKS(120)) {
|
||||
@@ -8365,7 +8365,7 @@ void chrTickDie(struct chrdata *chr)
|
||||
|
||||
// Change images randomly
|
||||
if (chr->act_die.drcarollimagedelay > 0) {
|
||||
chr->act_die.drcarollimagedelay -= g_Vars.lvupdate240_60;
|
||||
chr->act_die.drcarollimagedelay -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
chr->act_die.drcarollimagedelay = (random() % TICKS(1000)) * 0.01f + 5.0f;
|
||||
chr->drcarollimage_left = 1 + (s32)((random() % 400) * 0.01f);
|
||||
@@ -8458,7 +8458,7 @@ void chrTickDruggedComingUp(struct chrdata *chr)
|
||||
SFX_THUD_8097,
|
||||
};
|
||||
|
||||
chr->act_druggedcomingup.timer60 += g_Vars.lvupdate240_60;
|
||||
chr->act_druggedcomingup.timer60 += g_Vars.lvupdate60;
|
||||
|
||||
if (chr->act_druggedcomingup.timer60 > 0) {
|
||||
struct animtablerow *row;
|
||||
@@ -8586,7 +8586,7 @@ void chrTickDruggedKo(struct chrdata *chr)
|
||||
|
||||
// If fade is active, handle it
|
||||
if (chr->act_dead.fadetimer60 >= 0) {
|
||||
chr->act_dead.fadetimer60 += g_Vars.lvupdate240_60;
|
||||
chr->act_dead.fadetimer60 += g_Vars.lvupdate60;
|
||||
|
||||
if (chr->act_dead.fadetimer60 >= TICKS(90)) {
|
||||
reap = true;
|
||||
@@ -8601,7 +8601,7 @@ void chrTickDruggedKo(struct chrdata *chr)
|
||||
if (chr->prop->flags & PROPFLAG_ONANYSCREENPREVTICK) {
|
||||
chr->act_dead.invistimer60 = 0;
|
||||
} else {
|
||||
chr->act_dead.invistimer60 += g_Vars.lvupdate240_60;
|
||||
chr->act_dead.invistimer60 += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (chr->act_dead.fadewheninvis && chr->act_dead.invistimer60 >= TICKS(120)) {
|
||||
@@ -8933,7 +8933,7 @@ s32 chrTurn(struct chrdata *chr, s32 turning, f32 endanimframe, f32 speed, f32 t
|
||||
u32 stack;
|
||||
f32 finalangle = chrGetInverseTheta(chr);
|
||||
f32 remainingangle;
|
||||
f32 increment = M_BADTAU / 100.0f * speed * g_Vars.lvupdate240f * model->anim->playspeed;
|
||||
f32 increment = M_BADTAU / 100.0f * speed * g_Vars.lvupdate60f * model->anim->playspeed;
|
||||
|
||||
if (chr->aibot) {
|
||||
struct prop *target = chrGetTargetProp(chr);
|
||||
@@ -9900,7 +9900,7 @@ void chrTickShoot(struct chrdata *chr, s32 handnum)
|
||||
tickspershot *= 1 + sp208;
|
||||
}
|
||||
|
||||
chr->firecount[handnum] += g_Vars.lvupdate240_60;
|
||||
chr->firecount[handnum] += g_Vars.lvupdate60;
|
||||
|
||||
if (chr->firecount[handnum] >= tickspershot) {
|
||||
chr->firecount[handnum] = 0;
|
||||
@@ -10191,9 +10191,9 @@ void chrTickShoot(struct chrdata *chr, s32 handnum)
|
||||
sp15c.y = vector.y * sp168;
|
||||
sp15c.z = vector.z * sp168;
|
||||
|
||||
sp16c.x = sp15c.f[0] * g_Vars.lvupdate240freal + vector.f[0] * spcc;
|
||||
sp16c.y = sp15c.f[1] * g_Vars.lvupdate240freal + vector.f[1] * spcc;
|
||||
sp16c.z = sp15c.f[2] * g_Vars.lvupdate240freal + vector.f[2] * spcc;
|
||||
sp16c.x = sp15c.f[0] * g_Vars.lvupdate60freal + vector.f[0] * spcc;
|
||||
sp16c.y = sp15c.f[1] * g_Vars.lvupdate60freal + vector.f[1] * spcc;
|
||||
sp16c.z = sp15c.f[2] * g_Vars.lvupdate60freal + vector.f[2] * spcc;
|
||||
|
||||
projectileobj->timer240 = func->timer60;
|
||||
|
||||
@@ -10706,7 +10706,7 @@ void chrTickFire(struct chrdata *chr)
|
||||
modelSetAnimSpeed(model, 0.5f, 0);
|
||||
} else {
|
||||
modelSetAnimSpeed(model, 0.1f, 0);
|
||||
chr->act_attack.pausecount += g_Vars.lvupdate240_60;
|
||||
chr->act_attack.pausecount += g_Vars.lvupdate60;
|
||||
}
|
||||
} else {
|
||||
modelSetAnimSpeed(model, 0.5f, 0);
|
||||
@@ -11479,7 +11479,7 @@ void chrTickAttackWalk(struct chrdata *chr)
|
||||
chr->hidden &= ~CHRHFLAG_NEEDANIM;
|
||||
}
|
||||
|
||||
chr->act_attackwalk.frame60count += g_Vars.lvupdate240_60;
|
||||
chr->act_attackwalk.frame60count += g_Vars.lvupdate60;
|
||||
chr->lastwalk60 = g_Vars.lvframe60;
|
||||
|
||||
// If stuck or time exceeded, stop
|
||||
@@ -11703,7 +11703,7 @@ void chrTickRunPos(struct chrdata *chr)
|
||||
func0f043f2c(chr, &chr->act_runpos.pos, 1, &chr->act_runpos.turnspeed);
|
||||
|
||||
if (chr->act_runpos.eta60 > 0) {
|
||||
chr->act_runpos.eta60 -= g_Vars.lvupdate240_60;
|
||||
chr->act_runpos.eta60 -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
fVar7 = 1;
|
||||
|
||||
@@ -11717,7 +11717,7 @@ void chrTickRunPos(struct chrdata *chr)
|
||||
fVar7 = func0f02dff0(ANIM_SKEDAR_RUNNING);
|
||||
}
|
||||
|
||||
chr->act_runpos.neardist += fVar7 * g_Vars.lvupdate240freal * modelGetAbsAnimSpeed(model);
|
||||
chr->act_runpos.neardist += fVar7 * g_Vars.lvupdate60freal * modelGetAbsAnimSpeed(model);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12795,7 +12795,7 @@ void chrTickGoPos(struct chrdata *chr)
|
||||
// obstacles, but is also used as a run countdown timer.
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (chr->goposforce >= 0) {
|
||||
chr->goposforce -= g_Vars.lvupdate240_60;
|
||||
chr->goposforce -= g_Vars.lvupdate60;
|
||||
|
||||
if (chr->goposforce < 0) {
|
||||
chrStop(chr);
|
||||
@@ -13153,7 +13153,7 @@ bool chrStartSkJump(struct chrdata *chr, u8 arg1, u8 arg2, s32 arg3, u8 arg4)
|
||||
|
||||
void chrTickSkJump(struct chrdata *chr)
|
||||
{
|
||||
if (g_Vars.lvupdate240_60 == 0) {
|
||||
if (g_Vars.lvupdate60 == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -13201,8 +13201,8 @@ void chrTickSkJump(struct chrdata *chr)
|
||||
}
|
||||
break;
|
||||
case SKJUMPSTATE_AIRBORNE:
|
||||
chr->act_skjump.pos.x = chr->act_skjump.vel[0] * g_Vars.lvupdate240_60 + chr->prop->pos.x;
|
||||
chr->act_skjump.pos.z = chr->act_skjump.vel[1] * g_Vars.lvupdate240_60 + chr->prop->pos.z;
|
||||
chr->act_skjump.pos.x = chr->act_skjump.vel[0] * g_Vars.lvupdate60 + chr->prop->pos.x;
|
||||
chr->act_skjump.pos.z = chr->act_skjump.vel[1] * g_Vars.lvupdate60 + chr->prop->pos.z;
|
||||
|
||||
if (chr->act_skjump.total60 > 0) {
|
||||
fVar6 = 1.0f - chr->act_skjump.timer60 / (f32)chr->act_skjump.total60;
|
||||
@@ -13225,7 +13225,7 @@ void chrTickSkJump(struct chrdata *chr)
|
||||
}
|
||||
|
||||
if (chr->act_skjump.timer60 > 0) {
|
||||
chr->act_skjump.timer60 -= g_Vars.lvupdate240_60;
|
||||
chr->act_skjump.timer60 -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
chrTryStop(chr);
|
||||
}
|
||||
@@ -13249,23 +13249,23 @@ void chraTick(struct chrdata *chr)
|
||||
}
|
||||
|
||||
if (race == RACE_DRCAROLL) {
|
||||
g_DrCarollDyingTimer += g_Vars.lvupdate240_60;
|
||||
g_DrCarollDyingTimer += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
chr->soundtimer += g_Vars.lvupdate240_60;
|
||||
chr->talktimer += g_Vars.lvupdate240_60;
|
||||
chr->soundtimer += g_Vars.lvupdate60;
|
||||
chr->talktimer += g_Vars.lvupdate60;
|
||||
|
||||
#if VERSION < VERSION_PAL_BETA
|
||||
if (chr->aibot) {
|
||||
chr->aibot->unk030 += g_Vars.lvupdate240_60;
|
||||
chr->aibot->unk030 += g_Vars.lvupdate60;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (chr->hidden & CHRHFLAG_TIMER_RUNNING) {
|
||||
chr->timer60 += g_Vars.lvupdate240_60;
|
||||
chr->timer60 += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
chr->sleep -= g_Vars.lvupdate240_60;
|
||||
chr->sleep -= g_Vars.lvupdate60;
|
||||
|
||||
if (chr->sleep < 0
|
||||
|| (chr->chrflags & CHRCFLAG_00040000)
|
||||
@@ -13287,7 +13287,7 @@ void chraTick(struct chrdata *chr)
|
||||
chr->chrflags |= CHRCFLAG_CONSIDER_DODGE;
|
||||
}
|
||||
} else {
|
||||
chr->aimtesttimer60 -= g_Vars.lvupdate240_60;
|
||||
chr->aimtesttimer60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13585,8 +13585,8 @@ void chraTickBg(void)
|
||||
// 8 60ths since the last frame then the max corpses will be reduced by 2.
|
||||
// This is why corpses are more likely to fade on screen when you change
|
||||
// weapons - the lag spike from changing guns triggers a lower corpse limit.
|
||||
if (g_Vars.lvupdate240_60 > 6) {
|
||||
maxdeadonscreen = maxdeadonscreen - g_Vars.lvupdate240_60 + 6;
|
||||
if (g_Vars.lvupdate60 > 6) {
|
||||
maxdeadonscreen = maxdeadonscreen - g_Vars.lvupdate60 + 6;
|
||||
}
|
||||
|
||||
if (maxdeadonscreen < 0) {
|
||||
@@ -15675,7 +15675,7 @@ void chrAddTargetToBdlist(struct chrdata *chr)
|
||||
s32 i;
|
||||
|
||||
if (target) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
chr->bdlist[chr->bdstart] = target->pos.x - chr->prop->pos.x;
|
||||
chr->bdstart++;
|
||||
chr->bdstart %= 60;
|
||||
|
||||
@@ -671,7 +671,7 @@ void explosionInflictDamage(struct prop *expprop)
|
||||
s32 j;
|
||||
f32 damageradius;
|
||||
|
||||
if (g_Vars.lvupdate240_60 <= 0) {
|
||||
if (g_Vars.lvupdate60 <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -878,7 +878,7 @@ void explosionInflictDamage(struct prop *expprop)
|
||||
}
|
||||
} else if (objIsHealthy(obj)) {
|
||||
// Sustained damage
|
||||
minfrac *= 0.05f * g_Vars.lvupdate240freal;
|
||||
minfrac *= 0.05f * g_Vars.lvupdate60freal;
|
||||
|
||||
if ((obj->hidden & OBJHFLAG_00001000) == 0
|
||||
&& (obj->flags2 & (OBJFLAG2_LINKEDTOSAFE | OBJFLAG2_00200000)) == 0) {
|
||||
@@ -978,7 +978,7 @@ void explosionInflictDamage(struct prop *expprop)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
minfrac *= 0.05f * g_Vars.lvupdate240freal;
|
||||
minfrac *= 0.05f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (g_Vars.normmplayerisrunning) {
|
||||
@@ -1035,11 +1035,11 @@ u32 explosionTick(struct prop *prop)
|
||||
|
||||
maxage = TICKS(type->duration);
|
||||
|
||||
if (g_Vars.lvupdate240_60 == 0) {
|
||||
if (g_Vars.lvupdate60 == 0) {
|
||||
return TICKOP_NONE;
|
||||
}
|
||||
|
||||
lvupdate = g_Vars.lvupdate240_60 < TICKS(15) ? g_Vars.lvupdate240_60 : (s32)TICKS(15);
|
||||
lvupdate = g_Vars.lvupdate60 < TICKS(15) ? g_Vars.lvupdate60 : (s32)TICKS(15);
|
||||
|
||||
#if PAL
|
||||
if (exp->age >= 7 && exp->age < maxage)
|
||||
|
||||
+2
-2
@@ -363,11 +363,11 @@ struct textureconfig *pheadGetTexture(s32 playernum, s32 fileid, u16 deviceseria
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (g_Vars.thisframe240 - g_Menus[playernum].fm.headtextures->lastupdated240 < 20) {
|
||||
if (g_Vars.thisframestart240 - g_Menus[playernum].fm.headtextures->lastupdated240 < 20) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_Menus[playernum].fm.headtextures->lastupdated240 = g_Vars.thisframe240;
|
||||
g_Menus[playernum].fm.headtextures->lastupdated240 = g_Vars.thisframestart240;
|
||||
|
||||
func0f15015c(device, fileid, g_Menus[playernum].fm.headtextures->unk000[freeslot]);
|
||||
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ void footstepCheckMagic(struct chrdata *chr)
|
||||
|
||||
if (debugIsFootstepsEnabled() && PLAYERCOUNT() == 1 && chr->magicanim >= 0) {
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
chr->magicframe += g_Vars.lvupdate240freal * chr->magicspeed;
|
||||
chr->magicframe += g_Vars.lvupdate60freal * chr->magicspeed;
|
||||
#else
|
||||
chr->magicframe += g_Vars.lvupdate240 * chr->magicspeed;
|
||||
#endif
|
||||
|
||||
@@ -52,7 +52,7 @@ void menuTickTimers(void)
|
||||
g_20SecIntervalFrac -= 1.0f;
|
||||
}
|
||||
|
||||
g_Lv80SecIntervalFrac = g_Lv80SecIntervalFrac + LVUPDATE240FREAL() / 4800.0f;
|
||||
g_Lv80SecIntervalFrac = g_Lv80SecIntervalFrac + LVUPDATE60FREAL() / 4800.0f;
|
||||
|
||||
if (g_Lv80SecIntervalFrac > 1.0f) {
|
||||
g_Lv80SecIntervalFrac -= 1.0f;
|
||||
|
||||
@@ -226,7 +226,7 @@ void currentPlayerZoomOut(f32 fovpersec)
|
||||
}
|
||||
|
||||
if (index >= 0) {
|
||||
f32 amount = fovpersec * 0.25f * LVUPDATE240FREAL();
|
||||
f32 amount = fovpersec * 0.25f * LVUPDATE60FREAL();
|
||||
|
||||
if (bgunGetWeaponNum2(0) == WEAPON_FARSIGHT) {
|
||||
amount *= 0.5f;
|
||||
@@ -251,7 +251,7 @@ void currentPlayerZoomIn(f32 fovpersec)
|
||||
}
|
||||
|
||||
if (index >= 0) {
|
||||
f32 amount = fovpersec * 0.25f * LVUPDATE240FREAL();
|
||||
f32 amount = fovpersec * 0.25f * LVUPDATE60FREAL();
|
||||
|
||||
if (bgunGetWeaponNum2(0) == WEAPON_FARSIGHT) {
|
||||
amount *= 0.5f;
|
||||
@@ -476,7 +476,7 @@ f32 gsetGetDamage(struct gset *gset)
|
||||
damage = fullfunc->damage;
|
||||
|
||||
if (gset->weaponnum == WEAPON_REAPER) {
|
||||
damage *= LVUPDATE240FREAL();
|
||||
damage *= LVUPDATE60FREAL();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -188,9 +188,9 @@ Gfx *getitleRender(Gfx *gdl)
|
||||
}
|
||||
|
||||
#if PAL
|
||||
var80062484 += 2.4f * g_Vars.lvupdate240f;
|
||||
var80062484 += 2.4f * g_Vars.lvupdate60f;
|
||||
#else
|
||||
var80062484 += g_Vars.lvupdate240f + g_Vars.lvupdate240f;
|
||||
var80062484 += g_Vars.lvupdate60f + g_Vars.lvupdate60f;
|
||||
#endif
|
||||
|
||||
guRotate(&var8009cc88[var80062410], var80062484, 0, 1, 0);
|
||||
|
||||
+8
-8
@@ -1750,7 +1750,7 @@ void beamTick(struct beam *beam)
|
||||
} else {
|
||||
if (g_Vars.lvupdate240 <= 8) {
|
||||
// Not lagging
|
||||
beam->dist += beam->speed * g_Vars.lvupdate240f;
|
||||
beam->dist += beam->speed * g_Vars.lvupdate60f;
|
||||
} else {
|
||||
// Lagging
|
||||
beam->dist += beam->speed * (2 + RANDOMFRAC() * 0.5f);
|
||||
@@ -1891,9 +1891,9 @@ void casingCreateForHand(s32 handnum, f32 ground, Mtxf *mtx)
|
||||
casing->speed.y = newyspeed;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
casing->speed.x += (player->hands[handnum].posmtx.m[3][0] - player->hands[handnum].prevmtx.m[3][0]) / g_Vars.lvupdate240freal;
|
||||
casing->speed.y += (player->hands[handnum].posmtx.m[3][1] - player->hands[handnum].prevmtx.m[3][1]) / g_Vars.lvupdate240freal;
|
||||
casing->speed.z += (player->hands[handnum].posmtx.m[3][2] - player->hands[handnum].prevmtx.m[3][2]) / g_Vars.lvupdate240freal;
|
||||
casing->speed.x += (player->hands[handnum].posmtx.m[3][0] - player->hands[handnum].prevmtx.m[3][0]) / g_Vars.lvupdate60freal;
|
||||
casing->speed.y += (player->hands[handnum].posmtx.m[3][1] - player->hands[handnum].prevmtx.m[3][1]) / g_Vars.lvupdate60freal;
|
||||
casing->speed.z += (player->hands[handnum].posmtx.m[3][2] - player->hands[handnum].prevmtx.m[3][2]) / g_Vars.lvupdate60freal;
|
||||
}
|
||||
} else {
|
||||
if (weaponnum == WEAPON_REAPER) {
|
||||
@@ -1948,9 +1948,9 @@ void casingCreateForHand(s32 handnum, f32 ground, Mtxf *mtx)
|
||||
casing->speed.y = newyspeed;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
casing->speed.x += (player->hands[handnum].posmtx.m[3][0] - player->hands[handnum].prevmtx.m[3][0]) / g_Vars.lvupdate240freal;
|
||||
casing->speed.y += (player->hands[handnum].posmtx.m[3][1] - player->hands[handnum].prevmtx.m[3][1]) / g_Vars.lvupdate240freal;
|
||||
casing->speed.z += (player->hands[handnum].posmtx.m[3][2] - player->hands[handnum].prevmtx.m[3][2]) / g_Vars.lvupdate240freal;
|
||||
casing->speed.x += (player->hands[handnum].posmtx.m[3][0] - player->hands[handnum].prevmtx.m[3][0]) / g_Vars.lvupdate60freal;
|
||||
casing->speed.y += (player->hands[handnum].posmtx.m[3][1] - player->hands[handnum].prevmtx.m[3][1]) / g_Vars.lvupdate60freal;
|
||||
casing->speed.z += (player->hands[handnum].posmtx.m[3][2] - player->hands[handnum].prevmtx.m[3][2]) / g_Vars.lvupdate60freal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2139,7 +2139,7 @@ void boltbeamsTick(void)
|
||||
(g_BoltBeams[i].tailpos.f[1] - g_BoltBeams[i].headpos.f[1]) * (g_BoltBeams[i].tailpos.f[1] - g_BoltBeams[i].headpos.f[1]) +
|
||||
(g_BoltBeams[i].tailpos.f[2] - g_BoltBeams[i].headpos.f[2]) * (g_BoltBeams[i].tailpos.f[2] - g_BoltBeams[i].headpos.f[2]));
|
||||
|
||||
length -= g_BoltBeams[i].speed * LVUPDATE240FREAL() / 60.0f;
|
||||
length -= g_BoltBeams[i].speed * LVUPDATE60FREAL() / 60.0f;
|
||||
|
||||
if (length < 0) {
|
||||
g_BoltBeams[i].unk00 = -1;
|
||||
|
||||
+3
-3
@@ -1398,7 +1398,7 @@ void hudmsgsTick(void)
|
||||
|
||||
fadeintime = (sqrtf(msg->width * msg->width + msg->height * msg->height) + 132) / PALUPF(7.0f);
|
||||
|
||||
msg->timer += g_Vars.lvupdate240_60;
|
||||
msg->timer += g_Vars.lvupdate60;
|
||||
|
||||
if (msg->timer >= (s32)fadeintime || msg->type == HUDMSGTYPE_CUTSCENESUBTITLE) {
|
||||
msg->state = HUDMSGSTATE_ONSCREEN;
|
||||
@@ -1407,7 +1407,7 @@ void hudmsgsTick(void)
|
||||
}
|
||||
break;
|
||||
case HUDMSGSTATE_ONSCREEN:
|
||||
msg->timer += g_Vars.lvupdate240_60;
|
||||
msg->timer += g_Vars.lvupdate60;
|
||||
|
||||
hide = false;
|
||||
|
||||
@@ -1436,7 +1436,7 @@ void hudmsgsTick(void)
|
||||
case HUDMSGSTATE_FADINGOUT:
|
||||
fadeouttime = (sqrtf(msg->width * msg->width + msg->height * msg->height) + 92) / PALUPF(7.0f);
|
||||
|
||||
msg->timer += g_Vars.lvupdate240_60;
|
||||
msg->timer += g_Vars.lvupdate60;
|
||||
|
||||
if (msg->timer >= (s32)fadeouttime) {
|
||||
msg->state = HUDMSGSTATE_FREE;
|
||||
|
||||
+2
-2
@@ -1123,7 +1123,7 @@ void invIncrementHeldTime(s32 weapon1, s32 weapon2)
|
||||
if (time >= 0) {
|
||||
if (weapon1 == g_Vars.currentplayer->gunheldarr[i].weapon1 &&
|
||||
weapon2 == g_Vars.currentplayer->gunheldarr[i].weapon2) {
|
||||
g_Vars.currentplayer->gunheldarr[i].totaltime240_60 = time + g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->gunheldarr[i].totaltime240_60 = time + g_Vars.lvupdate60;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1139,7 +1139,7 @@ void invIncrementHeldTime(s32 weapon1, s32 weapon2)
|
||||
}
|
||||
|
||||
if (i == ARRAYCOUNT(g_Vars.currentplayer->gunheldarr)) {
|
||||
g_Vars.currentplayer->gunheldarr[leastusedindex].totaltime240_60 = g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->gunheldarr[leastusedindex].totaltime240_60 = g_Vars.lvupdate60;
|
||||
g_Vars.currentplayer->gunheldarr[leastusedindex].weapon1 = weapon1;
|
||||
g_Vars.currentplayer->gunheldarr[leastusedindex].weapon2 = weapon2;
|
||||
}
|
||||
|
||||
+95
-16
@@ -265,14 +265,14 @@ void lvReset(s32 stagenum)
|
||||
g_Vars.lvupdate240 = 4;
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
g_Vars.lvupdate240f = 1.0f;
|
||||
g_Vars.lvupdate240frealprev = PALUPF(1);
|
||||
g_Vars.lvupdate60f = 1.0f;
|
||||
g_Vars.lvupdate60frealprev = PALUPF(1);
|
||||
#else
|
||||
g_Vars.lvupdate240frealprev = PALUPF(1);
|
||||
g_Vars.lvupdate240f = 1.0f;
|
||||
g_Vars.lvupdate60frealprev = PALUPF(1);
|
||||
g_Vars.lvupdate60f = 1.0f;
|
||||
#endif
|
||||
|
||||
g_Vars.lvupdate240freal = g_Vars.lvupdate240frealprev;
|
||||
g_Vars.lvupdate60freal = g_Vars.lvupdate60frealprev;
|
||||
|
||||
g_StageTimeElapsed60 = 0;
|
||||
g_StageTimeElapsed1f = 0;
|
||||
@@ -950,6 +950,83 @@ void lvFindThreats(void)
|
||||
}
|
||||
}
|
||||
|
||||
//Gfx *lvPrintI(Gfx *gdl, s32 *x, s32 *y, char *name, u32 value)
|
||||
//{
|
||||
// char buffer[64];
|
||||
//
|
||||
// sprintf(buffer, "%s: %u\n", name, value);
|
||||
// gdl = textRender(gdl, x, y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, viGetWidth(), viGetHeight(), 0, 0);
|
||||
//
|
||||
// return gdl;
|
||||
//}
|
||||
//
|
||||
//Gfx *lvPrintH(Gfx *gdl, s32 *x, s32 *y, char *name, u32 value)
|
||||
//{
|
||||
// char buffer[64];
|
||||
//
|
||||
// sprintf(buffer, "%s: %08x\n", name, value);
|
||||
// gdl = textRender(gdl, x, y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, viGetWidth(), viGetHeight(), 0, 0);
|
||||
//
|
||||
// return gdl;
|
||||
//}
|
||||
//
|
||||
//Gfx *lvPrintF(Gfx *gdl, s32 *x, s32 *y, char *name, f32 value)
|
||||
//{
|
||||
// char buffer[64];
|
||||
//
|
||||
// sprintf(buffer, "%s: %s%s%.1f\n", name, "", "", value);
|
||||
// gdl = textRender(gdl, x, y, buffer, g_CharsHandelGothicXs, g_FontHandelGothicXs, 0x00ff00a0, 0x000000a0, viGetWidth(), viGetHeight(), 0, 0);
|
||||
//
|
||||
// return gdl;
|
||||
//}
|
||||
//
|
||||
//Gfx *lvPrint(Gfx *gdl)
|
||||
//{
|
||||
// static u32 times[60] = {0};
|
||||
// static s32 index = 0;
|
||||
//
|
||||
// times[index++] = g_Vars.diffframet / 1000;
|
||||
//
|
||||
// if (index >= 60) {
|
||||
// index = 0;
|
||||
// }
|
||||
//
|
||||
// if (g_FontHandelGothicXs) {
|
||||
// char buffer[64];
|
||||
// s32 x = 10;
|
||||
// s32 y = 10;
|
||||
//
|
||||
// gdl = text0f153628(gdl);
|
||||
//
|
||||
// gdl = lvPrintI(gdl, &x, &y, "diffframe60", g_Vars.diffframe60 );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "diffframe60f", g_Vars.diffframe60f );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lvframe60", g_Vars.lvframe60 );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lvframenum", g_Vars.lvframenum );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "diffframe60freal", g_Vars.diffframe60freal );
|
||||
// gdl = lvPrintH(gdl, &x, &y, "prevframestartt", g_Vars.prevframestartt );
|
||||
// gdl = lvPrintH(gdl, &x, &y, "thisframestartt", g_Vars.thisframestartt );
|
||||
// gdl = lvPrintH(gdl, &x, &y, "diffframet", g_Vars.diffframet );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lostframetime60t", g_Vars.lostframetime60t );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lostframetime240t", g_Vars.lostframetime240t );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lvframe240", g_Vars.lvframe240 );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lvupdate240", g_Vars.lvupdate240 );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lvupdate60", g_Vars.lvupdate60 );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "lvupdate240rem", g_Vars.lvupdate240rem );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "diffframe240", g_Vars.diffframe240 );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "lvupdate60f", g_Vars.lvupdate60f );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "diffframe240f", g_Vars.diffframe240f );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "lvupdate60freal", g_Vars.lvupdate60freal );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "lvupdate60frealprev", g_Vars.lvupdate60frealprev);
|
||||
// gdl = lvPrintI(gdl, &x, &y, "prevframestart240", g_Vars.prevframestart240 );
|
||||
// gdl = lvPrintI(gdl, &x, &y, "thisframestart240", g_Vars.thisframestart240 );
|
||||
// gdl = lvPrintF(gdl, &x, &y, "diffframe240freal", g_Vars.diffframe240freal );
|
||||
//
|
||||
// gdl = text0f153780(gdl);
|
||||
// }
|
||||
//
|
||||
// return gdl;
|
||||
//}
|
||||
|
||||
/**
|
||||
* Renders a complete frame for all players, and also does some other game logic
|
||||
* that really doesn't belong here.
|
||||
@@ -1120,7 +1197,7 @@ Gfx *lvRender(Gfx *gdl)
|
||||
chr->blurdrugamount = TICKS(5000);
|
||||
}
|
||||
|
||||
chr->blurdrugamount -= g_Vars.lvupdate240_60 * (chr->blurnumtimesdied + 1);
|
||||
chr->blurdrugamount -= g_Vars.lvupdate60 * (chr->blurnumtimesdied + 1);
|
||||
|
||||
if (chr->blurdrugamount < 1) {
|
||||
chr->blurdrugamount = 0;
|
||||
@@ -1724,6 +1801,8 @@ Gfx *lvRender(Gfx *gdl)
|
||||
}
|
||||
#endif
|
||||
|
||||
//gdl = lvPrint(gdl);
|
||||
|
||||
return gdl;
|
||||
}
|
||||
|
||||
@@ -1933,7 +2012,7 @@ s32 sub54321(s32 value)
|
||||
void lvUpdateCutsceneTime(void)
|
||||
{
|
||||
if (g_Vars.in_cutscene) {
|
||||
g_CutsceneTime240_60 += g_Vars.lvupdate240_60;
|
||||
g_CutsceneTime240_60 += g_Vars.lvupdate60;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2103,19 +2182,19 @@ void lvTick(void)
|
||||
}
|
||||
}
|
||||
|
||||
g_Vars.lvupdate240_60 = g_Vars.lvupdate240 + g_Vars.lvupdate240_60error;
|
||||
g_Vars.lvupdate240_60error = g_Vars.lvupdate240_60 & 3;
|
||||
g_Vars.lvupdate240_60 >>= 2;
|
||||
g_Vars.lvupdate60 = g_Vars.lvupdate240 + g_Vars.lvupdate240rem;
|
||||
g_Vars.lvupdate240rem = g_Vars.lvupdate60 & 3;
|
||||
g_Vars.lvupdate60 >>= 2;
|
||||
|
||||
if (g_Vars.lvupdate240 > 0) {
|
||||
g_Vars.lvframenum++;
|
||||
}
|
||||
|
||||
g_Vars.lvupdate240f = g_Vars.lvupdate240 * 0.25f;
|
||||
g_Vars.lvframe60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.lvupdate60f = g_Vars.lvupdate240 * 0.25f;
|
||||
g_Vars.lvframe60 += g_Vars.lvupdate60;
|
||||
g_Vars.lvframe240 += g_Vars.lvupdate240;
|
||||
g_Vars.lvupdate240frealprev = g_Vars.lvupdate240freal;
|
||||
g_Vars.lvupdate240freal = PALUPF(g_Vars.lvupdate240f);
|
||||
g_Vars.lvupdate60frealprev = g_Vars.lvupdate60freal;
|
||||
g_Vars.lvupdate60freal = PALUPF(g_Vars.lvupdate60f);
|
||||
|
||||
bgunTickBoost();
|
||||
hudmsgsTick();
|
||||
@@ -2183,7 +2262,7 @@ void lvTick(void)
|
||||
if (g_Vars.normmplayerisrunning && g_Vars.stagenum < STAGE_TITLE) {
|
||||
if (g_MpTimeLimit60 > 0) {
|
||||
s32 elapsed = g_StageTimeElapsed60;
|
||||
s32 nexttime = g_Vars.lvupdate240_60 + g_StageTimeElapsed60;
|
||||
s32 nexttime = g_Vars.lvupdate60 + g_StageTimeElapsed60;
|
||||
s32 warntime = TICKS(g_MpTimeLimit60) - TICKS(3600);
|
||||
|
||||
// Show HUD message at one minute remaining
|
||||
@@ -2257,7 +2336,7 @@ void lvTick(void)
|
||||
}
|
||||
}
|
||||
|
||||
g_StageTimeElapsed60 += g_Vars.lvupdate240_60;
|
||||
g_StageTimeElapsed60 += g_Vars.lvupdate60;
|
||||
g_StageTimeElapsed1f = g_StageTimeElapsed60 / TICKS(60.0f);
|
||||
|
||||
viSetUseZBuf(true);
|
||||
|
||||
+1
-1
@@ -494,7 +494,7 @@ void nbombInflictDamage(struct nbomb *nbomb)
|
||||
#endif
|
||||
{
|
||||
struct coord vector = {0, 0, 0};
|
||||
f32 damage = 0.01f * g_Vars.lvupdate240freal;
|
||||
f32 damage = 0.01f * g_Vars.lvupdate60freal;
|
||||
|
||||
chrDamageByMisc(chr, damage, &vector, &gset, nbomb->ownerprop);
|
||||
|
||||
|
||||
+26
-26
@@ -1581,7 +1581,7 @@ void playerTickMpSwirl(void)
|
||||
// but the swirl position should only be updated once per frame,
|
||||
// so it's only updated for the player at index 0.
|
||||
if (g_Vars.currentplayerindex == 0) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
// Calculate rotation
|
||||
if (g_MpSwirlAngleDegrees < 179.5f) {
|
||||
if (g_MpSwirlAngleDegrees < -20) {
|
||||
@@ -1777,7 +1777,7 @@ void playerExecutePreparedWarp(void)
|
||||
look.y = memcampos.y + g_WarpType3MoreHeight - pos.f[1];
|
||||
look.z = memcampos.z + sinf(g_WarpType3PosAngle) * 0.0f - pos.f[2];
|
||||
|
||||
g_WarpType3PosAngle += g_WarpType3RotAngle * g_Vars.lvupdate240freal;
|
||||
g_WarpType3PosAngle += g_WarpType3RotAngle * g_Vars.lvupdate60freal;
|
||||
|
||||
while (g_WarpType3PosAngle >= M_BADTAU) {
|
||||
g_WarpType3PosAngle -= M_BADTAU;
|
||||
@@ -1906,7 +1906,7 @@ void playerTickCutscene(bool arg0)
|
||||
|
||||
if (g_CutsceneCurAnimFrame60 < endframe) {
|
||||
#if PAL
|
||||
g_CutsceneCurAnimFrame240 += g_Vars.lvupdate240freal;
|
||||
g_CutsceneCurAnimFrame240 += g_Vars.lvupdate60freal;
|
||||
g_CutsceneCurAnimFrame60 = floorf(g_CutsceneCurAnimFrame240 + 0.01f);
|
||||
#else
|
||||
g_CutsceneCurAnimFrame240 += g_Vars.lvupdate240;
|
||||
@@ -2004,7 +2004,7 @@ void playerTickCutscene(bool arg0)
|
||||
viSetFovY(fovy);
|
||||
|
||||
if (g_Vars.currentplayerindex == 0) {
|
||||
g_CutsceneCurTotalFrame60f += g_Vars.lvupdate240freal;
|
||||
g_CutsceneCurTotalFrame60f += g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -2094,7 +2094,7 @@ void playerUpdateZoom(void)
|
||||
struct stagetableentry *stage;
|
||||
|
||||
if (g_Vars.currentplayer->zoomintime < g_Vars.currentplayer->zoomintimemax) {
|
||||
g_Vars.currentplayer->zoomintime += g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->zoomintime += g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->zoomintime > g_Vars.currentplayer->zoomintimemax) {
|
||||
g_Vars.currentplayer->zoomintime = g_Vars.currentplayer->zoomintimemax;
|
||||
@@ -2321,7 +2321,7 @@ bool playerIsFadeComplete(void)
|
||||
void playerUpdateColourScreenProperties(void)
|
||||
{
|
||||
if (g_Vars.currentplayer->colourfadetimemax60 >= 0) {
|
||||
g_Vars.currentplayer->colourfadetime60 += g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->colourfadetime60 += g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->colourfadetime60 < g_Vars.currentplayer->colourfadetimemax60) {
|
||||
f32 mult = g_Vars.currentplayer->colourfadetime60 / g_Vars.currentplayer->colourfadetimemax60;
|
||||
@@ -2358,7 +2358,7 @@ void playerTickChrFade(void)
|
||||
struct chrdata *chr = g_Vars.currentplayer->prop->chr;
|
||||
f32 frac;
|
||||
|
||||
g_Vars.currentplayer->bondfadetime60 += g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->bondfadetime60 += g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->bondfadetime60 < g_Vars.currentplayer->bondfadetimemax60) {
|
||||
frac = g_Vars.currentplayer->bondfadefracold
|
||||
@@ -2493,7 +2493,7 @@ void playerTickDamageAndHealth(void)
|
||||
f32 inc;
|
||||
|
||||
if (g_Vars.currentplayer->pausemode == PAUSEMODE_UNPAUSED) {
|
||||
inc = g_Vars.lvupdate240freal;
|
||||
inc = g_Vars.lvupdate60freal;
|
||||
} else {
|
||||
inc = g_Vars.diffframe240freal;
|
||||
}
|
||||
@@ -3383,7 +3383,7 @@ void playerTickTeleport(f32 *aspectratio)
|
||||
// State 1: TELEPORTSTATE_PREENTER
|
||||
// Wait in this state for 24 ticks
|
||||
if (g_Vars.currentplayer->teleportstate == TELEPORTSTATE_PREENTER) {
|
||||
u32 time = g_Vars.currentplayer->teleporttime + g_Vars.lvupdate240_60;
|
||||
u32 time = g_Vars.currentplayer->teleporttime + g_Vars.lvupdate60;
|
||||
|
||||
if (time >= 24) {
|
||||
g_Vars.currentplayer->teleporttime = 0;
|
||||
@@ -3396,7 +3396,7 @@ void playerTickTeleport(f32 *aspectratio)
|
||||
// State 2: TELEPORTSTATE_ENTERING
|
||||
// Adjust aspect ratio over 48 ticks
|
||||
if (g_Vars.currentplayer->teleportstate == TELEPORTSTATE_ENTERING) {
|
||||
u32 time = g_Vars.currentplayer->teleporttime + g_Vars.lvupdate240_60;
|
||||
u32 time = g_Vars.currentplayer->teleporttime + g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->teleporttime == 48) {
|
||||
g_Vars.currentplayer->teleportstate = TELEPORTSTATE_WHITE;
|
||||
@@ -3417,7 +3417,7 @@ void playerTickTeleport(f32 *aspectratio)
|
||||
// Adjust aspect ratio over 48 ticks, but with slightly faster
|
||||
// time progression in the first several ticks.
|
||||
if (g_Vars.currentplayer->teleportstate == TELEPORTSTATE_EXITING) {
|
||||
u32 time = g_Vars.currentplayer->teleporttime + g_Vars.lvupdate240_60;
|
||||
u32 time = g_Vars.currentplayer->teleporttime + g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->teleporttime < 7) {
|
||||
time = g_Vars.currentplayer->teleporttime + 1;
|
||||
@@ -3538,7 +3538,7 @@ void playerTick(bool arg0)
|
||||
bgunSetSightVisible(GUNSIGHTREASON_1, true);
|
||||
|
||||
if ((g_Vars.tickmode == TICKMODE_GE_FADEIN || g_Vars.tickmode == TICKMODE_NORMAL) && !g_InCutscene && !g_MainIsEndscreen) {
|
||||
g_Vars.currentplayer->bondviewlevtime60 += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->bondviewlevtime60 += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->devicesactive & DEVICE_SUICIDEPILL) {
|
||||
@@ -3732,7 +3732,7 @@ void playerTick(bool arg0)
|
||||
if (outofbounds) {
|
||||
// Slayer rocket has flown out of bounds
|
||||
// Allow 2 seconds of this, then blow up rocket
|
||||
g_Vars.currentplayer->badrockettime += g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->badrockettime += g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->badrockettime > TICKS(120)) {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
@@ -3743,7 +3743,7 @@ void playerTick(bool arg0)
|
||||
}
|
||||
} else if (g_Vars.currentplayer->badrockettime > 0) {
|
||||
// Slayer rocket is in bounds, but was recently out
|
||||
g_Vars.currentplayer->badrockettime -= g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->badrockettime -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->badrockettime < 0) {
|
||||
g_Vars.currentplayer->badrockettime = 0;
|
||||
@@ -3860,8 +3860,8 @@ void playerTick(bool arg0)
|
||||
sp2ac.x = sp2b8[0][0];
|
||||
sp2ac.z = sp2b8[0][2];
|
||||
|
||||
sp178 = sticky * LVUPDATE240FREAL() * 0.00025f;
|
||||
sp174 = -stickx * LVUPDATE240FREAL() * 0.00025f;
|
||||
sp178 = sticky * LVUPDATE60FREAL() * 0.00025f;
|
||||
sp174 = -stickx * LVUPDATE60FREAL() * 0.00025f;
|
||||
|
||||
f20 = sqrtf(sp2ac.f[0] * sp2ac.f[0] + sp2ac.f[2] * sp2ac.f[2]);
|
||||
|
||||
@@ -3914,13 +3914,13 @@ void playerTick(bool arg0)
|
||||
newspeed = prevspeed;
|
||||
|
||||
if (prevspeed < targetspeed) {
|
||||
newspeed = prevspeed + 0.05f * LVUPDATE240FREAL();
|
||||
newspeed = prevspeed + 0.05f * LVUPDATE60FREAL();
|
||||
|
||||
if (newspeed > targetspeed) {
|
||||
newspeed = targetspeed;
|
||||
}
|
||||
} else if (prevspeed > targetspeed) {
|
||||
newspeed = prevspeed - 0.05f * LVUPDATE240FREAL();
|
||||
newspeed = prevspeed - 0.05f * LVUPDATE60FREAL();
|
||||
|
||||
if (newspeed < targetspeed) {
|
||||
newspeed = targetspeed;
|
||||
@@ -4665,7 +4665,7 @@ void playerDisplayShield(void)
|
||||
s32 rand = ((g_Vars.currentplayer->shieldshowrnd >> 16) % 200) * 4 + 800;
|
||||
|
||||
g_Vars.currentplayer->shieldshowrnd = random();
|
||||
g_Vars.currentplayer->shieldshowrot = g_Vars.thisframe240 % rand;
|
||||
g_Vars.currentplayer->shieldshowrot = g_Vars.thisframestart240 % rand;
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->shieldshowtime = 0;
|
||||
@@ -4693,7 +4693,7 @@ Gfx *playerRenderShield(Gfx *gdl)
|
||||
maxrotf = maxrot;
|
||||
f20 = (60 - g_Vars.currentplayer->shieldshowtime) * (1.0f / 60.0f);
|
||||
|
||||
g_Vars.currentplayer->shieldshowrot += g_Vars.lvupdate240freal * (0.8f + 2.0f * f20 * f20);
|
||||
g_Vars.currentplayer->shieldshowrot += g_Vars.lvupdate60freal * (0.8f + 2.0f * f20 * f20);
|
||||
|
||||
if (g_Vars.currentplayer->shieldshowrot >= maxrotf) {
|
||||
g_Vars.currentplayer->shieldshowrot -= maxrotf;
|
||||
@@ -4759,7 +4759,7 @@ Gfx *playerRenderShield(Gfx *gdl)
|
||||
(g_Vars.currentplayer->shieldshowrnd & 4) != 0,
|
||||
0);
|
||||
|
||||
g_Vars.currentplayer->shieldshowtime += g_Vars.lvupdate240freal;
|
||||
g_Vars.currentplayer->shieldshowtime += g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.currentplayer->shieldshowtime > 60) {
|
||||
g_Vars.currentplayer->shieldshowtime = -1;
|
||||
@@ -4810,7 +4810,7 @@ Gfx *playerRenderHud(Gfx *gdl)
|
||||
// Adjust eyes shutting
|
||||
if (g_Vars.currentplayer->eyesshut) {
|
||||
if (g_Vars.currentplayer->eyesshutfrac < 0.95f) {
|
||||
g_Vars.currentplayer->eyesshutfrac += g_Vars.lvupdate240freal * 0.12f;
|
||||
g_Vars.currentplayer->eyesshutfrac += g_Vars.lvupdate60freal * 0.12f;
|
||||
|
||||
if (g_Vars.currentplayer->eyesshutfrac > 0.95f) {
|
||||
g_Vars.currentplayer->eyesshutfrac = 0.95f;
|
||||
@@ -4818,7 +4818,7 @@ Gfx *playerRenderHud(Gfx *gdl)
|
||||
}
|
||||
} else {
|
||||
if (g_Vars.currentplayer->eyesshutfrac > 0) {
|
||||
g_Vars.currentplayer->eyesshutfrac -= g_Vars.lvupdate240freal * 0.12f;
|
||||
g_Vars.currentplayer->eyesshutfrac -= g_Vars.lvupdate60freal * 0.12f;
|
||||
|
||||
if (g_Vars.currentplayer->eyesshutfrac < 0) {
|
||||
g_Vars.currentplayer->eyesshutfrac = 0;
|
||||
@@ -5030,7 +5030,7 @@ Gfx *playerRenderHud(Gfx *gdl)
|
||||
}
|
||||
|
||||
if (g_Vars.currentplayer->deadtimer >= 0) {
|
||||
g_Vars.currentplayer->deadtimer -= g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->deadtimer -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->deadtimer < 0) {
|
||||
canrestart = true;
|
||||
@@ -5089,7 +5089,7 @@ Gfx *playerRenderHud(Gfx *gdl)
|
||||
gdl = bviewDrawFisheye(gdl, 0xffffffff, 255, 0, TICKS(50), g_Vars.currentplayer->eyespy->hit);
|
||||
}
|
||||
|
||||
g_Vars.currentplayer->eyespy->camerashuttertime -= g_Vars.lvupdate240_60;
|
||||
g_Vars.currentplayer->eyespy->camerashuttertime -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
gdl = bviewDrawFisheye(gdl, 0xffffffff, 255, 0, TICKS(50), g_Vars.currentplayer->eyespy->hit);
|
||||
}
|
||||
@@ -5960,7 +5960,7 @@ void playerChooseThirdPersonAnimation(struct chrdata *chr, s32 crouchpos, f32 sp
|
||||
}
|
||||
}
|
||||
|
||||
limit = g_Vars.lvupdate240freal * 0.10470308363438f;
|
||||
limit = g_Vars.lvupdate60freal * 0.10470308363438f;
|
||||
|
||||
if (angle - *angleoffset > limit) {
|
||||
*angleoffset += limit;
|
||||
|
||||
+34
-34
@@ -1677,9 +1677,9 @@ void propsTickPlayer(bool islastplayer)
|
||||
struct prop *prop;
|
||||
struct prop *end;
|
||||
s32 savedlvupdate240;
|
||||
s32 savedlvupdate240_60;
|
||||
f32 savedlvupdate240f;
|
||||
f32 savedlvupdate240freal;
|
||||
s32 savedlvupdate60;
|
||||
f32 savedlvupdate60f;
|
||||
f32 savedlvupdate60freal;
|
||||
s32 savedslotupdate240;
|
||||
s32 savedslotupdate240_60;
|
||||
f32 savedslotupdate240f;
|
||||
@@ -1720,9 +1720,9 @@ void propsTickPlayer(bool islastplayer)
|
||||
// Save these global timing values because we'll be modifying them
|
||||
// and restoring them afterwards
|
||||
savedlvupdate240 = g_Vars.lvupdate240;
|
||||
savedlvupdate240_60 = g_Vars.lvupdate240_60;
|
||||
savedlvupdate240f = g_Vars.lvupdate240f;
|
||||
savedlvupdate240freal = g_Vars.lvupdate240freal;
|
||||
savedlvupdate60 = g_Vars.lvupdate60;
|
||||
savedlvupdate60f = g_Vars.lvupdate60f;
|
||||
savedlvupdate60freal = g_Vars.lvupdate60freal;
|
||||
|
||||
for (i = 0; i < g_Vars.numpropstates; i++) {
|
||||
g_Vars.propstates[i].slotupdate240 += g_Vars.lvupdate240;
|
||||
@@ -1872,16 +1872,16 @@ void propsTickPlayer(bool islastplayer)
|
||||
// The prop is in the foreground, so it must be ticked on this frame
|
||||
if (prop->lastupdateframe != g_Vars.prevupdateframe) {
|
||||
g_Vars.lvupdate240 = prop->propupdate240;
|
||||
g_Vars.lvupdate240_60 = prop->propupdate240 + prop->propupdate60err;
|
||||
prop->propupdate60err = g_Vars.lvupdate240_60 & 3;
|
||||
g_Vars.lvupdate240_60 >>= 2;
|
||||
g_Vars.lvupdate240f = g_Vars.lvupdate240 / 4.0f;
|
||||
g_Vars.lvupdate240freal = PALUPF(g_Vars.lvupdate240f);
|
||||
g_Vars.lvupdate60 = prop->propupdate240 + prop->propupdate60err;
|
||||
prop->propupdate60err = g_Vars.lvupdate60 & 3;
|
||||
g_Vars.lvupdate60 >>= 2;
|
||||
g_Vars.lvupdate60f = g_Vars.lvupdate240 / 4.0f;
|
||||
g_Vars.lvupdate60freal = PALUPF(g_Vars.lvupdate60f);
|
||||
} else {
|
||||
g_Vars.lvupdate240 = savedlvupdate240;
|
||||
g_Vars.lvupdate240_60 = savedlvupdate240_60;
|
||||
g_Vars.lvupdate240f = savedlvupdate240f;
|
||||
g_Vars.lvupdate240freal = savedlvupdate240freal;
|
||||
g_Vars.lvupdate60 = savedlvupdate60;
|
||||
g_Vars.lvupdate60f = savedlvupdate60f;
|
||||
g_Vars.lvupdate60freal = savedlvupdate60freal;
|
||||
}
|
||||
|
||||
prop->backgroundedframes = 0;
|
||||
@@ -1916,9 +1916,9 @@ void propsTickPlayer(bool islastplayer)
|
||||
|
||||
if (prop->lastupdateframe != g_Vars.prevupdateframe) {
|
||||
g_Vars.lvupdate240 = savedlvupdate240;
|
||||
g_Vars.lvupdate240_60 = savedlvupdate240_60;
|
||||
g_Vars.lvupdate240f = savedlvupdate240f;
|
||||
g_Vars.lvupdate240freal = savedlvupdate240freal;
|
||||
g_Vars.lvupdate60 = savedlvupdate60;
|
||||
g_Vars.lvupdate60f = savedlvupdate60f;
|
||||
g_Vars.lvupdate60freal = savedlvupdate60freal;
|
||||
}
|
||||
|
||||
prop->lastupdateframe = g_Vars.updateframe;
|
||||
@@ -1936,16 +1936,16 @@ void propsTickPlayer(bool islastplayer)
|
||||
if (prop->propstateindex == runstateindex) {
|
||||
if (prop->lastupdateframe != g_Vars.propstates[runstateindex].lastupdateframe) {
|
||||
g_Vars.lvupdate240 = prop->propupdate240;
|
||||
g_Vars.lvupdate240_60 = prop->propupdate240 + prop->propupdate60err;
|
||||
prop->propupdate60err = g_Vars.lvupdate240_60 & 3;
|
||||
g_Vars.lvupdate240_60 >>= 2;
|
||||
g_Vars.lvupdate240f = g_Vars.lvupdate240 / 4.0f;
|
||||
g_Vars.lvupdate240freal = PALUPF(g_Vars.lvupdate240f);
|
||||
g_Vars.lvupdate60 = prop->propupdate240 + prop->propupdate60err;
|
||||
prop->propupdate60err = g_Vars.lvupdate60 & 3;
|
||||
g_Vars.lvupdate60 >>= 2;
|
||||
g_Vars.lvupdate60f = g_Vars.lvupdate240 / 4.0f;
|
||||
g_Vars.lvupdate60freal = PALUPF(g_Vars.lvupdate60f);
|
||||
} else {
|
||||
g_Vars.lvupdate240 = savedslotupdate240;
|
||||
g_Vars.lvupdate240_60 = savedslotupdate240_60;
|
||||
g_Vars.lvupdate240f = savedslotupdate240f;
|
||||
vars->lvupdate240freal = PALUPF(savedslotupdate240f);
|
||||
g_Vars.lvupdate60 = savedslotupdate240_60;
|
||||
g_Vars.lvupdate60f = savedslotupdate240f;
|
||||
vars->lvupdate60freal = PALUPF(savedslotupdate240f);
|
||||
}
|
||||
|
||||
// Tick the prop
|
||||
@@ -1986,9 +1986,9 @@ void propsTickPlayer(bool islastplayer)
|
||||
|
||||
if (prop->lastupdateframe != g_Vars.propstates[runstateindex].lastupdateframe) {
|
||||
g_Vars.lvupdate240 = savedslotupdate240;
|
||||
g_Vars.lvupdate240_60 = savedslotupdate240_60;
|
||||
g_Vars.lvupdate240f = savedslotupdate240f;
|
||||
vars->lvupdate240freal = PALUPF(savedslotupdate240f);
|
||||
g_Vars.lvupdate60 = savedslotupdate240_60;
|
||||
g_Vars.lvupdate60f = savedslotupdate240f;
|
||||
vars->lvupdate60freal = PALUPF(savedslotupdate240f);
|
||||
}
|
||||
|
||||
prop->lastupdateframe = g_Vars.updateframe;
|
||||
@@ -1998,9 +1998,9 @@ void propsTickPlayer(bool islastplayer)
|
||||
}
|
||||
|
||||
g_Vars.lvupdate240 = savedlvupdate240;
|
||||
g_Vars.lvupdate240_60 = savedlvupdate240_60;
|
||||
g_Vars.lvupdate240f = savedlvupdate240f;
|
||||
g_Vars.lvupdate240freal = savedlvupdate240freal;
|
||||
g_Vars.lvupdate60 = savedlvupdate60;
|
||||
g_Vars.lvupdate60f = savedlvupdate60f;
|
||||
g_Vars.lvupdate60freal = savedlvupdate60freal;
|
||||
|
||||
if (op == TICKOP_CHANGEDLIST) {
|
||||
// The prop has changed from active to paused, which means its
|
||||
@@ -2189,9 +2189,9 @@ void propsTickPlayer(bool islastplayer)
|
||||
}
|
||||
|
||||
g_Vars.lvupdate240 = savedlvupdate240;
|
||||
g_Vars.lvupdate240_60 = savedlvupdate240_60;
|
||||
g_Vars.lvupdate240f = savedlvupdate240f;
|
||||
g_Vars.lvupdate240freal = savedlvupdate240freal;
|
||||
g_Vars.lvupdate60 = savedlvupdate60;
|
||||
g_Vars.lvupdate60f = savedlvupdate60f;
|
||||
g_Vars.lvupdate60freal = savedlvupdate60freal;
|
||||
|
||||
g_Vars.propstates[runstateindex].slotupdate240 = 0;
|
||||
g_Vars.propstates[runstateindex].lastupdateframe = g_Vars.updateframe;
|
||||
|
||||
+117
-117
@@ -3532,7 +3532,7 @@ void applySpeed(f32 *distdone, f32 maxdist, f32 *speedptr, f32 accel, f32 decel,
|
||||
f32 speed = *speedptr;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
f32 limit = speed * speed * 0.5f / decel;
|
||||
f32 distremaining = maxdist - *distdone;
|
||||
|
||||
@@ -3848,7 +3848,7 @@ void projectileFall(struct defaultobj *obj, f32 arg1[3][3])
|
||||
} else if (sp6c > 0.0f && obj->realrot[t2][1] < 0.0f && obj->realrot[t2][1] < arg1[t2][1]) {
|
||||
projectile->unk064 = 0.05f / (sp6c * 0.63672113f);
|
||||
} else {
|
||||
f2 = acosf((arg1[t2][0] * obj->realrot[t2][0] + arg1[t2][1] * obj->realrot[t2][1] + arg1[t2][2] * obj->realrot[t2][2]) / (obj->model->scale * obj->model->scale)) / g_Vars.lvupdate240freal;
|
||||
f2 = acosf((arg1[t2][0] * obj->realrot[t2][0] + arg1[t2][1] * obj->realrot[t2][1] + arg1[t2][2] * obj->realrot[t2][2]) / (obj->model->scale * obj->model->scale)) / g_Vars.lvupdate60freal;
|
||||
|
||||
if (sp6c != 0.0f) {
|
||||
projectile->unk064 = f2 / sp6c;
|
||||
@@ -4636,7 +4636,7 @@ void weaponTick(struct prop *prop)
|
||||
// HARDFREEING. They then fade out over 1 second, at which point they are
|
||||
// given the REAPABLE flag and soon freed.
|
||||
if (obj->flags3 & OBJFLAG3_HARDFREEING) {
|
||||
weapon->fadeouttimer60 -= g_Vars.lvupdate240_60;
|
||||
weapon->fadeouttimer60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (weapon->fadeouttimer60 <= 0) {
|
||||
weapon->fadeouttimer60 = 0;
|
||||
@@ -6176,7 +6176,7 @@ void hovTick(struct defaultobj *obj, struct hov *hov)
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
f32 f0;
|
||||
f32 f12;
|
||||
f32 f2;
|
||||
@@ -6529,9 +6529,9 @@ f32 objCollide(struct defaultobj *movingobj, struct coord *movingvel, f32 rotati
|
||||
struct coord sp58;
|
||||
struct coord sp4c;
|
||||
|
||||
obstaclevel.x = movingvel->x * 0.5f / g_Vars.lvupdate240freal;
|
||||
obstaclevel.x = movingvel->x * 0.5f / g_Vars.lvupdate60freal;
|
||||
obstaclevel.y = 0.0f;
|
||||
obstaclevel.z = movingvel->z * 0.5f / g_Vars.lvupdate240freal;
|
||||
obstaclevel.z = movingvel->z * 0.5f / g_Vars.lvupdate60freal;
|
||||
|
||||
objApplyMomentum(obstacleobj, &obstaclevel, 0.0f, true, true);
|
||||
|
||||
@@ -6573,7 +6573,7 @@ f32 objCollide(struct defaultobj *movingobj, struct coord *movingvel, f32 rotati
|
||||
xdiff *= mult;
|
||||
zdiff *= mult;
|
||||
|
||||
rotation /= g_Vars.lvupdate240freal;
|
||||
rotation /= g_Vars.lvupdate60freal;
|
||||
|
||||
speed.f[0] += -zdiff * rotation * 10.0f;
|
||||
speed.f[2] += xdiff * rotation * 10.0f;
|
||||
@@ -7830,7 +7830,7 @@ void hoverbikeUpdateMovement(struct hoverbikeobj *bike, f32 speedforwards, f32 s
|
||||
tmp *= 1.0f - speedforwards * 0.5f;
|
||||
}
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
bike->w += (tmp - bike->w) * PALUPF(0.075f);
|
||||
}
|
||||
|
||||
@@ -7840,9 +7840,9 @@ void hoverbikeUpdateMovement(struct hoverbikeobj *bike, f32 speedforwards, f32 s
|
||||
cosangle = cosf(angle);
|
||||
|
||||
if (speedforwards >= 0) {
|
||||
f2 = (speedforwards + 0.1f) * 0.3f * g_Vars.lvupdate240freal;
|
||||
f2 = (speedforwards + 0.1f) * 0.3f * g_Vars.lvupdate60freal;
|
||||
} else {
|
||||
f2 = (0.1f - speedforwards) * 0.3f * g_Vars.lvupdate240freal;
|
||||
f2 = (0.1f - speedforwards) * 0.3f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (bike->rels[1] < speedforwards * 0.5f) {
|
||||
@@ -7888,9 +7888,9 @@ void hoverbikeUpdateMovement(struct hoverbikeobj *bike, f32 speedforwards, f32 s
|
||||
sp70 += f12 * 0.04f * M_BADTAU;
|
||||
|
||||
if (speedsideways >= 0) {
|
||||
f12 = (speedsideways + 0.1f) * 0.3f * g_Vars.lvupdate240freal;
|
||||
f12 = (speedsideways + 0.1f) * 0.3f * g_Vars.lvupdate60freal;
|
||||
} else {
|
||||
f12 = (0.1f - speedsideways) * 0.3f * g_Vars.lvupdate240freal;
|
||||
f12 = (0.1f - speedsideways) * 0.3f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (bike->rels[0] < 0.4f * speedsideways) {
|
||||
@@ -7909,7 +7909,7 @@ void hoverbikeUpdateMovement(struct hoverbikeobj *bike, f32 speedforwards, f32 s
|
||||
|
||||
sp68 += speedsideways * 0.2512874007225f;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
bike->speedabs[1] *= PAL ? 0.964f : 0.97f;
|
||||
bike->speedabs[0] *= PAL ? 0.964f : 0.97f;
|
||||
bike->speedabs[1] += bike->rels[1] * cosangle * PALUPF(1.08f);
|
||||
@@ -7918,7 +7918,7 @@ void hoverbikeUpdateMovement(struct hoverbikeobj *bike, f32 speedforwards, f32 s
|
||||
bike->speedabs[0] += -bike->rels[0] * cosangle * PALUPF(0.72f);
|
||||
}
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
bike->exreal += (sp70 - bike->exreal) * 0.04f;
|
||||
bike->ezreal += (sp6c - bike->ezreal) * 0.15f;
|
||||
bike->ezreal2 += (sp68 - bike->ezreal2) * 0.04f;
|
||||
@@ -8115,7 +8115,7 @@ bool rocketTickFbw(struct weaponobj *rocket)
|
||||
newpos.y = rocketprop->pos.y;
|
||||
newpos.z = rocketprop->pos.z;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
projectile->unk010 += PAL ? 0.0021600001f : 0.0018f;
|
||||
|
||||
speed = projectile->unk010;
|
||||
@@ -8330,24 +8330,24 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
mtx4SetTranslation(&prop->pos, &sp504);
|
||||
|
||||
if (projectile->unk0dc > 0.0f) {
|
||||
projectile->unk0dc -= projectile->unk0e0 * g_Vars.lvupdate240freal;
|
||||
projectile->unk0dc -= projectile->unk0e0 * g_Vars.lvupdate60freal;
|
||||
|
||||
if (projectile->unk0dc < 0.0f) {
|
||||
projectile->unk0dc = 0.0f;
|
||||
} else if (projectile->unk0e4 < 1.0f) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
if (projectile->unk0dc > projectile->unk0ec) {
|
||||
projectile->unk0dc = projectile->unk0ec + (projectile->unk0dc - projectile->unk0ec) * projectile->unk0e4;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (projectile->unk0dc < 0.0f) {
|
||||
projectile->unk0dc += projectile->unk0e0 * g_Vars.lvupdate240freal;
|
||||
projectile->unk0dc += projectile->unk0e0 * g_Vars.lvupdate60freal;
|
||||
|
||||
if (projectile->unk0dc > 0.0f) {
|
||||
projectile->unk0dc = 0.0f;
|
||||
} else if (projectile->unk0e4 < 1.0f) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
if (projectile->unk0dc < -projectile->unk0ec) {
|
||||
projectile->unk0dc = -projectile->unk0ec + (projectile->unk0dc + projectile->unk0ec) * projectile->unk0e4;
|
||||
}
|
||||
@@ -8359,7 +8359,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
dist = sqrtf(projectile->speed.f[0] * projectile->speed.f[0] + projectile->speed.f[2] * projectile->speed.f[2]);
|
||||
|
||||
if (dist > 0.0f) {
|
||||
f32 f12 = projectile->unk098 * g_Vars.lvupdate240freal / dist;
|
||||
f32 f12 = projectile->unk098 * g_Vars.lvupdate60freal / dist;
|
||||
|
||||
if (f12 >= 1.0f) {
|
||||
projectile->speed.x = 0.0f;
|
||||
@@ -8369,7 +8369,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
projectile->speed.z -= projectile->speed.z * f12;
|
||||
|
||||
if (projectile->unk0e4 < 1.0f) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
if (projectile->speed.x > projectile->unk0f0) {
|
||||
projectile->speed.x = (projectile->speed.x - projectile->unk0f0) * projectile->unk0e4 + projectile->unk0f0;
|
||||
} else if (projectile->speed.x < -projectile->unk0f0) {
|
||||
@@ -8432,7 +8432,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
}
|
||||
}
|
||||
|
||||
sp5a8 = projectile->unk0dc * g_Vars.lvupdate240freal;
|
||||
sp5a8 = projectile->unk0dc * g_Vars.lvupdate60freal;
|
||||
|
||||
if (sp5a8 != 0.0f) {
|
||||
struct coord sp404 = {0, 0, 0};
|
||||
@@ -8445,9 +8445,9 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
}
|
||||
}
|
||||
|
||||
sp59c.x = projectile->speed.x * g_Vars.lvupdate240freal;
|
||||
sp59c.x = projectile->speed.x * g_Vars.lvupdate60freal;
|
||||
sp59c.y = 0.0f;
|
||||
sp59c.z = projectile->speed.z * g_Vars.lvupdate240freal;
|
||||
sp59c.z = projectile->speed.z * g_Vars.lvupdate60freal;
|
||||
|
||||
if (haslimitedarea) {
|
||||
x = pad.pos.x - prop->pos.x - sp59c.x;
|
||||
@@ -8560,9 +8560,9 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
sp590.y = 0.0f;
|
||||
sp590.z = projectile->speed.z + sp3f4.f[2] * f0_2;
|
||||
|
||||
sp59c.x = sp590.f[0] * g_Vars.lvupdate240freal;
|
||||
sp59c.x = sp590.f[0] * g_Vars.lvupdate60freal;
|
||||
sp59c.y = 0.0f;
|
||||
sp59c.z = sp590.f[2] * g_Vars.lvupdate240freal;
|
||||
sp59c.z = sp590.f[2] * g_Vars.lvupdate60freal;
|
||||
|
||||
if (haslimitedarea) {
|
||||
x = pad.pos.x - prop->pos.x - sp59c.x;
|
||||
@@ -8594,9 +8594,9 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
sp590.y = 0.0f;
|
||||
sp590.z = -projectile->speed.f[2] * sp58c;
|
||||
|
||||
sp59c.x = sp590.f[0] * g_Vars.lvupdate240freal;
|
||||
sp59c.x = sp590.f[0] * g_Vars.lvupdate60freal;
|
||||
sp59c.y = 0.0f;
|
||||
sp59c.z = sp590.f[2] * g_Vars.lvupdate240freal;
|
||||
sp59c.z = sp590.f[2] * g_Vars.lvupdate60freal;
|
||||
|
||||
if (haslimitedarea) {
|
||||
x = pad.pos.x - prop->pos.x - sp59c.x;
|
||||
@@ -8643,9 +8643,9 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
sp590.y = 0.0f;
|
||||
sp590.z = sp398.f[2] * f14;
|
||||
|
||||
sp59c.x = sp590.f[0] * g_Vars.lvupdate240freal;
|
||||
sp59c.x = sp590.f[0] * g_Vars.lvupdate60freal;
|
||||
sp59c.y = 0.0f;
|
||||
sp59c.z = sp590.f[2] * g_Vars.lvupdate240freal;
|
||||
sp59c.z = sp590.f[2] * g_Vars.lvupdate60freal;
|
||||
|
||||
if (haslimitedarea) {
|
||||
x = pad.pos.x - prop->pos.x - sp59c.x;
|
||||
@@ -8742,19 +8742,19 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
|
||||
if (projectile->flags & PROJECTILEFLAG_00000020) {
|
||||
if (projectile->unk01c < (1.0f / 3.6f)) {
|
||||
projectile->unk0ac += projectile->unk014 * g_Vars.lvupdate240freal;
|
||||
projectile->unk0a8 += projectile->unk0ac * g_Vars.lvupdate240freal;
|
||||
projectile->unk01c += (1.0f / 90.0f) * g_Vars.lvupdate240freal;
|
||||
projectile->unk0ac += projectile->unk014 * g_Vars.lvupdate60freal;
|
||||
projectile->unk0a8 += projectile->unk0ac * g_Vars.lvupdate60freal;
|
||||
projectile->unk01c += (1.0f / 90.0f) * g_Vars.lvupdate60freal;
|
||||
|
||||
if (projectile->unk01c > (1.0f / 3.6f)) {
|
||||
projectile->unk01c = (1.0f / 3.6f);
|
||||
}
|
||||
} else {
|
||||
if (projectile->unk0a8 > sp5dc.y) {
|
||||
projectile->unk0ac += projectile->unk014 * g_Vars.lvupdate240freal;
|
||||
projectile->unk0a8 += projectile->unk0ac * g_Vars.lvupdate240freal;
|
||||
projectile->unk0ac += projectile->unk014 * g_Vars.lvupdate60freal;
|
||||
projectile->unk0a8 += projectile->unk0ac * g_Vars.lvupdate60freal;
|
||||
|
||||
sp5dc.y += 0.07f * (projectile->unk0a8 - sp5dc.y) * g_Vars.lvupdate240freal;
|
||||
sp5dc.y += 0.07f * (projectile->unk0a8 - sp5dc.y) * g_Vars.lvupdate60freal;
|
||||
} else {
|
||||
sp5dc.y = projectile->unk0a8;
|
||||
|
||||
@@ -8832,7 +8832,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
mainOverrideVariable("kkd", &kkd);
|
||||
mainOverrideVariable("kkp", &kkp);
|
||||
|
||||
tmp = ((kkd / 100.0f * var80069bc4 / LVUPDATE240FREAL()) + (kkp / 100.00f * sp28c * LVUPDATE240FREAL())) * (kkg / 100.000f);
|
||||
tmp = ((kkd / 100.0f * var80069bc4 / LVUPDATE60FREAL()) + (kkp / 100.00f * sp28c * LVUPDATE60FREAL())) * (kkg / 100.000f);
|
||||
|
||||
var80069bc4 = sp28c;
|
||||
|
||||
@@ -8874,27 +8874,27 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
// Apply gravity
|
||||
f32 f0;
|
||||
|
||||
projectile->speed.y += (projectile->unk014 + projectile->unk01c) * g_Vars.lvupdate240freal;
|
||||
projectile->speed.y += (projectile->unk014 + projectile->unk01c) * g_Vars.lvupdate60freal;
|
||||
|
||||
if (projectile->flags & PROJECTILEFLAG_LIGHTWEIGHT) {
|
||||
f0 = projectile->speed.y - (1.0f / 7.2f) * g_Vars.lvupdate240freal;
|
||||
f0 = projectile->speed.y - (1.0f / 7.2f) * g_Vars.lvupdate60freal;
|
||||
} else {
|
||||
f0 = projectile->speed.y - (1.0f / 3.6f) * g_Vars.lvupdate240freal;
|
||||
f0 = projectile->speed.y - (1.0f / 3.6f) * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
sp5dc.y += g_Vars.lvupdate240freal * (projectile->speed.y + f0) * 0.5f;
|
||||
sp5dc.y += g_Vars.lvupdate60freal * (projectile->speed.y + f0) * 0.5f;
|
||||
|
||||
projectile->speed.y = f0;
|
||||
} else {
|
||||
projectile->speed.y += (projectile->unk014 + projectile->unk01c) * g_Vars.lvupdate240freal;
|
||||
sp5dc.y += projectile->speed.y * g_Vars.lvupdate240freal;
|
||||
projectile->speed.y += (projectile->unk014 + projectile->unk01c) * g_Vars.lvupdate60freal;
|
||||
sp5dc.y += projectile->speed.y * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
projectile->speed.x += projectile->unk010 * g_Vars.lvupdate240freal;
|
||||
projectile->speed.z += projectile->unk018 * g_Vars.lvupdate240freal;
|
||||
projectile->speed.x += projectile->unk010 * g_Vars.lvupdate60freal;
|
||||
projectile->speed.z += projectile->unk018 * g_Vars.lvupdate60freal;
|
||||
|
||||
sp5dc.x += projectile->speed.x * g_Vars.lvupdate240freal;
|
||||
sp5dc.z += projectile->speed.z * g_Vars.lvupdate240freal;
|
||||
sp5dc.x += projectile->speed.x * g_Vars.lvupdate60freal;
|
||||
sp5dc.z += projectile->speed.z * g_Vars.lvupdate60freal;
|
||||
|
||||
mtx3ToMtx4(obj->realrot, &sp30c);
|
||||
func0f096698(&sp30c, &projectile->mtx, g_Vars.lvupdate240);
|
||||
@@ -9476,9 +9476,9 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
Mtxf spac;
|
||||
|
||||
if (projectile->unk060 < 1.0f) {
|
||||
projectile->unk060 += projectile->unk064 * g_Vars.lvupdate240freal;
|
||||
projectile->unk060 += projectile->unk064 * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_Vars.lvupdate240_60 > 0) {
|
||||
if (g_Vars.lvupdate60 > 0) {
|
||||
projectile->unk064 *= 1.1f;
|
||||
}
|
||||
|
||||
@@ -9507,7 +9507,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
|
||||
stop = false;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
sp5dc.x += PALUPF(projectile->speed.x);
|
||||
sp5dc.z += PALUPF(projectile->speed.z);
|
||||
|
||||
@@ -9516,7 +9516,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
||||
f32 dist = sqrtf(projectile->speed.f[0] * projectile->speed.f[0] + projectile->speed.f[2] * projectile->speed.f[2]);
|
||||
|
||||
if (dist > 0.0f) {
|
||||
f12 = projectile->unk098 * g_Vars.lvupdate240freal / dist;
|
||||
f12 = projectile->unk098 * g_Vars.lvupdate60freal / dist;
|
||||
|
||||
if (f12 >= 1.0f) {
|
||||
projectile->speed.x = 0.0f;
|
||||
@@ -10170,7 +10170,7 @@ void escastepTick(struct prop *prop)
|
||||
|
||||
resetting = false;
|
||||
|
||||
step->frame += g_Vars.lvupdate240_60;
|
||||
step->frame += g_Vars.lvupdate60;
|
||||
|
||||
keyframes = (obj->flags & OBJFLAG_ESCSTEP_ZALIGNED) ? g_EscaStepKeyframesZ : g_EscaStepKeyframesX;
|
||||
|
||||
@@ -10341,10 +10341,10 @@ void cctvTick(struct prop *camprop)
|
||||
|
||||
if (canseeplayer) {
|
||||
obj->flags |= OBJFLAG_CAMERA_BONDINVIEW;
|
||||
camera->seebondtime60 += g_Vars.lvupdate240_60;
|
||||
camera->seebondtime60 += g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.coopplayernum >= 0) {
|
||||
camera->seebondtime60 += g_Vars.lvupdate240_60;
|
||||
camera->seebondtime60 += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (camera->seebondtime60 >= (s32)(TICKS(300) * g_CctvWaitScale)) {
|
||||
@@ -10360,13 +10360,13 @@ void cctvTick(struct prop *camprop)
|
||||
f32 tmp = camera->yspeed * camera->yspeed * 764.06536865234f;
|
||||
|
||||
if (camera->yrot >= yaw - tmp) {
|
||||
camera->yspeed -= 0.00065439427271485f * g_Vars.lvupdate240freal;
|
||||
camera->yspeed -= 0.00065439427271485f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (camera->yspeed < 0.00065439427271485f) {
|
||||
camera->yspeed = 0.00065439427271485f;
|
||||
}
|
||||
} else if (camera->yspeed < camera->ymaxspeed) {
|
||||
f32 newspeed = camera->yspeed + 0.00065439427271485f * g_Vars.lvupdate240freal;
|
||||
f32 newspeed = camera->yspeed + 0.00065439427271485f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (newspeed > camera->ymaxspeed) {
|
||||
newspeed = camera->ymaxspeed;
|
||||
@@ -10377,7 +10377,7 @@ void cctvTick(struct prop *camprop)
|
||||
}
|
||||
}
|
||||
|
||||
camera->yrot += camera->yspeed * g_Vars.lvupdate240freal;
|
||||
camera->yrot += camera->yspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (camera->yrot >= yaw) {
|
||||
camera->yrot = yaw;
|
||||
@@ -10388,13 +10388,13 @@ void cctvTick(struct prop *camprop)
|
||||
f32 tmp = camera->yspeed * camera->yspeed * 764.06536865234f;
|
||||
|
||||
if (camera->yrot <= yaw + tmp) {
|
||||
camera->yspeed -= 0.00065439427271485f * g_Vars.lvupdate240freal;
|
||||
camera->yspeed -= 0.00065439427271485f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (camera->yspeed < 0.00065439427271485f) {
|
||||
camera->yspeed = 0.00065439427271485f;
|
||||
}
|
||||
} else if (camera->yspeed < camera->ymaxspeed) {
|
||||
f32 newspeed = camera->yspeed + 0.00065439427271485f * g_Vars.lvupdate240freal;
|
||||
f32 newspeed = camera->yspeed + 0.00065439427271485f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (newspeed > camera->ymaxspeed) {
|
||||
newspeed = camera->ymaxspeed;
|
||||
@@ -10405,7 +10405,7 @@ void cctvTick(struct prop *camprop)
|
||||
}
|
||||
}
|
||||
|
||||
camera->yrot -= camera->yspeed * g_Vars.lvupdate240freal;
|
||||
camera->yrot -= camera->yspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (camera->yrot <= yaw) {
|
||||
camera->yrot = yaw;
|
||||
@@ -10462,7 +10462,7 @@ void fanTick(struct prop *prop)
|
||||
// Adjust fan speed
|
||||
if (fan->on == true) {
|
||||
// Accelerating
|
||||
fan->yspeed += fan->yaccel * g_Vars.lvupdate240freal;
|
||||
fan->yspeed += fan->yaccel * g_Vars.lvupdate60freal;
|
||||
|
||||
if (fan->yspeed > fan->ymaxspeed) {
|
||||
fan->yspeed = fan->ymaxspeed;
|
||||
@@ -10482,7 +10482,7 @@ void fanTick(struct prop *prop)
|
||||
|
||||
// Rotate
|
||||
if (fan->yspeed > 0) {
|
||||
fan->yrot += fan->yspeed * g_Vars.lvupdate240freal;
|
||||
fan->yrot += fan->yspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
while (fan->yrot >= 1.5705462694168f) { // almost BADDEG2RAD(90)
|
||||
fan->yrot -= 1.5705462694168f;
|
||||
@@ -10498,7 +10498,7 @@ void fanUpdateModel(struct prop *prop)
|
||||
Mtxf sp6c;
|
||||
f32 sp48[3][3];
|
||||
f32 sp24[3][3];
|
||||
f32 angle = fan->yspeed * g_Vars.lvupdate240freal;
|
||||
f32 angle = fan->yspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
while (angle >= M_BADTAU) {
|
||||
angle -= M_BADTAU;
|
||||
@@ -10592,13 +10592,13 @@ void autogunTick(struct prop *prop)
|
||||
// must be here for a match, so it was likely copied from later in the
|
||||
// function.
|
||||
if (spinup) {
|
||||
autogun->barrelspeed += 0.009971722f * g_Vars.lvupdate240freal;
|
||||
autogun->barrelspeed += 0.009971722f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (autogun->barrelspeed > maxspeed) {
|
||||
autogun->barrelspeed = maxspeed;
|
||||
}
|
||||
} else if (autogun->barrelspeed > 0.0f) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
autogun->barrelspeed *= 0.99f;
|
||||
}
|
||||
|
||||
@@ -10608,7 +10608,7 @@ void autogunTick(struct prop *prop)
|
||||
}
|
||||
|
||||
if (autogun->barrelspeed > 0.0f) {
|
||||
autogun->barrelrot += autogun->barrelspeed * g_Vars.lvupdate240freal;
|
||||
autogun->barrelrot += autogun->barrelspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
while (autogun->barrelrot >= M_BADTAU) {
|
||||
autogun->barrelrot -= M_BADTAU;
|
||||
@@ -10940,13 +10940,13 @@ void autogunTick(struct prop *prop)
|
||||
|
||||
// Increase or decrease the barrel speed and apply the rotation
|
||||
if (spinup) {
|
||||
autogun->barrelspeed += 0.009971722f * g_Vars.lvupdate240freal;
|
||||
autogun->barrelspeed += 0.009971722f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (autogun->barrelspeed > 0.5983033f) {
|
||||
autogun->barrelspeed = 0.5983033f;
|
||||
}
|
||||
} else if (autogun->barrelspeed > 0.0f) {
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
autogun->barrelspeed *= 0.99f;
|
||||
}
|
||||
|
||||
@@ -10956,7 +10956,7 @@ void autogunTick(struct prop *prop)
|
||||
}
|
||||
|
||||
if (autogun->barrelspeed > 0.0f) {
|
||||
autogun->barrelrot += autogun->barrelspeed * g_Vars.lvupdate240freal;
|
||||
autogun->barrelrot += autogun->barrelspeed * g_Vars.lvupdate60freal;
|
||||
|
||||
while (autogun->barrelrot >= M_BADTAU) {
|
||||
autogun->barrelrot -= M_BADTAU;
|
||||
@@ -11280,7 +11280,7 @@ void autogunTickShoot(struct prop *autogunprop)
|
||||
|
||||
if (sqguntohitdist >= sqguntotargetdist) {
|
||||
f32 guntotargetdist = sqrtf(sqguntotargetdist);
|
||||
f32 increment = 0.16f * g_Vars.lvupdate240freal * g_AutogunAccuracyScale;
|
||||
f32 increment = 0.16f * g_Vars.lvupdate60freal * g_AutogunAccuracyScale;
|
||||
|
||||
if (guntotargetdist > 200.0f) {
|
||||
increment *= 200.0f / guntotargetdist;
|
||||
@@ -11744,7 +11744,7 @@ void chopperIncrementBarrel(struct prop *chopperprop, bool firing)
|
||||
}
|
||||
|
||||
if (chopper->barrelrotspeed < 0.34906584f) {
|
||||
chopper->barrelrotspeed += 0.017453292f * LVUPDATE240FREAL();
|
||||
chopper->barrelrotspeed += 0.017453292f * LVUPDATE60FREAL();
|
||||
} else {
|
||||
chopper->barrelrotspeed = 0.34906584f;
|
||||
}
|
||||
@@ -11758,7 +11758,7 @@ void chopperIncrementBarrel(struct prop *chopperprop, bool firing)
|
||||
}
|
||||
}
|
||||
|
||||
chopper->barrelrot += chopper->barrelrotspeed * LVUPDATE240FREAL();
|
||||
chopper->barrelrot += chopper->barrelrotspeed * LVUPDATE60FREAL();
|
||||
|
||||
#if PAL
|
||||
applySpeed(&gunroty, angleh, &gunturnyspeed60, 0.0027920822612941f * speedmult, 0.0055841645225883f * speedmult, 0.16752494871616f * speedmult);
|
||||
@@ -11861,7 +11861,7 @@ void chopperIncrementMovement(struct prop *prop, f32 goalroty, f32 goalrotx, str
|
||||
dir->z *= chopper->power;
|
||||
|
||||
if (chopper->power < 3.7f) {
|
||||
chopper->power += 0.030833334f * g_Vars.lvupdate240freal;
|
||||
chopper->power += 0.030833334f * g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
chopper->bob += 0.052359f;
|
||||
@@ -11879,7 +11879,7 @@ void chopperIncrementMovement(struct prop *prop, f32 goalroty, f32 goalrotx, str
|
||||
|
||||
f2 = PAL ? 0.976f : 0.98f;
|
||||
|
||||
for (i = 1; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 1; i < g_Vars.lvupdate60; i++) {
|
||||
f2 *= PAL ? 0.976f : 0.98f;
|
||||
}
|
||||
|
||||
@@ -11979,9 +11979,9 @@ void chopperIncrementMovement(struct prop *prop, f32 goalroty, f32 goalrotx, str
|
||||
|
||||
chopper->ontarget = angle < 0.1745f;
|
||||
|
||||
newpos.x = prop->pos.x + chopper->vx * g_Vars.lvupdate240freal;
|
||||
newpos.y = prop->pos.y + chopper->vy * g_Vars.lvupdate240freal;
|
||||
newpos.z = prop->pos.z + chopper->vz * g_Vars.lvupdate240freal;
|
||||
newpos.x = prop->pos.x + chopper->vx * g_Vars.lvupdate60freal;
|
||||
newpos.y = prop->pos.y + chopper->vy * g_Vars.lvupdate60freal;
|
||||
newpos.z = prop->pos.z + chopper->vz * g_Vars.lvupdate60freal;
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &newpos, newrooms);
|
||||
|
||||
@@ -12030,7 +12030,7 @@ void chopperTickFall(struct prop *chopperprop)
|
||||
xdiff = 0;
|
||||
zdiff = 0;
|
||||
|
||||
chopper->timer60 -= g_Vars.lvupdate240_60;
|
||||
chopper->timer60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (chopper->path) {
|
||||
for (i = 0; i < chopper->path->len; i++) {
|
||||
@@ -12056,7 +12056,7 @@ void chopperTickFall(struct prop *chopperprop)
|
||||
*z = xdiff;
|
||||
} else if (chopper->timer60 >= 0) {
|
||||
// Haven't started falling yet
|
||||
chopper->timer60 -= g_Vars.lvupdate240_60;
|
||||
chopper->timer60 -= g_Vars.lvupdate60;
|
||||
} else {
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (*y > -0.7f)
|
||||
@@ -12066,7 +12066,7 @@ void chopperTickFall(struct prop *chopperprop)
|
||||
#endif
|
||||
{
|
||||
// Increase fall speed
|
||||
*y -= 0.009f * g_Vars.lvupdate240f;
|
||||
*y -= 0.009f * g_Vars.lvupdate60f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12092,7 +12092,7 @@ void chopperTickFall(struct prop *chopperprop)
|
||||
f32 bob;
|
||||
s32 i;
|
||||
|
||||
for (i = 1; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 1; i < g_Vars.lvupdate60; i++) {
|
||||
mult *= 1.0f - PALUPF(0.02f);
|
||||
}
|
||||
|
||||
@@ -12114,9 +12114,9 @@ void chopperTickFall(struct prop *chopperprop)
|
||||
newspeed.y = mult * (speed.f[1] * chopper->power + chopper->vy);
|
||||
newspeed.z = mult * (speed.f[2] * chopper->power + chopper->vz);
|
||||
|
||||
newpos.x = chopperprop->pos.x + newspeed.f[0] * g_Vars.lvupdate240freal;
|
||||
newpos.y = chopperprop->pos.y + newspeed.f[1] * g_Vars.lvupdate240freal;
|
||||
newpos.z = chopperprop->pos.z + newspeed.f[2] * g_Vars.lvupdate240freal;
|
||||
newpos.x = chopperprop->pos.x + newspeed.f[0] * g_Vars.lvupdate60freal;
|
||||
newpos.y = chopperprop->pos.y + newspeed.f[1] * g_Vars.lvupdate60freal;
|
||||
newpos.z = chopperprop->pos.z + newspeed.f[2] * g_Vars.lvupdate60freal;
|
||||
|
||||
if (cdExamLos09(&chopperprop->pos, chopperprop->rooms, &newpos, CDTYPE_BG) == CDRESULT_COLLISION) {
|
||||
struct coord sp74;
|
||||
@@ -12186,7 +12186,7 @@ void chopperTickIdle(struct prop *prop)
|
||||
|
||||
chraiExecute(chopper, PROPTYPE_OBJ);
|
||||
|
||||
chopper->timer60 += g_Vars.lvupdate240_60;
|
||||
chopper->timer60 += g_Vars.lvupdate60;
|
||||
|
||||
coord.x = 0;
|
||||
coord.y = 0;
|
||||
@@ -12208,10 +12208,10 @@ void chopperTickPatrol(struct prop *chopperprop)
|
||||
|
||||
chraiExecute(chopper, PROPTYPE_OBJ);
|
||||
|
||||
chopper->timer60 += g_Vars.lvupdate240_60;
|
||||
chopper->timer60 += g_Vars.lvupdate60;
|
||||
|
||||
if (chopper->patroltimer60 > 0) {
|
||||
chopper->patroltimer60 -= g_Vars.lvupdate240_60;
|
||||
chopper->patroltimer60 -= g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (chopper->path) {
|
||||
@@ -12289,7 +12289,7 @@ void chopperTickCombat(struct prop *chopperprop)
|
||||
|
||||
chraiExecute(chopper, PROPTYPE_OBJ);
|
||||
|
||||
chopper->timer60 += g_Vars.lvupdate240_60;
|
||||
chopper->timer60 += g_Vars.lvupdate60;
|
||||
|
||||
if ((chopper->targetvisible && dist < 2000000.0f) || chopper->path == NULL) {
|
||||
// Stay put
|
||||
@@ -12483,8 +12483,8 @@ void hovercarTick(struct prop *prop)
|
||||
|
||||
if (hovercar->dead) {
|
||||
if (active) {
|
||||
hovercar->deadtimer60 -= g_Vars.lvupdate240_60;
|
||||
hovercar->sparkstimer60 -= g_Vars.lvupdate240_60;
|
||||
hovercar->deadtimer60 -= g_Vars.lvupdate60;
|
||||
hovercar->sparkstimer60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (hovercar->sparkstimer60 < 0) {
|
||||
hovercar->sparkstimer60 = TICKS(50);
|
||||
@@ -12600,30 +12600,30 @@ void hovercarTick(struct prop *prop)
|
||||
// during acceleration can cause the hovercar to exceed its max speed.
|
||||
if (hovercar->speedtime60 >= 0) {
|
||||
if (1);
|
||||
if (hovercar->speedtime60 <= g_Vars.lvupdate240freal) {
|
||||
if (hovercar->speedtime60 <= g_Vars.lvupdate60freal) {
|
||||
hovercar->speed = hovercar->speedaim;
|
||||
} else {
|
||||
hovercar->speed += (hovercar->speedaim - hovercar->speed) * g_Vars.lvupdate240freal / hovercar->speedtime60;
|
||||
hovercar->speed += (hovercar->speedaim - hovercar->speed) * g_Vars.lvupdate60freal / hovercar->speedtime60;
|
||||
}
|
||||
|
||||
hovercar->speedtime60 -= g_Vars.lvupdate240freal;
|
||||
hovercar->speedtime60 -= g_Vars.lvupdate60freal;
|
||||
}
|
||||
|
||||
if (active) {
|
||||
if (hovercar->turnyspeed60 > 0) {
|
||||
hovercar->speed -= hovercar->speedaim * (1.0f / 24.0f) * LVUPDATE240FREAL();
|
||||
hovercar->speed -= hovercar->speedaim * (1.0f / 24.0f) * LVUPDATE60FREAL();
|
||||
|
||||
if (hovercar->speed < 0) {
|
||||
hovercar->speed = 0.1f;
|
||||
}
|
||||
} else {
|
||||
if (hovercar->speed < hovercar->speedaim) {
|
||||
hovercar->speed += hovercar->speedaim * (1.0f / 24.0f) * LVUPDATE240FREAL();
|
||||
hovercar->speed += hovercar->speedaim * (1.0f / 24.0f) * LVUPDATE60FREAL();
|
||||
}
|
||||
}
|
||||
|
||||
if (stopping) {
|
||||
hovercar->speed -= 50.0f / 240.f * LVUPDATE240FREAL();
|
||||
hovercar->speed -= 50.0f / 240.f * LVUPDATE60FREAL();
|
||||
|
||||
if (hovercar->speed < 0) {
|
||||
hovercar->speed = 0;
|
||||
@@ -12693,9 +12693,9 @@ void hovercarTick(struct prop *prop)
|
||||
sp194.y = active ? sinf(sp1fc) : sinf(sp18c);
|
||||
sp194.z = cosf(sp190) * sp138;
|
||||
|
||||
sp150.x = prop->pos.x + sp194.f[0] * (hovercar->speed * g_Vars.lvupdate240freal);
|
||||
sp150.y = prop->pos.y + sp194.f[1] * (hovercar->speed * g_Vars.lvupdate240freal);
|
||||
sp150.z = prop->pos.z + sp194.f[2] * (hovercar->speed * g_Vars.lvupdate240freal);
|
||||
sp150.x = prop->pos.x + sp194.f[0] * (hovercar->speed * g_Vars.lvupdate60freal);
|
||||
sp150.y = prop->pos.y + sp194.f[1] * (hovercar->speed * g_Vars.lvupdate60freal);
|
||||
sp150.z = prop->pos.z + sp194.f[2] * (hovercar->speed * g_Vars.lvupdate60freal);
|
||||
|
||||
func0f065e74(&prop->pos, prop->rooms, &sp150, sp140);
|
||||
|
||||
@@ -12704,7 +12704,7 @@ void hovercarTick(struct prop *prop)
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
if (sp150.y < -100000) {
|
||||
sp150.y = prop->pos.y + sp194.f[1] * (hovercar->speed * g_Vars.lvupdate240freal);
|
||||
sp150.y = prop->pos.y + sp194.f[1] * (hovercar->speed * g_Vars.lvupdate60freal);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -12912,7 +12912,7 @@ u32 objTick(struct prop *prop)
|
||||
regenning = false;
|
||||
}
|
||||
|
||||
prop->timetoregen -= g_Vars.lvupdate240_60;
|
||||
prop->timetoregen -= g_Vars.lvupdate60;
|
||||
|
||||
// If ready to start fading in but propCanRegen returns false, wait
|
||||
// another second and try again. In practice propCanRegen will always
|
||||
@@ -15135,7 +15135,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
break;
|
||||
case TVCMD_PAUSE: // f07ffb4
|
||||
if (screen->pause60 >= 0) {
|
||||
screen->pause60 -= g_Vars.lvupdate240_60;
|
||||
screen->pause60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (screen->pause60 >= 0) {
|
||||
yielding = true;
|
||||
@@ -15186,7 +15186,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
screen->offset += 2;
|
||||
break;
|
||||
case TVCMD_ROTATEREL: // f080140
|
||||
screen->rot += g_Vars.lvupdate240f * (s32)cmd[1] * (M_BADTAU / 65536.0f);
|
||||
screen->rot += g_Vars.lvupdate60f * (s32)cmd[1] * (M_BADTAU / 65536.0f);
|
||||
|
||||
if (screen->rot >= M_BADTAU) {
|
||||
screen->rot -= M_BADTAU;
|
||||
@@ -15203,7 +15203,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
|
||||
// Increment X scale
|
||||
if (screen->xscaleinc > 0) {
|
||||
screen->xscalefrac += screen->xscaleinc * g_Vars.lvupdate240f;
|
||||
screen->xscalefrac += screen->xscaleinc * g_Vars.lvupdate60f;
|
||||
|
||||
if (screen->xscalefrac < 1.0f) {
|
||||
screen->xscale = screen->xscaleold + (screen->xscalenew - screen->xscaleold) * screen->xscalefrac;
|
||||
@@ -15216,7 +15216,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
|
||||
// Increment Y scale
|
||||
if (screen->yscaleinc > 0) {
|
||||
screen->yscalefrac += screen->yscaleinc * g_Vars.lvupdate240f;
|
||||
screen->yscalefrac += screen->yscaleinc * g_Vars.lvupdate60f;
|
||||
|
||||
if (screen->yscalefrac < 1.0f) {
|
||||
screen->yscale = screen->yscaleold + (screen->yscalenew - screen->yscaleold) * screen->yscalefrac;
|
||||
@@ -15229,7 +15229,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
|
||||
// Increment X scroll
|
||||
if (screen->xmidinc > 0) {
|
||||
screen->xmidfrac += screen->xmidinc * g_Vars.lvupdate240f;
|
||||
screen->xmidfrac += screen->xmidinc * g_Vars.lvupdate60f;
|
||||
|
||||
if (screen->xmidfrac < 1.0f) {
|
||||
screen->xmid = screen->xmidold + (screen->xmidnew - screen->xmidold) * screen->xmidfrac;
|
||||
@@ -15242,7 +15242,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
|
||||
// Increment Y scroll
|
||||
if (screen->ymidinc > 0) {
|
||||
screen->ymidfrac += screen->ymidinc * g_Vars.lvupdate240f;
|
||||
screen->ymidfrac += screen->ymidinc * g_Vars.lvupdate60f;
|
||||
|
||||
if (screen->ymidfrac < 1.0f) {
|
||||
screen->ymid = screen->ymidold + (screen->ymidnew - screen->ymidold) * screen->ymidfrac;
|
||||
@@ -15256,7 +15256,7 @@ Gfx *tvscreenRender(struct model *model, struct modelnode *node, struct tvscreen
|
||||
// Increment colour change
|
||||
// 370
|
||||
if (screen->colinc > 0) {
|
||||
screen->colfrac += screen->colinc * g_Vars.lvupdate240f;
|
||||
screen->colfrac += screen->colinc * g_Vars.lvupdate60f;
|
||||
|
||||
// 398
|
||||
if (screen->colfrac < 1.0f) {
|
||||
@@ -22936,7 +22936,7 @@ bool doorCalcIntendedFrac(struct doorobj *door)
|
||||
bool checkcollision = false;
|
||||
|
||||
if (door->doortype == DOORTYPE_LASER && door->fadetime60 != 0) {
|
||||
door->fadetime60 -= g_Vars.lvupdate240_60;
|
||||
door->fadetime60 -= g_Vars.lvupdate60;
|
||||
|
||||
if (door->fadetime60 < 0) {
|
||||
door->fadetime60 = 0;
|
||||
@@ -23673,7 +23673,7 @@ void gasTick(void)
|
||||
u32 stack;
|
||||
|
||||
if (g_GasReleasing) {
|
||||
g_GasReleaseTimer240 += g_Vars.lvupdate240freal;
|
||||
g_GasReleaseTimer240 += g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_GasReleaseTimer240 >= g_GasReleaseTimerMax240) {
|
||||
g_GasReleaseTimer240 = g_GasReleaseTimerMax240;
|
||||
@@ -23702,7 +23702,7 @@ void gasTick(void)
|
||||
if (g_GasSoundTimer240 < g_GasReleaseTimerMax240) {
|
||||
s16 soundnum = -1;
|
||||
|
||||
g_GasSoundTimer240 += g_Vars.lvupdate240freal;
|
||||
g_GasSoundTimer240 += g_Vars.lvupdate60freal;
|
||||
|
||||
if (!g_GasAudioHandle && !lvIsPaused()) {
|
||||
soundnum = SFX_0037;
|
||||
@@ -23756,7 +23756,7 @@ bool countdownTimerIsRunning(void)
|
||||
void countdownTimerTick(void)
|
||||
{
|
||||
if (g_CountdownTimerRunning) {
|
||||
g_CountdownTimerValue60 -= g_Vars.lvupdate240freal;
|
||||
g_CountdownTimerValue60 -= g_Vars.lvupdate60freal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23892,7 +23892,7 @@ void alarmTick(void)
|
||||
}
|
||||
}
|
||||
|
||||
g_AlarmTimer += g_Vars.lvupdate240_60;
|
||||
g_AlarmTimer += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
// For G5, stop alarm after 55 seconds.
|
||||
@@ -24112,9 +24112,9 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct
|
||||
sp120.y = dir->y * 0.27777776f;
|
||||
sp120.z = dir->z * 0.27777776f;
|
||||
|
||||
sp130.x = sp120.f[0] * g_Vars.lvupdate240freal;
|
||||
sp130.y = sp120.f[1] * g_Vars.lvupdate240freal;
|
||||
sp130.z = sp120.f[2] * g_Vars.lvupdate240freal;
|
||||
sp130.x = sp120.f[0] * g_Vars.lvupdate60freal;
|
||||
sp130.y = sp120.f[1] * g_Vars.lvupdate60freal;
|
||||
sp130.z = sp120.f[2] * g_Vars.lvupdate60freal;
|
||||
|
||||
bgun0f09ebcc(&rocket->base, pos, fromprop->rooms, &spe0, &sp130, &sp13c, fromprop, pos);
|
||||
|
||||
@@ -24173,7 +24173,7 @@ void projectileCreate(struct prop *fromprop, struct fireslotthing *arg1, struct
|
||||
aimpos.z = targetprop->pos.z;
|
||||
|
||||
if (func0f06b39c(pos, dir, &aimpos, 30)) {
|
||||
f32 f0 = 0.16f * g_Vars.lvupdate240freal * arg1->unk0c;
|
||||
f32 f0 = 0.16f * g_Vars.lvupdate60freal * arg1->unk0c;
|
||||
|
||||
if (dist > 200.0f) {
|
||||
f0 *= 200.0f / dist;
|
||||
|
||||
+5
-5
@@ -3521,17 +3521,17 @@ void propsndTickChannel(s32 channelnum)
|
||||
if (channel->unk06 == -1) {
|
||||
sp48 = channel->unk04;
|
||||
} else if (channel->unk1c >= 0) {
|
||||
if (channel->unk1c > g_Vars.lvupdate240_60) {
|
||||
sp48 = channel->unk06 + (channel->unk04 - channel->unk06) * g_Vars.lvupdate240_60 / channel->unk1c;
|
||||
if (channel->unk1c > g_Vars.lvupdate60) {
|
||||
sp48 = channel->unk06 + (channel->unk04 - channel->unk06) * g_Vars.lvupdate60 / channel->unk1c;
|
||||
}
|
||||
|
||||
channel->unk1c -= g_Vars.lvupdate240_60;
|
||||
channel->unk1c -= g_Vars.lvupdate60;
|
||||
} else if (channel->unk18 && channel->unk06 != channel->unk04) {
|
||||
f32 f12 = channel->unk04 - channel->unk06;
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
f32 f14 = g_Vars.lvupdate240freal * (1.0f / 6000.0f) * channel->unk18;
|
||||
f32 f14 = g_Vars.lvupdate60freal * (1.0f / 6000.0f) * channel->unk18;
|
||||
#else
|
||||
f32 f14 = g_Vars.lvupdate240_60 * (1.0f / 6000.0f) * channel->unk18;
|
||||
f32 f14 = g_Vars.lvupdate60 * (1.0f / 6000.0f) * channel->unk18;
|
||||
#endif
|
||||
|
||||
if (ABS(f12) > 1.0f) {
|
||||
|
||||
@@ -11,7 +11,7 @@ void shardsTick(void)
|
||||
s32 j;
|
||||
|
||||
if (g_ShardsActive) {
|
||||
lvupdate = (g_Vars.lvupdate240_60 < TICKS(15)) ? g_Vars.lvupdate240_60 : TICKS(15);
|
||||
lvupdate = (g_Vars.lvupdate60 < TICKS(15)) ? g_Vars.lvupdate60 : TICKS(15);
|
||||
|
||||
for (i = 0; i < g_MaxShards; i++) {
|
||||
if (g_Shards[i].age60 > 0) {
|
||||
|
||||
+1
-1
@@ -506,7 +506,7 @@ Gfx *sightDrawDelayedAimer(Gfx *gdl, s32 x, s32 y, s32 radius, s32 cornergap, u3
|
||||
static f32 xspeed = 0;
|
||||
static f32 yspeed = 0;
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240_60; i++) {
|
||||
for (i = 0; i < g_Vars.lvupdate60; i++) {
|
||||
dist = x - xpos;
|
||||
|
||||
if (dist > 0.5f || dist < -0.5f) {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
|
||||
void skyTick(void)
|
||||
{
|
||||
g_SkyCloudOffset += g_Vars.lvupdate240freal * g_SkyWindSpeed;
|
||||
g_SkyCloudOffset += g_Vars.lvupdate60freal * g_SkyWindSpeed;
|
||||
|
||||
if (g_SkyCloudOffset > 4096) {
|
||||
g_SkyCloudOffset -= 4096;
|
||||
|
||||
+1
-1
@@ -457,7 +457,7 @@ u32 smokeTick(struct prop *prop)
|
||||
|
||||
// These tick values aren't adjusted for PAL,
|
||||
// so smoke will hang around for longer in PAL versions
|
||||
lvupdate = g_Vars.lvupdate240_60 < 15 ? (f32)g_Vars.lvupdate240_60 : 15.0f;
|
||||
lvupdate = g_Vars.lvupdate60 < 15 ? (f32)g_Vars.lvupdate60 : 15.0f;
|
||||
|
||||
for (i = 0; i < lvupdate; i++) {
|
||||
smoke->age++;
|
||||
|
||||
@@ -30,7 +30,7 @@ void sparksTick(void)
|
||||
}
|
||||
|
||||
// Iterate the lvupdate multiplier
|
||||
for (j = 0; j < g_Vars.lvupdate240_60; j++) {
|
||||
for (j = 0; j < g_Vars.lvupdate60; j++) {
|
||||
group->age++;
|
||||
next = group->startindex;
|
||||
spark = &g_Sparks[next];
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ void splatTickChr(struct prop *prop)
|
||||
}
|
||||
}
|
||||
|
||||
chr->tickssincesplat += g_Vars.lvupdate240_60;
|
||||
chr->tickssincesplat += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
void splatsCreateForChrHit(struct prop *prop, struct shotdata *shotdata, struct coord *arg2, struct coord *arg3, bool isskedar, s32 splattype, struct chrdata *chr2)
|
||||
|
||||
+14
-23
@@ -7,21 +7,21 @@
|
||||
|
||||
void frametimeInit(void)
|
||||
{
|
||||
g_Vars.thisframetime = osGetCount();
|
||||
g_Vars.lastframetime = g_Vars.thisframetime;
|
||||
g_Vars.thisframestartt = osGetCount();
|
||||
g_Vars.prevframestartt = g_Vars.thisframestartt;
|
||||
}
|
||||
|
||||
void frametimeApply(s32 diffframe60, s32 diffframe240, s32 frametime)
|
||||
{
|
||||
g_Vars.lastframetime = g_Vars.thisframetime;
|
||||
g_Vars.thisframetime = frametime;
|
||||
g_Vars.prevframestartt = g_Vars.thisframestartt;
|
||||
g_Vars.thisframestartt = frametime;
|
||||
|
||||
g_Vars.diffframe60 = diffframe60;
|
||||
g_Vars.diffframe60f = diffframe60;
|
||||
g_Vars.diffframe60freal = PALUPF(g_Vars.diffframe60f);
|
||||
|
||||
g_Vars.lastframe240 = g_Vars.thisframe240;
|
||||
g_Vars.thisframe240 += diffframe240;
|
||||
g_Vars.prevframestart240 = g_Vars.thisframestart240;
|
||||
g_Vars.thisframestart240 += diffframe240;
|
||||
g_Vars.diffframe240 = diffframe240;
|
||||
g_Vars.diffframe240f = diffframe240;
|
||||
g_Vars.diffframe240freal = PALUPF(g_Vars.diffframe240f);
|
||||
@@ -30,31 +30,22 @@ void frametimeApply(s32 diffframe60, s32 diffframe240, s32 frametime)
|
||||
void frametimeCalculate(void)
|
||||
{
|
||||
u32 count;
|
||||
u32 thisframeticks;
|
||||
u32 diffframet;
|
||||
u32 diffframe60;
|
||||
u32 diffframe240;
|
||||
|
||||
do {
|
||||
count = osGetCount();
|
||||
thisframeticks = count - g_Vars.thisframetime;
|
||||
g_Vars.thisframeticks = thisframeticks;
|
||||
diffframet = count - g_Vars.thisframestartt;
|
||||
g_Vars.diffframet = diffframet;
|
||||
|
||||
#if PAL
|
||||
diffframe60 = (g_Vars.lostframetime + thisframeticks + 468750) / 937500;
|
||||
diffframe240 = (g_Vars.lostframetime240 + thisframeticks + 117187) / 234375;
|
||||
#else
|
||||
diffframe60 = (g_Vars.lostframetime + thisframeticks + 390625) / 781250;
|
||||
diffframe240 = (g_Vars.lostframetime240 + thisframeticks + 97656) / 195312;
|
||||
#endif
|
||||
diffframe60 = (g_Vars.lostframetime60t + diffframet + CYCLES_PER_FRAME / 2) / CYCLES_PER_FRAME;
|
||||
diffframe240 = (g_Vars.lostframetime240t + diffframet + CYCLES_PER_FRAME / 2 / 4) / (CYCLES_PER_FRAME / 4);
|
||||
} while (diffframe60 < g_Vars.mininc60);
|
||||
|
||||
#if PAL
|
||||
g_Vars.lostframetime = (g_Vars.lostframetime + thisframeticks) - (diffframe60 * 937500);
|
||||
g_Vars.lostframetime240 = (g_Vars.lostframetime240 + thisframeticks) - (diffframe240 * 234375);
|
||||
#else
|
||||
g_Vars.lostframetime = (g_Vars.lostframetime + thisframeticks) - (diffframe60 * 781250);
|
||||
g_Vars.lostframetime240 = (g_Vars.lostframetime240 + thisframeticks) - (diffframe240 * 195312);
|
||||
#endif
|
||||
g_Vars.lostframetime60t = g_Vars.lostframetime60t + diffframet - diffframe60 * CYCLES_PER_FRAME;
|
||||
g_Vars.lostframetime240t = g_Vars.lostframetime240t + diffframet - diffframe240 * (CYCLES_PER_FRAME / 4);
|
||||
|
||||
g_Vars.mininc60 = 1;
|
||||
|
||||
frametimeApply(diffframe60, diffframe240, count);
|
||||
|
||||
+21
-21
@@ -198,7 +198,7 @@ void titleTickLegal(void)
|
||||
viSetZRange(100, 10000);
|
||||
viSetUseZBuf(false);
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_TitleTimer > TICKS(180)) {
|
||||
titleSetNextMode(TITLEMODE_CHECKCONTROLLERS);
|
||||
@@ -691,7 +691,7 @@ void titleTickPdLogo(void)
|
||||
viSetZRange(100, 10000);
|
||||
viSetUseZBuf(false);
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
var8009ccb8 = 1 - var8009ccb8;
|
||||
|
||||
#if VERSION == VERSION_JPN_FINAL
|
||||
@@ -7065,7 +7065,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
g_PdLogoYRotStopping = false;
|
||||
}
|
||||
} else /*e18*/ if (g_PdLogoYRotEnabled) {
|
||||
g_PdLogoYRotCur += g_PdLogoYRotSpeed * g_Vars.lvupdate240freal;
|
||||
g_PdLogoYRotCur += g_PdLogoYRotSpeed * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_PdLogoYRotCur >= M_BADTAU) {
|
||||
g_PdLogoYRotCur -= M_BADTAU;
|
||||
@@ -7078,7 +7078,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
if (g_PdLogoPreMorphTimer != 0) {
|
||||
s32 duration = 80;
|
||||
|
||||
g_PdLogoPreMorphTimer += g_Vars.lvupdate240_60;
|
||||
g_PdLogoPreMorphTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_PdLogoPreMorphTimer > 0) {
|
||||
g_PdLogoFrac = (f32) g_PdLogoPreMorphTimer / (f32) duration;
|
||||
@@ -7096,7 +7096,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
|
||||
// f14
|
||||
if (g_PdLogoMorphing) {
|
||||
g_PdLogoFrac += 0.004f * g_Vars.lvupdate240freal;
|
||||
g_PdLogoFrac += 0.004f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_PdLogoFrac >= 0.8f) {
|
||||
if (g_PdLogoMorphEndTimer == 0) {
|
||||
@@ -7112,7 +7112,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
|
||||
// f80
|
||||
if (g_PdLogoMorphEndTimer != 0) {
|
||||
g_PdLogoMorphEndTimer += g_Vars.lvupdate240_60;
|
||||
g_PdLogoMorphEndTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_PdLogoXRotCur > 0.0f) {
|
||||
// Implement the camera lowering effect, but it's actually
|
||||
@@ -7125,14 +7125,14 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_PdLogoMorphEndTimer > 30 && g_PdLogoMorphEndTimer - g_Vars.lvupdate240_60 <= 30) {
|
||||
if (g_PdLogoMorphEndTimer > 30 && g_PdLogoMorphEndTimer - g_Vars.lvupdate60 <= 30) {
|
||||
// Start slowing the spinning rotation
|
||||
g_PdLogoYRotEnabled = false;
|
||||
g_PdLogoYRotStopping = true;
|
||||
g_PdLogoEndYRot = ((s32) (g_PdLogoYRotCur * 4.0f / M_BADTAU) + 2) * M_BADTAU * 0.25f;
|
||||
}
|
||||
|
||||
if (g_PdLogoMorphEndTimer > 100 && g_PdLogoMorphEndTimer - g_Vars.lvupdate240_60 <= 100) {
|
||||
if (g_PdLogoMorphEndTimer > 100 && g_PdLogoMorphEndTimer - g_Vars.lvupdate60 <= 100) {
|
||||
g_PdLogoDarkenEnabled = true;
|
||||
}
|
||||
|
||||
@@ -7148,7 +7148,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
// Fading out the side and back faces of the logo...
|
||||
// This is done by adjusting the ambient lighting. I guess the front
|
||||
// face is excluded from ambient light?
|
||||
g_PdLogoAmbientLightFrac -= 0.0075f * g_Vars.lvupdate240freal;
|
||||
g_PdLogoAmbientLightFrac -= 0.0075f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_PdLogoAmbientLightFrac <= 0.0f) {
|
||||
g_PdLogoAmbientLightFrac = 0.0f;
|
||||
@@ -7159,7 +7159,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
|
||||
// 178
|
||||
if (g_PdLogoPreTitleTimer != 0) {
|
||||
g_PdLogoPreTitleTimer += g_Vars.lvupdate240_60;
|
||||
g_PdLogoPreTitleTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_PdLogoPreTitleTimer > 20) {
|
||||
g_PdLogoPreTitleTimer = 0;
|
||||
@@ -7175,7 +7175,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
|
||||
// 1c4
|
||||
if (g_PdLogoPointlessTimer != 0) {
|
||||
g_PdLogoPointlessTimer += g_Vars.lvupdate240_60;
|
||||
g_PdLogoPointlessTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_PdLogoPointlessTimer > 0) {
|
||||
g_PdLogoPointlessTimer = 0;
|
||||
@@ -7212,7 +7212,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
// 2d4
|
||||
if (g_PdLogoUnusedRotEnabled) {
|
||||
// Some unused value... maybe a different method of rotating the light?
|
||||
g_PdLogoUnusedRot += 0.0062821852043271f * g_Vars.lvupdate240freal;
|
||||
g_PdLogoUnusedRot += 0.0062821852043271f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_PdLogoUnusedRot >= M_BADTAU) {
|
||||
g_PdLogoUnusedRot -= M_BADTAU;
|
||||
@@ -7221,7 +7221,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
|
||||
// 32c
|
||||
if (g_PdLogoLightMoving) {
|
||||
g_PdLogoLightDirFrac += 0.017f * g_Vars.lvupdate240freal;
|
||||
g_PdLogoLightDirFrac += 0.017f * g_Vars.lvupdate60freal;
|
||||
|
||||
if (g_PdLogoLightDirFrac >= 1.0f) {
|
||||
g_PdLogoLightDirFrac = 1.0f;
|
||||
@@ -7231,7 +7231,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
||||
|
||||
// 380
|
||||
if (g_PdLogoExitTimer != 0) {
|
||||
g_PdLogoExitTimer += g_Vars.lvupdate240_60;
|
||||
g_PdLogoExitTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_PdLogoExitTimer > 60) {
|
||||
g_PdLogoExitTimer = 0;
|
||||
@@ -7434,7 +7434,7 @@ void titleTickRarePresents(void)
|
||||
viSetZRange(100, 10000);
|
||||
viSetUseZBuf(false);
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_TitleTimer > TICKS(300)) {
|
||||
titleSetNextMode(TITLEMODE_PDLOGO);
|
||||
@@ -7586,10 +7586,10 @@ void titleTickNintendoLogo(void)
|
||||
viSetZRange(100, 10000);
|
||||
viSetUseZBuf(false);
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (g_TitleFastForward) {
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (joyGetButtonsPressedThisFrame(0, 0xffff)) {
|
||||
@@ -7763,7 +7763,7 @@ void titleTickRareLogo(void)
|
||||
musicQueueStartEvent(TRACKTYPE_PRIMARY, MUSIC_TITLE1, 0, 0x7fff);
|
||||
}
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
|
||||
if (joyGetButtonsPressedThisFrame(0, 0xffff)) {
|
||||
if (osResetType == RESETTYPE_WARM) {
|
||||
@@ -7860,7 +7860,7 @@ Gfx *titleRenderRareLogo(Gfx *gdl)
|
||||
titleSetLight(&var800625a8, s0, s0, s0, 0, &lightdir);
|
||||
}
|
||||
|
||||
var80062920 += g_Vars.lvupdate240f / 90;
|
||||
var80062920 += g_Vars.lvupdate60f / 90;
|
||||
|
||||
tmp = 1 - fracdone * 1;
|
||||
|
||||
@@ -8027,7 +8027,7 @@ void titleTickNoController(void)
|
||||
viSetZRange(100, 10000);
|
||||
viSetUseZBuf(false);
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
Gfx *titleRenderNoController(Gfx *gdl)
|
||||
@@ -8150,7 +8150,7 @@ void titleTickNoExpansion(void)
|
||||
viSetZRange(100, 10000);
|
||||
viSetUseZBuf(0);
|
||||
|
||||
g_TitleTimer += g_Vars.lvupdate240_60;
|
||||
g_TitleTimer += g_Vars.lvupdate60;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+15
-15
@@ -847,7 +847,7 @@ void frExecuteHelpScript(void)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
g_FrData.helpscriptsleep -= g_Vars.lvupdate240_60;
|
||||
g_FrData.helpscriptsleep -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_FrData.helpscriptsleep <= 0) {
|
||||
g_FrData.helpscriptsleep = 0;
|
||||
@@ -1605,7 +1605,7 @@ bool frIsAmmoWasted(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
g_FrData.proxyendtimer -= g_Vars.lvupdate240_60;
|
||||
g_FrData.proxyendtimer -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_FrData.proxyendtimer <= 0) {
|
||||
// Timer has just hit zero - remove all proxy items
|
||||
@@ -1698,7 +1698,7 @@ void frTick(void)
|
||||
|
||||
// Handle the menu countdown
|
||||
if (g_FrData.menucountdown != 0) {
|
||||
g_FrData.menucountdown -= g_Vars.lvupdate240_60;
|
||||
g_FrData.menucountdown -= g_Vars.lvupdate60;
|
||||
|
||||
// Prevent showing the menu until gun is put away
|
||||
if (g_FrData.menucountdown <= 0) {
|
||||
@@ -1829,7 +1829,7 @@ void frTick(void)
|
||||
g_FrData.numshotssincetopup = 0;
|
||||
}
|
||||
|
||||
g_FrData.timetaken += g_Vars.lvupdate240_60;
|
||||
g_FrData.timetaken += g_Vars.lvupdate60;
|
||||
|
||||
// Handle prestart
|
||||
if (g_FrData.timetaken < 0) {
|
||||
@@ -1884,7 +1884,7 @@ void frTick(void)
|
||||
if ((g_FrData.targets[i].flags & FRTARGETFLAG_TMPINVINCIBLE)
|
||||
&& g_FrData.targets[i].invincibletimer < TICKS(300)) {
|
||||
invincible = true;
|
||||
g_FrData.targets[i].invincibletimer += g_Vars.lvupdate240_60;
|
||||
g_FrData.targets[i].invincibletimer += g_Vars.lvupdate60;
|
||||
}
|
||||
|
||||
if (obj->damage > 0) {
|
||||
@@ -2009,7 +2009,7 @@ void frTick(void)
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
mult = g_FrData.targets[i].travelspeed * g_Vars.lvupdate240freal;
|
||||
mult = g_FrData.targets[i].travelspeed * g_Vars.lvupdate60freal;
|
||||
#else
|
||||
mult = (g_FrData.targets[i].travelspeed * g_Vars.lvupdate240) * 0.25f;
|
||||
#endif
|
||||
@@ -2087,7 +2087,7 @@ void frTick(void)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
g_FrData.targets[i].timeuntilrotate -= g_Vars.lvupdate240_60;
|
||||
g_FrData.targets[i].timeuntilrotate -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_FrData.targets[i].timeuntilrotate <= 0) {
|
||||
g_FrData.targets[i].timeuntilrotate = 0;
|
||||
@@ -2109,7 +2109,7 @@ void frTick(void)
|
||||
oldside = (u8)oldside;
|
||||
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
g_FrData.targets[i].angle += speed * g_Vars.lvupdate240freal;
|
||||
g_FrData.targets[i].angle += speed * g_Vars.lvupdate60freal;
|
||||
#else
|
||||
g_FrData.targets[i].angle += speed * g_Vars.lvupdate240 * 0.25f;
|
||||
#endif
|
||||
@@ -2147,7 +2147,7 @@ void frTick(void)
|
||||
}
|
||||
|
||||
if (g_FrData.targets[i].scriptenabled && g_FrData.targets[i].scriptsleep != SECSTOTIME60(255)) {
|
||||
g_FrData.targets[i].scriptsleep -= g_Vars.lvupdate240_60;
|
||||
g_FrData.targets[i].scriptsleep -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_FrData.targets[i].scriptsleep <= 0) {
|
||||
g_FrData.targets[i].scriptenabled = false;
|
||||
@@ -2787,7 +2787,7 @@ void dtTick(void)
|
||||
{
|
||||
if (var80088adc) {
|
||||
if (g_DtData.intraining) {
|
||||
g_DtData.timetaken += g_Vars.lvupdate240_60;
|
||||
g_DtData.timetaken += g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->isdead) {
|
||||
dtEnd();
|
||||
@@ -2808,7 +2808,7 @@ void dtTick(void)
|
||||
if (g_DtData.timeleft <= 0) {
|
||||
dtPushEndscreen();
|
||||
} else {
|
||||
g_DtData.timeleft -= g_Vars.lvupdate240_60;
|
||||
g_DtData.timeleft -= g_Vars.lvupdate60;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3074,7 +3074,7 @@ void htTick(void)
|
||||
{
|
||||
if (var80088bb8) {
|
||||
if (g_HtData.intraining) {
|
||||
g_HtData.timetaken += g_Vars.lvupdate240_60;
|
||||
g_HtData.timetaken += g_Vars.lvupdate60;
|
||||
|
||||
if (g_Vars.currentplayer->isdead) {
|
||||
htEnd();
|
||||
@@ -3095,7 +3095,7 @@ void htTick(void)
|
||||
if (g_HtData.timeleft <= 0) {
|
||||
htPushEndscreen();
|
||||
} else {
|
||||
g_HtData.timeleft -= g_Vars.lvupdate240_60;
|
||||
g_HtData.timeleft -= g_Vars.lvupdate60;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3553,7 +3553,7 @@ bool frGetFeedback(char *scorebuffer, char *zonebuffer, char *extrabuffer)
|
||||
sprintf(extrabuffer, "");
|
||||
|
||||
if (g_FrData.feedbackzone) {
|
||||
g_FrData.feedbackttl -= g_Vars.lvupdate240_60;
|
||||
g_FrData.feedbackttl -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_FrData.feedbackttl <= 0) {
|
||||
g_FrData.feedbackzone = 0;
|
||||
@@ -3603,7 +3603,7 @@ bool frGetFeedback(char *scorebuffer, char *zonebuffer)
|
||||
};
|
||||
|
||||
if (g_FrData.feedbackzone) {
|
||||
g_FrData.feedbackttl -= g_Vars.lvupdate240_60;
|
||||
g_FrData.feedbackttl -= g_Vars.lvupdate60;
|
||||
|
||||
if (g_FrData.feedbackttl <= 0) {
|
||||
g_FrData.feedbackzone = 0;
|
||||
|
||||
+17
-17
@@ -329,7 +329,7 @@ void weatherTickRain(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
if (weather->unkc0 > 0) {
|
||||
lvupdate = g_Vars.lvupdate240_60;
|
||||
lvupdate = g_Vars.lvupdate60;
|
||||
|
||||
if (weather->unkc0 < lvupdate) {
|
||||
weather->unkb8 = weather->unkbc;
|
||||
@@ -345,7 +345,7 @@ void weatherTickRain(struct weatherdata *weather)
|
||||
weather->windspeedz = -weather->windspeed;
|
||||
weather->windspeedx = 0;
|
||||
} else if (weather->unk10 > 0) {
|
||||
s32 lvupdate = g_Vars.lvupdate240_60;
|
||||
s32 lvupdate = g_Vars.lvupdate60;
|
||||
|
||||
if (weather->unk10 < lvupdate) {
|
||||
weather->windanglerad = weather->unk0c;
|
||||
@@ -377,9 +377,9 @@ void weatherTickRain(struct weatherdata *weather)
|
||||
for (i = 0; i != ARRAYCOUNT(data->particles); i++) {
|
||||
struct weatherparticle *particle = &data->particles[i];
|
||||
|
||||
particle->pos.x += particle->inc.x * LVUPDATE240FREAL();
|
||||
particle->pos.y += particle->inc.y * LVUPDATE240FREAL();
|
||||
particle->pos.z += particle->inc.z * LVUPDATE240FREAL();
|
||||
particle->pos.x += particle->inc.x * LVUPDATE60FREAL();
|
||||
particle->pos.y += particle->inc.y * LVUPDATE60FREAL();
|
||||
particle->pos.z += particle->inc.z * LVUPDATE60FREAL();
|
||||
|
||||
if (particle->pos.y < data->boundarymin.y) {
|
||||
lVar6 = 2;
|
||||
@@ -441,7 +441,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
weather->windspeedz = -weather->windspeed;
|
||||
weather->windspeedx = 0;
|
||||
} else if (weather->unk10 > 0) {
|
||||
s32 lvupdate = g_Vars.lvupdate240_60;
|
||||
s32 lvupdate = g_Vars.lvupdate60;
|
||||
|
||||
if (weather->unk10 < lvupdate) {
|
||||
weather->windanglerad = weather->unk0c;
|
||||
@@ -471,7 +471,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
data = g_WeatherData->particledata[0];
|
||||
|
||||
// 0
|
||||
data->unk3ec8[0] += 0.04f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[0] += 0.04f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[0] < 0) {
|
||||
data->unk3ec8[0] += M_TAU;
|
||||
@@ -482,7 +482,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 1
|
||||
data->unk3ec8[1] += -0.03f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[1] += -0.03f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[1] < 0) {
|
||||
data->unk3ec8[1] += M_TAU;
|
||||
@@ -493,7 +493,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 2
|
||||
data->unk3ec8[2] += 0.04f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[2] += 0.04f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[2] < 0) {
|
||||
data->unk3ec8[2] += M_TAU;
|
||||
@@ -504,7 +504,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 3
|
||||
data->unk3ec8[3] += 0.03f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[3] += 0.03f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[3] < 0) {
|
||||
data->unk3ec8[3] += M_TAU;
|
||||
@@ -515,7 +515,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 4
|
||||
data->unk3ec8[4] += 0.02f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[4] += 0.02f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[4] < 0) {
|
||||
data->unk3ec8[4] += M_TAU;
|
||||
@@ -526,7 +526,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 5
|
||||
data->unk3ec8[5] += 0.01f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[5] += 0.01f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[5] < 0) {
|
||||
data->unk3ec8[5] += M_TAU;
|
||||
@@ -537,7 +537,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 6
|
||||
data->unk3ec8[6] += -0.01f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[6] += -0.01f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[6] < 0) {
|
||||
data->unk3ec8[6] += M_TAU;
|
||||
@@ -548,7 +548,7 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
}
|
||||
|
||||
// 7
|
||||
data->unk3ec8[7] += -0.02f * LVUPDATE240FREAL();
|
||||
data->unk3ec8[7] += -0.02f * LVUPDATE60FREAL();
|
||||
|
||||
if (data->unk3ec8[7] < 0) {
|
||||
data->unk3ec8[7] += M_TAU;
|
||||
@@ -561,9 +561,9 @@ void weatherTickSnow(struct weatherdata *weather)
|
||||
for (i = 0; i < ARRAYCOUNT(data->particles); i++) {
|
||||
struct weatherparticle *particle = &data->particles[i];
|
||||
|
||||
particle->pos.x += particle->inc.x * LVUPDATE240FREAL();
|
||||
particle->pos.y += particle->inc.y * LVUPDATE240FREAL();
|
||||
particle->pos.z += particle->inc.z * LVUPDATE240FREAL();
|
||||
particle->pos.x += particle->inc.x * LVUPDATE60FREAL();
|
||||
particle->pos.y += particle->inc.y * LVUPDATE60FREAL();
|
||||
particle->pos.z += particle->inc.z * LVUPDATE60FREAL();
|
||||
|
||||
if (particle->pos.y < data->boundarymin.y) {
|
||||
lVar7 = 2;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#define ARRAYCOUNT(a) (s32)(sizeof(a) / sizeof(a[0]))
|
||||
#define CHRRACE(chr) (chr ? chr->race : RACE_HUMAN)
|
||||
#define CRASH() *(u8 *)0 = 69
|
||||
#define CYCLES_PER_FRAME ((s32) OS_CPU_COUNTER / (PAL ? 50 : 60))
|
||||
#define IS4MB() (g_Is4Mb == true)
|
||||
#define IS8MB() (g_Is4Mb != true)
|
||||
#define LINEHEIGHT (VERSION == VERSION_JPN_FINAL ? 14 : 11)
|
||||
@@ -49,9 +50,9 @@
|
||||
&& (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & (device)))
|
||||
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
#define LVUPDATE240FREAL() g_Vars.lvupdate240freal
|
||||
#define LVUPDATE60FREAL() g_Vars.lvupdate60freal
|
||||
#else
|
||||
#define LVUPDATE240FREAL() g_Vars.lvupdate240f
|
||||
#define LVUPDATE60FREAL() g_Vars.lvupdate60f
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_NTSC_1_0
|
||||
|
||||
+144
-136
@@ -98,147 +98,155 @@ struct fileguid {
|
||||
};
|
||||
|
||||
struct g_vars {
|
||||
/*000000*/ s32 diffframe60;
|
||||
/*000004*/ f32 diffframe60f;
|
||||
/*000008*/ s32 lvframe60;
|
||||
/*00000c*/ s32 lvframenum; // increments by 1 each frame when not paused
|
||||
/*000010*/ f32 diffframe60freal;
|
||||
/*000014*/ s32 lastframetime;
|
||||
/*000018*/ s32 thisframetime;
|
||||
/*00001c*/ s32 thisframeticks;
|
||||
/*000020*/ s32 lostframetime;
|
||||
/*000024*/ s32 lostframetime240;
|
||||
/*000028*/ u32 mininc60;
|
||||
/*00002c*/ s32 roomportalrecursionlimit;
|
||||
/*000030*/ s32 lvframe240;
|
||||
/*000034*/ s32 lvupdate240; // 0 = paused, 4 = slowmo, 8 = normal
|
||||
/*000038*/ s32 lvupdate240_60;
|
||||
/*00003c*/ s32 lvupdate240_60error;
|
||||
/*000040*/ s32 diffframe240;
|
||||
/*000044*/ f32 lvupdate240f;
|
||||
/*000048*/ f32 diffframe240f;
|
||||
/*00004c*/ f32 lvupdate240freal; // actually a 60 value
|
||||
/*000050*/ f32 lvupdate240frealprev;
|
||||
/*000054*/ s32 lastframe240;
|
||||
/*000058*/ s32 thisframe240;
|
||||
/*00005c*/ f32 diffframe240freal;
|
||||
/*000060*/ s16 *waypointnums; // ordered by room asc, padnum asc
|
||||
/*000064*/ struct player *players[4];
|
||||
/*000074*/ struct playerstats playerstats[4];
|
||||
/*000274*/ u32 playerorder[4];
|
||||
/*000284*/ struct player *currentplayer;
|
||||
/*000288*/ struct playerstats *currentplayerstats;
|
||||
/*00028c*/ s32 currentplayernum; // 0-3 - controller numbers I think
|
||||
/*000290*/ s32 currentplayerindex; // 0-3 - but 2 or 3 probably only used in combat simulator
|
||||
/*000294*/ s32 bondplayernum;
|
||||
/*000298*/ s32 coopplayernum;
|
||||
/*00029c*/ s32 antiplayernum;
|
||||
/*0002a0*/ struct player *bond; // Joanna
|
||||
/*0002a4*/ struct player *coop; // Co-op buddy when controlled by human
|
||||
/*0002a8*/ struct player *anti; // Counter-op
|
||||
/*0002ac*/ s32 tickmode;
|
||||
/*0002b0*/ s32 killcount;
|
||||
/*0002b4*/ u32 knockoutcount;
|
||||
/*0002b8*/ struct textoverride *textoverrides;
|
||||
/*0002bc*/ s32 roomcount;
|
||||
/*0002c0*/ s32 hitboundscount;
|
||||
/*0002c4*/ struct modelnode *hitnodes[20];
|
||||
/*000314*/ u32 mplayerisrunning; // combat sim with any number of players, coop with human buddy, and counter-op
|
||||
/*000318*/ u32 normmplayerisrunning; // combat sim with any number of players
|
||||
/*00031c*/ s32 lvmpbotlevel;
|
||||
/*000320*/ s32 lockscreen;
|
||||
/*000324*/ bool bondvisible;
|
||||
/*000328*/ bool bondcollisions;
|
||||
/*00032c*/ bool enableslopes;
|
||||
/*000330*/ u32 padrandomroutes;
|
||||
/*000334*/ s32 maxprops;
|
||||
/*000338*/ struct prop *props; // pointer to array of structs
|
||||
/*00033c*/ struct prop *activeprops; // head of a doubly linked list
|
||||
/*000340*/ struct prop *activepropstail; // next pointer points to pausedprops
|
||||
/*000344*/ struct prop *freeprops; // head of a singularly linked list
|
||||
/*000348*/ struct prop **onscreenprops; // sorted by distance, furthest first
|
||||
/*00034c*/ struct prop **endonscreenprops;
|
||||
/*000350*/ s32 numonscreenprops;
|
||||
/*000354*/ struct prop *pausedprops; // head of a doubly linked list, prev pointer points to activepropstail
|
||||
/*000358*/ u8 numpropstates;
|
||||
/*000359*/ u8 allocstateindex;
|
||||
/*00035a*/ u8 runstateindex;
|
||||
/*00035b*/ u8 alwaystick;
|
||||
/*00035c*/ u16 updateframe;
|
||||
/*00035e*/ u16 prevupdateframe;
|
||||
/*000360*/ struct propstate propstates[7];
|
||||
/*000424*/ struct chrdata *chrdata;
|
||||
/*000428*/ struct truckobj *truck;
|
||||
/*00042c*/ struct heliobj *heli;
|
||||
/*000430*/ struct chopperobj *hovercar;
|
||||
/*000434*/ u8 *ailist;
|
||||
/*000438*/ u32 aioffset;
|
||||
/*00043c*/ s32 hardfreeabletally;
|
||||
/*000440*/ s32 antiheadnum;
|
||||
/*000444*/ s32 antibodynum;
|
||||
/*000448*/ s32 coopradaron;
|
||||
/*00044c*/ s32 antiradaron;
|
||||
/*000450*/ s32 pendingantiplayernum;
|
||||
/*000454*/ s32 coopfriendlyfire;
|
||||
/*000458*/ u32 modifiedfiles;
|
||||
/*00045c*/ s32 speedpilltime; // in time60
|
||||
/*000460*/ s32 speedpillchange;
|
||||
/*000464*/ u32 speedpillwant;
|
||||
/*000468*/ bool speedpillon;
|
||||
/*00046c*/ s32 restartlevel;
|
||||
/*000470*/ s32 perfectbuddynum;
|
||||
/*000474*/ s32 numaibuddies;
|
||||
/*000478*/ bool aibuddiesspawned;
|
||||
/*00047c*/ s32 bossfileid;
|
||||
/*000480*/ u16 bossdeviceserial;
|
||||
/*000482*/ u16 language;
|
||||
/*000484*/ s32 mphilltime;
|
||||
/*000488*/ s32 totalkills;
|
||||
/*00048c*/ bool useperimshoot;
|
||||
/*000490*/ s32 mpsetupmenu;
|
||||
/*000494*/ s8 waitingtojoin[4];
|
||||
/*000498*/ s32 unk000498;
|
||||
/*00049c*/ bool usingadvsetup;
|
||||
/*0004a0*/ s32 unk0004a0;
|
||||
/*0004a4*/ s32 mpquickteamnumsims;
|
||||
/*0004a8*/ s32 mpsimdifficulty;
|
||||
/*0004ac*/ s8 mpplayerteams[4];
|
||||
/*0004b0*/ u32 mpquickteam;
|
||||
/*0004b4*/ s32 stagenum;
|
||||
/*0004b8*/ struct prop *aibuddies[4];
|
||||
/*0004c8*/ u32 dontplaynrg; // allow X music to be played (NRG = energy track)
|
||||
/*0004cc*/ s32 in_cutscene;
|
||||
/*0004d0*/ u8 paksconnected;
|
||||
/*0004d1*/ u8 paksconnected2;
|
||||
/*0004d2*/ s8 autocutnum; // cutscene scene number (0, 1 or 2), set to -1 while loading cutscene
|
||||
/*0004d3*/ s8 autocutplaying; // true if playing a cutscene via the menu, false when a button is pressed
|
||||
/*0004d4*/ s8 autocutgroupcur; // index into g_Cutscenes
|
||||
/*0004d5*/ s8 autocutgroupleft; // number of cutscenes left to play
|
||||
/*0004d6*/ s8 autocutfinished; // true if cutscene reached natural end
|
||||
/*0004d7*/ s8 autocutgroupskip; // true if pressed start during auto cutscene
|
||||
/*0004d8*/ s32 joydisableframestogo;
|
||||
/*0004dc*/ u8 playertojoymap[4];
|
||||
/*0004e0*/ u8 fourmeg2player;
|
||||
/*0004e1*/ u8 remakewallhitvtx;
|
||||
/*0004e2*/ u8 cutsceneskip60ths;
|
||||
/*0004e3*/ u8 langfilteron;
|
||||
// lv values pause when the game is paused, and reset when a new level is loaded
|
||||
// diff values run all the time
|
||||
// names ending in f are the same as their non-f counterparts, but as a float
|
||||
// names ending in freal are the same as f but multiplied by 1.2 on PAL
|
||||
// names ending in 60 mean their units are 60ths of a second
|
||||
// names ending in 240 mean their units are 240ths of a second
|
||||
// names ending in t mean their units are CPU ticks/cycles
|
||||
|
||||
/*0x000*/ s32 diffframe60; // time between current frame start and previous frame start in 60ths of a second
|
||||
/*0x004*/ f32 diffframe60f; // always .0 decimal
|
||||
/*0x008*/ s32 lvframe60; // incrementing 60ths, but it doesn't apply remainder so it drops behind lvframe240 / 4
|
||||
/*0x00c*/ s32 lvframenum; // increments by 1 each frame
|
||||
/*0x010*/ f32 diffframe60freal;
|
||||
/*0x014*/ s32 prevframestartt; // cycle count at start of previous frame
|
||||
/*0x018*/ s32 thisframestartt; // cycle count at start of current frame
|
||||
/*0x01c*/ s32 diffframet; // previous frame's duration in ticks, including any wait time after it finished
|
||||
/*0x020*/ s32 lostframetime60t;
|
||||
/*0x024*/ s32 lostframetime240t;
|
||||
/*0x028*/ u32 mininc60; // minimum amount of time between frames (always set to 1, ie. max 60fps)
|
||||
/*0x02c*/ s32 roomportalrecursionlimit;
|
||||
/*0x030*/ s32 lvframe240; // incrementing 240ths
|
||||
/*0x034*/ s32 lvupdate240; // update multiplier, capped at 4 if slow motion
|
||||
/*0x038*/ s32 lvupdate60; // update multiplier, factoring in remainder from previous frame
|
||||
/*0x03c*/ s32 lvupdate240rem; // update multiplier's remainder for next frame's lvupdate60 (0 - 3)
|
||||
/*0x040*/ s32 diffframe240; // time between current frame start and previous frame start in 240ths of a second
|
||||
/*0x044*/ f32 lvupdate60f; // with decimal
|
||||
/*0x048*/ f32 diffframe240f; // always .0 decimal
|
||||
/*0x04c*/ f32 lvupdate60freal;
|
||||
/*0x050*/ f32 lvupdate60frealprev; // previous frame's lvupdate60freal
|
||||
/*0x054*/ s32 prevframestart240; // previous frame's start time in 240ths (incrementing)
|
||||
/*0x058*/ s32 thisframestart240; // current frame's start time in 240ths (incrementing)
|
||||
/*0x05c*/ f32 diffframe240freal;
|
||||
/*0x060*/ s16 *waypointnums; // ordered by room asc, padnum asc
|
||||
/*0x064*/ struct player *players[4];
|
||||
/*0x074*/ struct playerstats playerstats[4];
|
||||
/*0x274*/ u32 playerorder[4];
|
||||
/*0x284*/ struct player *currentplayer;
|
||||
/*0x288*/ struct playerstats *currentplayerstats;
|
||||
/*0x28c*/ s32 currentplayernum; // 0-3 - controller numbers I think
|
||||
/*0x290*/ s32 currentplayerindex; // 0-3 - but 2 or 3 probably only used in combat simulator
|
||||
/*0x294*/ s32 bondplayernum;
|
||||
/*0x298*/ s32 coopplayernum;
|
||||
/*0x29c*/ s32 antiplayernum;
|
||||
/*0x2a0*/ struct player *bond; // Joanna
|
||||
/*0x2a4*/ struct player *coop; // Co-op buddy when controlled by human
|
||||
/*0x2a8*/ struct player *anti; // Counter-op
|
||||
/*0x2ac*/ s32 tickmode;
|
||||
/*0x2b0*/ s32 killcount;
|
||||
/*0x2b4*/ u32 knockoutcount;
|
||||
/*0x2b8*/ struct textoverride *textoverrides;
|
||||
/*0x2bc*/ s32 roomcount;
|
||||
/*0x2c0*/ s32 hitboundscount;
|
||||
/*0x2c4*/ struct modelnode *hitnodes[20];
|
||||
/*0x314*/ u32 mplayerisrunning; // combat sim with any number of players, coop with human buddy, and counter-op
|
||||
/*0x318*/ u32 normmplayerisrunning; // combat sim with any number of players
|
||||
/*0x31c*/ s32 lvmpbotlevel;
|
||||
/*0x320*/ s32 lockscreen;
|
||||
/*0x324*/ bool bondvisible;
|
||||
/*0x328*/ bool bondcollisions;
|
||||
/*0x32c*/ bool enableslopes;
|
||||
/*0x330*/ u32 padrandomroutes;
|
||||
/*0x334*/ s32 maxprops;
|
||||
/*0x338*/ struct prop *props; // pointer to array of structs
|
||||
/*0x33c*/ struct prop *activeprops; // head of a doubly linked list
|
||||
/*0x340*/ struct prop *activepropstail; // next pointer points to pausedprops
|
||||
/*0x344*/ struct prop *freeprops; // head of a singularly linked list
|
||||
/*0x348*/ struct prop **onscreenprops; // sorted by distance, furthest first
|
||||
/*0x34c*/ struct prop **endonscreenprops;
|
||||
/*0x350*/ s32 numonscreenprops;
|
||||
/*0x354*/ struct prop *pausedprops; // head of a doubly linked list, prev pointer points to activepropstail
|
||||
/*0x358*/ u8 numpropstates;
|
||||
/*0x359*/ u8 allocstateindex;
|
||||
/*0x35a*/ u8 runstateindex;
|
||||
/*0x35b*/ u8 alwaystick;
|
||||
/*0x35c*/ u16 updateframe;
|
||||
/*0x35e*/ u16 prevupdateframe;
|
||||
/*0x360*/ struct propstate propstates[7];
|
||||
/*0x424*/ struct chrdata *chrdata;
|
||||
/*0x428*/ struct truckobj *truck;
|
||||
/*0x42c*/ struct heliobj *heli;
|
||||
/*0x430*/ struct chopperobj *hovercar;
|
||||
/*0x434*/ u8 *ailist;
|
||||
/*0x438*/ u32 aioffset;
|
||||
/*0x43c*/ s32 hardfreeabletally;
|
||||
/*0x440*/ s32 antiheadnum;
|
||||
/*0x444*/ s32 antibodynum;
|
||||
/*0x448*/ s32 coopradaron;
|
||||
/*0x44c*/ s32 antiradaron;
|
||||
/*0x450*/ s32 pendingantiplayernum;
|
||||
/*0x454*/ s32 coopfriendlyfire;
|
||||
/*0x458*/ u32 modifiedfiles;
|
||||
/*0x45c*/ s32 speedpilltime; // in time60
|
||||
/*0x460*/ s32 speedpillchange;
|
||||
/*0x464*/ u32 speedpillwant;
|
||||
/*0x468*/ bool speedpillon;
|
||||
/*0x46c*/ s32 restartlevel;
|
||||
/*0x470*/ s32 perfectbuddynum;
|
||||
/*0x474*/ s32 numaibuddies;
|
||||
/*0x478*/ bool aibuddiesspawned;
|
||||
/*0x47c*/ s32 bossfileid;
|
||||
/*0x480*/ u16 bossdeviceserial;
|
||||
/*0x482*/ u16 language;
|
||||
/*0x484*/ s32 mphilltime;
|
||||
/*0x488*/ s32 totalkills;
|
||||
/*0x48c*/ bool useperimshoot;
|
||||
/*0x490*/ s32 mpsetupmenu;
|
||||
/*0x494*/ s8 waitingtojoin[4];
|
||||
/*0x498*/ s32 unk000498;
|
||||
/*0x49c*/ bool usingadvsetup;
|
||||
/*0x4a0*/ s32 unk0004a0;
|
||||
/*0x4a4*/ s32 mpquickteamnumsims;
|
||||
/*0x4a8*/ s32 mpsimdifficulty;
|
||||
/*0x4ac*/ s8 mpplayerteams[4];
|
||||
/*0x4b0*/ u32 mpquickteam;
|
||||
/*0x4b4*/ s32 stagenum;
|
||||
/*0x4b8*/ struct prop *aibuddies[4];
|
||||
/*0x4c8*/ u32 dontplaynrg; // allow X music to be played (NRG = energy track)
|
||||
/*0x4cc*/ s32 in_cutscene;
|
||||
/*0x4d0*/ u8 paksconnected;
|
||||
/*0x4d1*/ u8 paksconnected2;
|
||||
/*0x4d2*/ s8 autocutnum; // cutscene scene number (0, 1 or 2), set to -1 while loading cutscene
|
||||
/*0x4d3*/ s8 autocutplaying; // true if playing a cutscene via the menu, false when a button is pressed
|
||||
/*0x4d4*/ s8 autocutgroupcur; // index into g_Cutscenes
|
||||
/*0x4d5*/ s8 autocutgroupleft; // number of cutscenes left to play
|
||||
/*0x4d6*/ s8 autocutfinished; // true if cutscene reached natural end
|
||||
/*0x4d7*/ s8 autocutgroupskip; // true if pressed start during auto cutscene
|
||||
/*0x4d8*/ s32 joydisableframestogo;
|
||||
/*0x4dc*/ u8 playertojoymap[4];
|
||||
/*0x4e0*/ u8 fourmeg2player;
|
||||
/*0x4e1*/ u8 remakewallhitvtx;
|
||||
/*0x4e2*/ u8 cutsceneskip60ths;
|
||||
/*0x4e3*/ u8 langfilteron;
|
||||
|
||||
// 000f = Counter: if 10-15 then ticks down 1 per 7 frames, if under 10 then 1 per frame.
|
||||
// 00f0 = One bit per pak. Does something with the pak if counter expired.
|
||||
// 0f00 = One bit per pak. Does something with the pak if counter expired (likely opposite of the above).
|
||||
/*0004e4*/ u16 unk0004e4;
|
||||
/*0x4e4*/ u16 unk0004e4;
|
||||
|
||||
/*0004e8*/ u32 unk0004e8;
|
||||
/*0004ec*/ u32 unk0004ec;
|
||||
/*0004f0*/ u32 unk0004f0;
|
||||
/*0004f4*/ u32 unk0004f4;
|
||||
/*0004f8*/ u32 unk0004f8;
|
||||
/*0004fc*/ u32 unk0004fc;
|
||||
/*0004e0*/ u32 unk000500;
|
||||
/*000504*/ u32 unk000504;
|
||||
/*000508*/ u32 unk000508;
|
||||
/*00050c*/ u32 unk00050c;
|
||||
/*000510*/ f32 unk000510;
|
||||
/*0x4e8*/ u32 unk0004e8;
|
||||
/*0x4ec*/ u32 unk0004ec;
|
||||
/*0x4f0*/ u32 unk0004f0;
|
||||
/*0x4f4*/ u32 unk0004f4;
|
||||
/*0x4f8*/ u32 unk0004f8;
|
||||
/*0x4fc*/ u32 unk0004fc;
|
||||
/*0x4e0*/ u32 unk000500;
|
||||
/*0x504*/ u32 unk000504;
|
||||
/*0x508*/ u32 unk000508;
|
||||
/*0x50c*/ u32 unk00050c;
|
||||
/*0x510*/ f32 unk000510;
|
||||
};
|
||||
|
||||
struct weaponobj;
|
||||
|
||||
+2
-2
@@ -295,7 +295,7 @@ void anim00023d38(s16 animnum)
|
||||
s32 i;
|
||||
|
||||
if (var8005f010[animnum] != 0xff) {
|
||||
var8009a890[var8005f010[animnum]] = g_Vars.thisframe240;
|
||||
var8009a890[var8005f010[animnum]] = g_Vars.thisframestart240;
|
||||
var8005f004 = (var8005f010[animnum] + 1) % 40;
|
||||
} else {
|
||||
s32 tmp;
|
||||
@@ -320,7 +320,7 @@ void anim00023d38(s16 animnum)
|
||||
var8009a888[bestindex] = animDma(&var8009a884[bestindex * var8005f01c], g_Anims[animnum].data, tmp);
|
||||
var8005f010[animnum] = bestindex;
|
||||
var8009a88c[bestindex] = animnum;
|
||||
var8009a890[bestindex] = g_Vars.thisframe240;
|
||||
var8009a890[bestindex] = g_Vars.thisframestart240;
|
||||
var8005f004 = (bestindex + 1) % 40;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-10
@@ -1220,21 +1220,17 @@ void mainLoop(void)
|
||||
}
|
||||
|
||||
while (g_MainChangeToStageNum < 0 || g_MainNumGfxTasks != 0) {
|
||||
s32 tmp;
|
||||
s32 cycles;
|
||||
|
||||
osRecvMesg(&g_SchedMesgQueue, &msg, OS_MESG_BLOCK);
|
||||
|
||||
switch (*(s16 *)msg) {
|
||||
switch (*(s16 *) msg) {
|
||||
case OS_SC_RETRACE_MSG:
|
||||
tmp = osGetCount() - g_Vars.thisframetime;
|
||||
#if PAL
|
||||
if (tmp >= g_Vars.mininc60 * 937500 - 937500 / 2) {
|
||||
cycles = osGetCount() - g_Vars.thisframestartt;
|
||||
|
||||
if (cycles >= g_Vars.mininc60 * CYCLES_PER_FRAME - CYCLES_PER_FRAME / 2) {
|
||||
mainTick();
|
||||
}
|
||||
#else
|
||||
if (tmp >= g_Vars.mininc60 * 781250 - 781250 / 2) {
|
||||
mainTick();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case OS_SC_DONE_MSG:
|
||||
g_MainNumGfxTasks--;
|
||||
|
||||
+8
-8
@@ -18,16 +18,16 @@ void varsInit(void)
|
||||
g_Vars.lvmpbotlevel = 0;
|
||||
g_Vars.lockscreen = 0;
|
||||
g_Vars.diffframe60 = 1;
|
||||
g_Vars.lastframe240 = -1;
|
||||
g_Vars.thisframe240 = 0;
|
||||
g_Vars.prevframestart240 = -1;
|
||||
g_Vars.thisframestart240 = 0;
|
||||
g_Vars.diffframe240 = 4;
|
||||
g_Vars.diffframe60freal = 1;
|
||||
g_Vars.lastframetime = 0;
|
||||
g_Vars.thisframetime = 0;
|
||||
g_Vars.thisframeticks = 0;
|
||||
g_Vars.lostframetime = 0;
|
||||
g_Vars.lostframetime240 = 0;
|
||||
g_Vars.lvupdate240_60error = 2;
|
||||
g_Vars.prevframestartt = 0;
|
||||
g_Vars.thisframestartt = 0;
|
||||
g_Vars.diffframet = 0;
|
||||
g_Vars.lostframetime60t = 0;
|
||||
g_Vars.lostframetime240t = 0;
|
||||
g_Vars.lvupdate240rem = 2;
|
||||
g_Vars.mininc60 = 1;
|
||||
g_Vars.roomportalrecursionlimit = 254;
|
||||
g_Vars.diffframe240f = 4;
|
||||
|
||||
Reference in New Issue
Block a user