- renamed some constants.

Manually copied from NBlood because the underlying code has changed too much already.
This commit is contained in:
Christoph Oelckers 2021-06-16 21:13:04 +02:00
parent 9ed27effe5
commit 63bc36e3c4
28 changed files with 317 additions and 289 deletions

View file

@ -198,6 +198,34 @@ void FGameConfigFile::DoAutoloadSetup (/*FIWadManager *iwad_man*/)
isInitialized = true;
}
CreateSectionAtStart("Exhumed.Autoload");
CreateSectionAtStart("WW2GI.Autoload");
CreateSectionAtStart("Nam.Autoload");
CreateSectionAtStart("Exhumed.Autoload");
CreateSectionAtStart("Redneck.Route66.Autoload");
CreateSectionAtStart("Redneck.RidesAgain.Autoload");
CreateSectionAtStart("Redneck.Redneck.Autoload");
CreateSectionAtStart("Redneck.Autoload");
CreateSectionAtStart("ShadowWarrior.TwinDragon.Autoload");
CreateSectionAtStart("ShadowWarrior.Wanton.Autoload");
CreateSectionAtStart("ShadowWarrior.ShadowWarrior.Autoload");
CreateSectionAtStart("ShadowWarrior.Autoload");
CreateSectionAtStart("Blood.Cryptic.Autoload");
CreateSectionAtStart("Blood.Blood.Autoload");
CreateSectionAtStart("Blood.Autoload");
CreateSectionAtStart("Duke.WorldTour.Autoload");
CreateSectionAtStart("Duke.NWinter.Autoload");
CreateSectionAtStart("Duke.Vacation.15.Autoload");
CreateSectionAtStart("Duke.Vacation.13.Autoload");
CreateSectionAtStart("Duke.Vacation.Autoload");
CreateSectionAtStart("Duke.DukeDC.15.Autoload");
CreateSectionAtStart("Duke.DukeDC.13.Autoload");
CreateSectionAtStart("Duke.DukeDC.Autoload");
CreateSectionAtStart("Duke.Duke.15.Autoload");
CreateSectionAtStart("Duke.Duke.13.Autoload");
CreateSectionAtStart("Duke.Duke.Autoload");
CreateSectionAtStart("Duke.Autoload");
CreateSectionAtStart("Global.Autoload");
// The same goes for auto-exec files.

View file

@ -40,7 +40,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Tine
{
DAMAGE_TYPE_2,
kDamageBullet,
17,
174762,
1152,
@ -67,7 +67,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Shell
{
DAMAGE_TYPE_2,
kDamageBullet,
4,
65536,
0,
@ -94,7 +94,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Bullet
{
DAMAGE_TYPE_2,
kDamageBullet,
7,
21845,
0,
@ -122,7 +122,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Tommy AP
{
DAMAGE_TYPE_2,
kDamageBullet,
20,
65536,
0,
@ -149,7 +149,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Shell AP
{
DAMAGE_TYPE_2,
kDamageBullet,
6,
87381,
0,
@ -176,7 +176,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Tommy regular
{
DAMAGE_TYPE_2,
kDamageBullet,
12,
65536,
0,
@ -203,7 +203,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Bat bite
{
DAMAGE_TYPE_2,
kDamageBullet,
4,
0,
921,
@ -230,7 +230,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Eel bite
{
DAMAGE_TYPE_2,
kDamageBullet,
12,
0,
1177,
@ -257,7 +257,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Gill bite
{
DAMAGE_TYPE_2,
kDamageBullet,
9,
0,
1177,
@ -284,7 +284,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Beast slash
{
DAMAGE_TYPE_3,
kDamageExplode,
50,
43690,
1024,
@ -311,7 +311,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Axe
{
DAMAGE_TYPE_2,
kDamageBullet,
18,
436906,
1024,
@ -338,7 +338,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Cleaver
{
DAMAGE_TYPE_2,
kDamageBullet,
9,
218453,
1024,
@ -365,7 +365,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Phantasm slash
{
DAMAGE_TYPE_2,
kDamageBullet,
20,
436906,
1024,
@ -392,7 +392,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Gargoyle Slash
{
DAMAGE_TYPE_2,
kDamageBullet,
16,
218453,
1024,
@ -419,7 +419,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Cerberus bite
{
DAMAGE_TYPE_2,
kDamageBullet,
19,
218453,
614,
@ -446,7 +446,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Hound bite
{
DAMAGE_TYPE_2,
kDamageBullet,
10,
218453,
614,
@ -473,7 +473,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Rat bite
{
DAMAGE_TYPE_2,
kDamageBullet,
4,
0,
921,
@ -500,7 +500,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Spider bite
{
DAMAGE_TYPE_2,
kDamageBullet,
8,
0,
614,
@ -527,7 +527,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Unk
{
DAMAGE_TYPE_2,
kDamageBullet,
9,
0,
512,
@ -580,7 +580,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Tchernobog burn vector
{
DAMAGE_TYPE_1,
kDamageBurn,
2,
0,
0,
@ -607,7 +607,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// Vodoo 1.0 vector
{
DAMAGE_TYPE_5,
kDamageSpirit,
25,
0,
0,
@ -634,7 +634,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max
// 22 kVectorGenDudePunch
{
DAMAGE_TYPE_0,
kDamageFall,
37,
874762,
620,
@ -2599,7 +2599,7 @@ static void ConcussSprite(DBloodActor* source, DBloodActor* actor, int x, int y,
actor->zvel() += MulScale(t, dz, 16);
}
}
actDamageSprite(source, actor, DAMAGE_TYPE_3, damage);
actDamageSprite(source, actor, kDamageExplode, damage);
}
//---------------------------------------------------------------------------
@ -2739,7 +2739,7 @@ static void actNapalmMove(DBloodActor* actor)
if (Chance(0x8000)) pSprite->cstat |= 4;
sfxPlay3DSound(pSprite, 303, 24 + (pSprite->flags & 3), 1);
actRadiusDamage(pOwner, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 128, 0, 60, DAMAGE_TYPE_3, 15, 120);
actRadiusDamage(pOwner, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 128, 0, 60, kDamageExplode, 15, 120);
if (pXSprite->data4 > 1)
{
@ -2952,15 +2952,15 @@ static bool actKillModernDude(DBloodActor* actor, DAMAGE_TYPE damageType)
removeDudeStuff(pSprite);
if (pXSprite->txID <= 0 || getNextIncarnation(pXSprite) == nullptr)
{
if (pExtra->weaponType == kGenDudeWeaponKamikaze && Chance(0x4000) && damageType != DAMAGE_TYPE_5 && damageType != DAMAGE_TYPE_4)
if (pExtra->weaponType == kGenDudeWeaponKamikaze && Chance(0x4000) && damageType != kDamageSpirit && damageType != kDamageDrown)
{
doExplosion(pSprite, pXSprite->data1 - kTrapExploder);
if (Chance(0x9000)) damageType = (DAMAGE_TYPE)3;
}
if (damageType == DAMAGE_TYPE_1)
if (damageType == kDamageBurn)
{
if (pExtra->availDeaths[DAMAGE_TYPE_1] && !spriteIsUnderwater(pSprite))
if (pExtra->availDeaths[kDamageBurn] && !spriteIsUnderwater(pSprite))
{
if (pExtra->canBurn)
{
@ -2980,7 +2980,7 @@ static bool actKillModernDude(DBloodActor* actor, DAMAGE_TYPE damageType)
{
pXSprite->burnTime = 0;
pXSprite->burnSource = -1;
damageType = DAMAGE_TYPE_0;
damageType = kDamageFall;
}
}
}
@ -3061,7 +3061,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
case kDudeCultistShotgun:
case kDudeCultistTesla:
case kDudeCultistTNT:
if (damageType == DAMAGE_TYPE_1 && pXSprite->medium == kMediumNormal)
if (damageType == kDamageBurn && pXSprite->medium == kMediumNormal)
{
pSprite->type = kDudeBurningCultist;
aiNewState(actor, &cultistBurnGoto);
@ -3071,7 +3071,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
break;
case kDudeBeast:
if (damageType == DAMAGE_TYPE_1 && pXSprite->medium == kMediumNormal)
if (damageType == kDamageBurn && pXSprite->medium == kMediumNormal)
{
pSprite->type = kDudeBurningBeast;
aiNewState(actor, &beastBurnGoto);
@ -3081,7 +3081,7 @@ static bool actKillDudeStage1(DBloodActor* actor, DAMAGE_TYPE damageType)
break;
case kDudeInnocent:
if (damageType == DAMAGE_TYPE_1 && pXSprite->medium == kMediumNormal)
if (damageType == kDamageBurn && pXSprite->medium == kMediumNormal)
{
pSprite->type = kDudeBurningInnocent;
aiNewState(actor, &innocentBurnGoto);
@ -3175,7 +3175,7 @@ static int checkDamageType(DBloodActor* actor, DAMAGE_TYPE damageType)
switch (damageType)
{
case DAMAGE_TYPE_3:
case kDamageExplode:
nSeq = 2;
switch (pSprite->type)
{
@ -3188,7 +3188,7 @@ static int checkDamageType(DBloodActor* actor, DAMAGE_TYPE damageType)
if (!pExtra->availDeaths[damageType])
{
nSeq = 1;
damageType = DAMAGE_TYPE_0;
damageType = kDamageFall;
}
break;
}
@ -3209,11 +3209,11 @@ static int checkDamageType(DBloodActor* actor, DAMAGE_TYPE damageType)
break;
}
break;
case DAMAGE_TYPE_1:
case kDamageBurn:
nSeq = 3;
sfxPlay3DSound(pSprite, 351, -1, 0);
break;
case DAMAGE_TYPE_5:
case kDamageSpirit:
switch (pSprite->type) {
case kDudeZombieAxeNormal:
case kDudeZombieAxeBuried:
@ -3227,7 +3227,7 @@ static int checkDamageType(DBloodActor* actor, DAMAGE_TYPE damageType)
break;
}
break;
case DAMAGE_TYPE_0:
case kDamageFall:
switch (pSprite->type)
{
case kDudeCultistTommy:
@ -3487,7 +3487,7 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag
case kDudeBurningCultist:
burningCultistDeath(actor, nSeq);
damageType = DAMAGE_TYPE_3;
damageType = kDamageExplode;
break;
#ifdef NOONE_EXTENSIONS
@ -3498,13 +3498,13 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag
case kDudeModernCustomBurning:
modernCustomDudeBurningDeath(actor, nSeq);
genDudePostDeath(pSprite, DAMAGE_TYPE_3, damage);
genDudePostDeath(pSprite, kDamageExplode, damage);
return;
#endif
case kDudeBurningZombieAxe:
zombieAxeBurningDeath(actor, nSeq);
damageType = DAMAGE_TYPE_3;
damageType = kDamageExplode;
break;
case kDudeBurningZombieButcher:
@ -3512,7 +3512,7 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag
break;
case kDudeBurningInnocent:
damageType = DAMAGE_TYPE_3;
damageType = kDamageExplode;
seqSpawn(dudeInfo[nType].seqStartID + 7, actor, nDudeToGibClient1);
break;
@ -3629,7 +3629,7 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag
break;
case kDudeBurningTinyCaleb:
damageType = DAMAGE_TYPE_3;
damageType = kDamageExplode;
seqSpawn(dudeInfo[nType].seqStartID + 11, actor, nDudeToGibClient1);
break;
@ -3639,7 +3639,7 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag
break;
case kDudeBurningBeast:
damageType = DAMAGE_TYPE_3;
damageType = kDamageExplode;
seqSpawn(dudeInfo[nType].seqStartID + 12, actor, nDudeToGibClient1);
break;
@ -3648,7 +3648,7 @@ void actKillDude(DBloodActor* killerActor, DBloodActor* actor, DAMAGE_TYPE damag
break;
}
if (damageType == DAMAGE_TYPE_3)
if (damageType == kDamageExplode)
{
DUDEINFO* pDudeInfo = getDudeInfo(pSprite->type);
for (int i = 0; i < 3; i++)
@ -3696,7 +3696,7 @@ static int actDamageDude(DBloodActor* source, DBloodActor* actor, int damage, DA
if (pXSprite->health <= 0) return 0;
damage = aiDamageSprite(source, actor, damageType, damage);
if (pXSprite->health <= 0)
actKillDude(source, actor, ((damageType == DAMAGE_TYPE_3 && damage < 160) ? DAMAGE_TYPE_0 : damageType), damage);
actKillDude(source, actor, ((damageType == kDamageExplode && damage < 160) ? kDamageFall : damageType), damage);
}
else
{
@ -3919,7 +3919,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
int rand2 = (7 + Random(7)) << 4;
int nDamage = actDamageSprite(missileOwner, actorHit, rand1, rand2);
if ((pThingInfo && pThingInfo->dmgControl[DAMAGE_TYPE_1] != 0) || (pDudeInfo && pDudeInfo->damageVal[DAMAGE_TYPE_1] != 0))
if ((pThingInfo && pThingInfo->dmgControl[kDamageBurn] != 0) || (pDudeInfo && pDudeInfo->damageVal[kDamageBurn] != 0))
actBurnSprite(missileActor->GetOwner(), actorHit, 360);
// by NoOne: make Life Leech heal user, just like it was in 1.0x versions
@ -3966,7 +3966,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
{
int nOwner = pMissile->owner;
int nDamage = (15 + Random(7)) << 4;
actDamageSprite(nOwner, pSpriteHit, DAMAGE_TYPE_2, nDamage);
actDamageSprite(nOwner, pSpriteHit, kDamageBullet, nDamage);
}
actPostSprite(missileActor, kStatFree);
break;
@ -3979,7 +3979,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
if (hitCode == 3 && pSpriteHit && (pThingInfo || pDudeInfo))
{
int nDamage = (25 + Random(20)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_5, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageSpirit, nDamage);
}
actPostSprite(missileActor, kStatFree);
break;
@ -3993,7 +3993,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
{
int nDmgMul = (pMissile->type == kMissileLifeLeechAltSmall) ? 6 : 3;
int nDamage = (nDmgMul + Random(nDmgMul)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_5, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageSpirit, nDamage);
}
actPostSprite(missileActor, kStatFree);
break;
@ -4006,7 +4006,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
evPost(actorHit, 0, kCallbackFXFlameLick);
int nDamage = (50 + Random(50)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_2, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage);
}
actExplodeSprite(pMissile);
break;
@ -4020,25 +4020,25 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
sfxKill3DSound(pMissile, -1, -1);
if ((hitCode == 3 && pSpriteHit) && (pThingInfo || pDudeInfo))
{
if ((pThingInfo && pThingInfo->dmgControl[DAMAGE_TYPE_1] != 0) || (pDudeInfo && pDudeInfo->damageVal[DAMAGE_TYPE_1] != 0))
if ((pThingInfo && pThingInfo->dmgControl[kDamageBurn] != 0) || (pDudeInfo && pDudeInfo->damageVal[kDamageBurn] != 0))
{
if (pThingInfo && pSpriteHit->type == kThingTNTBarrel && actorHit->x().burnTime == 0)
evPost(actorHit, 0, kCallbackFXFlameLick);
actBurnSprite(missileOwner, actorHit, 480);
actRadiusDamage(missileOwner, pMissile->x, pMissile->y, pMissile->z, pMissile->sectnum, 16, 20, 10, DAMAGE_TYPE_2, 6, 480);
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())
{
int nDamage = (20 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_2, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage);
}
}
else
{
int nDamage = (20 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_2, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage);
}
if (surfType[pSpriteHit->picnum] == kSurfFlesh)
@ -4065,7 +4065,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
evPost(actorHit, 0, kCallbackFXFlameLick);
actBurnSprite(missileOwner, actorHit, (4 + gGameOptions.nDifficulty) << 2);
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_1, 8);
actDamageSprite(missileOwner, actorHit, kDamageBurn, 8);
}
break;
@ -4077,9 +4077,9 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
evPost(actorHit, 0, kCallbackFXFlameLick);
actBurnSprite(missileOwner, actorHit, (4 + gGameOptions.nDifficulty) << 2);
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_1, 8);
actDamageSprite(missileOwner, actorHit, kDamageBurn, 8);
int nDamage = (25 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_2, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage);
}
actExplodeSprite(pMissile);
break;
@ -4092,9 +4092,9 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
evPost(actorHit, 0, kCallbackFXFlameLick);
actBurnSprite(missileOwner, actorHit, 32);
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_5, 12);
actDamageSprite(missileOwner, actorHit, kDamageSpirit, 12);
int nDamage = (25 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_2, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageBullet, nDamage);
}
actExplodeSprite(pMissile);
break;
@ -4109,7 +4109,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
if (pSpriteHit->statnum == kStatDude)
{
int nDamage = (25 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_5, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageSpirit, nDamage);
}
}
break;
@ -4124,7 +4124,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
if (pSpriteHit->statnum == kStatDude)
{
int nDamage = (10 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_5, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageSpirit, nDamage);
int nType = missileOwner->s().type - kDudeBase;
if (missileOwner->x().health > 0)
actHealDude(missileOwner, 10, getDudeInfo(nType + kDudeBase)->startHealth);
@ -4142,7 +4142,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
if (hitCode == 3 && actorHit)
{
int nDamage = (15 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_6, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageTesla, nDamage);
}
break;
@ -4152,7 +4152,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
if (hitCode == 3 && actorHit)
{
int nDamage = (10 + Random(10)) << 4;
actDamageSprite(missileOwner, actorHit, DAMAGE_TYPE_0, nDamage);
actDamageSprite(missileOwner, actorHit, kDamageFall, nDamage);
}
break;
}
@ -4202,8 +4202,8 @@ static void actTouchFloor(DBloodActor* actor, int nSector)
if (doDamage) {
DAMAGE_TYPE nDamageType;
if (pSector->type == kSectorDamage) nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType, DAMAGE_TYPE_0, DAMAGE_TYPE_6);
else nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType - 1, DAMAGE_TYPE_0, DAMAGE_TYPE_6);
if (pSector->type == kSectorDamage) nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType, kDamageFall, kDamageTesla);
else nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType - 1, kDamageFall, kDamageTesla);
int nDamage;
if (pXSector->data) nDamage = ClipRange(pXSector->data, 0, 1000);
@ -4213,7 +4213,7 @@ static void actTouchFloor(DBloodActor* actor, int nSector)
}
if (tileGetSurfType(nSector + 0x4000) == kSurfLava)
{
actDamageSprite(actor, actor, DAMAGE_TYPE_1, 16);
actDamageSprite(actor, actor, kDamageBurn, 16);
sfxPlay3DSound(&actor->s(), 352, 5, 2);
}
}
@ -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)) ? DAMAGE_TYPE_0 : (Chance(0x4000)) ? DAMAGE_TYPE_3 : DAMAGE_TYPE_2, dmg);
if (dmg > 0) actDamageSprite(pSprite2->index, pSprite, (Chance(0x2000)) ? kDamageFall : (Chance(0x4000)) ? kDamageExplode : kDamageBullet, dmg);
if (Chance(0x0200)) actKickObject(actor2, actor);
}
}
@ -4287,7 +4287,7 @@ static void checkCeilHit(DBloodActor* actor)
switch (pSprite2->type)
{
case kDudeTchernobog:
actDamageSprite(actor2, actor, DAMAGE_TYPE_3, pXSprite->health << 2);
actDamageSprite(actor2, actor, kDamageExplode, pXSprite->health << 2);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustom:
@ -4298,11 +4298,11 @@ static void checkCeilHit(DBloodActor* actor)
if (!actor->IsPlayerActor())
{
actDamageSprite(actor2, actor, DAMAGE_TYPE_0, dmg);
actDamageSprite(actor2, actor, kDamageFall, dmg);
if (pXSprite && !actor->isActive()) aiActivateDude(actor);
}
else if (powerupCheck(&gPlayer[pSprite->type - kDudePlayer1], kPwUpJumpBoots) > 0) actDamageSprite(actor2, actor, DAMAGE_TYPE_3, dmg);
else actDamageSprite(actor2, actor, DAMAGE_TYPE_0, dmg);
else if (powerupCheck(&gPlayer[pSprite->type - kDudePlayer1], kPwUpJumpBoots) > 0) actDamageSprite(actor2, actor, kDamageExplode, dmg);
else actDamageSprite(actor2, actor, kDamageFall, dmg);
break;
#endif
@ -4314,11 +4314,11 @@ static void checkCeilHit(DBloodActor* actor)
if (pSprite2->type == kTrapSawCircular)
{
if (!pXSprite2->state) actDamageSprite(actor, actor, DAMAGE_TYPE_2, 1);
if (!pXSprite2->state) actDamageSprite(actor, actor, kDamageBullet, 1);
else {
pXSprite2->data1 = 1;
pXSprite2->data2 = ClipHigh(pXSprite2->data2 + 8, 600);
actDamageSprite(actor, actor, DAMAGE_TYPE_2, 16);
actDamageSprite(actor, actor, kDamageBullet, 16);
}
}
}
@ -4369,7 +4369,7 @@ static void checkHit(DBloodActor* actor)
actKickObject(actor, actor2);
sfxPlay3DSound(pSprite, 357, -1, 1);
int dmg = (mass1 - mass2) + abs(FixedToInt(actor->xvel()));
if (dmg > 0) actDamageSprite(actor, actor2, (Chance(0x2000)) ? DAMAGE_TYPE_0 : DAMAGE_TYPE_2, dmg);
if (dmg > 0) actDamageSprite(actor, actor2, (Chance(0x2000)) ? kDamageFall : kDamageBullet, dmg);
}
}
}
@ -4384,7 +4384,7 @@ static void checkHit(DBloodActor* actor)
case kThingZombieHead:
sfxPlay3DSound(pSprite->x, pSprite->y, pSprite->z, 357, pSprite->sectnum);
actKickObject(actor, actor2);
actDamageSprite(nullptr, actor2, DAMAGE_TYPE_0, 80);
actDamageSprite(nullptr, actor2, kDamageFall, 80);
break;
case kDudeBurningInnocent:
@ -4393,7 +4393,7 @@ static void checkHit(DBloodActor* actor)
case kDudeBurningZombieButcher:
// This does not make sense
pXSprite->burnTime = ClipLow(pXSprite->burnTime - 4, 0);
actDamageSprite(actor->GetBurnSource(), actor, DAMAGE_TYPE_1, 8);
actDamageSprite(actor->GetBurnSource(), actor, kDamageBurn, 8);
break;
}
}
@ -4448,7 +4448,7 @@ static void checkFloorHit(DBloodActor* actor)
actKickObject(actor, actor2);
int dmg = (mass1 - mass2) + pSprite->clipdist;
if (dmg > 0) actDamageSprite(actor, actor2, (Chance(0x2000)) ? DAMAGE_TYPE_0 : DAMAGE_TYPE_2, dmg);
if (dmg > 0) actDamageSprite(actor, actor2, (Chance(0x2000)) ? kDamageFall : kDamageBullet, dmg);
}
}
#endif
@ -4476,15 +4476,15 @@ static void checkFloorHit(DBloodActor* actor)
}
actKickObject(actor, actor2);
sfxPlay3DSound(pSprite->x, pSprite->y, pSprite->z, 357, pSprite->sectnum);
actDamageSprite(-1, pSprite2, DAMAGE_TYPE_0, 80);
actDamageSprite(-1, pSprite2, kDamageFall, 80);
break;
case kTrapSawCircular:
if (!pXSprite2->state) actDamageSprite(actor, actor, DAMAGE_TYPE_2, 1);
if (!pXSprite2->state) actDamageSprite(actor, actor, kDamageBullet, 1);
else
{
pXSprite2->data1 = 1;
pXSprite2->data2 = ClipHigh(pXSprite2->data2 + 8, 600);
actDamageSprite(actor, actor, DAMAGE_TYPE_2, 16);
actDamageSprite(actor, actor, kDamageBullet, 16);
}
break;
case kDudeCultistTommy:
@ -4525,7 +4525,7 @@ static void checkFloorHit(DBloodActor* actor)
#else
if (pPlayer)
#endif
actDamageSprite(actor, actor2, DAMAGE_TYPE_2, 8);
actDamageSprite(actor, actor2, kDamageBullet, 8);
break;
}
}
@ -4651,7 +4651,7 @@ int MoveThing(spritetype *pSprite)
switch (pSprite->type) {
case kThingZombieHead:
sfxPlay3DSound(pSprite, 607, 0, 0);
actDamageSprite(-1, pSprite, DAMAGE_TYPE_0, 80);
actDamageSprite(-1, pSprite, kDamageFall, 80);
break;
case kThingKickablePail:
sfxPlay3DSound(pSprite, 374, 0, 0);
@ -4709,7 +4709,7 @@ int MoveThing(spritetype *pSprite)
int vax = actFloorBounceVector((int*)&xvel[nSprite], (int*)&yvel[nSprite], (int*)&v20, pSprite->sectnum, pThingInfo->elastic);
int nDamage = MulScale(vax, vax, 30)-pThingInfo->dmgResist;
if (nDamage > 0)
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_0, nDamage);
actDamageSprite(nSprite, pSprite, kDamageFall, nDamage);
zvel[nSprite] = v20;
if (velFloor[pSprite->sectnum] == 0 && abs(zvel[nSprite]) < 0x10000)
{
@ -4725,7 +4725,7 @@ int MoveThing(spritetype *pSprite)
case kThingZombieHead:
if (abs(zvel[nSprite]) > 0x80000) {
sfxPlay3DSound(pSprite, 607, 0, 0);
actDamageSprite(-1, pSprite, DAMAGE_TYPE_0, 80);
actDamageSprite(-1, pSprite, kDamageFall, 80);
}
break;
case kThingKickablePail:
@ -4760,7 +4760,7 @@ int MoveThing(spritetype *pSprite)
case kThingZombieHead:
if (abs(zvel[nSprite]) > 0x80000) {
sfxPlay3DSound(pSprite, 607, 0, 0);
actDamageSprite(-1, pSprite, DAMAGE_TYPE_0, 80);
actDamageSprite(-1, pSprite, kDamageFall, 80);
}
break;
case kThingKickablePail:
@ -4836,14 +4836,14 @@ void MoveDude(spritetype *pSprite)
{
nSector = pSprite->sectnum;
if (pSprite->statnum == kStatDude || pSprite->statnum == kStatThing)
actDamageSprite(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000<<4);
actDamageSprite(pSprite->index, pSprite, kDamageFall, 1000<<4);
}
if (sector[nSector].type >= kSectorPath && sector[nSector].type <= kSectorRotate)
{
short nSector2 = nSector;
if (pushmove_old(&pSprite->x, &pSprite->y, &pSprite->z, &nSector2, wd, tz, bz, CLIPMASK0) == -1)
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_0, 1000 << 4);
actDamageSprite(nSprite, pSprite, kDamageFall, 1000 << 4);
if (nSector2 != -1)
nSector = nSector2;
}
@ -5038,7 +5038,7 @@ void MoveDude(spritetype *pSprite)
pSprite->flags |= 6;
break;
case kDudeBoneEel:
actKillDude(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000<<4);
actKillDude(pSprite->index, pSprite, kDamageFall, 1000<<4);
break;
}
}
@ -5128,12 +5128,12 @@ void MoveDude(spritetype *pSprite)
case kDudeBat:
case kDudeRat:
case kDudeBurningInnocent:
actKillDude(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000 << 4);
actKillDude(pSprite->index, pSprite, kDamageFall, 1000 << 4);
break;
#ifdef NOONE_EXTENSIONS
case kDudeModernCustom:
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
if (!canSwim(pSprite)) actKillDude(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000 << 4);
if (!canSwim(pSprite)) actKillDude(pSprite->index, pSprite, kDamageFall, 1000 << 4);
break;
#endif
}
@ -5246,7 +5246,7 @@ void MoveDude(spritetype *pSprite)
}
nDamage -= 100<<4;
if (nDamage > 0)
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_0, nDamage);
actDamageSprite(nSprite, pSprite, kDamageFall, nDamage);
zvel[nSprite] = v30;
if (abs(zvel[nSprite]) < 0x10000)
{
@ -5715,7 +5715,7 @@ void actProcessSprites(void)
if (pXSprite->burnTime > 0)
{
pXSprite->burnTime = ClipLow(pXSprite->burnTime-4,0);
actDamageSprite(pXSprite->burnSource, pSprite, DAMAGE_TYPE_1, 8);
actDamageSprite(pXSprite->burnSource, pSprite, kDamageBurn, 8);
}
if (pXSprite->Proximity) {
@ -5878,7 +5878,7 @@ void actProcessSprites(void)
int nObject = hit & 0x3fff;
assert(nObject >= 0 && nObject < kMaxSprites);
spritetype * pObject = &sprite[nObject];
actDamageSprite(pSprite->owner, pObject, DAMAGE_TYPE_0, pXSprite->data1);
actDamageSprite(pSprite->owner, pObject, kDamageFall, pXSprite->data1);
}
break;
#endif
@ -5889,13 +5889,13 @@ void actProcessSprites(void)
int nObject = hit & 0x3fff;
assert(nObject >= 0 && nObject < kMaxSprites);
spritetype *pObject = &sprite[nObject];
actDamageSprite(pSprite->owner, pObject, DAMAGE_TYPE_0, 12);
actDamageSprite(pSprite->owner, pObject, kDamageFall, 12);
}
break;
case kThingPodGreenBall:
if ((hit&0xc000) == 0x4000)
{
actRadiusDamage(&bloodActors[pSprite->owner], pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 200, 1, 20, DAMAGE_TYPE_3, 6, 0);
actRadiusDamage(&bloodActors[pSprite->owner], pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 200, 1, 20, kDamageExplode, 6, 0);
evPost(pSprite->index, 3, 0, kCallbackFXPodBloodSplat);
}
else
@ -5905,7 +5905,7 @@ void actProcessSprites(void)
break;
assert(nObject >= 0 && nObject < kMaxSprites);
spritetype *pObject = &sprite[nObject];
actDamageSprite(pSprite->owner, pObject, DAMAGE_TYPE_0, 12);
actDamageSprite(pSprite->owner, pObject, kDamageFall, 12);
evPost(pSprite->index, 3, 0, kCallbackFXPodBloodSplat);
}
break;
@ -5993,7 +5993,7 @@ void actProcessSprites(void)
if (pExplodeInfo->dmg && pXSprite->target == 0)
{
pXSprite->target = 1;
actDamageSprite(nOwner, pDude, DAMAGE_TYPE_0, (pExplodeInfo->dmg+Random(pExplodeInfo->dmgRng))<<4);
actDamageSprite(nOwner, pDude, kDamageFall, (pExplodeInfo->dmg+Random(pExplodeInfo->dmgRng))<<4);
}
if (pExplodeInfo->dmgType)
ConcussSprite(pOwner, act2, x, y, z, pExplodeInfo->dmgType);
@ -6138,8 +6138,8 @@ void actProcessSprites(void)
}
dy = SinScale16(pSprite->ang);
dx = CosScale16(pSprite->ang);
gVectorData[VECTOR_TYPE_20].maxDist = pXSprite->data1<<9;
actFireVector(pSprite, 0, 0, dx, dy, Random2(0x8888), VECTOR_TYPE_20);
gVectorData[kVectorTchernobogBurn].maxDist = pXSprite->data1<<9;
actFireVector(pSprite, 0, 0, dx, dy, Random2(0x8888), kVectorTchernobogBurn);
}
break;
}
@ -6163,11 +6163,11 @@ void actProcessSprites(void)
case kDudeBurningCultist:
case kDudeBurningZombieAxe:
case kDudeBurningZombieButcher:
actDamageSprite(pXSprite->burnSource, pSprite, DAMAGE_TYPE_1, 8);
actDamageSprite(pXSprite->burnSource, pSprite, kDamageBurn, 8);
break;
default:
pXSprite->burnTime = ClipLow(pXSprite->burnTime-4, 0);
actDamageSprite(pXSprite->burnSource, pSprite, DAMAGE_TYPE_1, 8);
actDamageSprite(pXSprite->burnSource, pSprite, kDamageBurn, 8);
break;
}
}
@ -6215,7 +6215,7 @@ void actProcessSprites(void)
if (pPlayer->voodooTargets)
voodooTarget(pPlayer);
if (pPlayer->hand && Chance(0x8000))
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_4, 12);
actDamageSprite(nSprite, pSprite, kDamageDrown, 12);
if (pPlayer->isUnderwater)
{
char bActive = packItemActive(pPlayer, 1);
@ -6229,7 +6229,7 @@ void actProcessSprites(void)
{
pPlayer->chokeEffect += 4;
if (Chance(pPlayer->chokeEffect))
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_4, 3<<4);
actDamageSprite(nSprite, pSprite, kDamageDrown, 3<<4);
}
else
pPlayer->chokeEffect = 0;
@ -6916,7 +6916,7 @@ void actFireVector(spritetype *pShooter, int a2, int a3, int a4, int a5, int a6,
y -= MulScale(a5, 112, 14);
z -= MulScale(a6, 112<<4, 14);
int shift = 4;
if (vectorType == VECTOR_TYPE_0 && !IsPlayerSprite(pSprite))
if (vectorType == kVectorTine && !IsPlayerSprite(pSprite))
shift = 3;
actDamageSprite(nShooter, pSprite, pVectorData->dmgType, pVectorData->dmg<<shift);
int nXSprite = pSprite->extra;
@ -7264,7 +7264,7 @@ void SerializeActor(FSerializer& arc)
{
if (arc.BeginObject("actor"))
{
arc("maxdist20", gVectorData[VECTOR_TYPE_20].maxDist) // The code messes around with this field so better save it.
arc("maxdist20", gVectorData[kVectorTchernobogBurn].maxDist) // The code messes around with this field so better save it.
.SparseArray("spritehit", gSpriteHit, kMaxSprites, activeXSprites)
("postcount", gPostCount)
.Array("post", gPost, gPostCount)

View file

@ -27,39 +27,39 @@ BEGIN_BLD_NS
class DBloodActor;
enum DAMAGE_TYPE {
DAMAGE_TYPE_0 = 0,
DAMAGE_TYPE_1, // Flame
DAMAGE_TYPE_2,
DAMAGE_TYPE_3,
DAMAGE_TYPE_4,
DAMAGE_TYPE_5,
DAMAGE_TYPE_6, // Tesla
kDamageFall = 0,
kDamageBurn,
kDamageBullet,
kDamageExplode,
kDamageDrown,
kDamageSpirit,
kDamageTesla,
kDamageMax = 7,
};
enum VECTOR_TYPE {
VECTOR_TYPE_0 = 0,
VECTOR_TYPE_1,
VECTOR_TYPE_2,
VECTOR_TYPE_3,
VECTOR_TYPE_4,
VECTOR_TYPE_5,
VECTOR_TYPE_6,
VECTOR_TYPE_7,
VECTOR_TYPE_8,
VECTOR_TYPE_9,
VECTOR_TYPE_10,
VECTOR_TYPE_11,
VECTOR_TYPE_12,
VECTOR_TYPE_13,
VECTOR_TYPE_14,
VECTOR_TYPE_15,
VECTOR_TYPE_16,
VECTOR_TYPE_17,
kVectorTine = 0,
kVectorShell,
kVectorBullet,
kVectorTommyAP,
kVectorShellAP,
kVectorTommyRegular,
kVectorBatBite,
kVectorBoneelBite,
kVectorGillBite,
kVectorBeastSlash,
kVectorAxe,
kVectorCleaver,
kVectorGhost,
kVectorGargSlash,
kVectorCerberusHack,
kVectorHoundBite,
kVectorRatBite,
kVectorSpiderBite,
VECTOR_TYPE_18,
VECTOR_TYPE_19,
VECTOR_TYPE_20,
VECTOR_TYPE_21,
kVectorTchernobogBurn,
kVectorVoodoo10,
#ifdef NOONE_EXTENSIONS
kVectorGenDudePunch,
#endif

View file

@ -951,7 +951,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
if (pSprite->type == kDudeModernCustom) {
GENDUDEEXTRA* pExtra = genDudeExtra(pSprite);
if (nDmgType == DAMAGE_TYPE_1) {
if (nDmgType == kDamageBurn) {
if (pXSprite->health > (uint32_t)pDudeInfo->fleeHealth) return nDamage;
else if (pXSprite->txID <= 0 || getNextIncarnation(pXSprite) == NULL) {
@ -968,7 +968,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
if (pXSprite->burnTime <= 0)
pXSprite->burnTime = 1200;
if (pExtra->canBurn && pExtra->availDeaths[DAMAGE_TYPE_1] > 0) {
if (pExtra->canBurn && pExtra->availDeaths[kDamageBurn] > 0) {
aiPlay3DSound(pSprite, 361, AI_SFX_PRIORITY_0, -1);
playGenDudeSound(pSprite, kGenDudeSndBurning);
@ -985,7 +985,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
}
} else {
actKillDude(nSource, pSprite, DAMAGE_TYPE_0, 65535);
actKillDude(nSource, pSprite, kDamageFall, 65535);
}
} else if (canWalk(pSprite) && !inDodge(pXSprite->aiState) && !inRecoil(pXSprite->aiState)) {
@ -1015,7 +1015,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
}
#endif
if (nDmgType == DAMAGE_TYPE_6)
if (nDmgType == kDamageTesla)
{
DUDEEXTRA *pDudeExtra = &gDudeExtra[pSprite->extra];
pDudeExtra->recoil = 1;
@ -1026,7 +1026,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
case kDudeCultistShotgun:
case kDudeCultistTesla:
case kDudeCultistTNT:
if (nDmgType != DAMAGE_TYPE_1)
if (nDmgType != kDamageBurn)
{
if (!dudeIsPlayingSeq(pSprite, 14) && !pXSprite->medium)
aiNewState(actor, &cultistDodge);
@ -1035,7 +1035,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
else if (dudeIsPlayingSeq(pSprite, 13) && (pXSprite->medium == kMediumWater || pXSprite->medium == kMediumGoo))
aiNewState(actor, &cultistSwimDodge);
}
else if (nDmgType == DAMAGE_TYPE_1 && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
else if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
{
pSprite->type = kDudeBurningCultist;
aiNewState(actor, &cultistBurnGoto);
@ -1047,7 +1047,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
}
break;
case kDudeInnocent:
if (nDmgType == DAMAGE_TYPE_1 && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
{
pSprite->type = kDudeBurningInnocent;
aiNewState(actor, &cultistBurnGoto);
@ -1080,7 +1080,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
aiNewState(actor, &gargoyleFChase);
break;
case kDudeZombieButcher:
if (nDmgType == DAMAGE_TYPE_1 && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth) {
if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth) {
aiPlay3DSound(pSprite, 361, AI_SFX_PRIORITY_0, -1);
aiPlay3DSound(pSprite, 1202, AI_SFX_PRIORITY_2, -1);
pSprite->type = kDudeBurningZombieButcher;
@ -1090,7 +1090,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
}
break;
case kDudeTinyCaleb:
if (nDmgType == DAMAGE_TYPE_1 && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/)
{
pSprite->type = kDudeBurningInnocent;
aiNewState(actor, &cultistBurnGoto);
@ -1111,7 +1111,7 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType
break;
case kDudeZombieAxeNormal:
case kDudeZombieAxeBuried:
if (nDmgType == DAMAGE_TYPE_1 && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth)
if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth)
{
aiPlay3DSound(pSprite, 361, AI_SFX_PRIORITY_0, -1);
aiPlay3DSound(pSprite, 1106, AI_SFX_PRIORITY_2, -1);

View file

@ -75,7 +75,7 @@ void batBiteSeqCallback(int, DBloodActor* actor)
int height = (pSprite->yrepeat*pDudeInfo->eyeHeight)<<2;
int height2 = (pTarget->yrepeat*pDudeInfoT->eyeHeight)<<2;
assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
actFireVector(pSprite, 0, 0, dx, dy, height2-height, VECTOR_TYPE_6);
actFireVector(pSprite, 0, 0, dx, dy, height2-height, kVectorBatBite);
}
static void batThinkTarget(DBloodActor* actor)

View file

@ -74,9 +74,9 @@ void SlashSeqCallback(int, DBloodActor* actor)
int dz = pSprite->z-pTarget->z;
dx += Random3(4000-700*gGameOptions.nDifficulty);
dy += Random3(4000-700*gGameOptions.nDifficulty);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_13);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_13);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_13);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGargSlash);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGargSlash);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGargSlash);
sfxPlay3DSound(pSprite, 9012+Random(2), -1, 0);
}
@ -137,7 +137,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, DAMAGE_TYPE_0, nDamage<<4);
actDamageSprite(nSprite, pSprite2, kDamageFall, nDamage<<4);
}
}
}
@ -167,7 +167,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, DAMAGE_TYPE_0, nDamage<<4);
actDamageSprite(nSprite, pSprite2, kDamageFall, nDamage<<4);
}
}
}

View file

@ -86,7 +86,7 @@ void eelBiteSeqCallback(int, DBloodActor* actor)
return;
}
assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
actFireVector(pSprite, 0, 0, dx, dy, height2-height, VECTOR_TYPE_7);
actFireVector(pSprite, 0, 0, dx, dy, height2-height, kVectorBoneelBite);
}
static void eelThinkTarget(DBloodActor* actor)

View file

@ -72,7 +72,7 @@ void SeqAttackCallback(int, DBloodActor* actor)
int r1 = Random3(500);
int r2 = Random3(1000);
int r3 = Random3(1000);
actFireVector(pSprite, 0, 0, dx+r3, dy+r2, dz+r1, VECTOR_TYPE_1);
actFireVector(pSprite, 0, 0, dx+r3, dy+r2, dz+r1, kVectorShell);
}
if (Chance(0x8000))
sfxPlay3DSound(pSprite, 10000+Random(5), -1, 0);

View file

@ -74,9 +74,9 @@ void cerberusBiteSeqCallback(int, DBloodActor* actor)
}
spritetype *pTarget = &sprite[pXSprite->target];
int dz = pTarget->z-pSprite->z;
actFireVector(pSprite, 350, -100, dx, dy, dz, VECTOR_TYPE_14);
actFireVector(pSprite, -350, 0, dx, dy, dz, VECTOR_TYPE_14);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_14);
actFireVector(pSprite, 350, -100, dx, dy, dz, kVectorCerberusHack);
actFireVector(pSprite, -350, 0, dx, dy, dz, kVectorCerberusHack);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorCerberusHack);
}
void cerberusBurnSeqCallback(int, DBloodActor* actor)

View file

@ -83,7 +83,7 @@ void TommySeqCallback(int, DBloodActor* actor)
dx += Random3((5-gGameOptions.nDifficulty)*1000);
dy += Random3((5-gGameOptions.nDifficulty)*1000);
dz += Random3((5-gGameOptions.nDifficulty)*500);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_2);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorBullet);
sfxPlay3DSound(pSprite, 4001, -1, 0);
}
@ -119,7 +119,7 @@ void ShotSeqCallback(int, DBloodActor* actor)
int r1 = Random3(500);
int r2 = Random3(1000);
int r3 = Random3(1000);
actFireVector(pSprite, 0, 0, dx+r3, dy+r2, dz+r1, VECTOR_TYPE_1);
actFireVector(pSprite, 0, 0, dx+r3, dy+r2, dz+r1, kVectorShell);
}
if (Chance(0x8000))
sfxPlay3DSound(pSprite, 1001, -1, 0);

View file

@ -89,13 +89,13 @@ void SlashFSeqCallback(int, DBloodActor* actor)
int dz = height-height2;
int dx = CosScale16(pSprite->ang);
int dy = SinScale16(pSprite->ang);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_13);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGargSlash);
int r1 = Random(50);
int r2 = Random(50);
actFireVector(pSprite, 0, 0, dx+r2, dy-r1, dz, VECTOR_TYPE_13);
actFireVector(pSprite, 0, 0, dx+r2, dy-r1, dz, kVectorGargSlash);
r1 = Random(50);
r2 = Random(50);
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_13);
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, kVectorGargSlash);
}
void ThrowFSeqCallback(int, DBloodActor* actor)

View file

@ -74,13 +74,13 @@ void ghostSlashSeqCallback(int, DBloodActor* actor)
int dx = CosScale16(pSprite->ang);
int dy = SinScale16(pSprite->ang);
sfxPlay3DSound(pSprite, 1406, 0, 0);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_12);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGhost);
int r1 = Random(50);
int r2 = Random(50);
actFireVector(pSprite, 0, 0, dx+r2, dy-r1, dz, VECTOR_TYPE_12);
actFireVector(pSprite, 0, 0, dx+r2, dy-r1, dz, kVectorGhost);
r1 = Random(50);
r2 = Random(50);
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_12);
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, kVectorGhost);
}
void ghostThrowSeqCallback(int, DBloodActor* actor)

View file

@ -68,9 +68,9 @@ void GillBiteSeqCallback(int, DBloodActor* actor)
int dz = pSprite->z-pTarget->z;
dx += Random3(2000);
dy += Random3(2000);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_8);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_8);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_8);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGillBite);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGillBite);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorGillBite);
}
static void gillThinkSearch(DBloodActor* actor)

View file

@ -63,7 +63,7 @@ void houndBiteSeqCallback(int, DBloodActor* actor)
spritetype *pTarget = &sprite[pXSprite->target];
#ifdef NOONE_EXTENSIONS
if (IsPlayerSprite(pTarget) || gModernMap) // allow to hit non-player targets
actFireVector(pSprite, 0, 0, dx, dy, pTarget->z - pSprite->z, VECTOR_TYPE_15);
actFireVector(pSprite, 0, 0, dx, dy, pTarget->z - pSprite->z, kVectorHoundBite);
#else
if (IsPlayerSprite(pTarget))
actFireVector(pSprite, 0, 0, dx, dy, pTarget->z - pSprite->z, VECTOR_TYPE_15);

View file

@ -127,12 +127,12 @@ void sub_70284(int, DBloodActor* actor)
case kDudeTentacleGreen:
default: // ???
nBurn = 0;
dmgType = DAMAGE_TYPE_2;
dmgType = kDamageBullet;
nDist = 50;
break;
case kDudeTentacleFire: // ???
nBurn = (gGameOptions.nDifficulty*120)>>2;
dmgType = DAMAGE_TYPE_3;
dmgType = kDamageExplode;
nDist = 75;
break;
}

View file

@ -52,7 +52,7 @@ void ratBiteSeqCallback(int, DBloodActor* actor)
assert(pXSprite->target >= 0 && pXSprite->target < kMaxSprites);
spritetype *pTarget = &sprite[pXSprite->target];
if (IsPlayerSprite(pTarget))
actFireVector(pSprite, 0, 0, dx, dy, pTarget->z-pSprite->z, VECTOR_TYPE_16);
actFireVector(pSprite, 0, 0, dx, dy, pTarget->z-pSprite->z, kVectorRatBite);
}
static void ratThinkSearch(DBloodActor* actor)

View file

@ -87,25 +87,25 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
PLAYER *pPlayer = &gPlayer[pTarget->type - kDudePlayer1];
switch (pSprite->type) {
case kDudeSpiderBrown:
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_17);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
if (IsPlayerSprite(pTarget) && !pPlayer->godMode && powerupCheck(pPlayer, kPwUpDeathMask) <= 0 && Chance(0x4000))
powerupActivate(pPlayer, kPwUpDeliriumShroom);
break;
case kDudeSpiderRed:
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_17);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
if (Chance(0x5000)) sub_70D30(pXTarget, 4, 16);
break;
case kDudeSpiderBlack:
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_17);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
sub_70D30(pXTarget, 8, 16);
break;
case kDudeSpiderMother: {
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_17);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
dx += Random2(2000);
dy += Random2(2000);
dz += Random2(2000);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_17);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorSpiderBite);
sub_70D30(pXTarget, 8, 16);
}
break;

View file

@ -649,7 +649,7 @@ static void unicultThinkChase(DBloodActor* actor)
if (CheckProximity(pSprite, pTarget->x, pTarget->y, pTarget->z, pTarget->sectnum, pExpl->radius >> 1)) {
xvel[pSprite->index] = zvel[pSprite->index] = yvel[pSprite->index] = 0;
if (doExplosion(pSprite, nType) && pXSprite->health > 0)
actDamageSprite(pSprite->index, pSprite, DAMAGE_TYPE_3, 65535);
actDamageSprite(pSprite->index, pSprite, kDamageExplode, 65535);
}
return;
}
@ -1252,7 +1252,7 @@ void removeLeech(spritetype* pLeech, bool delSprite) {
void killDudeLeech(spritetype* pLeech) {
if (pLeech != NULL) {
actDamageSprite(pLeech->owner, pLeech, DAMAGE_TYPE_3, 65535);
actDamageSprite(pLeech->owner, pLeech, kDamageExplode, 65535);
sfxPlay3DSoundCP(pLeech, 522, -1, 0, 60000);
if (pLeech->owner >= 0 && pLeech->owner < kMaxSprites)
@ -1979,7 +1979,7 @@ bool genDudePrepare(spritetype* pSprite, int propId) {
case kGenDudePropertyWeapon: {
pExtra->curWeapon = pXSprite->data1;
switch (pXSprite->data1) {
case VECTOR_TYPE_19: pExtra->curWeapon = VECTOR_TYPE_2; break;
case VECTOR_TYPE_19: pExtra->curWeapon = kVectorBullet; break;
case kMissileUnused: pExtra->curWeapon = kMissileArcGargoyle; break;
case kThingDroppedLifeLeech: pExtra->curWeapon = kModernThingEnemyLifeLeech; break;
}
@ -2191,7 +2191,7 @@ bool genDudePrepare(spritetype* pSprite, int propId) {
}
void genDudePostDeath(spritetype* pSprite, DAMAGE_TYPE damageType, int damage) {
if (damageType == DAMAGE_TYPE_3) {
if (damageType == kDamageExplode) {
DUDEINFO* pDudeInfo = getDudeInfo(pSprite->type);
for (int i = 0; i < 3; i++)
if (pDudeInfo->nGibType[i] > -1)

View file

@ -75,7 +75,7 @@ void HackSeqCallback(int, DBloodActor* actor)
int dx = CosScale16(nAngle);
int dy = SinScale16(nAngle);
sfxPlay3DSound(pSprite, 1101, 1, 0);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_10);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorAxe);
}
void StandSeqCallback(int, DBloodActor* actor)

View file

@ -57,7 +57,7 @@ void zombfHackSeqCallback(int, DBloodActor* actor)
int height = (pDudeInfo->eyeHeight*pSprite->yrepeat);
DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type);
int height2 = (pDudeInfoT->eyeHeight*pTarget->yrepeat);
actFireVector(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), height-height2, VECTOR_TYPE_11);
actFireVector(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), height-height2, kVectorCleaver);
}
void PukeSeqCallback(int, DBloodActor* actor)

View file

@ -130,7 +130,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
if (gDetail < effectDetail[nViewEffect] || nTSprite >= MAXSPRITESONSCREEN) return NULL;
switch (nViewEffect)
{
case VIEW_EFFECT_18:
case kViewEffectAtom:
for (int i = 0; i < 16; i++)
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
@ -151,8 +151,8 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->shade = -128;
}
break;
case VIEW_EFFECT_16:
case VIEW_EFFECT_17:
case kViewEffectFlag:
case kViewEffectBigFlag:
{
int top, bottom;
GetSpriteExtents(pTSprite, &top, &bottom);
@ -160,14 +160,14 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->shade = -128;
pNSprite->pal = 0;
pNSprite->z = top;
if (nViewEffect == VIEW_EFFECT_16)
if (nViewEffect == kViewEffectFlag)
pNSprite->xrepeat = pNSprite->yrepeat = 24;
else
pNSprite->xrepeat = pNSprite->yrepeat = 64;
pNSprite->picnum = 3558;
return pNSprite;
}
case VIEW_EFFECT_15:
case kViewEffectTesla:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
pNSprite->z = pTSprite->z;
@ -178,7 +178,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->picnum = 2135;
break;
}
case VIEW_EFFECT_14:
case kViewEffectShoot:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
pNSprite->shade = -128;
@ -187,7 +187,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->picnum = 2605;
return pNSprite;
}
case VIEW_EFFECT_13:
case kViewEffectReflectiveBall:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
pNSprite->shade = 26;
@ -197,7 +197,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->picnum = 2089;
break;
}
case VIEW_EFFECT_11:
case kViewEffectPhase:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
int top, bottom;
@ -210,7 +210,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->z = top;
break;
}
case VIEW_EFFECT_10:
case kViewEffectTrail:
{
int nAng = pTSprite->ang;
if (pTSprite->cstat & 16)
@ -246,7 +246,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
}
break;
}
case VIEW_EFFECT_8:
case kViewEffectFlame:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
pNSprite->shade = -128;
@ -256,7 +256,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->xrepeat = pNSprite->yrepeat = (tileWidth(pTSprite->picnum)*pTSprite->xrepeat)/64;
break;
}
case VIEW_EFFECT_6:
case kViewEffectSmokeHigh:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
int top, bottom;
@ -272,7 +272,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->yrepeat = pTSprite->yrepeat;
break;
}
case VIEW_EFFECT_7:
case kViewEffectSmokeLow:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
int top, bottom;
@ -288,7 +288,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->yrepeat = pTSprite->yrepeat;
break;
}
case VIEW_EFFECT_4:
case kViewEffectTorchHigh:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
int top, bottom;
@ -299,7 +299,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->xrepeat = pNSprite->yrepeat = (tileWidth(pTSprite->picnum)*pTSprite->xrepeat)/32;
break;
}
case VIEW_EFFECT_5:
case kViewEffectTorchLow:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
int top, bottom;
@ -310,7 +310,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->xrepeat = pNSprite->yrepeat = (tileWidth(pTSprite->picnum)*pTSprite->xrepeat)/32;
break;
}
case VIEW_EFFECT_0:
case kViewEffectShadow:
{
if (r_shadows)
{
@ -328,7 +328,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
}
break;
}
case VIEW_EFFECT_1:
case kViewEffectFlareHalo:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
pNSprite->shade = -128;
@ -340,7 +340,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->picnum = 2427;
break;
}
case VIEW_EFFECT_2:
case kViewEffectCeilGlow:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
sectortype *pSector = &sector[pTSprite->sectnum];
@ -356,7 +356,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->owner = pTSprite->owner;
break;
}
case VIEW_EFFECT_3:
case kViewEffectFloorGlow:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
sectortype *pSector = &sector[pTSprite->sectnum];
@ -373,7 +373,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->owner = pTSprite->owner;
break;
}
case VIEW_EFFECT_9:
case kViewEffectSpear:
{
auto pNSprite = viewInsertTSprite(tsprite, spritesortcnt, pTSprite->sectnum, 32767, pTSprite);
pNSprite->z = pTSprite->z;
@ -385,7 +385,7 @@ static tspritetype *viewAddEffect(spritetype* tsprite, int& spritesortcnt, int n
pNSprite->picnum = 775;
break;
}
case VIEW_EFFECT_12:
case kViewEffectShowWeapon:
{
assert(pTSprite->type >= kDudePlayer1 && pTSprite->type <= kDudePlayer8);
PLAYER *pPlayer = &gPlayer[pTSprite->type-kDudePlayer1];
@ -641,7 +641,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
}
if (pTSprite->flags&256)
{
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_6);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectSmokeHigh);
}
if (pTSprite->flags&1024)
{
@ -657,7 +657,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
case kDecorationCandle:
if (!pTXSprite || pTXSprite->state == 1) {
pTSprite->shade = -128;
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_11);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectPhase);
} else {
pTSprite->shade = -8;
}
@ -665,9 +665,9 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
case kDecorationTorch:
if (!pTXSprite || pTXSprite->state == 1) {
pTSprite->picnum++;
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_4);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectTorchHigh);
} else {
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_6);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectSmokeHigh);
}
break;
default:
@ -680,13 +680,13 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
switch (pTSprite->type) {
case kItemFlagABase:
if (pTXSprite && pTXSprite->state > 0 && gGameOptions.nGameType == 3) {
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_17);
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectBigFlag);
if (pNTSprite) pNTSprite->pal = 10;
}
break;
case kItemFlagBBase:
if (pTXSprite && pTXSprite->state > 0 && gGameOptions.nGameType == 3) {
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_17);
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectBigFlag);
if (pNTSprite) pNTSprite->pal = 7;
}
break;
@ -714,10 +714,10 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
pTSprite->cstat |= 32;
break;
case kMissileTeslaRegular:
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_15);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectTesla);
break;
case kMissileButcherKnife:
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_10);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectTrail);
break;
case kMissileFlareRegular:
case kMissileFlareAlt:
@ -729,18 +729,18 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
}
}
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_1);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectFlareHalo);
if (pTSprite->type != kMissileFlareRegular) break;
sectortype *pSector = &sector[pTSprite->sectnum];
int zDiff = (pTSprite->z - pSector->ceilingz) >> 8;
if ((pSector->ceilingstat&1) == 0 && zDiff < 64) {
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_2);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectCeilGlow);
}
zDiff = (pSector->floorz - pTSprite->z) >> 8;
if ((pSector->floorstat&1) == 0 && zDiff < 64) {
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_3);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectFloorGlow);
}
break;
}
@ -775,15 +775,15 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
}
if (powerupCheck(pPlayer, kPwUpReflectShots)) {
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_13);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectReflectiveBall);
}
if (cl_showweapon && gGameOptions.nGameType > 0 && gView) {
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_12);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectShowWeapon);
}
if (pPlayer->flashEffect && (gView != pPlayer || gViewPos != VIEWPOS_0)) {
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_14);
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectShoot);
if (pNTSprite) {
POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture];
pNTSprite->x += MulScale(pPosture->zOffset, Cos(pTSprite->ang), 28);
@ -794,7 +794,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
if (pPlayer->hasFlag > 0 && gGameOptions.nGameType == 3) {
if (pPlayer->hasFlag&1) {
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_16);
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectFlag);
if (pNTSprite)
{
pNTSprite->pal = 10;
@ -802,7 +802,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
}
}
if (pPlayer->hasFlag&2) {
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_16);
auto pNTSprite = viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectFlag);
if (pNTSprite)
{
pNTSprite->pal = 7;
@ -815,7 +815,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
if (pTSprite->owner != gView->pSprite->index || gViewPos != VIEWPOS_0) {
if (getflorzofslope(pTSprite->sectnum, pTSprite->x, pTSprite->y) >= cZ)
{
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_0);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectShadow);
}
}
break;
@ -826,7 +826,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
if (pTXSprite->data1) {
pTSprite->picnum = 772;
if (pTXSprite->data2)
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_9);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectSpear);
}
}
else if (pTXSprite->data1) pTSprite->picnum = 773;
@ -840,7 +840,7 @@ void viewProcessSprites(spritetype* tsprite, int& spritesortcnt, int32_t cX, int
if (pTSprite->type < kThingBase || pTSprite->type >= kThingMax || !gSpriteHit[nXSprite].florhit) {
if ((pTSprite->flags & kPhysMove) && getflorzofslope(pTSprite->sectnum, pTSprite->x, pTSprite->y) >= cZ)
viewAddEffect(tsprite, spritesortcnt, nTSprite, VIEW_EFFECT_0);
viewAddEffect(tsprite, spritesortcnt, nTSprite, kViewEffectShadow);
}
}
break;

View file

@ -657,7 +657,7 @@ void DropVoodooCb(int nSprite) // unused
t += ((3200-pPlayer2->armor[2])<<15)/3200;
if (Chance(t) || nNextSprite < 0)
{
int nDmg = actDamageSprite(nOwner, pSprite2, DAMAGE_TYPE_5, pXSprite->data1<<4);
int nDmg = actDamageSprite(nOwner, pSprite2, kDamageSpirit, pXSprite->data1<<4);
pXSprite->data1 = ClipLow(pXSprite->data1-nDmg, 0);
sub_76A08(pSprite2, pSprite, pPlayer2);
evPost(nSprite, 3, 0, kCallbackRemove);

View file

@ -303,7 +303,7 @@ const char* GameInterface::GenericCheat(int player, int cheat)
SetToys(true);
break;
case kCheatKevorkian:
actDamageSprite(gMe->nSprite, gMe->pSprite, DAMAGE_TYPE_2, 8000);
actDamageSprite(gMe->nSprite, gMe->pSprite, kDamageBullet, 8000);
return GStrings("TXTB_KEVORKIAN");
case kCheatMcGee:
@ -314,7 +314,7 @@ const char* GameInterface::GenericCheat(int player, int cheat)
return GStrings("TXTB_FIRED");
}
case kCheatEdmark:
actDamageSprite(gMe->nSprite, gMe->pSprite, DAMAGE_TYPE_3, 8000);
actDamageSprite(gMe->nSprite, gMe->pSprite, kDamageExplode, 8000);
return GStrings("TXTB_THEDAYS");
case kCheatKrueger:

View file

@ -1195,7 +1195,7 @@ void debrisConcuss(int nOwner, int listIndex, int x, int y, int z, int dmg) {
}
actDamageSprite(nOwner, pSprite, DAMAGE_TYPE_3, dmg);
actDamageSprite(nOwner, pSprite, kDamageExplode, dmg);
return;
}
}
@ -2667,8 +2667,8 @@ void damageSprites(XSPRITE* pXSource, spritetype* pSprite) {
else playerDamageSprite(&bloodActors[pSource->index], pPlayer, (DAMAGE_TYPE)dmgType, dmg);
}
else if ((pXSprite->health = ClipLow(pXSprite->health - dmg, 1)) > 16) return;
else if (!pPlayer) actKillDude(pSource->index, pSprite, DAMAGE_TYPE_2, dmg);
else playerDamageSprite(&bloodActors[pSource->index], pPlayer, DAMAGE_TYPE_2, dmg);
else if (!pPlayer) actKillDude(pSource->index, pSprite, kDamageBullet, dmg);
else playerDamageSprite(&bloodActors[pSource->index], pPlayer, kDamageBullet, dmg);
return;
}

View file

@ -268,7 +268,7 @@ char powerupActivate(PLAYER *pPlayer, int nPowerUp)
}
if (ceilIsTooLow(pPlayer->pSprite))
actDamageSprite(pPlayer->pSprite->index, pPlayer->pSprite, DAMAGE_TYPE_3, 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, DAMAGE_TYPE_3, 65535);
actDamageSprite(pPlayer->pSprite->index, pPlayer->pSprite, kDamageExplode, 65535);
}
break;
case kItemShroomGrow:
@ -1621,13 +1621,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, DAMAGE_TYPE_0, 500<<4);
actDamageSprite(nSprite, pSprite, kDamageFall, 500<<4);
if (pSprite->sectnum != nSector)
{
if (nSector == -1)
{
nSector = pSprite->sectnum;
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_0, 500<<4);
actDamageSprite(nSprite, pSprite, kDamageFall, 500<<4);
}
assert(nSector >= 0 && nSector < kMaxSectors);
ChangeSpriteSect(nSprite, nSector);
@ -1907,11 +1907,11 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
{
switch (nDamageType)
{
case DAMAGE_TYPE_5:
case kDamageSpirit:
nDeathSeqID = 18;
sfxPlay3DSound(pSprite, 716, 0, 0);
break;
case DAMAGE_TYPE_3:
case kDamageExplode:
GibSprite(pSprite, GIBTYPE_7, NULL, NULL);
GibSprite(pSprite, GIBTYPE_15, NULL, NULL);
pPlayer->pSprite->cstat |= 32768;
@ -1939,7 +1939,7 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
pXSprite->health = ClipLow(nHealth, 0);
if (pXSprite->health > 0 && pXSprite->health < 16)
{
nDamageType = DAMAGE_TYPE_2;
nDamageType = kDamageBullet;
pXSprite->health = 0;
nHealth = -25;
}
@ -1951,7 +1951,7 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
nSound = pDamageInfo->Kills[0];
else
nSound = pDamageInfo->Kills[Random(3)];
if (nDamageType == DAMAGE_TYPE_4 && pXSprite->medium == kMediumWater && !pPlayer->hand)
if (nDamageType == kDamageDrown && pXSprite->medium == kMediumWater && !pPlayer->hand)
nSound = 714;
sfxPlay3DSound(pSprite, nSound, 0, 6);
return nDamage;
@ -1966,22 +1966,22 @@ int playerDamageSprite(DBloodActor* source, PLAYER *pPlayer, DAMAGE_TYPE nDamage
pPlayer->curWeapon = 0;
pPlayer->fraggerId = nSource;
pPlayer->voodooTargets = 0;
if (nDamageType == DAMAGE_TYPE_3 && nDamage < (9<<4))
nDamageType = DAMAGE_TYPE_0;
if (nDamageType == kDamageExplode && nDamage < (9<<4))
nDamageType = kDamageFall;
switch (nDamageType)
{
case DAMAGE_TYPE_3:
case kDamageExplode:
sfxPlay3DSound(pSprite, 717, 0, 0);
GibSprite(pSprite, GIBTYPE_7, NULL, NULL);
GibSprite(pSprite, GIBTYPE_15, NULL, NULL);
pPlayer->pSprite->cstat |= 32768;
nDeathSeqID = 2;
break;
case DAMAGE_TYPE_1:
case kDamageBurn:
sfxPlay3DSound(pSprite, 718, 0, 0);
nDeathSeqID = 3;
break;
case DAMAGE_TYPE_4:
case kDamageDrown:
nDeathSeqID = 1;
break;
default:
@ -2072,9 +2072,9 @@ void voodooTarget(PLAYER *pPlayer)
for (int i = 0; i < 4; i++)
{
int ang1 = (pPlayer->voodooVar1+pPlayer->vodooVar2)&2047;
actFireVector(pPlayer->pSprite, 0, dz, CosScale16(ang1), SinScale16(ang1), v4, VECTOR_TYPE_21);
actFireVector(pPlayer->pSprite, 0, dz, CosScale16(ang1), SinScale16(ang1), v4, kVectorVoodoo10);
int ang2 = (pPlayer->voodooVar1+2048-pPlayer->vodooVar2)&2047;
actFireVector(pPlayer->pSprite, 0, dz, CosScale16(ang2), SinScale16(ang2), v4, VECTOR_TYPE_21);
actFireVector(pPlayer->pSprite, 0, dz, CosScale16(ang2), SinScale16(ang2), v4, kVectorVoodoo10);
}
pPlayer->voodooTargets = ClipLow(pPlayer->voodooTargets-1, 0);
}
@ -2142,7 +2142,7 @@ void PlayerKneelsOver(int, DBloodActor* actor)
if (gPlayer[p].pXSprite == pXSprite)
{
PLAYER *pPlayer = &gPlayer[p];
playerDamageSprite(pPlayer->fragger(), pPlayer, DAMAGE_TYPE_5, 500<<4);
playerDamageSprite(pPlayer->fragger(), pPlayer, kDamageSpirit, 500<<4);
return;
}
}

View file

@ -1163,7 +1163,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
nDamage = 500;
else
nDamage = pXSector->data;
actDamageSprite(nSprite, &sprite[nSprite], DAMAGE_TYPE_0, nDamage<<4);
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
}
a2 = ClipRange(a2-(vbp/2)*4, 0, 65536);
}
@ -1174,7 +1174,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
nDamage = 500;
else
nDamage = pXSector->data;
actDamageSprite(nSprite, &sprite[nSprite], DAMAGE_TYPE_0, nDamage<<4);
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
a2 = ClipRange(a2-(vbp/2)*4, 0, 65536);
}
}
@ -1197,7 +1197,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
nDamage = 500;
else
nDamage = pXSector->data;
actDamageSprite(nSprite, &sprite[nSprite], DAMAGE_TYPE_0, nDamage<<4);
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
}
a2 = ClipRange(a2+(vbp/2)*4, 0, 65536);
}
@ -1208,7 +1208,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
nDamage = 500;
else
nDamage = pXSector->data;
actDamageSprite(nSprite, &sprite[nSprite], DAMAGE_TYPE_0, nDamage<<4);
actDamageSprite(nSprite, &sprite[nSprite], kDamageFall, nDamage<<4);
a2 = ClipRange(a2+(vbp/2)*4, 0, 65536);
}
}
@ -1421,9 +1421,9 @@ void TeleFrag(int nKiller, int nSector)
{
spritetype *pSprite = &sprite[nSprite];
if (pSprite->statnum == kStatDude)
actDamageSprite(nKiller, pSprite, DAMAGE_TYPE_3, 4000);
actDamageSprite(nKiller, pSprite, kDamageExplode, 4000);
else if (pSprite->statnum == kStatThing)
actDamageSprite(nKiller, pSprite, DAMAGE_TYPE_3, 4000);
actDamageSprite(nKiller, pSprite, kDamageExplode, 4000);
}
}
@ -2269,7 +2269,7 @@ void MGunFireSeqCallback(int, DBloodActor* actor)
int dx = CosScale16(pSprite->ang)+Random2(1000);
int dy = SinScale16(pSprite->ang)+Random2(1000);
int dz = Random2(1000);
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_2);
actFireVector(pSprite, 0, 0, dx, dy, dz, kVectorBullet);
sfxPlay3DSound(pSprite, 359, -1, 0);
}
}

View file

@ -76,25 +76,25 @@ extern VIEW predict, predictOld;
extern bool gPrediction;
enum VIEW_EFFECT {
VIEW_EFFECT_0 = 0,
VIEW_EFFECT_1,
VIEW_EFFECT_2,
VIEW_EFFECT_3,
VIEW_EFFECT_4,
VIEW_EFFECT_5,
VIEW_EFFECT_6,
VIEW_EFFECT_7,
VIEW_EFFECT_8,
VIEW_EFFECT_9,
VIEW_EFFECT_10,
VIEW_EFFECT_11,
VIEW_EFFECT_12,
VIEW_EFFECT_13,
VIEW_EFFECT_14,
VIEW_EFFECT_15,
VIEW_EFFECT_16,
VIEW_EFFECT_17,
VIEW_EFFECT_18,
kViewEffectShadow = 0,
kViewEffectFlareHalo,
kViewEffectCeilGlow,
kViewEffectFloorGlow,
kViewEffectTorchHigh,
kViewEffectTorchLow,
kViewEffectSmokeHigh,
kViewEffectSmokeLow,
kViewEffectFlame,
kViewEffectSpear,
kViewEffectTrail,
kViewEffectPhase,
kViewEffectShowWeapon,
kViewEffectReflectiveBall,
kViewEffectShoot,
kViewEffectTesla,
kViewEffectFlag,
kViewEffectBigFlag,
kViewEffectAtom,
kViewEffectSpotProgress,
};

View file

@ -1053,7 +1053,7 @@ void FirePitchfork(int, PLAYER *pPlayer)
int r2 = Random2(2000);
int r3 = Random2(2000);
for (int i = 0; i < 4; i++)
actFireVector(pPlayer->pSprite, (2*i-3)*40, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r1, aim->dy+r2, aim->dz+r3, VECTOR_TYPE_0);
actFireVector(pPlayer->pSprite, (2*i-3)*40, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r1, aim->dy+r2, aim->dz+r3, kVectorTine);
}
void FireSpray(int, PLAYER *pPlayer)
@ -1211,14 +1211,14 @@ void FireShotgun(int nTrigger, PLAYER *pPlayer)
r1 = Random3(1500);
r2 = Random3(1500);
r3 = Random3(500);
nType = VECTOR_TYPE_1;
nType = kVectorShell;
}
else
{
r1 = Random3(2500);
r2 = Random3(2500);
r3 = Random3(1500);
nType = VECTOR_TYPE_4;
nType = kVectorShellAP;
}
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, pPlayer->aim.dx+r1, pPlayer->aim.dy+r2, pPlayer->aim.dz+r3, nType);
}
@ -1243,7 +1243,7 @@ void FireTommy(int nTrigger, PLAYER *pPlayer)
int r1 = Random3(400);
int r2 = Random3(1200);
int r3 = Random3(1200);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r3, aim->dy+r2, aim->dz+r1, VECTOR_TYPE_5);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r3, aim->dy+r2, aim->dz+r1, kVectorTommyRegular);
SpawnBulletEject(pPlayer, -15, -45);
pPlayer->visibility = 20;
break;
@ -1253,12 +1253,12 @@ void FireTommy(int nTrigger, PLAYER *pPlayer)
int r1 = Random3(400);
int r2 = Random3(1200);
int r3 = Random3(1200);
actFireVector(pPlayer->pSprite, -120, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r3, aim->dy+r2, aim->dz+r1, VECTOR_TYPE_5);
actFireVector(pPlayer->pSprite, -120, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r3, aim->dy+r2, aim->dz+r1, kVectorTommyRegular);
SpawnBulletEject(pPlayer, -140, -45);
r1 = Random3(400);
r2 = Random3(1200);
r3 = Random3(1200);
actFireVector(pPlayer->pSprite, 120, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r3, aim->dy+r2, aim->dz+r1, VECTOR_TYPE_5);
actFireVector(pPlayer->pSprite, 120, pPlayer->zWeapon-pPlayer->pSprite->z, aim->dx+r3, aim->dy+r2, aim->dz+r1, kVectorTommyRegular);
SpawnBulletEject(pPlayer, 140, 45);
pPlayer->visibility = 30;
break;
@ -1282,7 +1282,7 @@ void FireSpread(int nTrigger, PLAYER *pPlayer)
r1 = Random3(300);
r2 = Random3(600);
r3 = Random3(600);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, VECTOR_TYPE_3);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, kVectorTommyAP);
r1 = Random2(90);
r2 = Random2(30);
SpawnBulletEject(pPlayer, r2, r1);
@ -1303,14 +1303,14 @@ void AltFireSpread(int nTrigger, PLAYER *pPlayer)
r1 = Random3(300);
r2 = Random3(600);
r3 = Random3(600);
actFireVector(pPlayer->pSprite, -120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, VECTOR_TYPE_3);
actFireVector(pPlayer->pSprite, -120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, kVectorTommyAP);
r1 = Random2(45);
r2 = Random2(120);
SpawnBulletEject(pPlayer, r2, r1);
r1 = Random3(300);
r2 = Random3(600);
r3 = Random3(600);
actFireVector(pPlayer->pSprite, 120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, VECTOR_TYPE_3);
actFireVector(pPlayer->pSprite, 120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, kVectorTommyAP);
r1 = Random2(-45);
r2 = Random2(-120);
SpawnBulletEject(pPlayer, r2, r1);
@ -1334,14 +1334,14 @@ void AltFireSpread2(int nTrigger, PLAYER *pPlayer)
r1 = Random3(300);
r2 = Random3(600);
r3 = Random3(600);
actFireVector(pPlayer->pSprite, -120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, VECTOR_TYPE_3);
actFireVector(pPlayer->pSprite, -120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, kVectorTommyAP);
r1 = Random2(45);
r2 = Random2(120);
SpawnBulletEject(pPlayer, r2, r1);
r1 = Random3(300);
r2 = Random3(600);
r3 = Random3(600);
actFireVector(pPlayer->pSprite, 120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, VECTOR_TYPE_3);
actFireVector(pPlayer->pSprite, 120, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, kVectorTommyAP);
r1 = Random2(-45);
r2 = Random2(-120);
SpawnBulletEject(pPlayer, r2, r1);
@ -1355,7 +1355,7 @@ void AltFireSpread2(int nTrigger, PLAYER *pPlayer)
r1 = Random3(300);
r2 = Random3(600);
r3 = Random3(600);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, VECTOR_TYPE_3);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, dx+r3, dy+r2, aim->dz+r1, kVectorTommyAP);
r1 = Random2(90);
r2 = Random2(30);
SpawnBulletEject(pPlayer, r2, r1);
@ -1418,7 +1418,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
spritetype *pSprite = pPlayer->pSprite;
if (nTrigger == 4)
{
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_2, 1<<4);
actDamageSprite(nSprite, pSprite, kDamageBullet, 1<<4);
return;
}
assert(pPlayer->voodooTarget >= 0);
@ -1431,7 +1431,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
{
sfxPlay3DSound(pSprite, 460, 2, 0);
fxSpawnBlood(pTarget, 17<<4);
int nDamage = actDamageSprite(nSprite, pTarget, DAMAGE_TYPE_5, 17<<4);
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 17<<4);
UseAmmo(pPlayer, 9, nDamage/4);
break;
}
@ -1439,7 +1439,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
{
sfxPlay3DSound(pSprite, 460, 2, 0);
fxSpawnBlood(pTarget, 17<<4);
int nDamage = actDamageSprite(nSprite, pTarget, DAMAGE_TYPE_5, 9<<4);
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 9<<4);
if (IsPlayerSprite(pTarget))
WeaponLower(&gPlayer[pTarget->type-kDudePlayer1]);
UseAmmo(pPlayer, 9, nDamage/4);
@ -1449,7 +1449,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
{
sfxPlay3DSound(pSprite, 463, 2, 0);
fxSpawnBlood(pTarget, 17<<4);
int nDamage = actDamageSprite(nSprite, pTarget, DAMAGE_TYPE_5, 49<<4);
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 49<<4);
UseAmmo(pPlayer, 9, nDamage/4);
break;
}
@ -1457,7 +1457,7 @@ void FireVoodoo(int nTrigger, PLAYER *pPlayer)
{
sfxPlay3DSound(pSprite, 460, 2, 0);
fxSpawnBlood(pTarget, 17<<4);
int nDamage = actDamageSprite(nSprite, pTarget, DAMAGE_TYPE_5, 11<<4);
int nDamage = actDamageSprite(nSprite, pTarget, kDamageSpirit, 11<<4);
if (IsPlayerSprite(pTarget))
{
PLAYER *pOtherPlayer = &gPlayer[pTarget->type - kDudePlayer1];
@ -1492,7 +1492,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, DAMAGE_TYPE_5, nDamage);
nDamage = actDamageSprite(pPlayer->nSprite, pTarget, kDamageSpirit, nDamage);
if (IsPlayerSprite(pTarget))
{
@ -1530,7 +1530,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, DAMAGE_TYPE_5, nDamage);
nDamage = actDamageSprite(pPlayer->nSprite, pTarget, kDamageSpirit, nDamage);
UseAmmo(pPlayer, 9, nDamage);
if (IsPlayerSprite(pTarget))
{
@ -1683,7 +1683,7 @@ void FireLifeLeech(int nTrigger, PLAYER *pPlayer)
if (checkAmmo2(pPlayer, 8, 1))
UseAmmo(pPlayer, 8, 1);
else
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, DAMAGE_TYPE_5, 16);
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, kDamageSpirit, 16);
pPlayer->visibility = ClipHigh(pPlayer->visibility+5, 50);
}
@ -1706,7 +1706,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, DAMAGE_TYPE_5, ((25-nAmmo)<<4));
actDamageSprite(pPlayer->nSprite, pPlayer->pSprite, kDamageSpirit, ((25-nAmmo)<<4));
nAmmo = 25;
}
pXSprite->data3 = nAmmo;
@ -1726,7 +1726,7 @@ void FireBeast(int , PLAYER * pPlayer)
int r1 = Random2(2000);
int r2 = Random2(2000);
int r3 = Random2(2000);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, pPlayer->aim.dx+r1, pPlayer->aim.dy+r2, pPlayer->aim.dz+r3, VECTOR_TYPE_9);
actFireVector(pPlayer->pSprite, 0, pPlayer->zWeapon-pPlayer->pSprite->z, pPlayer->aim.dx+r1, pPlayer->aim.dy+r2, pPlayer->aim.dz+r3, kVectorBeastSlash);
}
uint8_t gWeaponUpgrade[][13] = {
@ -2612,7 +2612,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, DAMAGE_TYPE_6, nDamage<<4);
actDamageSprite(nOwner, pSprite, kDamageTesla, nDamage<<4);
}
}
}
@ -2630,7 +2630,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, DAMAGE_TYPE_6, nDamage<<4);
actDamageSprite(nOwner, pSprite, kDamageTesla, nDamage<<4);
}
}
}