mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
- renamed the sprite variant of aiDamageSprite.
This commit is contained in:
parent
bbe3f333fa
commit
fbae41ee0a
7 changed files with 32 additions and 32 deletions
|
@ -3966,7 +3966,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
|||
{
|
||||
int nOwner = pMissile->owner;
|
||||
int nDamage = (15 + Random(7)) << 4;
|
||||
actDamageSprite(nOwner, pSpriteHit, kDamageBullet, nDamage);
|
||||
actDamageSprite_(nOwner, pSpriteHit, kDamageBullet, nDamage);
|
||||
}
|
||||
actPostSprite(missileActor, kStatFree);
|
||||
break;
|
||||
|
@ -4276,7 +4276,7 @@ static void checkCeilHit(DBloodActor* actor)
|
|||
int dmg = abs((mass1 - mass2) * (pSprite2->clipdist - pSprite->clipdist));
|
||||
if (actor2->IsDudeActor())
|
||||
{
|
||||
if (dmg > 0) actDamageSprite(pSprite2->index, pSprite, (Chance(0x2000)) ? kDamageFall : (Chance(0x4000)) ? kDamageExplode : kDamageBullet, dmg);
|
||||
if (dmg > 0) actDamageSprite_(pSprite2->index, pSprite, (Chance(0x2000)) ? kDamageFall : (Chance(0x4000)) ? kDamageExplode : kDamageBullet, dmg);
|
||||
if (Chance(0x0200)) actKickObject(actor2, actor);
|
||||
}
|
||||
}
|
||||
|
@ -4475,7 +4475,7 @@ static void checkFloorHit(DBloodActor* actor)
|
|||
}
|
||||
actKickObject(actor, actor2);
|
||||
sfxPlay3DSound(pSprite->x, pSprite->y, pSprite->z, 357, pSprite->sectnum);
|
||||
actDamageSprite(-1, pSprite2, kDamageFall, 80);
|
||||
actDamageSprite_(-1, pSprite2, kDamageFall, 80);
|
||||
break;
|
||||
case kTrapSawCircular:
|
||||
if (!pXSprite2->state) actDamageSprite(actor, actor, kDamageBullet, 1);
|
||||
|
@ -4874,7 +4874,7 @@ void MoveDude(DBloodActor* actor)
|
|||
{
|
||||
nSector = pSprite->sectnum;
|
||||
if (pSprite->statnum == kStatDude || pSprite->statnum == kStatThing)
|
||||
actDamageSprite(pSprite->index, pSprite, kDamageFall, 1000 << 4);
|
||||
actDamageSprite_(pSprite->index, pSprite, kDamageFall, 1000 << 4);
|
||||
}
|
||||
|
||||
if (sector[nSector].type >= kSectorPath && sector[nSector].type <= kSectorRotate)
|
||||
|
@ -7404,7 +7404,7 @@ void SerializeActor(FSerializer& arc)
|
|||
}
|
||||
|
||||
// dumping ground for temporary wrappers.
|
||||
int actDamageSprite(int nSource, spritetype* pSprite, DAMAGE_TYPE damageType, int damage)
|
||||
int actDamageSprite_(int nSource, spritetype* pSprite, DAMAGE_TYPE damageType, int damage)
|
||||
{
|
||||
return actDamageSprite(nSource == -1 ? nullptr : &bloodActors[nSource], &bloodActors[pSprite->index], damageType, damage);
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ void actRadiusDamage(DBloodActor* source, int x, int y, int z, int nSector, int
|
|||
DBloodActor *actDropObject(DBloodActor *pSprite, int nType);
|
||||
bool actHealDude(DBloodActor* pXDude, int a2, int a3);
|
||||
void actKillDude(DBloodActor* a1, DBloodActor* pSprite, DAMAGE_TYPE a3, int a4);
|
||||
int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE a3, int a4);
|
||||
int actDamageSprite_(int nSource, spritetype *pSprite, DAMAGE_TYPE a3, int a4);
|
||||
int actDamageSprite(DBloodActor* pSource, DBloodActor* pTarget, DAMAGE_TYPE damageType, int damage);
|
||||
void actHitcodeToData(int a1, HITINFO *pHitInfo, DBloodActor **actor, walltype **a7 = nullptr);
|
||||
void actAirDrag(DBloodActor *pSprite, int a2);
|
||||
|
|
|
@ -139,7 +139,7 @@ void StompSeqCallback(int, DBloodActor* actor1)
|
|||
nDamage = v1c + ((vc-nDist2)*v10)/vc;
|
||||
if (IsPlayerSprite(pSprite2))
|
||||
gPlayer[pSprite2->type-kDudePlayer1].quakeEffect += nDamage*4;
|
||||
actDamageSprite(nSprite, pSprite2, kDamageFall, nDamage<<4);
|
||||
actDamageSprite_(nSprite, pSprite2, kDamageFall, nDamage<<4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ void StompSeqCallback(int, DBloodActor* actor1)
|
|||
nDamage = v1c + ((vc-nDist2)*v10)/vc;
|
||||
if (IsPlayerSprite(pSprite2))
|
||||
gPlayer[pSprite2->type-kDudePlayer1].quakeEffect += nDamage*4;
|
||||
actDamageSprite(nSprite, pSprite2, kDamageFall, nDamage<<4);
|
||||
actDamageSprite_(nSprite, pSprite2, kDamageFall, nDamage<<4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1500,7 +1500,7 @@ void debrisConcuss(int nOwner, int listIndex, int x, int y, int z, int dmg) {
|
|||
pSprite->statnum = kStatThing; // temporary change statnum property
|
||||
}
|
||||
|
||||
actDamageSprite(nOwner, pSprite, kDamageExplode, dmg);
|
||||
actDamageSprite_(nOwner, pSprite, kDamageExplode, dmg);
|
||||
|
||||
if (thing)
|
||||
pSprite->statnum = kStatDecoration; // return statnum property back
|
||||
|
@ -3019,13 +3019,13 @@ void damageSprites(XSPRITE* pXSource, spritetype* pSprite) {
|
|||
|
||||
playerDamageArmor(pPlayer, (DAMAGE_TYPE)dmgType, dmg);
|
||||
for (int i = 0; i < 3; armor[i] = pPlayer->armor[i], pPlayer->armor[i] = 0, i++);
|
||||
actDamageSprite(pSource->index, pSprite, (DAMAGE_TYPE)dmgType, dmg);
|
||||
actDamageSprite_(pSource->index, pSprite, (DAMAGE_TYPE)dmgType, dmg);
|
||||
for (int i = 0; i < 3; pPlayer->armor[i] = armor[i], i++);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
actDamageSprite(pSource->index, pSprite, (DAMAGE_TYPE)dmgType, dmg);
|
||||
actDamageSprite_(pSource->index, pSprite, (DAMAGE_TYPE)dmgType, dmg);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ char powerupActivate(PLAYER *pPlayer, int nPowerUp)
|
|||
}
|
||||
|
||||
if (ceilIsTooLow(pPlayer->pSprite))
|
||||
actDamageSprite(pPlayer->pSprite->index, pPlayer->pSprite, kDamageExplode, 65535);
|
||||
actDamageSprite_(pPlayer->pSprite->index, pPlayer->pSprite, kDamageExplode, 65535);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -316,7 +316,7 @@ void powerupDeactivate(PLAYER *pPlayer, int nPowerUp)
|
|||
if (gModernMap) {
|
||||
playerSizeReset(pPlayer);
|
||||
if (ceilIsTooLow(pPlayer->pSprite))
|
||||
actDamageSprite(pPlayer->pSprite->index, pPlayer->pSprite, kDamageExplode, 65535);
|
||||
actDamageSprite_(pPlayer->pSprite->index, pPlayer->pSprite, kDamageExplode, 65535);
|
||||
}
|
||||
break;
|
||||
case kItemShroomGrow:
|
||||
|
@ -1669,13 +1669,13 @@ void playerProcess(PLAYER *pPlayer)
|
|||
{
|
||||
short nSector = pSprite->sectnum;
|
||||
if (pushmove_old(&pSprite->x, &pSprite->y, &pSprite->z, &nSector, dw, dzt, dzb, CLIPMASK0) == -1)
|
||||
actDamageSprite(nSprite, pSprite, kDamageFall, 500<<4);
|
||||
actDamageSprite_(nSprite, pSprite, kDamageFall, 500<<4);
|
||||
if (pSprite->sectnum != nSector)
|
||||
{
|
||||
if (nSector == -1)
|
||||
{
|
||||
nSector = pSprite->sectnum;
|
||||
actDamageSprite(nSprite, pSprite, kDamageFall, 500<<4);
|
||||
actDamageSprite_(nSprite, pSprite, kDamageFall, 500<<4);
|
||||
}
|
||||
assert(nSector >= 0 && nSector < kMaxSectors);
|
||||
ChangeSpriteSect(nSprite, nSector);
|
||||
|
|
|
@ -1168,7 +1168,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
|
|||
nDamage = 500;
|
||||
else
|
||||
nDamage = pXSector->data;
|
||||
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
actDamageSprite_(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
}
|
||||
a2 = ClipRange(a2-(vbp/2)*4, 0, 65536);
|
||||
}
|
||||
|
@ -1179,7 +1179,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
|
|||
nDamage = 500;
|
||||
else
|
||||
nDamage = pXSector->data;
|
||||
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
actDamageSprite_(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
a2 = ClipRange(a2-(vbp/2)*4, 0, 65536);
|
||||
}
|
||||
}
|
||||
|
@ -1202,7 +1202,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
|
|||
nDamage = 500;
|
||||
else
|
||||
nDamage = pXSector->data;
|
||||
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
actDamageSprite_(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
}
|
||||
a2 = ClipRange(a2+(vbp/2)*4, 0, 65536);
|
||||
}
|
||||
|
@ -1213,7 +1213,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
|
|||
nDamage = 500;
|
||||
else
|
||||
nDamage = pXSector->data;
|
||||
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
actDamageSprite_(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
|
||||
a2 = ClipRange(a2+(vbp/2)*4, 0, 65536);
|
||||
}
|
||||
}
|
||||
|
@ -1426,9 +1426,9 @@ void TeleFrag(int nKiller, int nSector)
|
|||
{
|
||||
spritetype *pSprite = &sprite[nSprite];
|
||||
if (pSprite->statnum == kStatDude)
|
||||
actDamageSprite(nKiller, pSprite, kDamageExplode, 4000);
|
||||
actDamageSprite_(nKiller, pSprite, kDamageExplode, 4000);
|
||||
else if (pSprite->statnum == kStatThing)
|
||||
actDamageSprite(nKiller, pSprite, kDamageExplode, 4000);
|
||||
actDamageSprite_(nKiller, pSprite, kDamageExplode, 4000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1434,7 +1434,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
spritetype *pSprite = pPlayer->pSprite;
|
||||
if (nTrigger == 4)
|
||||
{
|
||||
actDamageSprite(nSprite, pSprite, kDamageBullet, 1<<4);
|
||||
actDamageSprite_(nSprite, pSprite, kDamageBullet, 1<<4);
|
||||
return;
|
||||
}
|
||||
assert(pPlayer->voodooTarget >= 0);
|
||||
|
@ -1447,7 +1447,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
{
|
||||
sfxPlay3DSound(pSprite, 460, 2, 0);
|
||||
fxSpawnBlood(pTarget, 17<<4);
|
||||
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 17<<4);
|
||||
int nDamage = actDamageSprite_(nSprite, pTarget, kDamageSpirit, 17<<4);
|
||||
UseAmmo(pPlayer, 9, nDamage/4);
|
||||
break;
|
||||
}
|
||||
|
@ -1455,7 +1455,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
{
|
||||
sfxPlay3DSound(pSprite, 460, 2, 0);
|
||||
fxSpawnBlood(pTarget, 17<<4);
|
||||
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 9<<4);
|
||||
int nDamage = actDamageSprite_(nSprite, pTarget, kDamageSpirit, 9<<4);
|
||||
if (IsPlayerSprite(pTarget))
|
||||
WeaponLower(&gPlayer[pTarget->type-kDudePlayer1]);
|
||||
UseAmmo(pPlayer, 9, nDamage/4);
|
||||
|
@ -1465,7 +1465,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
{
|
||||
sfxPlay3DSound(pSprite, 463, 2, 0);
|
||||
fxSpawnBlood(pTarget, 17<<4);
|
||||
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 49<<4);
|
||||
int nDamage = actDamageSprite_(nSprite, pTarget, kDamageSpirit, 49<<4);
|
||||
UseAmmo(pPlayer, 9, nDamage/4);
|
||||
break;
|
||||
}
|
||||
|
@ -1473,7 +1473,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
{
|
||||
sfxPlay3DSound(pSprite, 460, 2, 0);
|
||||
fxSpawnBlood(pTarget, 17<<4);
|
||||
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 11<<4);
|
||||
int nDamage = actDamageSprite_(nSprite, pTarget, kDamageSpirit, 11<<4);
|
||||
if (IsPlayerSprite(pTarget))
|
||||
{
|
||||
PLAYER *pOtherPlayer = &gPlayer[pTarget->type - kDudePlayer1];
|
||||
|
@ -1508,7 +1508,7 @@ void AltFireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
int v8 = pPlayer->ammoCount[9] << 1;
|
||||
int nDamage = (v8 + Random(vc)) << 4;
|
||||
nDamage = (nDamage * ((51200 - nDist) + 1)) / 51200;
|
||||
nDamage = actDamageSprite(pPlayer->nSprite, pTarget, kDamageSpirit, nDamage);
|
||||
nDamage = actDamageSprite_(pPlayer->nSprite, pTarget, kDamageSpirit, nDamage);
|
||||
|
||||
if (IsPlayerSprite(pTarget))
|
||||
{
|
||||
|
@ -1546,7 +1546,7 @@ void AltFireVoodoo(int nTrigger, PLAYER *pPlayer)
|
|||
int v8 = pPlayer->ammoCount[9] << 1;
|
||||
int nDamage = (v8 + Random2(vc)) << 4;
|
||||
nDamage = (nDamage * ((51200 - nDist) + 1)) / 51200;
|
||||
nDamage = actDamageSprite(pPlayer->nSprite, pTarget, kDamageSpirit, nDamage);
|
||||
nDamage = actDamageSprite_(pPlayer->nSprite, pTarget, kDamageSpirit, nDamage);
|
||||
UseAmmo(pPlayer, 9, nDamage);
|
||||
if (IsPlayerSprite(pTarget))
|
||||
{
|
||||
|
@ -1699,7 +1699,7 @@ void FireLifeLeech(int nTrigger, PLAYER *pPlayer)
|
|||
if (checkAmmo2(pPlayer, 8, 1))
|
||||
UseAmmo(pPlayer, 8, 1);
|
||||
else
|
||||
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, kDamageSpirit, 16);
|
||||
actDamageSprite_(pPlayer->nSprite, pPlayer->pSprite, kDamageSpirit, 16);
|
||||
pPlayer->visibility = ClipHigh(pPlayer->visibility+5, 50);
|
||||
}
|
||||
|
||||
|
@ -1722,7 +1722,7 @@ void AltFireLifeLeech(int , PLAYER *pPlayer)
|
|||
int nAmmo = pPlayer->ammoCount[8];
|
||||
if (nAmmo < 25 && pPlayer->pXSprite->health > unsigned((25-nAmmo)<<4))
|
||||
{
|
||||
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, kDamageSpirit, ((25-nAmmo)<<4));
|
||||
actDamageSprite_(pPlayer->nSprite, pPlayer->pSprite, kDamageSpirit, ((25-nAmmo)<<4));
|
||||
nAmmo = 25;
|
||||
}
|
||||
pXSprite->data3 = nAmmo;
|
||||
|
@ -2668,7 +2668,7 @@ void teslaHit(spritetype *pMissile, int a2)
|
|||
int nDamage = ClipLow((nDist-(ksqrt(dx*dx+dy*dy)>>4)+20)>>1, 10);
|
||||
if (nSprite == nOwner)
|
||||
nDamage /= 2;
|
||||
actDamageSprite(nOwner, pSprite, kDamageTesla, nDamage<<4);
|
||||
actDamageSprite_(nOwner, pSprite, kDamageTesla, nDamage<<4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2686,7 +2686,7 @@ void teslaHit(spritetype *pMissile, int a2)
|
|||
int dx = pMissile->x-pSprite->x;
|
||||
int dy = pMissile->y-pSprite->y;
|
||||
int nDamage = ClipLow(nDist-(ksqrt(dx*dx+dy*dy)>>4)+20, 20);
|
||||
actDamageSprite(nOwner, pSprite, kDamageTesla, nDamage<<4);
|
||||
actDamageSprite_(nOwner, pSprite, kDamageTesla, nDamage<<4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue