mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
Eliminate misused DemoRecordStatus usages
This commit is contained in:
parent
1f6181fa99
commit
44e6ccb3d4
5 changed files with 23 additions and 23 deletions
|
@ -2661,7 +2661,7 @@ void actRadiusDamage(DBloodActor* source, int x, int y, int z, int nSector, int
|
|||
{
|
||||
uint8_t sectmap[(kMaxSectors + 7) >> 3];
|
||||
auto pOwner = source->GetOwner();
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaexplosions && pOwner && pOwner->IsDudeActor() && !VanillaMode() && !DemoRecordStatus(); // use new sector checking logic
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaexplosions && pOwner && pOwner->IsDudeActor() && !VanillaMode(); // use new sector checking logic
|
||||
GetClosestSpriteSectors(nSector, x, y, nDist, sectmap, nullptr, newSectCheckMethod);
|
||||
nDist <<= 4;
|
||||
if (flags & 2)
|
||||
|
@ -3092,7 +3092,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
|
|||
break;
|
||||
|
||||
case kDudeTinyCaleb:
|
||||
if (cl_bloodvanillaenemies || VanillaMode() || DemoRecordStatus())
|
||||
if (cl_bloodvanillaenemies || VanillaMode())
|
||||
break;
|
||||
if (damageType == kDamageBurn && pXSprite->medium == kMediumNormal)
|
||||
{
|
||||
|
@ -3936,7 +3936,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
|||
actBurnSprite(missileActor->GetOwner(), actorHit, 360);
|
||||
|
||||
// by NoOne: make Life Leech heal user, just like it was in 1.0x versions
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode() && !DemoRecordStatus() && pDudeInfo != nullptr)
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode() && pDudeInfo != nullptr)
|
||||
{
|
||||
if (missileOwner->IsDudeActor() && missileOwner->hasX() && missileOwner->x().health != 0)
|
||||
actHealDude(missileOwner, nDamage >> 2, getDudeInfo(missileOwner->s().type)->startHealth);
|
||||
|
@ -4042,7 +4042,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
|||
actRadiusDamage(missileOwner, pMissile->x, pMissile->y, pMissile->z, pMissile->sectnum, 16, 20, 10, kDamageBullet, 6, 480);
|
||||
|
||||
// by NoOne: allow additional bullet damage for Flare Gun
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode() && !DemoRecordStatus())
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode())
|
||||
{
|
||||
int nDamage = (20 + Random(10)) << 4;
|
||||
actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage);
|
||||
|
@ -4651,7 +4651,7 @@ int MoveThing(spritetype *pSprite)
|
|||
{
|
||||
short bakCstat = pSprite->cstat;
|
||||
pSprite->cstat &= ~257;
|
||||
if ((pSprite->owner >= 0) && !cl_bloodvanillaexplosions && !VanillaMode() && !DemoRecordStatus())
|
||||
if ((pSprite->owner >= 0) && !cl_bloodvanillaexplosions && !VanillaMode())
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_NONE; // improved clipmove accuracy
|
||||
v8 = gSpriteHit[nXSprite].hit = ClipMove((int*)&pSprite->x, (int*)&pSprite->y, (int*)&pSprite->z, &nSector, xvel[nSprite]>>12, yvel[nSprite]>>12, pSprite->clipdist<<2, (pSprite->z-top)/4, (bottom-pSprite->z)/4, CLIPMASK0);
|
||||
enginecompatibility_mode = bakCompat; // restore
|
||||
|
@ -5016,7 +5016,7 @@ void MoveDude(spritetype *pSprite)
|
|||
}
|
||||
if (pPlayer && zvel[nSprite] > 0x155555 && !pPlayer->fallScream && pXSprite->height > 0)
|
||||
{
|
||||
const bool playerAlive = (pXSprite->health > 0) || VanillaMode() || DemoRecordStatus(); // only trigger falling scream if player is alive or vanilla mode
|
||||
const bool playerAlive = (pXSprite->health > 0) || VanillaMode(); // only trigger falling scream if player is alive or vanilla mode
|
||||
if (playerAlive)
|
||||
{
|
||||
pPlayer->fallScream = 1;
|
||||
|
@ -5114,7 +5114,7 @@ void MoveDude(spritetype *pSprite)
|
|||
break;
|
||||
case kDudeBurningCultist:
|
||||
{
|
||||
const bool fixRandomCultist = !cl_bloodvanillaenemies && (pSprite->inittype >= kDudeBase) && (pSprite->inittype < kDudeMax) && !VanillaMode() && !DemoRecordStatus(); // fix burning cultists randomly switching types underwater
|
||||
const bool fixRandomCultist = !cl_bloodvanillaenemies && (pSprite->inittype >= kDudeBase) && (pSprite->inittype < kDudeMax) && !VanillaMode(); // fix burning cultists randomly switching types underwater
|
||||
if (Chance(chance))
|
||||
pSprite->type = kDudeCultistTommy;
|
||||
else
|
||||
|
@ -5440,7 +5440,7 @@ int MoveMissile(spritetype *pSprite)
|
|||
int z = pSprite->z;
|
||||
int nSector2 = pSprite->sectnum;
|
||||
clipmoveboxtracenum = 1;
|
||||
if ((pSprite->owner >= 0) && !isFlameSprite && !cl_bloodvanillaexplosions && !VanillaMode() && !DemoRecordStatus())
|
||||
if ((pSprite->owner >= 0) && !isFlameSprite && !cl_bloodvanillaexplosions && !VanillaMode())
|
||||
enginecompatibility_mode = ENGINECOMPATIBILITY_NONE; // improved clipmove accuracy
|
||||
int vdx = ClipMove(&x, &y, &z, &nSector2, vx, vy, pSprite->clipdist<<2, (z-top)/4, (bottom-z)/4, CLIPMASK0);
|
||||
enginecompatibility_mode = bakCompat; // restore
|
||||
|
@ -6013,7 +6013,7 @@ void actProcessSprites(void)
|
|||
// the new flag newSectCheckMethod for GetClosestSpriteSectors() does rectify these issues, but this may cause unintended side effects for level scripted explosions
|
||||
// so only allow this new checking method for dude spawned explosions
|
||||
short gAffectedXWalls[kMaxXWalls];
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaexplosions && pOwner && pOwner->IsDudeActor() && !VanillaMode() && !DemoRecordStatus(); // use new sector checking logic
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaexplosions && pOwner && pOwner->IsDudeActor() && !VanillaMode(); // use new sector checking logic
|
||||
GetClosestSpriteSectors(nSector, x, y, radius, sectmap, gAffectedXWalls, newSectCheckMethod);
|
||||
|
||||
for (int i = 0; i < kMaxXWalls; i++)
|
||||
|
@ -6206,7 +6206,7 @@ void actProcessSprites(void)
|
|||
if (nXSprite > 0)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
const bool fixBurnGlitch = !cl_bloodvanillaenemies && IsBurningDude(pSprite) && !VanillaMode() && !DemoRecordStatus(); // if enemies are burning, always apply burning damage per tick
|
||||
const bool fixBurnGlitch = !cl_bloodvanillaenemies && IsBurningDude(pSprite) && !VanillaMode(); // if enemies are burning, always apply burning damage per tick
|
||||
if ((pXSprite->burnTime > 0) || fixBurnGlitch)
|
||||
{
|
||||
switch (pSprite->type)
|
||||
|
|
|
@ -1033,7 +1033,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
DUDEEXTRA *pDudeExtra = &gDudeExtra[pSprite->extra];
|
||||
pDudeExtra->recoil = 1;
|
||||
}
|
||||
const bool fixRandomCultist = !cl_bloodvanillaenemies && (pSprite->inittype >= kDudeBase) && (pSprite->inittype < kDudeMax) && !VanillaMode() && !DemoRecordStatus(); // fix burning cultists randomly switching types underwater
|
||||
const bool fixRandomCultist = !cl_bloodvanillaenemies && (pSprite->inittype >= kDudeBase) && (pSprite->inittype < kDudeMax) && !VanillaMode(); // fix burning cultists randomly switching types underwater
|
||||
switch (pSprite->type)
|
||||
{
|
||||
case kDudeCultistTommy:
|
||||
|
@ -1110,7 +1110,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
|
|||
case kDudeTinyCaleb:
|
||||
if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
|
||||
{
|
||||
if (!cl_bloodvanillaenemies && !VanillaMode() && !DemoRecordStatus()) // fix burning sprite for tiny caleb
|
||||
if (!cl_bloodvanillaenemies && !VanillaMode()) // fix burning sprite for tiny caleb
|
||||
{
|
||||
pSprite->type = kDudeBurningTinyCaleb;
|
||||
aiNewState(actor, &tinycalebBurnGoto);
|
||||
|
@ -1480,7 +1480,7 @@ void aiLookForTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
if (pXSprite->state)
|
||||
{
|
||||
uint8_t sectmap[(kMaxSectors+7)>>3];
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaenemies && !VanillaMode() && !DemoRecordStatus(); // use new sector checking logic
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaenemies && !VanillaMode(); // use new sector checking logic
|
||||
GetClosestSpriteSectors(pSprite->sectnum, pSprite->x, pSprite->y, 400, sectmap, nullptr, newSectCheckMethod);
|
||||
|
||||
int nSprite2;
|
||||
|
|
|
@ -95,7 +95,7 @@ void StompSeqCallback(int, DBloodActor* actor1)
|
|||
int nSector = pSprite->sectnum;
|
||||
int v1c = 5+2*gGameOptions.nDifficulty;
|
||||
int v10 = 25+30*gGameOptions.nDifficulty;
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaenemies && !VanillaMode() && !DemoRecordStatus(); // use new sector checking logic
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaenemies && !VanillaMode(); // use new sector checking logic
|
||||
GetClosestSpriteSectors(nSector, x, y, vc, sectmap, nullptr, newSectCheckMethod);
|
||||
char v4 = 0;
|
||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||
|
|
|
@ -491,7 +491,7 @@ void nnExtInitModernStuff(bool bSaveLoad) {
|
|||
nnExtResetGlobals();
|
||||
|
||||
// use true random only for single player mode, otherwise use Blood's default one.
|
||||
if (gGameOptions.nGameType == 0 && !VanillaMode() && !DemoRecordStatus()) {
|
||||
if (gGameOptions.nGameType == 0 && !VanillaMode()) {
|
||||
|
||||
gStdRandom.seed(std::random_device()());
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ static bool checkFired6or7(PLAYER *pPlayer)
|
|||
case 6:
|
||||
return 1;
|
||||
case 7:
|
||||
if (VanillaMode() || DemoRecordStatus())
|
||||
if (VanillaMode())
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -731,7 +731,7 @@ void WeaponLower(PLAYER *pPlayer)
|
|||
}
|
||||
break;
|
||||
case 7: // throwing ignited alt fire spray
|
||||
if (VanillaMode() || DemoRecordStatus() || (pPlayer->newWeapon != 0))
|
||||
if (VanillaMode() || (pPlayer->newWeapon != 0))
|
||||
break;
|
||||
pPlayer->weaponState = 1;
|
||||
StartQAV(pPlayer, 11, -1, 0);
|
||||
|
@ -1479,7 +1479,7 @@ void AltFireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
|
||||
// by NoOne: trying to simulate v1.0x voodoo here.
|
||||
// dunno how exactly it works, but at least it not spend all the ammo on alt fire
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode() && !DemoRecordStatus()) {
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode()) {
|
||||
int nCount = ClipHigh(pPlayer->ammoCount[9], pPlayer->aimTargetsCount);
|
||||
if (nCount > 0)
|
||||
{
|
||||
|
@ -2203,7 +2203,7 @@ void WeaponProcess(PLAYER *pPlayer) {
|
|||
}
|
||||
if (pPlayer->newWeapon)
|
||||
{
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->newWeapon) && !checkFired6or7(pPlayer) && !VanillaMode() && !DemoRecordStatus()) // skip banned weapons when underwater and using next/prev weapon key inputs
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->newWeapon) && !checkFired6or7(pPlayer) && !VanillaMode()) // skip banned weapons when underwater and using next/prev weapon key inputs
|
||||
{
|
||||
if (prevNewWeaponVal == WeaponSel_Next || prevNewWeaponVal == WeaponSel_Prev) // if player switched weapons
|
||||
{
|
||||
|
@ -2254,7 +2254,7 @@ void WeaponProcess(PLAYER *pPlayer) {
|
|||
pPlayer->newWeapon = 12;
|
||||
}
|
||||
}
|
||||
else if ((pPlayer->newWeapon == 7) && !VanillaMode() && !DemoRecordStatus())
|
||||
else if ((pPlayer->newWeapon == 7) && !VanillaMode())
|
||||
{
|
||||
if ((pPlayer->curWeapon == 7) && (pPlayer->weaponState == 2)) // fix spray can state glitch when switching from spray to tnt and back quickly
|
||||
{
|
||||
|
@ -2577,10 +2577,10 @@ void WeaponProcess(PLAYER *pPlayer) {
|
|||
case 5:
|
||||
if (powerupCheck(pPlayer, kPwUpTwoGuns))
|
||||
// by NoOne: allow napalm launcher alt fire act like in v1.0x versions
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode() && !DemoRecordStatus()) StartQAV(pPlayer, 123, nClientFireNapalm2, 0);
|
||||
if (gGameOptions.weaponsV10x && !VanillaMode()) StartQAV(pPlayer, 123, nClientFireNapalm2, 0);
|
||||
else StartQAV(pPlayer, 122, nClientAltFireNapalm, 0);
|
||||
else
|
||||
StartQAV(pPlayer, 91, (gGameOptions.weaponsV10x && !VanillaMode() && !DemoRecordStatus()) ? nClientFireNapalm : nClientAltFireNapalm, 0);
|
||||
StartQAV(pPlayer, 91, (gGameOptions.weaponsV10x && !VanillaMode()) ? nClientFireNapalm : nClientAltFireNapalm, 0);
|
||||
return;
|
||||
case 2:
|
||||
if (CheckAmmo(pPlayer, 1, 8))
|
||||
|
@ -2625,7 +2625,7 @@ void teslaHit(spritetype *pMissile, int a2)
|
|||
int nDist = 300;
|
||||
int nSector = pMissile->sectnum;
|
||||
int nOwner = pMissile->owner;
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaexplosions && !VanillaMode() && !DemoRecordStatus(); // use new sector checking logic
|
||||
const bool newSectCheckMethod = !cl_bloodvanillaexplosions && !VanillaMode(); // use new sector checking logic
|
||||
GetClosestSpriteSectors(nSector, x, y, nDist, sectmap, nullptr, newSectCheckMethod);
|
||||
bool v4 = true;
|
||||
DBloodActor* actor = nullptr;
|
||||
|
|
Loading…
Reference in a new issue