mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 11:50:49 +00:00
- Blood: Restore originally intended isRunning
code that never worked behind two CVARs to offer an alternative playing experience.
* `cl_bloodvanillarun` enables/disables the `isRunning` code that affects AI, bobbing and swaying. * `cl_bloodvanillabobbing` enables/disables the `isRunning` code that affects bobbing and swaying, allowing only the `isRunning` AI changes.
This commit is contained in:
parent
9884d5f396
commit
f6c7ed3984
5 changed files with 15 additions and 21 deletions
|
@ -82,6 +82,8 @@ CVARD(Bool, cl_showmagamt, false, CVAR_ARCHIVE, "show the amount of rounds left
|
||||||
CVARD(Bool, cl_nomeleeblur, false, CVAR_ARCHIVE, "enable/disable blur effect with melee weapons in SW")
|
CVARD(Bool, cl_nomeleeblur, false, CVAR_ARCHIVE, "enable/disable blur effect with melee weapons in SW")
|
||||||
CVARD(Bool, cl_exhumedoldturn, false, CVAR_ARCHIVE, "enable/disable legacy turning speed for Powerslave/Exhumed")
|
CVARD(Bool, cl_exhumedoldturn, false, CVAR_ARCHIVE, "enable/disable legacy turning speed for Powerslave/Exhumed")
|
||||||
CVARD(Bool, cl_hudinterpolation, true, CVAR_ARCHIVE, "enable/disable HUD (weapon drawer) interpolation")
|
CVARD(Bool, cl_hudinterpolation, true, CVAR_ARCHIVE, "enable/disable HUD (weapon drawer) interpolation")
|
||||||
|
CVARD(Bool, cl_bloodvanillarun, true, CVAR_ARCHIVE, "enable/disable Blood's vanilla run mode")
|
||||||
|
CVARD(Bool, cl_bloodvanillabobbing, true, CVAR_ARCHIVE, "enable/disable Blood's vanilla bobbing while not using vanilla run mode")
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")
|
CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim")
|
||||||
|
|
|
@ -27,6 +27,8 @@ EXTERN_CVAR(Bool, cl_showmagamt)
|
||||||
EXTERN_CVAR(Bool, cl_nomeleeblur)
|
EXTERN_CVAR(Bool, cl_nomeleeblur)
|
||||||
EXTERN_CVAR(Bool, cl_exhumedoldturn)
|
EXTERN_CVAR(Bool, cl_exhumedoldturn)
|
||||||
EXTERN_CVAR(Bool, cl_hudinterpolation)
|
EXTERN_CVAR(Bool, cl_hudinterpolation)
|
||||||
|
EXTERN_CVAR(Bool, cl_bloodvanillarun)
|
||||||
|
EXTERN_CVAR(Bool, cl_bloodvanillabobbing)
|
||||||
|
|
||||||
EXTERN_CVAR(Bool, demorec_seeds_cvar)
|
EXTERN_CVAR(Bool, demorec_seeds_cvar)
|
||||||
EXTERN_CVAR(Bool, demoplay_diffs)
|
EXTERN_CVAR(Bool, demoplay_diffs)
|
||||||
|
|
|
@ -303,7 +303,6 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
actor->dudeSlope = DivScale(pTarget->z-pSprite->z, nDist, 10);
|
actor->dudeSlope = DivScale(pTarget->z-pSprite->z, nDist, 10);
|
||||||
switch (pSprite->type) {
|
switch (pSprite->type) {
|
||||||
case kDudeCultistTommy:
|
case kDudeCultistTommy:
|
||||||
#if 0 // apparently this can never be entered.
|
|
||||||
if (nDist < 0x1e00 && nDist > 0xe00 && abs(nDeltaAngle) < 85 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x1e00 && nDist > 0xe00 && abs(nDeltaAngle) < 85 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].isRunning
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].isRunning
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
|
@ -327,9 +326,7 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (nDist < 0x4600 && abs(nDeltaAngle) < 28)
|
||||||
#endif
|
|
||||||
if (nDist < 0x4600 && abs(nDeltaAngle) < 28)
|
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
switch (hit)
|
switch (hit)
|
||||||
|
@ -375,7 +372,7 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
case kDudeCultistShotgun:
|
case kDudeCultistShotgun:
|
||||||
if (nDist < 0x2c00 && nDist > 0x1400 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x2c00 && nDist > 0x1400 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->flags&2) && gGameOptions.nDifficulty >= 2 && IsPlayerSprite(pTarget) /*&& !gPlayer[pTarget->type-kDudePlayer1].isRunning*/
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty >= 2 && IsPlayerSprite(pTarget) && !gPlayer[pTarget->type-kDudePlayer1].isRunning
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
|
@ -442,7 +439,6 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kDudeCultistTesla:
|
case kDudeCultistTesla:
|
||||||
#if 0
|
|
||||||
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].isRunning
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].isRunning
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
|
@ -466,9 +462,7 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
|
||||||
#endif
|
|
||||||
if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
|
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
switch (hit)
|
switch (hit)
|
||||||
|
@ -557,7 +551,6 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kDudeCultistBeast:
|
case kDudeCultistBeast:
|
||||||
#if 0
|
|
||||||
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].isRunning
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].isRunning
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
|
@ -581,9 +574,7 @@ static void cultThinkChase(DBloodActor* actor)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
|
||||||
#endif
|
|
||||||
if (nDist < 0x3200 && abs(nDeltaAngle) < 28)
|
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
switch (hit)
|
switch (hit)
|
||||||
|
|
|
@ -1317,14 +1317,14 @@ void ProcessInput(PLAYER *pPlayer)
|
||||||
POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture];
|
POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture];
|
||||||
InputPacket *pInput = &pPlayer->input;
|
InputPacket *pInput = &pPlayer->input;
|
||||||
|
|
||||||
|
// Originally, this was never able to be true due to sloppy input code in the original game.
|
||||||
|
// Allow it to become true behind a CVAR to offer an alternate playing experience if desired.
|
||||||
|
pPlayer->isRunning = !!(pInput->actions & SB_RUN) && !cl_bloodvanillarun;
|
||||||
|
|
||||||
if ((pInput->actions & SB_BUTTON_MASK) || pInput->fvel || pInput->svel || pInput->avel)
|
if ((pInput->actions & SB_BUTTON_MASK) || pInput->fvel || pInput->svel || pInput->avel)
|
||||||
pPlayer->restTime = 0;
|
pPlayer->restTime = 0;
|
||||||
else if (pPlayer->restTime >= 0)
|
else if (pPlayer->restTime >= 0)
|
||||||
pPlayer->restTime += 4;
|
pPlayer->restTime += 4;
|
||||||
|
|
||||||
// This was just too broken. Every single place in the game depending on 'isRunning' will misbehave if this is set because originally it never worked as intended.
|
|
||||||
pPlayer->isRunning = false;// !!(pInput->actions& SB_RUN) && pPlayer->restTime <= 10;
|
|
||||||
|
|
||||||
WeaponProcess(pPlayer);
|
WeaponProcess(pPlayer);
|
||||||
if (pXSprite->health == 0)
|
if (pXSprite->health == 0)
|
||||||
{
|
{
|
||||||
|
@ -1666,8 +1666,7 @@ void playerProcess(PLAYER *pPlayer)
|
||||||
{
|
{
|
||||||
if (pXSprite->height < 256)
|
if (pXSprite->height < 256)
|
||||||
{
|
{
|
||||||
// taking a cue from BloodGDX here. Apparently due to poor coding in the original game this could never be true.
|
bool running = pPlayer->isRunning && !cl_bloodvanillabobbing;
|
||||||
bool running = false;// pPlayer->isRunning;
|
|
||||||
pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[running]*4) & 2047;
|
pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[running]*4) & 2047;
|
||||||
pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[running]*4)/2) & 2047;
|
pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[running]*4)/2) & 2047;
|
||||||
if (running)
|
if (running)
|
||||||
|
|
|
@ -547,8 +547,8 @@ class BloodStatusBar : RazeStatusBar
|
||||||
else
|
else
|
||||||
DrawImage(nTile, (x, y), DI_ITEM_RELCENTER, style:STYLE_Normal, col: 0xff606060, translation:Translation.MakeID(Translation_Remap, 5));
|
DrawImage(nTile, (x, y), DI_ITEM_RELCENTER, style:STYLE_Normal, col: 0xff606060, translation:Translation.MakeID(Translation_Remap, 5));
|
||||||
}
|
}
|
||||||
DrawImage("BlinkIcon", (118.5, 185.5), DI_ITEM_RELCENTER, col:0xff606060);
|
DrawImage("BlinkIcon", (118.5, 185.5), DI_ITEM_RELCENTER, col:Raze.shadeToLight(pPlayer.isRunning || cl_bloodvanillarun ? 16 : 40));
|
||||||
DrawImage("BlinkIcon", (201.5, 185.5), DI_ITEM_RELCENTER, col:0xff606060);
|
DrawImage("BlinkIcon", (201.5, 185.5), DI_ITEM_RELCENTER, col:Raze.shadeToLight(pPlayer.isRunning || cl_bloodvanillarun ? 16 : 40));
|
||||||
if (pPlayer.throwPower)
|
if (pPlayer.throwPower)
|
||||||
{
|
{
|
||||||
TileHGauge("ThrowGauge", 124, 175.5, pPlayer.throwPower, 65536);
|
TileHGauge("ThrowGauge", 124, 175.5, pPlayer.throwPower, 65536);
|
||||||
|
|
Loading…
Reference in a new issue