mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Blood: rename Ummune to Immune
This commit is contained in:
parent
dcad616030
commit
1105d52677
4 changed files with 7 additions and 7 deletions
|
@ -121,7 +121,7 @@ void aiNewState(spritetype *pSprite, XSPRITE *pXSprite, AISTATE *pAIState)
|
||||||
pAIState->enterFunc(pSprite, pXSprite);
|
pAIState->enterFunc(pSprite, pXSprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isUmmune(spritetype* pSprite, int dmgType, int minScale) {
|
bool isImmune(spritetype* pSprite, int dmgType, int minScale) {
|
||||||
|
|
||||||
if (dmgType >= kDmgFall && dmgType < kDmgMax && pSprite->extra >= 0 && xsprite[pSprite->extra].locked != 1) {
|
if (dmgType >= kDmgFall && dmgType < kDmgMax && pSprite->extra >= 0 && xsprite[pSprite->extra].locked != 1) {
|
||||||
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
||||||
|
@ -212,7 +212,7 @@ bool CanMove(spritetype *pSprite, int a2, int nAngle, int nRange)
|
||||||
// It makes ignore danger if enemy immune to N damageType. As result Cerberus start acting like
|
// It makes ignore danger if enemy immune to N damageType. As result Cerberus start acting like
|
||||||
// in Blood 1.0 so it can move normally to player. It's up to you for adding rest of enemies here as
|
// in Blood 1.0 so it can move normally to player. It's up to you for adding rest of enemies here as
|
||||||
// i don't think it will broke something in game.
|
// i don't think it will broke something in game.
|
||||||
if (!VanillaMode() && Crusher && isUmmune(pSprite, pXSector->damageType, 16)) return true;
|
if (!VanillaMode() && Crusher && isImmune(pSprite, pXSector->damageType, 16)) return true;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
case kDudeZombieButcher:
|
case kDudeZombieButcher:
|
||||||
case kDudeSpiderBrown:
|
case kDudeSpiderBrown:
|
||||||
|
@ -232,7 +232,7 @@ bool CanMove(spritetype *pSprite, int a2, int nAngle, int nRange)
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
case kDudeModernCustom:
|
case kDudeModernCustom:
|
||||||
case kDudeModernCustomBurning:
|
case kDudeModernCustomBurning:
|
||||||
if ((Crusher && !nnExtIsUmmune(pSprite, pXSector->damageType)) || ((Water || Underwater) && !canSwim(pSprite))) return false;
|
if ((Crusher && !nnExtIsImmune(pSprite, pXSector->damageType)) || ((Water || Underwater) && !canSwim(pSprite))) return false;
|
||||||
return true;
|
return true;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -767,7 +767,7 @@ static void thinkChase( spritetype* pSprite, XSPRITE* pXSprite ) {
|
||||||
VectorScan(pSprite, 0, 0, Cos(pSprite->ang) >> 16, Sin(pSprite->ang) >> 16, gDudeSlope[pSprite->extra], dist, 1);
|
VectorScan(pSprite, 0, 0, Cos(pSprite->ang) >> 16, Sin(pSprite->ang) >> 16, gDudeSlope[pSprite->extra], dist, 1);
|
||||||
if (pXSprite->target == gHitInfo.hitsprite) break;
|
if (pXSprite->target == gHitInfo.hitsprite) break;
|
||||||
|
|
||||||
bool immune = nnExtIsUmmune(pHSprite, gVectorData[curWeapon].dmgType);
|
bool immune = nnExtIsImmune(pHSprite, gVectorData[curWeapon].dmgType);
|
||||||
if (!(pXHSprite != NULL && (!immune || (immune && pHSprite->statnum == kStatThing && pXHSprite->Vector)) && !pXHSprite->locked)) {
|
if (!(pXHSprite != NULL && (!immune || (immune && pHSprite->statnum == kStatThing && pXHSprite->Vector)) && !pXHSprite->locked)) {
|
||||||
|
|
||||||
if ((approxDist(gHitInfo.hitx - pSprite->x, gHitInfo.hity - pSprite->y) <= 1500 && !blck)
|
if ((approxDist(gHitInfo.hitx - pSprite->x, gHitInfo.hity - pSprite->y) <= 1500 && !blck)
|
||||||
|
@ -853,7 +853,7 @@ static void thinkChase( spritetype* pSprite, XSPRITE* pXSprite ) {
|
||||||
else if (hit == 3 && (failed = (pHSprite->statnum != kStatThing || pXHSprite == NULL || pXHSprite->locked)) == false) {
|
else if (hit == 3 && (failed = (pHSprite->statnum != kStatThing || pXHSprite == NULL || pXHSprite->locked)) == false) {
|
||||||
// check also for damage resistance (all possible damages missile can use)
|
// check also for damage resistance (all possible damages missile can use)
|
||||||
for (int i = 0; i < kDmgMax; i++) {
|
for (int i = 0; i < kDmgMax; i++) {
|
||||||
if (gMissileInfoExtra[curWeapon - kMissileBase].dmgType[i] && (failed = nnExtIsUmmune(pHSprite, i)) == false)
|
if (gMissileInfoExtra[curWeapon - kMissileBase].dmgType[i] && (failed = nnExtIsImmune(pHSprite, i)) == false)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ THINGINFO_EXTRA gThingInfoExtra[] = {
|
||||||
// for actor.cpp
|
// for actor.cpp
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
bool nnExtIsUmmune(spritetype* pSprite, int dmgType, int minScale) {
|
bool nnExtIsImmune(spritetype* pSprite, int dmgType, int minScale) {
|
||||||
|
|
||||||
if (dmgType >= kDmgFall && dmgType < kDmgMax && pSprite->extra >= 0 && xsprite[pSprite->extra].locked != 1) {
|
if (dmgType >= kDmgFall && dmgType < kDmgMax && pSprite->extra >= 0 && xsprite[pSprite->extra].locked != 1) {
|
||||||
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
||||||
|
|
|
@ -162,7 +162,7 @@ extern short gPhysSpritesCount;
|
||||||
bool nnExtEraseModernStuff(spritetype* pSprite, XSPRITE* pXSprite);
|
bool nnExtEraseModernStuff(spritetype* pSprite, XSPRITE* pXSprite);
|
||||||
void nnExtInitModernStuff(bool bSaveLoad);
|
void nnExtInitModernStuff(bool bSaveLoad);
|
||||||
void nnExtProcessSuperSprites(void);
|
void nnExtProcessSuperSprites(void);
|
||||||
bool nnExtIsUmmune(spritetype* pSprite, int dmgType, int minScale = 16);
|
bool nnExtIsImmune(spritetype* pSprite, int dmgType, int minScale = 16);
|
||||||
int nnExtRandom(int a, int b);
|
int nnExtRandom(int a, int b);
|
||||||
// ------------------------------------------------------------------------- //
|
// ------------------------------------------------------------------------- //
|
||||||
spritetype* randomDropPickupObject(spritetype* pSprite, short prevItem);
|
spritetype* randomDropPickupObject(spritetype* pSprite, short prevItem);
|
||||||
|
|
Loading…
Reference in a new issue