- manual update of NBlood commit 24908021f3b844a73de05632565d55d5b71b577c

- Fix kModernCustomDude is not inheriting sprite size if SEQ have zero repeats
- Damage scale tweaks for kModernCustomDude
- Fix hitscan kModernCondition
This commit is contained in:
Christoph Oelckers 2021-09-19 16:34:01 +02:00
parent 1732d206bd
commit 95acafdbac
3 changed files with 11 additions and 9 deletions

View file

@ -1863,6 +1863,14 @@ void aiInitSprite(spritetype *pSprite)
case kDudeTentacleFire:
aiNewState(actor, &tentacleIdle);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustom:
case kDudeModernCustomBurning:
if (!gModernMap) break;
aiGenDudeInitSprite(pSprite, pXSprite);
genDudePrepare(pSprite, kGenDudePropertyAll);
break;
#endif
default:
aiNewState(actor, &genIdle);
break;
@ -1918,11 +1926,6 @@ void aiInitSprite(spritetype *pSprite)
#ifdef NOONE_EXTENSIONS
if (gModernMap) {
if (pSprite->type == kDudeModernCustom) {
aiGenDudeInitSprite(pSprite, pXSprite);
genDudePrepare(pSprite, kGenDudePropertyAll);
}
if (pXSprite->dudeFlag4) {
// restore dude's path

View file

@ -1324,7 +1324,6 @@ void scaleDamage(XSPRITE* pXSprite) {
case kThingPodFireBall:
case kThingNapalmBall:
curScale[kDmgBurn] = 32;
curScale[kDmgExplode] -= 32;
break;
case kMissileLifeLeechRegular:
curScale[kDmgBurn] = 60 + Random(4);
@ -1338,7 +1337,7 @@ void scaleDamage(XSPRITE* pXSprite) {
case kMissileFireballCerberus:
case kMissileFireballTchernobog:
curScale[kDmgBurn] = 50;
curScale[kDmgExplode] = 32;
curScale[kDmgExplode] -= 32;
curScale[kDmgFall] = 65 + Random(15);
break;
case kThingTNTBarrel:
@ -1348,7 +1347,7 @@ void scaleDamage(XSPRITE* pXSprite) {
case kThingArmedTNTStick:
case kModernThingTNTProx:
curScale[kDmgBurn] -= 32;
curScale[kDmgExplode] = 32;
curScale[kDmgExplode] -= 32;
curScale[kDmgFall] = 65 + Random(15);
break;
case kMissileTeslaAlt:

View file

@ -3947,7 +3947,7 @@ bool condCheckSprite(XSPRITE* pXCond, int cmpOp, bool PUSH) {
var = HitScan(pSpr, pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, arg1, arg3 << 1);
else if (IsDudeSprite(pSpr))
var = HitScan(pSpr, pSpr->z, CosScale16(pSpr->ang), SinScale16(pSpr->ang), (!xspriRangeIsFine(pSpr->extra)) ? 0 : spractor->dudeSlope, arg1, arg3 << 1);
else if (var2 & CSTAT_SPRITE_ALIGNMENT_FLOOR) {
else if ((var2 & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR) {
var3 = (var2 & 0x0008) ? 0x10000 << 1 : -(0x10000 << 1);
var = HitScan(pSpr, pSpr->z, Cos(pSpr->ang) >> 16, Sin(pSpr->ang) >> 16, var3, arg1, arg3 << 1);