mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
More meaningful names for build object struct members
This commit is contained in:
parent
61b4fae6e0
commit
528e7f8320
25 changed files with 275 additions and 266 deletions
|
@ -2558,7 +2558,7 @@ void actInit(bool bSaveLoad) {
|
||||||
if (xsprite[i].reference < 0) continue;
|
if (xsprite[i].reference < 0) continue;
|
||||||
XSPRITE* pXSprite = &xsprite[i]; spritetype* pSprite = &sprite[pXSprite->reference];
|
XSPRITE* pXSprite = &xsprite[i]; spritetype* pSprite = &sprite[pXSprite->reference];
|
||||||
|
|
||||||
switch (pSprite->lotag) {
|
switch (pSprite->type) {
|
||||||
// add statnum for faster dude searching
|
// add statnum for faster dude searching
|
||||||
case kGDXDudeTargetChanger:
|
case kGDXDudeTargetChanger:
|
||||||
changespritestat(i, kStatGDXDudeTargetChanger);
|
changespritestat(i, kStatGDXDudeTargetChanger);
|
||||||
|
@ -2586,7 +2586,7 @@ void actInit(bool bSaveLoad) {
|
||||||
if (pXSprite->data3 != pXSprite->sysData1) {
|
if (pXSprite->data3 != pXSprite->sysData1) {
|
||||||
switch (pSprite->statnum) {
|
switch (pSprite->statnum) {
|
||||||
case 6:
|
case 6:
|
||||||
switch (pSprite->lotag) {
|
switch (pSprite->type) {
|
||||||
case kCustomDude:
|
case kCustomDude:
|
||||||
case kCustomDudeBurning:
|
case kCustomDudeBurning:
|
||||||
pXSprite->data3 = pXSprite->sysData1; // move sndStartId back from sysData1 to data3
|
pXSprite->data3 = pXSprite->sysData1; // move sndStartId back from sysData1 to data3
|
||||||
|
@ -2685,9 +2685,9 @@ void actInit(bool bSaveLoad) {
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||||
int nType = pSprite->type - 400;
|
int nType = pSprite->type - 400;
|
||||||
pSprite->clipdist = thingInfo[nType].at4;
|
pSprite->clipdist = thingInfo[nType].at4;
|
||||||
pSprite->hitag = thingInfo[nType].at5;
|
pSprite->flags = thingInfo[nType].at5;
|
||||||
if (pSprite->hitag&2)
|
if (pSprite->flags&2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
||||||
pXSprite->health = thingInfo[nType].at0<<4;
|
pXSprite->health = thingInfo[nType].at0<<4;
|
||||||
switch (pSprite->type)
|
switch (pSprite->type)
|
||||||
|
@ -2760,7 +2760,7 @@ void actInit(bool bSaveLoad) {
|
||||||
if (!IsPlayerSprite(pSprite)) {
|
if (!IsPlayerSprite(pSprite)) {
|
||||||
|
|
||||||
switch (pSprite->type) {
|
switch (pSprite->type) {
|
||||||
case 225: // by NoOne: FakeDude type (no seq, custom hitag, clipdist and cstat)
|
case 225: // by NoOne: FakeDude type (no seq, custom flags, clipdist and cstat)
|
||||||
break;
|
break;
|
||||||
case kCustomDude:
|
case kCustomDude:
|
||||||
case kCustomDudeBurning:
|
case kCustomDudeBurning:
|
||||||
|
@ -2798,12 +2798,12 @@ void ConcussSprite(int a1, spritetype *pSprite, int x, int y, int z, int a6)
|
||||||
int dist2 = 0x40000+dx*dx+dy*dy+dz*dz;
|
int dist2 = 0x40000+dx*dx+dy*dy+dz*dz;
|
||||||
dassert(dist2 > 0);
|
dassert(dist2 > 0);
|
||||||
a6 = scale(0x40000, a6, dist2);
|
a6 = scale(0x40000, a6, dist2);
|
||||||
if (pSprite->hitag & 1)
|
if (pSprite->flags & 1)
|
||||||
{
|
{
|
||||||
int mass = 0;
|
int mass = 0;
|
||||||
if (IsDudeSprite(pSprite)) {
|
if (IsDudeSprite(pSprite)) {
|
||||||
mass = dudeInfo[pSprite->lotag - kDudeBase].mass;
|
mass = dudeInfo[pSprite->type - kDudeBase].mass;
|
||||||
switch (pSprite->lotag) {
|
switch (pSprite->type) {
|
||||||
case kCustomDude:
|
case kCustomDude:
|
||||||
case kCustomDudeBurning:
|
case kCustomDudeBurning:
|
||||||
mass = getSpriteMassBySize(pSprite);
|
mass = getSpriteMassBySize(pSprite);
|
||||||
|
@ -2886,7 +2886,7 @@ void sub_2A620(int nSprite, int x, int y, int z, int nSector, int nDist, int a7,
|
||||||
spritetype *pSprite2 = &sprite[i];
|
spritetype *pSprite2 = &sprite[i];
|
||||||
if (pSprite2->extra > 0 && pSprite2->extra < kMaxXSprites)
|
if (pSprite2->extra > 0 && pSprite2->extra < kMaxXSprites)
|
||||||
{
|
{
|
||||||
if (pSprite2->hitag & 0x20)
|
if (pSprite2->flags & 0x20)
|
||||||
continue;
|
continue;
|
||||||
if (!TestBitString(va0, pSprite2->sectnum))
|
if (!TestBitString(va0, pSprite2->sectnum))
|
||||||
continue;
|
continue;
|
||||||
|
@ -2915,7 +2915,7 @@ void sub_2A620(int nSprite, int x, int y, int z, int nSector, int nDist, int a7,
|
||||||
for (int i = headspritestat[4]; i >= 0; i = nextspritestat[i])
|
for (int i = headspritestat[4]; i >= 0; i = nextspritestat[i])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[i];
|
spritetype *pSprite2 = &sprite[i];
|
||||||
if (pSprite2->hitag&0x20)
|
if (pSprite2->flags&0x20)
|
||||||
continue;
|
continue;
|
||||||
if (!TestBitString(va0, pSprite2->sectnum))
|
if (!TestBitString(va0, pSprite2->sectnum))
|
||||||
continue;
|
continue;
|
||||||
|
@ -2948,7 +2948,7 @@ void sub_2AA94(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
seqSpawn(9, 3, pSprite->extra);
|
seqSpawn(9, 3, pSprite->extra);
|
||||||
if (Chance(0x8000))
|
if (Chance(0x8000))
|
||||||
pSprite->cstat |= 4;
|
pSprite->cstat |= 4;
|
||||||
sfxPlay3DSound(pSprite, 303, 24+(pSprite->hitag&3), 1);
|
sfxPlay3DSound(pSprite, 303, 24+(pSprite->flags&3), 1);
|
||||||
sub_2A620(nSprite, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 128, 0, 60, DAMAGE_TYPE_3, 15, 120, 0, 0);
|
sub_2A620(nSprite, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 128, 0, 60, DAMAGE_TYPE_3, 15, 120, 0, 0);
|
||||||
if (pXSprite->data4 > 1)
|
if (pXSprite->data4 > 1)
|
||||||
{
|
{
|
||||||
|
@ -3159,7 +3159,7 @@ void actKillDude(int nKillerSprite, spritetype *pSprite, DAMAGE_TYPE damageType,
|
||||||
if (pXSprite->dropMsg > 0) // drop items
|
if (pXSprite->dropMsg > 0) // drop items
|
||||||
actDropObject(pSprite, pXSprite->dropMsg);
|
actDropObject(pSprite, pXSprite->dropMsg);
|
||||||
|
|
||||||
pSprite->hitag &= ~kPhysMove; xvel[pSprite->index] = yvel[pSprite->index] = 0;
|
pSprite->flags &= ~kPhysMove; xvel[pSprite->index] = yvel[pSprite->index] = 0;
|
||||||
|
|
||||||
int seqId = pXSprite->data2 + 18;
|
int seqId = pXSprite->data2 + 18;
|
||||||
if (!gSysRes.Lookup(seqId, "SEQ")) {
|
if (!gSysRes.Lookup(seqId, "SEQ")) {
|
||||||
|
@ -3237,7 +3237,7 @@ void actKillDude(int nKillerSprite, spritetype *pSprite, DAMAGE_TYPE damageType,
|
||||||
}
|
}
|
||||||
if (pSprite->type != 249)
|
if (pSprite->type != 249)
|
||||||
trTriggerSprite(pSprite->index, pXSprite, 0);
|
trTriggerSprite(pSprite->index, pXSprite, 0);
|
||||||
pSprite->hitag |= 7;
|
pSprite->flags |= 7;
|
||||||
if (VanillaMode())
|
if (VanillaMode())
|
||||||
{
|
{
|
||||||
if (IsPlayerSprite(pKillerSprite))
|
if (IsPlayerSprite(pKillerSprite))
|
||||||
|
@ -3673,7 +3673,7 @@ void actKillDude(int nKillerSprite, spritetype *pSprite, DAMAGE_TYPE damageType,
|
||||||
if (pSprite->owner != -1 && pSprite->owner != (kMaxSprites - 1)) {
|
if (pSprite->owner != -1 && pSprite->owner != (kMaxSprites - 1)) {
|
||||||
//int owner = actSpriteIdToOwnerId(pSprite->xvel);
|
//int owner = actSpriteIdToOwnerId(pSprite->xvel);
|
||||||
int owner = pSprite->owner;
|
int owner = pSprite->owner;
|
||||||
switch (sprite[owner].lotag) {
|
switch (sprite[owner].type) {
|
||||||
case kCustomDude:
|
case kCustomDude:
|
||||||
case kCustomDudeBurning:
|
case kCustomDudeBurning:
|
||||||
if (owner != -1) gDudeExtra[sprite[owner].extra].at6.u1.at4--;
|
if (owner != -1) gDudeExtra[sprite[owner].extra].at6.u1.at4--;
|
||||||
|
@ -3701,7 +3701,7 @@ void actKillDude(int nKillerSprite, spritetype *pSprite, DAMAGE_TYPE damageType,
|
||||||
int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE damageType, int damage)
|
int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE damageType, int damage)
|
||||||
{
|
{
|
||||||
dassert(nSource < kMaxSprites);
|
dassert(nSource < kMaxSprites);
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
return 0;
|
return 0;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
if (nXSprite <= 0)
|
if (nXSprite <= 0)
|
||||||
|
@ -3724,7 +3724,7 @@ int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE damageType, in
|
||||||
{
|
{
|
||||||
if (pSprite->type < kDudeBase || pSprite->type >= kDudeMax)
|
if (pSprite->type < kDudeBase || pSprite->type >= kDudeMax)
|
||||||
{
|
{
|
||||||
sprintf(buffer, "Bad Dude Failed: initial=%d type=%d %s\n", (int)pSprite->zvel, (int)pSprite->type, (int)(pSprite->hitag&16) ? "RESPAWN" : "NORMAL");
|
sprintf(buffer, "Bad Dude Failed: initial=%d type=%d %s\n", (int)pSprite->inittype, (int)pSprite->type, (int)(pSprite->flags&16) ? "RESPAWN" : "NORMAL");
|
||||||
ThrowError(buffer);
|
ThrowError(buffer);
|
||||||
}
|
}
|
||||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||||
|
@ -3779,7 +3779,7 @@ int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE damageType, in
|
||||||
if (pSprite->owner >= 0 && sprite[pSprite->owner].type == kCustomDude)
|
if (pSprite->owner >= 0 && sprite[pSprite->owner].type == kCustomDude)
|
||||||
sprite[pSprite->owner].owner = kMaxSprites -1; // By NoOne: indicates if custom dude had life leech.
|
sprite[pSprite->owner].owner = kMaxSprites -1; // By NoOne: indicates if custom dude had life leech.
|
||||||
}
|
}
|
||||||
else if (!(pSprite->hitag&16))
|
else if (!(pSprite->flags&16))
|
||||||
actPropagateSpriteOwner(pSprite, &sprite[nSource]);
|
actPropagateSpriteOwner(pSprite, &sprite[nSource]);
|
||||||
trTriggerSprite(pSprite->index, pXSprite, 0);
|
trTriggerSprite(pSprite->index, pXSprite, 0);
|
||||||
switch (pSprite->type)
|
switch (pSprite->type)
|
||||||
|
@ -3946,7 +3946,7 @@ void actImpactMissile(spritetype *pMissile, int a2)
|
||||||
XSPRITE* pXSource = (pSource->extra >= 0) ? &xsprite[pSource->extra] : NULL;
|
XSPRITE* pXSource = (pSource->extra >= 0) ? &xsprite[pSource->extra] : NULL;
|
||||||
|
|
||||||
if (IsDudeSprite(pSource) && pXSource != NULL && pXSource->health != 0)
|
if (IsDudeSprite(pSource) && pXSource != NULL && pXSource->health != 0)
|
||||||
actHealDude(pXSource, nDamage >> 2, dudeInfo[pSource->lotag - kDudeBase].startHealth);
|
actHealDude(pXSource, nDamage >> 2, dudeInfo[pSource->type - kDudeBase].startHealth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pMissile->extra > 0)
|
if (pMissile->extra > 0)
|
||||||
|
@ -4214,7 +4214,7 @@ void actKickObject(spritetype *pSprite1, spritetype *pSprite2)
|
||||||
xvel[nSprite2] = mulscale30(nSpeed, Cos(pSprite1->ang+Random2(85)));
|
xvel[nSprite2] = mulscale30(nSpeed, Cos(pSprite1->ang+Random2(85)));
|
||||||
yvel[nSprite2] = mulscale30(nSpeed, Sin(pSprite1->ang+Random2(85)));
|
yvel[nSprite2] = mulscale30(nSpeed, Sin(pSprite1->ang+Random2(85)));
|
||||||
zvel[nSprite2] = mulscale(nSpeed, -0x2000, 14);
|
zvel[nSprite2] = mulscale(nSpeed, -0x2000, 14);
|
||||||
pSprite2->hitag = 7;
|
pSprite2->flags = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
void actTouchFloor(spritetype *pSprite, int nSector)
|
void actTouchFloor(spritetype *pSprite, int nSector)
|
||||||
|
@ -4226,10 +4226,10 @@ void actTouchFloor(spritetype *pSprite, int nSector)
|
||||||
if (pSector->extra > 0)
|
if (pSector->extra > 0)
|
||||||
pXSector = &xsector[pSector->extra];
|
pXSector = &xsector[pSector->extra];
|
||||||
|
|
||||||
if (pXSector && (pSector->lotag == 618 || pXSector->damageType > 0))
|
if (pXSector && (pSector->type == 618 || pXSector->damageType > 0))
|
||||||
{
|
{
|
||||||
DAMAGE_TYPE nDamageType;
|
DAMAGE_TYPE nDamageType;
|
||||||
if (pSector->lotag == 618)
|
if (pSector->type == 618)
|
||||||
nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType, DAMAGE_TYPE_0, DAMAGE_TYPE_6);
|
nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType, DAMAGE_TYPE_0, DAMAGE_TYPE_6);
|
||||||
else
|
else
|
||||||
nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType - 1, DAMAGE_TYPE_0, DAMAGE_TYPE_6);
|
nDamageType = (DAMAGE_TYPE)ClipRange(pXSector->damageType - 1, DAMAGE_TYPE_0, DAMAGE_TYPE_6);
|
||||||
|
@ -4272,16 +4272,16 @@ void ProcessTouchObjects(spritetype *pSprite, int nXSprite)
|
||||||
int nType = pSprite2->type-kThingBase;
|
int nType = pSprite2->type-kThingBase;
|
||||||
THINGINFO *pThingInfo = &thingInfo[nType];
|
THINGINFO *pThingInfo = &thingInfo[nType];
|
||||||
if (pThingInfo->at5&1)
|
if (pThingInfo->at5&1)
|
||||||
pSprite2->hitag |= 1;
|
pSprite2->flags |= 1;
|
||||||
if (pThingInfo->at5&2)
|
if (pThingInfo->at5&2)
|
||||||
pSprite2->hitag |= 4;
|
pSprite2->flags |= 4;
|
||||||
// Inlined ?
|
// Inlined ?
|
||||||
xvel[pSprite2->index] += mulscale(4, pSprite2->x-sprite[nSprite].x, 2);
|
xvel[pSprite2->index] += mulscale(4, pSprite2->x-sprite[nSprite].x, 2);
|
||||||
yvel[pSprite2->index] += mulscale(4, pSprite2->y-sprite[nSprite].y, 2);
|
yvel[pSprite2->index] += mulscale(4, pSprite2->y-sprite[nSprite].y, 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pSprite2->hitag |= 5;
|
pSprite2->flags |= 5;
|
||||||
xvel[pSprite2->index] += mulscale(4, pSprite2->x-sprite[nSprite].x, 2);
|
xvel[pSprite2->index] += mulscale(4, pSprite2->x-sprite[nSprite].x, 2);
|
||||||
yvel[pSprite2->index] += mulscale(4, pSprite2->y-sprite[nSprite].y, 2);
|
yvel[pSprite2->index] += mulscale(4, pSprite2->y-sprite[nSprite].y, 2);
|
||||||
|
|
||||||
|
@ -4655,7 +4655,7 @@ int MoveThing(spritetype *pSprite)
|
||||||
int ceilZ, ceilHit, floorZ, floorHit;
|
int ceilZ, ceilHit, floorZ, floorHit;
|
||||||
GetZRange(pSprite, &ceilZ, &ceilHit, &floorZ, &floorHit, pSprite->clipdist<<2, CLIPMASK0);
|
GetZRange(pSprite, &ceilZ, &ceilHit, &floorZ, &floorHit, pSprite->clipdist<<2, CLIPMASK0);
|
||||||
GetSpriteExtents(pSprite, &top, &bottom);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
if ((pSprite->hitag & 2) && bottom < floorZ)
|
if ((pSprite->flags & 2) && bottom < floorZ)
|
||||||
{
|
{
|
||||||
pSprite->z += 455;
|
pSprite->z += 455;
|
||||||
zvel[nSprite] += 58254;
|
zvel[nSprite] += 58254;
|
||||||
|
@ -4690,7 +4690,7 @@ int MoveThing(spritetype *pSprite)
|
||||||
int v20 = zvel[nSprite]-velFloor[pSprite->sectnum];
|
int v20 = zvel[nSprite]-velFloor[pSprite->sectnum];
|
||||||
if (v20 > 0)
|
if (v20 > 0)
|
||||||
{
|
{
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
int vax = actFloorBounceVector((int*)&xvel[nSprite], (int*)&yvel[nSprite], (int*)&v20, pSprite->sectnum, pThingInfo->at7);
|
int vax = actFloorBounceVector((int*)&xvel[nSprite], (int*)&yvel[nSprite], (int*)&v20, pSprite->sectnum, pThingInfo->at7);
|
||||||
int nDamage = mulscale(vax, vax, 30)-pThingInfo->atb;
|
int nDamage = mulscale(vax, vax, 30)-pThingInfo->atb;
|
||||||
if (nDamage > 0)
|
if (nDamage > 0)
|
||||||
|
@ -4699,7 +4699,7 @@ int MoveThing(spritetype *pSprite)
|
||||||
if (velFloor[pSprite->sectnum] == 0 && klabs(zvel[nSprite]) < 0x10000)
|
if (velFloor[pSprite->sectnum] == 0 && klabs(zvel[nSprite]) < 0x10000)
|
||||||
{
|
{
|
||||||
zvel[nSprite] = 0;
|
zvel[nSprite] = 0;
|
||||||
pSprite->hitag &= ~4;
|
pSprite->flags &= ~4;
|
||||||
}
|
}
|
||||||
switch (pSprite->type)
|
switch (pSprite->type)
|
||||||
{
|
{
|
||||||
|
@ -4722,13 +4722,13 @@ int MoveThing(spritetype *pSprite)
|
||||||
v8 = 0x4000|nSector;
|
v8 = 0x4000|nSector;
|
||||||
}
|
}
|
||||||
else if (zvel[nSprite] == 0)
|
else if (zvel[nSprite] == 0)
|
||||||
pSprite->hitag &= ~4;
|
pSprite->flags &= ~4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gSpriteHit[nXSprite].florhit = 0;
|
gSpriteHit[nXSprite].florhit = 0;
|
||||||
if (pSprite->hitag&2)
|
if (pSprite->flags&2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
}
|
}
|
||||||
if (top <= ceilZ)
|
if (top <= ceilZ)
|
||||||
{
|
{
|
||||||
|
@ -4820,7 +4820,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
if (pSprite->statnum == 6 || pSprite->statnum == 4)
|
if (pSprite->statnum == 6 || pSprite->statnum == 4)
|
||||||
actDamageSprite(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000<<4);
|
actDamageSprite(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000<<4);
|
||||||
}
|
}
|
||||||
if (sector[nSector].lotag >= 612 && sector[nSector].lotag <= 617)
|
if (sector[nSector].type >= 612 && sector[nSector].type <= 617)
|
||||||
{
|
{
|
||||||
short nSector2 = nSector;
|
short nSector2 = nSector;
|
||||||
if (pushmove_old(&pSprite->x, &pSprite->y, &pSprite->z, &nSector2, wd, tz, bz, CLIPMASK0) == -1)
|
if (pushmove_old(&pSprite->x, &pSprite->y, &pSprite->z, &nSector2, wd, tz, bz, CLIPMASK0) == -1)
|
||||||
|
@ -4842,7 +4842,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
if (pSprite->extra > 0)
|
if (pSprite->extra > 0)
|
||||||
pHitXSprite = &xsprite[pHitSprite->extra];
|
pHitXSprite = &xsprite[pHitSprite->extra];
|
||||||
int nOwner = actSpriteOwnerToSpriteId(pHitSprite);
|
int nOwner = actSpriteOwnerToSpriteId(pHitSprite);
|
||||||
if (pHitSprite->statnum == 5 && !(pHitSprite->hitag&32) && pSprite->index != nOwner)
|
if (pHitSprite->statnum == 5 && !(pHitSprite->flags&32) && pSprite->index != nOwner)
|
||||||
{
|
{
|
||||||
HITINFO hitInfo = gHitInfo;
|
HITINFO hitInfo = gHitInfo;
|
||||||
gHitInfo.hitsprite = nSprite;
|
gHitInfo.hitsprite = nSprite;
|
||||||
|
@ -4908,7 +4908,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
pXSector = NULL;
|
pXSector = NULL;
|
||||||
if (pXSector && pXSector->Enter && (pPlayer || !pXSector->at37_7))
|
if (pXSector && pXSector->Enter && (pPlayer || !pXSector->at37_7))
|
||||||
{
|
{
|
||||||
if (sector[nSector].lotag == 604)
|
if (sector[nSector].type == 604)
|
||||||
pXSector->data = pPlayer ? nSprite : -1;
|
pXSector->data = pPlayer ? nSprite : -1;
|
||||||
trTriggerSector(nSector, pXSector, 42);
|
trTriggerSector(nSector, pXSector, 42);
|
||||||
}
|
}
|
||||||
|
@ -4937,7 +4937,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
int ceilZ, ceilHit, floorZ, floorHit;
|
int ceilZ, ceilHit, floorZ, floorHit;
|
||||||
GetZRange(pSprite, &ceilZ, &ceilHit, &floorZ, &floorHit, wd, CLIPMASK0, PARALLAXCLIP_CEILING|PARALLAXCLIP_FLOOR);
|
GetZRange(pSprite, &ceilZ, &ceilHit, &floorZ, &floorHit, wd, CLIPMASK0, PARALLAXCLIP_CEILING|PARALLAXCLIP_FLOOR);
|
||||||
GetSpriteExtents(pSprite, &top, &bottom);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
if (pSprite->hitag & 2)
|
if (pSprite->flags & 2)
|
||||||
{
|
{
|
||||||
int vc = 58254;
|
int vc = 58254;
|
||||||
if (bDepth)
|
if (bDepth)
|
||||||
|
@ -5021,7 +5021,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
break;
|
break;
|
||||||
case 217:
|
case 217:
|
||||||
aiNewState(pSprite, pXSprite, &gillBeastGoto);
|
aiNewState(pSprite, pXSprite, &gillBeastGoto);
|
||||||
pSprite->hitag |= 6;
|
pSprite->flags |= 6;
|
||||||
break;
|
break;
|
||||||
case 218:
|
case 218:
|
||||||
actKillDude(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000<<4);
|
actKillDude(pSprite->index, pSprite, DAMAGE_TYPE_0, 1000<<4);
|
||||||
|
@ -5098,7 +5098,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
evPost(nSprite, 3, 0, CALLBACK_ID_11);
|
evPost(nSprite, 3, 0, CALLBACK_ID_11);
|
||||||
sfxPlay3DSound(pSprite, 720, -1, 0);
|
sfxPlay3DSound(pSprite, 720, -1, 0);
|
||||||
aiNewState(pSprite, pXSprite, &gillBeastSwimGoto);
|
aiNewState(pSprite, pXSprite, &gillBeastSwimGoto);
|
||||||
pSprite->hitag &= ~6;
|
pSprite->flags &= ~6;
|
||||||
break;
|
break;
|
||||||
case 206:
|
case 206:
|
||||||
case 211:
|
case 211:
|
||||||
|
@ -5174,7 +5174,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
evPost(nSprite, 3, 0, CALLBACK_ID_11);
|
evPost(nSprite, 3, 0, CALLBACK_ID_11);
|
||||||
sfxPlay3DSound(pSprite, 720, -1, 0);
|
sfxPlay3DSound(pSprite, 720, -1, 0);
|
||||||
aiNewState(pSprite, pXSprite, &gillBeastSwimGoto);
|
aiNewState(pSprite, pXSprite, &gillBeastSwimGoto);
|
||||||
pSprite->hitag &= ~6;
|
pSprite->flags &= ~6;
|
||||||
break;
|
break;
|
||||||
case 206:
|
case 206:
|
||||||
case 211:
|
case 211:
|
||||||
|
@ -5215,7 +5215,7 @@ void MoveDude(spritetype *pSprite)
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
{
|
{
|
||||||
pPlayer->at31b = 0;
|
pPlayer->at31b = 0;
|
||||||
if (nDamage > (15<<4) && (pSprite->hitag&4))
|
if (nDamage > (15<<4) && (pSprite->flags&4))
|
||||||
playerLandingSound(pPlayer);
|
playerLandingSound(pPlayer);
|
||||||
if (nDamage > (30<<4))
|
if (nDamage > (30<<4))
|
||||||
sfxPlay3DSound(pSprite, 701, 0, 0);
|
sfxPlay3DSound(pSprite, 701, 0, 0);
|
||||||
|
@ -5227,10 +5227,10 @@ void MoveDude(spritetype *pSprite)
|
||||||
if (klabs(zvel[nSprite]) < 0x10000)
|
if (klabs(zvel[nSprite]) < 0x10000)
|
||||||
{
|
{
|
||||||
zvel[nSprite] = velFloor[pSprite->sectnum];
|
zvel[nSprite] = velFloor[pSprite->sectnum];
|
||||||
pSprite->hitag &= ~4;
|
pSprite->flags &= ~4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
switch (tileGetSurfType(floorHit))
|
switch (tileGetSurfType(floorHit))
|
||||||
{
|
{
|
||||||
case kSurfWater:
|
case kSurfWater:
|
||||||
|
@ -5257,19 +5257,19 @@ void MoveDude(spritetype *pSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (zvel[nSprite] == 0)
|
else if (zvel[nSprite] == 0)
|
||||||
pSprite->hitag &= ~4;
|
pSprite->flags &= ~4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gSpriteHit[nXSprite].florhit = 0;
|
gSpriteHit[nXSprite].florhit = 0;
|
||||||
if (pSprite->hitag&2)
|
if (pSprite->flags&2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
}
|
}
|
||||||
if (top <= ceilZ)
|
if (top <= ceilZ)
|
||||||
{
|
{
|
||||||
gSpriteHit[nXSprite].ceilhit = ceilHit;
|
gSpriteHit[nXSprite].ceilhit = ceilHit;
|
||||||
pSprite->z += ClipLow(ceilZ-top, 0);
|
pSprite->z += ClipLow(ceilZ-top, 0);
|
||||||
if (zvel[nSprite] <= 0 && (pSprite->hitag&4))
|
if (zvel[nSprite] <= 0 && (pSprite->flags&4))
|
||||||
zvel[nSprite] = mulscale16(-zvel[nSprite], 0x2000);
|
zvel[nSprite] = mulscale16(-zvel[nSprite], 0x2000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -5605,7 +5605,7 @@ void actExplodeSprite(spritetype *pSprite)
|
||||||
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
||||||
actPostSprite(nSprite, 2);
|
actPostSprite(nSprite, 2);
|
||||||
pSprite->xrepeat = pSprite->yrepeat = explodeInfo[nType].at0;
|
pSprite->xrepeat = pSprite->yrepeat = explodeInfo[nType].at0;
|
||||||
pSprite->hitag &= ~3;
|
pSprite->flags &= ~3;
|
||||||
pSprite->type = nType;
|
pSprite->type = nType;
|
||||||
EXPLOSION *pExplodeInfo = &explodeInfo[nType];
|
EXPLOSION *pExplodeInfo = &explodeInfo[nType];
|
||||||
xsprite[nXSprite].target = 0;
|
xsprite[nXSprite].target = 0;
|
||||||
|
@ -5631,7 +5631,7 @@ void actActivateGibObject(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
sfxPlay3DSound(pSprite->x, pSprite->y, pSprite->z, vbp, pSprite->sectnum);
|
sfxPlay3DSound(pSprite->x, pSprite->y, pSprite->z, vbp, pSprite->sectnum);
|
||||||
if (v8 > 0)
|
if (v8 > 0)
|
||||||
actDropObject(pSprite, v8);
|
actDropObject(pSprite, v8);
|
||||||
if (!(pSprite->cstat&32768) && !(pSprite->hitag&16))
|
if (!(pSprite->cstat&32768) && !(pSprite->flags&16))
|
||||||
actPostSprite(pSprite->index, 1024);
|
actPostSprite(pSprite->index, 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5670,7 +5670,7 @@ void actProcessSprites(void)
|
||||||
if (!pXProxSpr->DudeLockout) {
|
if (!pXProxSpr->DudeLockout) {
|
||||||
|
|
||||||
for (int nAffected = headspritestat[6]; nAffected >= 0; nAffected = nextspritestat[nAffected]) {
|
for (int nAffected = headspritestat[6]; nAffected >= 0; nAffected = nextspritestat[nAffected]) {
|
||||||
if ((sprite[nAffected].hitag & 32) || xsprite[sprite[nAffected].extra].health <= 0) continue;
|
if ((sprite[nAffected].flags & 32) || xsprite[sprite[nAffected].extra].health <= 0) continue;
|
||||||
else if (CheckProximity(&sprite[nAffected], x, y, z, sectnum, 96)) {
|
else if (CheckProximity(&sprite[nAffected], x, y, z, sectnum, 96)) {
|
||||||
trTriggerSprite(index, pXProxSpr, 35);
|
trTriggerSprite(index, pXProxSpr, 35);
|
||||||
break;
|
break;
|
||||||
|
@ -5718,7 +5718,7 @@ void actProcessSprites(void)
|
||||||
//System.err.println("PHYS COUNT: "+gPhysSpritesCount);
|
//System.err.println("PHYS COUNT: "+gPhysSpritesCount);
|
||||||
for (int i = 0; i < gPhysSpritesCount; i++) {
|
for (int i = 0; i < gPhysSpritesCount; i++) {
|
||||||
if (gPhysSpritesList[i] == -1) continue;
|
if (gPhysSpritesList[i] == -1) continue;
|
||||||
else if (sprite[gPhysSpritesList[i]].statnum == kStatFree || (sprite[gPhysSpritesList[i]].hitag & kHitagFree) != 0) {
|
else if (sprite[gPhysSpritesList[i]].statnum == kStatFree || (sprite[gPhysSpritesList[i]].flags & kHitagFree) != 0) {
|
||||||
gPhysSpritesList[i] = -1;
|
gPhysSpritesList[i] = -1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -5778,7 +5778,7 @@ void actProcessSprites(void)
|
||||||
for (nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
if (nXSprite > 0)
|
if (nXSprite > 0)
|
||||||
|
@ -5800,7 +5800,7 @@ void actProcessSprites(void)
|
||||||
|
|
||||||
nNextSprite = nextspritestat[nSprite2];
|
nNextSprite = nextspritestat[nSprite2];
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite2->hitag&32) continue;
|
if (pSprite2->flags&32) continue;
|
||||||
XSPRITE *pXSprite2 = &xsprite[pSprite2->extra];
|
XSPRITE *pXSprite2 = &xsprite[pSprite2->extra];
|
||||||
if ((unsigned int)pXSprite2->health > 0)
|
if ((unsigned int)pXSprite2->health > 0)
|
||||||
{
|
{
|
||||||
|
@ -5854,7 +5854,7 @@ void actProcessSprites(void)
|
||||||
for (nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
int nSector = pSprite->sectnum;
|
int nSector = pSprite->sectnum;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
|
@ -5872,11 +5872,11 @@ void actProcessSprites(void)
|
||||||
int nType = pSprite->type - kThingBase;
|
int nType = pSprite->type - kThingBase;
|
||||||
THINGINFO *pThingInfo = &thingInfo[nType];
|
THINGINFO *pThingInfo = &thingInfo[nType];
|
||||||
if (pThingInfo->at5 & 1)
|
if (pThingInfo->at5 & 1)
|
||||||
pSprite->hitag |= 1;
|
pSprite->flags |= 1;
|
||||||
if (pThingInfo->at5 & 2)
|
if (pThingInfo->at5 & 2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
}
|
}
|
||||||
if (pSprite->hitag&3)
|
if (pSprite->flags&3)
|
||||||
{
|
{
|
||||||
viewBackupSpriteLoc(nSprite, pSprite);
|
viewBackupSpriteLoc(nSprite, pSprite);
|
||||||
if (pXSector && pXSector->panVel)
|
if (pXSector && pXSector->panVel)
|
||||||
|
@ -5902,9 +5902,9 @@ void actProcessSprites(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actAirDrag(pSprite, 128);
|
actAirDrag(pSprite, 128);
|
||||||
if (((pSprite->index>>8)&15) == (gFrame&15) && (pSprite->hitag&2))
|
if (((pSprite->index>>8)&15) == (gFrame&15) && (pSprite->flags&2))
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
if ((pSprite->hitag&4) || xvel[nSprite] || yvel[nSprite] || zvel[nSprite] ||
|
if ((pSprite->flags&4) || xvel[nSprite] || yvel[nSprite] || zvel[nSprite] ||
|
||||||
velFloor[pSprite->sectnum] || velCeil[pSprite->sectnum])
|
velFloor[pSprite->sectnum] || velCeil[pSprite->sectnum])
|
||||||
{
|
{
|
||||||
int hit = MoveThing(pSprite);
|
int hit = MoveThing(pSprite);
|
||||||
|
@ -5980,7 +5980,7 @@ void actProcessSprites(void)
|
||||||
for (nSprite = headspritestat[5]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (nSprite = headspritestat[5]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
viewBackupSpriteLoc(nSprite, pSprite);
|
viewBackupSpriteLoc(nSprite, pSprite);
|
||||||
int hit = MoveMissile(pSprite);
|
int hit = MoveMissile(pSprite);
|
||||||
|
@ -5991,7 +5991,7 @@ void actProcessSprites(void)
|
||||||
{
|
{
|
||||||
char v24c[(kMaxSectors+7)>>3];
|
char v24c[(kMaxSectors+7)>>3];
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
int nOwner = actSpriteOwnerToSpriteId(pSprite);
|
int nOwner = actSpriteOwnerToSpriteId(pSprite);
|
||||||
int nType = pSprite->type;
|
int nType = pSprite->type;
|
||||||
|
@ -6027,7 +6027,7 @@ void actProcessSprites(void)
|
||||||
for (int nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (int nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pDude = &sprite[nSprite2];
|
spritetype *pDude = &sprite[nSprite2];
|
||||||
if (pDude->hitag & 32)
|
if (pDude->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
if (TestBitString(v24c, pDude->sectnum))
|
if (TestBitString(v24c, pDude->sectnum))
|
||||||
{
|
{
|
||||||
|
@ -6055,7 +6055,7 @@ void actProcessSprites(void)
|
||||||
for (int nSprite2 = headspritestat[4]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (int nSprite2 = headspritestat[4]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pThing = &sprite[nSprite2];
|
spritetype *pThing = &sprite[nSprite2];
|
||||||
if (pThing->hitag & 32)
|
if (pThing->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
if (TestBitString(v24c, pThing->sectnum))
|
if (TestBitString(v24c, pThing->sectnum))
|
||||||
{
|
{
|
||||||
|
@ -6083,7 +6083,7 @@ void actProcessSprites(void)
|
||||||
if (gPhysSpritesCount > 0 && pExplodeInfo->dmgType != 0 && pXSprite->data1 != 0) {
|
if (gPhysSpritesCount > 0 && pExplodeInfo->dmgType != 0 && pXSprite->data1 != 0) {
|
||||||
for (int i = 0; i < gPhysSpritesCount; i++) {
|
for (int i = 0; i < gPhysSpritesCount; i++) {
|
||||||
if (gPhysSpritesList[i] == -1) continue;
|
if (gPhysSpritesList[i] == -1) continue;
|
||||||
else if (sprite[gPhysSpritesList[i]].sectnum < 0 || (sprite[gPhysSpritesList[i]].hitag & kHitagFree) != 0)
|
else if (sprite[gPhysSpritesList[i]].sectnum < 0 || (sprite[gPhysSpritesList[i]].flags & kHitagFree) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
spritetype* pDebris = &sprite[gPhysSpritesList[i]];
|
spritetype* pDebris = &sprite[gPhysSpritesList[i]];
|
||||||
|
@ -6105,7 +6105,7 @@ void actProcessSprites(void)
|
||||||
|
|
||||||
// By NoOne: if data4 > 0, do not remove explosion. This can be useful when designer wants put explosion generator in map manually
|
// By NoOne: if data4 > 0, do not remove explosion. This can be useful when designer wants put explosion generator in map manually
|
||||||
// via sprite statnum 2.
|
// via sprite statnum 2.
|
||||||
if (!(pSprite->hitag & kModernTypeFlag1)) {
|
if (!(pSprite->flags & kModernTypeFlag1)) {
|
||||||
pXSprite->data1 = ClipLow(pXSprite->data1 - 4, 0);
|
pXSprite->data1 = ClipLow(pXSprite->data1 - 4, 0);
|
||||||
pXSprite->data2 = ClipLow(pXSprite->data2 - 4, 0);
|
pXSprite->data2 = ClipLow(pXSprite->data2 - 4, 0);
|
||||||
pXSprite->data3 = ClipLow(pXSprite->data3 - 4, 0);
|
pXSprite->data3 = ClipLow(pXSprite->data3 - 4, 0);
|
||||||
|
@ -6117,7 +6117,7 @@ void actProcessSprites(void)
|
||||||
|
|
||||||
for (nSprite = headspritestat[11]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
for (nSprite = headspritestat[11]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
dassert(nXSprite > 0 && nXSprite < kMaxXSprites);
|
dassert(nXSprite > 0 && nXSprite < kMaxXSprites);
|
||||||
|
@ -6159,7 +6159,7 @@ void actProcessSprites(void)
|
||||||
for (nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
if (nXSprite > 0)
|
if (nXSprite > 0)
|
||||||
|
@ -6200,8 +6200,8 @@ void actProcessSprites(void)
|
||||||
// trigger dude death before transform
|
// trigger dude death before transform
|
||||||
trTriggerSprite(nSprite, pXSprite, COMMAND_ID_0);
|
trTriggerSprite(nSprite, pXSprite, COMMAND_ID_0);
|
||||||
|
|
||||||
pSprite->lotag = pIncarnation->lotag;
|
pSprite->type = pIncarnation->type;
|
||||||
pSprite->hitag = pIncarnation->hitag;
|
pSprite->flags = pIncarnation->flags;
|
||||||
pSprite->pal = pIncarnation->pal;
|
pSprite->pal = pIncarnation->pal;
|
||||||
pSprite->shade = pIncarnation->shade;
|
pSprite->shade = pIncarnation->shade;
|
||||||
pSprite->clipdist = pIncarnation->clipdist;
|
pSprite->clipdist = pIncarnation->clipdist;
|
||||||
|
@ -6277,7 +6277,7 @@ void actProcessSprites(void)
|
||||||
|
|
||||||
// remove the incarnation in case if non-locked
|
// remove the incarnation in case if non-locked
|
||||||
if (pXIncarnation->locked == 0) {
|
if (pXIncarnation->locked == 0) {
|
||||||
pXIncarnation->txID = pIncarnation->lotag = 0;
|
pXIncarnation->txID = pIncarnation->type = 0;
|
||||||
actPostSprite(pIncarnation->xvel, kStatFree);
|
actPostSprite(pIncarnation->xvel, kStatFree);
|
||||||
// or restore triggerOn and off options
|
// or restore triggerOn and off options
|
||||||
} else {
|
} else {
|
||||||
|
@ -6310,7 +6310,7 @@ void actProcessSprites(void)
|
||||||
{
|
{
|
||||||
nNextSprite = nextspritestat[nSprite2];
|
nNextSprite = nextspritestat[nSprite2];
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite2->hitag&32)
|
if (pSprite2->flags&32)
|
||||||
continue;
|
continue;
|
||||||
XSPRITE *pXSprite2 = &xsprite[pSprite2->extra];
|
XSPRITE *pXSprite2 = &xsprite[pSprite2->extra];
|
||||||
if ((unsigned int)pXSprite2->health > 0 && pSprite2->type >= kDudePlayer1 && pSprite2->type <= kDudePlayer8)
|
if ((unsigned int)pXSprite2->health > 0 && pSprite2->type >= kDudePlayer1 && pSprite2->type <= kDudePlayer8)
|
||||||
|
@ -6365,7 +6365,7 @@ void actProcessSprites(void)
|
||||||
for (nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
dassert(nXSprite > 0 && nXSprite < kMaxXSprites);
|
dassert(nXSprite > 0 && nXSprite < kMaxXSprites);
|
||||||
|
@ -6405,14 +6405,14 @@ void actProcessSprites(void)
|
||||||
actAirDrag(pSprite, 5376);
|
actAirDrag(pSprite, 5376);
|
||||||
else
|
else
|
||||||
actAirDrag(pSprite, 128);
|
actAirDrag(pSprite, 128);
|
||||||
if ((pSprite->hitag&4) || xvel[nSprite] || yvel[nSprite] || zvel[nSprite] ||
|
if ((pSprite->flags&4) || xvel[nSprite] || yvel[nSprite] || zvel[nSprite] ||
|
||||||
velFloor[pSprite->sectnum] || velCeil[pSprite->sectnum])
|
velFloor[pSprite->sectnum] || velCeil[pSprite->sectnum])
|
||||||
MoveDude(pSprite);
|
MoveDude(pSprite);
|
||||||
}
|
}
|
||||||
for (nSprite = headspritestat[14]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (nSprite = headspritestat[14]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag & 32)
|
if (pSprite->flags & 32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
dassert(nXSprite > 0 && nXSprite < kMaxXSprites);
|
dassert(nXSprite > 0 && nXSprite < kMaxXSprites);
|
||||||
|
@ -6508,7 +6508,7 @@ spritetype *actSpawnDude(spritetype *pSource, short nType, int a3, int a4)
|
||||||
|
|
||||||
// By NoOne: add a way to inherit some values of spawner type 18 by dude.
|
// By NoOne: add a way to inherit some values of spawner type 18 by dude.
|
||||||
// This way designer can count enemies via switches and do many other interesting things.
|
// This way designer can count enemies via switches and do many other interesting things.
|
||||||
if (pSource->hitag & kModernTypeFlag1) {
|
if (pSource->flags & kModernTypeFlag1) {
|
||||||
switch (pSource->type) { // allow inheriting only for selected source types
|
switch (pSource->type) { // allow inheriting only for selected source types
|
||||||
case 18:
|
case 18:
|
||||||
//inherit pal?
|
//inherit pal?
|
||||||
|
@ -6554,7 +6554,7 @@ spritetype * actSpawnSprite(spritetype *pSource, int nStat)
|
||||||
xvel[nSprite] = xvel[pSource->index];
|
xvel[nSprite] = xvel[pSource->index];
|
||||||
yvel[nSprite] = yvel[pSource->index];
|
yvel[nSprite] = yvel[pSource->index];
|
||||||
zvel[nSprite] = zvel[pSource->index];
|
zvel[nSprite] = zvel[pSource->index];
|
||||||
pSprite->hitag = 0;
|
pSprite->flags = 0;
|
||||||
int nXSprite = dbInsertXSprite(nSprite);
|
int nXSprite = dbInsertXSprite(nSprite);
|
||||||
gSpriteHit[nXSprite].florhit = 0;
|
gSpriteHit[nXSprite].florhit = 0;
|
||||||
gSpriteHit[nXSprite].ceilhit = 0;
|
gSpriteHit[nXSprite].ceilhit = 0;
|
||||||
|
@ -6574,9 +6574,9 @@ spritetype * actSpawnThing(int nSector, int x, int y, int z, int nThingType)
|
||||||
THINGINFO *pThingInfo = &thingInfo[nType];
|
THINGINFO *pThingInfo = &thingInfo[nType];
|
||||||
pXThing->health = pThingInfo->at0<<4;
|
pXThing->health = pThingInfo->at0<<4;
|
||||||
pSprite->clipdist = pThingInfo->at4;
|
pSprite->clipdist = pThingInfo->at4;
|
||||||
pSprite->hitag = pThingInfo->at5;
|
pSprite->flags = pThingInfo->at5;
|
||||||
if (pSprite->hitag & 2)
|
if (pSprite->flags & 2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
pSprite->cstat |= pThingInfo->atf;
|
pSprite->cstat |= pThingInfo->atf;
|
||||||
pSprite->picnum = pThingInfo->at11;
|
pSprite->picnum = pThingInfo->at11;
|
||||||
pSprite->shade = pThingInfo->at13;
|
pSprite->shade = pThingInfo->at13;
|
||||||
|
@ -6708,7 +6708,7 @@ spritetype* actFireMissile(spritetype *pSprite, int a2, int a3, int a4, int a5,
|
||||||
pMissile->shade = pMissileInfo->atc;
|
pMissile->shade = pMissileInfo->atc;
|
||||||
pMissile->pal = 0;
|
pMissile->pal = 0;
|
||||||
pMissile->clipdist = pMissileInfo->atd;
|
pMissile->clipdist = pMissileInfo->atd;
|
||||||
pMissile->hitag = 1;
|
pMissile->flags = 1;
|
||||||
pMissile->xrepeat = pMissileInfo->ata;
|
pMissile->xrepeat = pMissileInfo->ata;
|
||||||
pMissile->yrepeat = pMissileInfo->atb;
|
pMissile->yrepeat = pMissileInfo->atb;
|
||||||
pMissile->picnum = pMissileInfo->picnum;
|
pMissile->picnum = pMissileInfo->picnum;
|
||||||
|
@ -6879,7 +6879,7 @@ bool actCheckRespawn(spritetype *pSprite)
|
||||||
nRespawnTime = mulscale16(nRespawnTime, 0xa000);
|
nRespawnTime = mulscale16(nRespawnTime, 0xa000);
|
||||||
pSprite->owner = pSprite->statnum;
|
pSprite->owner = pSprite->statnum;
|
||||||
actPostSprite(pSprite->index, 8);
|
actPostSprite(pSprite->index, 8);
|
||||||
pSprite->hitag |= 16;
|
pSprite->flags |= 16;
|
||||||
if (pSprite->type >= kDudeBase && pSprite->type < kDudeMax)
|
if (pSprite->type >= kDudeBase && pSprite->type < kDudeMax)
|
||||||
{
|
{
|
||||||
pSprite->cstat &= ~257;
|
pSprite->cstat &= ~257;
|
||||||
|
@ -6908,7 +6908,7 @@ bool actCanSplatWall(int nWall)
|
||||||
if (pWall->nextsector != -1)
|
if (pWall->nextsector != -1)
|
||||||
{
|
{
|
||||||
sectortype *pSector = §or[pWall->nextsector];
|
sectortype *pSector = §or[pWall->nextsector];
|
||||||
if (pSector->lotag >= 600 && pSector->lotag < 620)
|
if (pSector->type >= 600 && pSector->type < 620)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -7048,7 +7048,7 @@ void actFireVector(spritetype *pShooter, int a2, int a3, int a4, int a5, int a6,
|
||||||
int t = pSprite->type == 426 ? 0 : dudeInfo[pSprite->type-kDudeBase].mass;
|
int t = pSprite->type == 426 ? 0 : dudeInfo[pSprite->type-kDudeBase].mass;
|
||||||
|
|
||||||
if (IsDudeSprite(pSprite)) {
|
if (IsDudeSprite(pSprite)) {
|
||||||
switch (pSprite->lotag) {
|
switch (pSprite->type) {
|
||||||
case kCustomDude:
|
case kCustomDude:
|
||||||
case kCustomDudeBurning:
|
case kCustomDudeBurning:
|
||||||
t = getSpriteMassBySize(pSprite);
|
t = getSpriteMassBySize(pSprite);
|
||||||
|
@ -7260,7 +7260,7 @@ void actPostSprite(int nSprite, int nStatus)
|
||||||
dassert(gPostCount < kMaxSprites);
|
dassert(gPostCount < kMaxSprites);
|
||||||
dassert(nSprite < kMaxSprites && sprite[nSprite].statnum < kMaxStatus);
|
dassert(nSprite < kMaxSprites && sprite[nSprite].statnum < kMaxStatus);
|
||||||
dassert(nStatus >= 0 && nStatus <= kStatFree);
|
dassert(nStatus >= 0 && nStatus <= kStatFree);
|
||||||
if (sprite[nSprite].hitag&32)
|
if (sprite[nSprite].flags&32)
|
||||||
{
|
{
|
||||||
for (n = 0; n < gPostCount; n++)
|
for (n = 0; n < gPostCount; n++)
|
||||||
if (gPost[n].at0 == nSprite)
|
if (gPost[n].at0 == nSprite)
|
||||||
|
@ -7270,7 +7270,7 @@ void actPostSprite(int nSprite, int nStatus)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
n = gPostCount;
|
n = gPostCount;
|
||||||
sprite[nSprite].hitag |= 32;
|
sprite[nSprite].flags |= 32;
|
||||||
gPostCount++;
|
gPostCount++;
|
||||||
}
|
}
|
||||||
gPost[n].at0 = nSprite;
|
gPost[n].at0 = nSprite;
|
||||||
|
@ -7284,7 +7284,7 @@ void actPostProcess(void)
|
||||||
POSTPONE *pPost = &gPost[i];
|
POSTPONE *pPost = &gPost[i];
|
||||||
int nSprite = pPost->at0;
|
int nSprite = pPost->at0;
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
pSprite->hitag &= ~32;
|
pSprite->flags &= ~32;
|
||||||
int nStatus = pPost->at2;
|
int nStatus = pPost->at2;
|
||||||
if (nStatus == kStatFree)
|
if (nStatus == kStatFree)
|
||||||
{
|
{
|
||||||
|
@ -7302,7 +7302,7 @@ void actPostProcess(void)
|
||||||
void MakeSplash(spritetype *pSprite, XSPRITE *pXSprite)
|
void MakeSplash(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(pXSprite);
|
UNREFERENCED_PARAMETER(pXSprite);
|
||||||
pSprite->hitag &= ~2;
|
pSprite->flags &= ~2;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
pSprite->z -= 4<<8;
|
pSprite->z -= 4<<8;
|
||||||
int nSurface = tileGetSurfType(gSpriteHit[nXSprite].florhit);
|
int nSurface = tileGetSurfType(gSpriteHit[nXSprite].florhit);
|
||||||
|
@ -7462,12 +7462,12 @@ spritetype* DropRandomPickupObject(spritetype* pSprite, short prevItem) {
|
||||||
pSprite2 = actDropObject(pSprite, selected);
|
pSprite2 = actDropObject(pSprite, selected);
|
||||||
if (pSprite2 != NULL) {
|
if (pSprite2 != NULL) {
|
||||||
|
|
||||||
pXSource->dropMsg = pSprite2->lotag; // store dropped item lotag in dropMsg
|
pXSource->dropMsg = pSprite2->type; // store dropped item type in dropMsg
|
||||||
pSprite2->x = pSource->x;
|
pSprite2->x = pSource->x;
|
||||||
pSprite2->y = pSource->y;
|
pSprite2->y = pSource->y;
|
||||||
pSprite2->z = pSource->z;
|
pSprite2->z = pSource->z;
|
||||||
|
|
||||||
if ((pSource->hitag & kModernTypeFlag1) && (pXSource->txID > 0 || (pXSource->txID != 3 && pXSource->lockMsg > 0)) &&
|
if ((pSource->flags & kModernTypeFlag1) && (pXSource->txID > 0 || (pXSource->txID != 3 && pXSource->lockMsg > 0)) &&
|
||||||
dbInsertXSprite(pSprite2->xvel) > 0) {
|
dbInsertXSprite(pSprite2->xvel) > 0) {
|
||||||
|
|
||||||
XSPRITE * pXSprite2 = &xsprite[pSprite2->extra];
|
XSPRITE * pXSprite2 = &xsprite[pSprite2->extra];
|
||||||
|
@ -7549,7 +7549,7 @@ spritetype* actSpawnCustomDude(spritetype* pSprite, int nDist) {
|
||||||
y = pSprite->y;
|
y = pSprite->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
pDude->lotag = nType; pDude->ang = nAngle;
|
pDude->type = nType; pDude->ang = nAngle;
|
||||||
vec3_t pos = { x, y, z }; setsprite(pDude->index, &pos);
|
vec3_t pos = { x, y, z }; setsprite(pDude->index, &pos);
|
||||||
pDude->cstat |= 0x1101; pDude->clipdist = dudeInfo[nType - kDudeBase].clipdist;
|
pDude->cstat |= 0x1101; pDude->clipdist = dudeInfo[nType - kDudeBase].clipdist;
|
||||||
|
|
||||||
|
@ -7572,7 +7572,7 @@ spritetype* actSpawnCustomDude(spritetype* pSprite, int nDist) {
|
||||||
if (pXSource->data4 <= 0) pXDude->health = dudeInfo[nType].startHealth << 4;
|
if (pXSource->data4 <= 0) pXDude->health = dudeInfo[nType].startHealth << 4;
|
||||||
else pXDude->health = ClipRange(pXSource->data4 << 4, 1, 65535);
|
else pXDude->health = ClipRange(pXSource->data4 << 4, 1, 65535);
|
||||||
|
|
||||||
if (pSource->hitag & kModernTypeFlag1) {
|
if (pSource->flags & kModernTypeFlag1) {
|
||||||
switch (pSource->type) {
|
switch (pSource->type) {
|
||||||
case kGDXCustomDudeSpawn:
|
case kGDXCustomDudeSpawn:
|
||||||
//inherit pal?
|
//inherit pal?
|
||||||
|
@ -7607,7 +7607,7 @@ int getSpriteMassBySize(spritetype* pSprite) {
|
||||||
int mass = 0; int seqId = -1; Seq* pSeq = NULL;
|
int mass = 0; int seqId = -1; Seq* pSeq = NULL;
|
||||||
if (IsDudeSprite(pSprite)) {
|
if (IsDudeSprite(pSprite)) {
|
||||||
|
|
||||||
switch (pSprite->lotag) {
|
switch (pSprite->type) {
|
||||||
case 225: // fake dude, no seq
|
case 225: // fake dude, no seq
|
||||||
break;
|
break;
|
||||||
case kCustomDude:
|
case kCustomDude:
|
||||||
|
@ -7615,7 +7615,7 @@ int getSpriteMassBySize(spritetype* pSprite) {
|
||||||
seqId = xsprite[pSprite->extra].data2;
|
seqId = xsprite[pSprite->extra].data2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
seqId = dudeInfo[pSprite->lotag - kDudeBase].seqStartID;
|
seqId = dudeInfo[pSprite->type - kDudeBase].seqStartID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7717,7 +7717,7 @@ int isDebris(int nSprite) {
|
||||||
int debrisGetFreeIndex(void) {
|
int debrisGetFreeIndex(void) {
|
||||||
for (int i = 0; i < kMaxSuperXSprites; i++) {
|
for (int i = 0; i < kMaxSuperXSprites; i++) {
|
||||||
if (gPhysSpritesList[i] == -1 || sprite[gPhysSpritesList[i]].statnum == kStatFree) return i;
|
if (gPhysSpritesList[i] == -1 || sprite[gPhysSpritesList[i]].statnum == kStatFree) return i;
|
||||||
else if ((sprite[gPhysSpritesList[i]].hitag & kHitagFree) || sprite[gPhysSpritesList[i]].extra < 0) return i;
|
else if ((sprite[gPhysSpritesList[i]].flags & kHitagFree) || sprite[gPhysSpritesList[i]].extra < 0) return i;
|
||||||
else if (xsprite[sprite[gPhysSpritesList[i]].extra].physAttr == 0) return i;
|
else if (xsprite[sprite[gPhysSpritesList[i]].extra].physAttr == 0) return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7921,7 +7921,7 @@ void debrisMove(int listIndex) {
|
||||||
if (moveHit != 0 && pXDebris->Impact && pXDebris->locked != 1 && !pXDebris->isTriggered) {
|
if (moveHit != 0 && pXDebris->Impact && pXDebris->locked != 1 && !pXDebris->isTriggered) {
|
||||||
if (!pXDebris->Interrutable && pXDebris->state != pXDebris->restState) return;
|
if (!pXDebris->Interrutable && pXDebris->state != pXDebris->restState) return;
|
||||||
|
|
||||||
if (pSprite->lotag >= kThingBase && pSprite->lotag < kThingMax)
|
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
||||||
// if thing was turned in debris, change it's stat back so it will do on impact what it supposed to do...
|
// if thing was turned in debris, change it's stat back so it will do on impact what it supposed to do...
|
||||||
//actPostSprite(nSprite, 4); // !!!! not working here for some reason
|
//actPostSprite(nSprite, 4); // !!!! not working here for some reason
|
||||||
changespritestat(nSprite, 4);
|
changespritestat(nSprite, 4);
|
||||||
|
|
|
@ -167,7 +167,7 @@ bool CanMove(spritetype *pSprite, int a2, int nAngle, int nRange)
|
||||||
Underwater = 1;
|
Underwater = 1;
|
||||||
if (pXSector->Depth)
|
if (pXSector->Depth)
|
||||||
Depth = 1;
|
Depth = 1;
|
||||||
if (sector[nSector].lotag == kSecDamage || pXSector->damageType > 0) {
|
if (sector[nSector].type == kSecDamage || pXSector->damageType > 0) {
|
||||||
// By NoOne: a quick fix for Cerberus spinning in E3M7-like maps, where damage sectors is used.
|
// By NoOne: a quick fix for Cerberus spinning in E3M7-like maps, where damage sectors is used.
|
||||||
// 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
|
||||||
|
@ -281,7 +281,7 @@ void aiChooseDirection(spritetype *pSprite, XSPRITE *pXSprite, int a3)
|
||||||
pXSprite->goalAng = pSprite->ang;
|
pXSprite->goalAng = pSprite->ang;
|
||||||
else if (CanMove(pSprite, pXSprite->target, pSprite->ang-v8, vsi))
|
else if (CanMove(pSprite, pXSprite->target, pSprite->ang-v8, vsi))
|
||||||
pXSprite->goalAng = pSprite->ang-v8;
|
pXSprite->goalAng = pSprite->ang-v8;
|
||||||
else if (pSprite->hitag&2)
|
else if (pSprite->flags&2)
|
||||||
pXSprite->goalAng = pSprite->ang+341;
|
pXSprite->goalAng = pSprite->ang+341;
|
||||||
else // Weird..
|
else // Weird..
|
||||||
pXSprite->goalAng = pSprite->ang+341;
|
pXSprite->goalAng = pSprite->ang+341;
|
||||||
|
@ -546,8 +546,8 @@ void aiActivateDude(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
pDudeExtraE->at4 = 0;
|
pDudeExtraE->at4 = 0;
|
||||||
pDudeExtraE->at8 = 1;
|
pDudeExtraE->at8 = 1;
|
||||||
pDudeExtraE->at0 = 0;
|
pDudeExtraE->at0 = 0;
|
||||||
if (!pSprite->hitag)
|
if (!pSprite->flags)
|
||||||
pSprite->hitag = 9;
|
pSprite->flags = 9;
|
||||||
if (pXSprite->target == -1)
|
if (pXSprite->target == -1)
|
||||||
aiNewState(pSprite, pXSprite, &batSearch);
|
aiNewState(pSprite, pXSprite, &batSearch);
|
||||||
else
|
else
|
||||||
|
@ -801,7 +801,7 @@ void aiActivateDude(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
case 213:
|
case 213:
|
||||||
case 214:
|
case 214:
|
||||||
case 215:
|
case 215:
|
||||||
pSprite->hitag |= 2;
|
pSprite->flags |= 2;
|
||||||
pSprite->cstat &= ~8;
|
pSprite->cstat &= ~8;
|
||||||
if (pXSprite->target == -1)
|
if (pXSprite->target == -1)
|
||||||
aiNewState(pSprite, pXSprite, &spidSearch);
|
aiNewState(pSprite, pXSprite, &spidSearch);
|
||||||
|
@ -816,7 +816,7 @@ void aiActivateDude(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
DUDEEXTRA_at6_u1 *pDudeExtraE = &gDudeExtra[pSprite->extra].at6.u1;
|
DUDEEXTRA_at6_u1 *pDudeExtraE = &gDudeExtra[pSprite->extra].at6.u1;
|
||||||
pDudeExtraE->at8 = 1;
|
pDudeExtraE->at8 = 1;
|
||||||
pDudeExtraE->at0 = 0;
|
pDudeExtraE->at0 = 0;
|
||||||
pSprite->hitag |= 2;
|
pSprite->flags |= 2;
|
||||||
pSprite->cstat &= ~8;
|
pSprite->cstat &= ~8;
|
||||||
if (pXSprite->target == -1)
|
if (pXSprite->target == -1)
|
||||||
aiNewState(pSprite, pXSprite, &spidSearch);
|
aiNewState(pSprite, pXSprite, &spidSearch);
|
||||||
|
@ -1496,7 +1496,7 @@ void aiProcessDudes(void)
|
||||||
for (int nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (int nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||||
|
@ -1611,7 +1611,7 @@ void aiInitSprite(spritetype *pSprite)
|
||||||
pDudeExtraE->at4 = 0;
|
pDudeExtraE->at4 = 0;
|
||||||
pDudeExtraE->at0 = 0;
|
pDudeExtraE->at0 = 0;
|
||||||
aiNewState(pSprite, pXSprite, &zombieSIdle);
|
aiNewState(pSprite, pXSprite, &zombieSIdle);
|
||||||
pSprite->hitag &= ~1;
|
pSprite->flags &= ~1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 205:
|
case 205:
|
||||||
|
@ -1743,26 +1743,26 @@ void aiInitSprite(spritetype *pSprite)
|
||||||
case 214:
|
case 214:
|
||||||
case 215:
|
case 215:
|
||||||
if (pSprite->cstat&8)
|
if (pSprite->cstat&8)
|
||||||
pSprite->hitag |= 9;
|
pSprite->flags |= 9;
|
||||||
else
|
else
|
||||||
pSprite->hitag = 15;
|
pSprite->flags = 15;
|
||||||
break;
|
break;
|
||||||
case 206:
|
case 206:
|
||||||
case 207:
|
case 207:
|
||||||
case 210:
|
case 210:
|
||||||
case 218:
|
case 218:
|
||||||
case 219:
|
case 219:
|
||||||
pSprite->hitag |= 9;
|
pSprite->flags |= 9;
|
||||||
break;
|
break;
|
||||||
case 217:
|
case 217:
|
||||||
if (pXSector && pXSector->Underwater)
|
if (pXSector && pXSector->Underwater)
|
||||||
pSprite->hitag |= 9;
|
pSprite->flags |= 9;
|
||||||
else
|
else
|
||||||
pSprite->hitag = 15;
|
pSprite->flags = 15;
|
||||||
break;
|
break;
|
||||||
case 205:
|
case 205:
|
||||||
case 244:
|
case 244:
|
||||||
pSprite->hitag = 7;
|
pSprite->flags = 7;
|
||||||
break;
|
break;
|
||||||
case 225: // by NoOne: FakeDude type
|
case 225: // by NoOne: FakeDude type
|
||||||
break;
|
break;
|
||||||
|
@ -1773,14 +1773,14 @@ void aiInitSprite(spritetype *pSprite)
|
||||||
case 224:
|
case 224:
|
||||||
case 226:
|
case 226:
|
||||||
if ((pSprite->cstat & CSTAT_SPRITE_YFLIP) != 0) {
|
if ((pSprite->cstat & CSTAT_SPRITE_YFLIP) != 0) {
|
||||||
if (!(pSprite->hitag & kModernTypeFlag1)) // don't add autoaim for player if hitag 1 specified in editor.
|
if (!(pSprite->flags & kModernTypeFlag1)) // don't add autoaim for player if hitag 1 specified in editor.
|
||||||
pSprite->hitag = kHitagAutoAim;
|
pSprite->flags = kHitagAutoAim;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
// go default
|
// go default
|
||||||
default:
|
default:
|
||||||
pSprite->hitag = 15;
|
pSprite->flags = 15;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,7 +434,7 @@ void MoveToCeil(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
{
|
{
|
||||||
DUDEEXTRA_at6_u1 *pDudeExtraE = &gDudeExtra[pSprite->extra].at6.u1;
|
DUDEEXTRA_at6_u1 *pDudeExtraE = &gDudeExtra[pSprite->extra].at6.u1;
|
||||||
pDudeExtraE->at8 = 0;
|
pDudeExtraE->at8 = 0;
|
||||||
pSprite->hitag = 0;
|
pSprite->flags = 0;
|
||||||
aiNewState(pSprite, pXSprite, &batIdle);
|
aiNewState(pSprite, pXSprite, &batIdle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -136,7 +136,7 @@ static void StompSeqCallback(int, int nXSprite)
|
||||||
{
|
{
|
||||||
if (pSprite2->type == 251)
|
if (pSprite2->type == 251)
|
||||||
continue;
|
continue;
|
||||||
if (pSprite2->hitag&32)
|
if (pSprite2->flags&32)
|
||||||
continue;
|
continue;
|
||||||
if (TestBitString(vb8, pSprite2->sectnum) && CheckProximity(pSprite2, x, y, z, nSector, vc))
|
if (TestBitString(vb8, pSprite2->sectnum) && CheckProximity(pSprite2, x, y, z, nSector, vc))
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ static void StompSeqCallback(int, int nXSprite)
|
||||||
for (int nSprite2 = headspritestat[4]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (int nSprite2 = headspritestat[4]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite2->hitag&32)
|
if (pSprite2->flags&32)
|
||||||
continue;
|
continue;
|
||||||
if (TestBitString(vb8, pSprite2->sectnum) && CheckProximity(pSprite2, x, y, z, nSector, vc))
|
if (TestBitString(vb8, pSprite2->sectnum) && CheckProximity(pSprite2, x, y, z, nSector, vc))
|
||||||
{
|
{
|
||||||
|
@ -293,7 +293,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
aiSetTarget(pXSprite, pXSprite->target);
|
aiSetTarget(pXSprite, pXSprite->target);
|
||||||
int nXSprite = sprite[pXSprite->reference].extra;
|
int nXSprite = sprite[pXSprite->reference].extra;
|
||||||
gDudeSlope[nXSprite] = divscale(pTarget->z-pSprite->z, nDist, 10);
|
gDudeSlope[nXSprite] = divscale(pTarget->z-pSprite->z, nDist, 10);
|
||||||
if (nDist < 0x1400 && nDist > 0xa00 && klabs(nDeltaAngle) < 85 && (pTarget->hitag&2)
|
if (nDist < 0x1400 && nDist > 0xa00 && klabs(nDeltaAngle) < 85 && (pTarget->flags&2)
|
||||||
&& IsPlayerSprite(pTarget) && Chance(0x8000))
|
&& IsPlayerSprite(pTarget) && Chance(0x8000))
|
||||||
{
|
{
|
||||||
XSECTOR *pXSector;
|
XSECTOR *pXSector;
|
||||||
|
|
|
@ -439,7 +439,7 @@ void MoveToCeil(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
{
|
{
|
||||||
DUDEEXTRA_at6_u1 *pDudeExtraE = &gDudeExtra[pSprite->extra].at6.u1;
|
DUDEEXTRA_at6_u1 *pDudeExtraE = &gDudeExtra[pSprite->extra].at6.u1;
|
||||||
pDudeExtraE->at8 = 0;
|
pDudeExtraE->at8 = 0;
|
||||||
pSprite->hitag = 0;
|
pSprite->flags = 0;
|
||||||
aiNewState(pSprite, pXSprite, &eelIdle);
|
aiNewState(pSprite, pXSprite, &eelIdle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -117,7 +117,7 @@ static void BurnSeqCallback(int, int nXSprite)
|
||||||
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite == pSprite2 || !(pSprite2->hitag&8))
|
if (pSprite == pSprite2 || !(pSprite2->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite2->x;
|
int x2 = pSprite2->x;
|
||||||
int y2 = pSprite2->y;
|
int y2 = pSprite2->y;
|
||||||
|
@ -200,7 +200,7 @@ static void BurnSeqCallback2(int, int nXSprite)
|
||||||
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite == pSprite2 || !(pSprite2->hitag&8))
|
if (pSprite == pSprite2 || !(pSprite2->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite2->x;
|
int x2 = pSprite2->x;
|
||||||
int y2 = pSprite2->y;
|
int y2 = pSprite2->y;
|
||||||
|
|
|
@ -331,7 +331,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
{
|
{
|
||||||
case 201:
|
case 201:
|
||||||
if (nDist < 0x1e00 && nDist > 0xe00 && klabs(nDeltaAngle) < 85 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x1e00 && nDist > 0xe00 && klabs(nDeltaAngle) < 85 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->hitag&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].at2e
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].at2e
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
|
@ -399,7 +399,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
break;
|
break;
|
||||||
case 202:
|
case 202:
|
||||||
if (nDist < 0x2c00 && nDist > 0x1400 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x2c00 && nDist > 0x1400 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->hitag&2) && gGameOptions.nDifficulty >= 2 && IsPlayerSprite(pTarget) && !gPlayer[pTarget->type-kDudePlayer1].at2e
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty >= 2 && IsPlayerSprite(pTarget) && !gPlayer[pTarget->type-kDudePlayer1].at2e
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
|
@ -467,7 +467,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
break;
|
break;
|
||||||
case 247:
|
case 247:
|
||||||
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->hitag&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].at2e
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].at2e
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
|
@ -535,7 +535,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
break;
|
break;
|
||||||
case 248:
|
case 248:
|
||||||
if (nDist < 0x2c00 && nDist > 0x1400 && klabs(nDeltaAngle) < 85
|
if (nDist < 0x2c00 && nDist > 0x1400 && klabs(nDeltaAngle) < 85
|
||||||
&& (pTarget->hitag&2) && IsPlayerSprite(pTarget))
|
&& (pTarget->flags&2) && IsPlayerSprite(pTarget))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
switch (hit)
|
switch (hit)
|
||||||
|
@ -556,7 +556,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (nDist < 0x1400 && klabs(nDeltaAngle) < 85
|
else if (nDist < 0x1400 && klabs(nDeltaAngle) < 85
|
||||||
&& (pTarget->hitag&2) && IsPlayerSprite(pTarget))
|
&& (pTarget->flags&2) && IsPlayerSprite(pTarget))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
switch (hit)
|
switch (hit)
|
||||||
|
@ -579,7 +579,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
break;
|
break;
|
||||||
case 249:
|
case 249:
|
||||||
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
if (nDist < 0x1e00 && nDist > 0xe00 && !TargetNearExplosion(pTarget)
|
||||||
&& (pTarget->hitag&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].at2e
|
&& (pTarget->flags&2) && gGameOptions.nDifficulty > 2 && IsPlayerSprite(pTarget) && gPlayer[pTarget->type-kDudePlayer1].at2e
|
||||||
&& Chance(0x8000))
|
&& Chance(0x8000))
|
||||||
{
|
{
|
||||||
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
int hit = HitScan(pSprite, pSprite->z, dx, dy, 0, CLIPMASK1, 0);
|
||||||
|
|
|
@ -152,7 +152,7 @@ static void BlastSSeqCallback(int, int nXSprite)
|
||||||
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite == pSprite2 || !(pSprite2->hitag&8))
|
if (pSprite == pSprite2 || !(pSprite2->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite2->x;
|
int x2 = pSprite2->x;
|
||||||
int y2 = pSprite2->y;
|
int y2 = pSprite2->y;
|
||||||
|
|
|
@ -135,7 +135,7 @@ static void BlastSeqCallback(int, int nXSprite)
|
||||||
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite == pSprite2 || !(pSprite2->hitag&8))
|
if (pSprite == pSprite2 || !(pSprite2->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite2->x;
|
int x2 = pSprite2->x;
|
||||||
int y2 = pSprite2->y;
|
int y2 = pSprite2->y;
|
||||||
|
|
|
@ -104,7 +104,7 @@ static void sub_71BD4(int, int nXSprite)
|
||||||
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite == pSprite2 || !(pSprite2->hitag&8))
|
if (pSprite == pSprite2 || !(pSprite2->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite2->x;
|
int x2 = pSprite2->x;
|
||||||
int y2 = pSprite2->y;
|
int y2 = pSprite2->y;
|
||||||
|
@ -180,7 +180,7 @@ static void sub_720AC(int, int nXSprite)
|
||||||
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
for (short nSprite2 = headspritestat[6]; nSprite2 >= 0; nSprite2 = nextspritestat[nSprite2])
|
||||||
{
|
{
|
||||||
spritetype *pSprite2 = &sprite[nSprite2];
|
spritetype *pSprite2 = &sprite[nSprite2];
|
||||||
if (pSprite == pSprite2 || !(pSprite2->hitag&8))
|
if (pSprite == pSprite2 || !(pSprite2->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite2->x;
|
int x2 = pSprite2->x;
|
||||||
int y2 = pSprite2->y;
|
int y2 = pSprite2->y;
|
||||||
|
|
|
@ -355,7 +355,7 @@ static void thinkGoto( spritetype* pSprite, XSPRITE* pXSprite )
|
||||||
{
|
{
|
||||||
int dx, dy, dist;
|
int dx, dy, dist;
|
||||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||||
DUDEINFO* pDudeInfo = &dudeInfo[pSprite->lotag - kDudeBase];
|
DUDEINFO* pDudeInfo = &dudeInfo[pSprite->type - kDudeBase];
|
||||||
|
|
||||||
dx = pXSprite->targetX - pSprite->x;
|
dx = pXSprite->targetX - pSprite->x;
|
||||||
dy = pXSprite->targetY - pSprite->y;
|
dy = pXSprite->targetY - pSprite->y;
|
||||||
|
@ -867,7 +867,7 @@ bool spriteIsUnderwater(spritetype* pSprite,bool oldWay) {
|
||||||
|
|
||||||
spritetype* leechIsDropped(spritetype* pSprite) {
|
spritetype* leechIsDropped(spritetype* pSprite) {
|
||||||
for (int nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
for (int nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
||||||
if (sprite[nSprite].lotag == kGDXThingCustomDudeLifeLeech && sprite[nSprite].owner == pSprite->xvel)
|
if (sprite[nSprite].type == kGDXThingCustomDudeLifeLeech && sprite[nSprite].owner == pSprite->xvel)
|
||||||
return &sprite[nSprite];
|
return &sprite[nSprite];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,11 +878,11 @@ spritetype* leechIsDropped(spritetype* pSprite) {
|
||||||
void removeDudeStuff(spritetype* pSprite) {
|
void removeDudeStuff(spritetype* pSprite) {
|
||||||
for (short nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
for (short nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
||||||
if (sprite[nSprite].owner != pSprite->xvel) continue;
|
if (sprite[nSprite].owner != pSprite->xvel) continue;
|
||||||
switch (sprite[nSprite].lotag) {
|
switch (sprite[nSprite].type) {
|
||||||
case 401:
|
case 401:
|
||||||
case 402:
|
case 402:
|
||||||
case 433:
|
case 433:
|
||||||
sprite[nSprite].lotag = 0;
|
sprite[nSprite].type = 0;
|
||||||
actPostSprite(sprite[nSprite].xvel, kStatFree);
|
actPostSprite(sprite[nSprite].xvel, kStatFree);
|
||||||
break;
|
break;
|
||||||
case kGDXThingCustomDudeLifeLeech:
|
case kGDXThingCustomDudeLifeLeech:
|
||||||
|
@ -1009,7 +1009,7 @@ void dudeLeechOperate(spritetype* pSprite, XSPRITE* pXSprite, EVENT a3)
|
||||||
int nTarget = pXSprite->target;
|
int nTarget = pXSprite->target;
|
||||||
if (nTarget >= 0 && nTarget < kMaxSprites) {
|
if (nTarget >= 0 && nTarget < kMaxSprites) {
|
||||||
spritetype* pTarget = &sprite[nTarget];
|
spritetype* pTarget = &sprite[nTarget];
|
||||||
if (pTarget->statnum == 6 && !(pTarget->hitag & 32) && pTarget->extra > 0 && pTarget->extra < kMaxXSprites && !pXSprite->stateTimer)
|
if (pTarget->statnum == 6 && !(pTarget->flags & 32) && pTarget->extra > 0 && pTarget->extra < kMaxXSprites && !pXSprite->stateTimer)
|
||||||
{
|
{
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite, &top, &bottom);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
|
@ -1057,7 +1057,7 @@ bool doExplosion(spritetype* pSprite, int nType) {
|
||||||
|
|
||||||
pExplosion->yrepeat = pExpl->at0;
|
pExplosion->yrepeat = pExpl->at0;
|
||||||
pExplosion->xrepeat = pExpl->at0;
|
pExplosion->xrepeat = pExpl->at0;
|
||||||
pExplosion->lotag = nType;
|
pExplosion->type = nType;
|
||||||
pExplosion->cstat |= CSTAT_SPRITE_INVISIBLE | CSTAT_SPRITE_ALIGNMENT_SLAB;
|
pExplosion->cstat |= CSTAT_SPRITE_INVISIBLE | CSTAT_SPRITE_ALIGNMENT_SLAB;
|
||||||
pExplosion->owner = pSprite->xvel;
|
pExplosion->owner = pSprite->xvel;
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ static void entryEZombie(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
{
|
{
|
||||||
UNREFERENCED_PARAMETER(pXSprite);
|
UNREFERENCED_PARAMETER(pXSprite);
|
||||||
pSprite->type = 203;
|
pSprite->type = 203;
|
||||||
pSprite->hitag |= 1;
|
pSprite->flags |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void entryAIdle(spritetype *pSprite, XSPRITE *pXSprite)
|
static void entryAIdle(spritetype *pSprite, XSPRITE *pXSprite)
|
||||||
|
|
|
@ -67,7 +67,7 @@ void UniMissileBurst(int nSprite) // 22
|
||||||
{
|
{
|
||||||
spritetype* pBurst = actSpawnSprite(pSprite, 5);
|
spritetype* pBurst = actSpawnSprite(pSprite, 5);
|
||||||
|
|
||||||
pBurst->lotag = pSprite->lotag;
|
pBurst->type = pSprite->type;
|
||||||
pBurst->shade = pSprite->shade;
|
pBurst->shade = pSprite->shade;
|
||||||
pBurst->picnum = pSprite->picnum;
|
pBurst->picnum = pSprite->picnum;
|
||||||
|
|
||||||
|
@ -79,10 +79,10 @@ void UniMissileBurst(int nSprite) // 22
|
||||||
|
|
||||||
pBurst->pal = pSprite->pal;
|
pBurst->pal = pSprite->pal;
|
||||||
pBurst->clipdist = pSprite->clipdist / 4;
|
pBurst->clipdist = pSprite->clipdist / 4;
|
||||||
pBurst->hitag = pSprite->hitag;
|
pBurst->flags = pSprite->flags;
|
||||||
pBurst->xrepeat = pSprite->xrepeat / 2;
|
pBurst->xrepeat = pSprite->xrepeat / 2;
|
||||||
pBurst->yrepeat = pSprite->yrepeat / 2;
|
pBurst->yrepeat = pSprite->yrepeat / 2;
|
||||||
pBurst->ang = ((pSprite->ang + missileInfo[pSprite->lotag - kMissileBase].at6) & 2047);
|
pBurst->ang = ((pSprite->ang + missileInfo[pSprite->type - kMissileBase].at6) & 2047);
|
||||||
pBurst->owner = pSprite->owner;
|
pBurst->owner = pSprite->owner;
|
||||||
|
|
||||||
actBuildMissile(pBurst, pBurst->extra, pSprite->xvel);
|
actBuildMissile(pBurst, pBurst->extra, pSprite->xvel);
|
||||||
|
@ -308,7 +308,7 @@ void Respawn(int nSprite) // 9
|
||||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||||
if (pSprite->statnum != 8 && pSprite->statnum != 4)
|
if (pSprite->statnum != 8 && pSprite->statnum != 4)
|
||||||
ThrowError("Sprite %d is not on Respawn or Thing list\n", nSprite);
|
ThrowError("Sprite %d is not on Respawn or Thing list\n", nSprite);
|
||||||
if (!(pSprite->hitag&16))
|
if (!(pSprite->flags&16))
|
||||||
ThrowError("Sprite %d does not have the respawn attribute\n", nSprite);
|
ThrowError("Sprite %d does not have the respawn attribute\n", nSprite);
|
||||||
switch (pXSprite->respawnPending)
|
switch (pXSprite->respawnPending)
|
||||||
{
|
{
|
||||||
|
@ -331,9 +331,9 @@ void Respawn(int nSprite) // 9
|
||||||
dassert(pSprite->owner != kStatRespawn);
|
dassert(pSprite->owner != kStatRespawn);
|
||||||
dassert(pSprite->owner >= 0 && pSprite->owner < kMaxStatus);
|
dassert(pSprite->owner >= 0 && pSprite->owner < kMaxStatus);
|
||||||
ChangeSpriteStat(nSprite, pSprite->owner);
|
ChangeSpriteStat(nSprite, pSprite->owner);
|
||||||
pSprite->type = pSprite->zvel;
|
pSprite->type = pSprite->inittype;
|
||||||
pSprite->owner = -1;
|
pSprite->owner = -1;
|
||||||
pSprite->hitag &= ~16;
|
pSprite->flags &= ~16;
|
||||||
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
||||||
pXSprite->respawnPending = 0;
|
pXSprite->respawnPending = 0;
|
||||||
pXSprite->burnTime = 0;
|
pXSprite->burnTime = 0;
|
||||||
|
@ -426,7 +426,7 @@ void CounterCheck(int nSector) // 12
|
||||||
sectortype *pSector = §or[nSector];
|
sectortype *pSector = §or[nSector];
|
||||||
// By NoOne: edits for counter sector new features.
|
// By NoOne: edits for counter sector new features.
|
||||||
// remove check below, so every sector can be counter if command 12 (this callback) received.
|
// remove check below, so every sector can be counter if command 12 (this callback) received.
|
||||||
//if (pSector->lotag != 619) return;
|
//if (pSector->type != 619) return;
|
||||||
int nXSprite = pSector->extra;
|
int nXSprite = pSector->extra;
|
||||||
if (nXSprite > 0)
|
if (nXSprite > 0)
|
||||||
{
|
{
|
||||||
|
@ -622,8 +622,8 @@ void sub_768E8(int nSprite) // 18
|
||||||
void sub_769B4(int nSprite) // 19
|
void sub_769B4(int nSprite) // 19
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->statnum == 4 && !(pSprite->hitag & 32)) {
|
if (pSprite->statnum == 4 && !(pSprite->flags & 32)) {
|
||||||
switch (pSprite->lotag) {
|
switch (pSprite->type) {
|
||||||
case 431:
|
case 431:
|
||||||
case kGDXThingCustomDudeLifeLeech:
|
case kGDXThingCustomDudeLifeLeech:
|
||||||
xsprite[pSprite->extra].stateTimer = 0;
|
xsprite[pSprite->extra].stateTimer = 0;
|
||||||
|
|
|
@ -882,7 +882,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
||||||
pSector->ceilingheinum = B_LITTLE16(pSector->ceilingheinum);
|
pSector->ceilingheinum = B_LITTLE16(pSector->ceilingheinum);
|
||||||
pSector->floorpicnum = B_LITTLE16(pSector->floorpicnum);
|
pSector->floorpicnum = B_LITTLE16(pSector->floorpicnum);
|
||||||
pSector->floorheinum = B_LITTLE16(pSector->floorheinum);
|
pSector->floorheinum = B_LITTLE16(pSector->floorheinum);
|
||||||
pSector->lotag = B_LITTLE16(pSector->lotag);
|
pSector->type = B_LITTLE16(pSector->type);
|
||||||
pSector->hitag = B_LITTLE16(pSector->hitag);
|
pSector->hitag = B_LITTLE16(pSector->hitag);
|
||||||
pSector->extra = B_LITTLE16(pSector->extra);
|
pSector->extra = B_LITTLE16(pSector->extra);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1004,7 +1004,7 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
||||||
pWall->cstat = B_LITTLE16(pWall->cstat);
|
pWall->cstat = B_LITTLE16(pWall->cstat);
|
||||||
pWall->picnum = B_LITTLE16(pWall->picnum);
|
pWall->picnum = B_LITTLE16(pWall->picnum);
|
||||||
pWall->overpicnum = B_LITTLE16(pWall->overpicnum);
|
pWall->overpicnum = B_LITTLE16(pWall->overpicnum);
|
||||||
pWall->lotag = B_LITTLE16(pWall->lotag);
|
pWall->type = B_LITTLE16(pWall->type);
|
||||||
pWall->hitag = B_LITTLE16(pWall->hitag);
|
pWall->hitag = B_LITTLE16(pWall->hitag);
|
||||||
pWall->extra = B_LITTLE16(pWall->extra);
|
pWall->extra = B_LITTLE16(pWall->extra);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1081,11 +1081,11 @@ int dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, short
|
||||||
pSprite->statnum = B_LITTLE16(pSprite->statnum);
|
pSprite->statnum = B_LITTLE16(pSprite->statnum);
|
||||||
pSprite->ang = B_LITTLE16(pSprite->ang);
|
pSprite->ang = B_LITTLE16(pSprite->ang);
|
||||||
pSprite->owner = B_LITTLE16(pSprite->owner);
|
pSprite->owner = B_LITTLE16(pSprite->owner);
|
||||||
pSprite->xvel = B_LITTLE16(pSprite->xvel);
|
pSprite->index = B_LITTLE16(pSprite->index);
|
||||||
pSprite->yvel = B_LITTLE16(pSprite->yvel);
|
pSprite->yvel = B_LITTLE16(pSprite->yvel);
|
||||||
pSprite->zvel = B_LITTLE16(pSprite->zvel);
|
pSprite->inittype = B_LITTLE16(pSprite->inittype);
|
||||||
pSprite->lotag = B_LITTLE16(pSprite->lotag);
|
pSprite->type = B_LITTLE16(pSprite->type);
|
||||||
pSprite->hitag = B_LITTLE16(pSprite->hitag);
|
pSprite->flags = B_LITTLE16(pSprite->hitag);
|
||||||
pSprite->extra = B_LITTLE16(pSprite->extra);
|
pSprite->extra = B_LITTLE16(pSprite->extra);
|
||||||
#endif
|
#endif
|
||||||
InsertSpriteSect(i, sprite[i].sectnum);
|
InsertSpriteSect(i, sprite[i].sectnum);
|
||||||
|
|
|
@ -295,7 +295,7 @@ static inline int GetWallType(int nWall)
|
||||||
if (yax_hasnextwall(nWall))
|
if (yax_hasnextwall(nWall))
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
return wall[nWall].lotag;
|
return wall[nWall].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void GetSpriteExtents(spritetype *pSprite, int *top, int *bottom)
|
inline void GetSpriteExtents(spritetype *pSprite, int *top, int *bottom)
|
||||||
|
|
|
@ -411,7 +411,7 @@ void evSend(int nIndex, int nType, int rxId, COMMAND_ID command)
|
||||||
for (int nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (int nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
if (nXSprite > 0)
|
if (nXSprite > 0)
|
||||||
|
@ -427,7 +427,7 @@ void evSend(int nIndex, int nType, int rxId, COMMAND_ID command)
|
||||||
for (int nSprite = headspritestat[3]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (int nSprite = headspritestat[3]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
if (nXSprite > 0)
|
if (nXSprite > 0)
|
||||||
|
@ -456,7 +456,7 @@ void evSend(int nIndex, int nType, int rxId, COMMAND_ID command)
|
||||||
{
|
{
|
||||||
int nSprite = rxBucket[i].index;
|
int nSprite = rxBucket[i].index;
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
if (nXSprite > 0)
|
if (nXSprite > 0)
|
||||||
|
|
|
@ -170,7 +170,7 @@ spritetype * CFX::fxSpawn(FX_ID nFx, int nSector, int x, int y, int z, unsigned
|
||||||
if (gStatCount[1] == 512)
|
if (gStatCount[1] == 512)
|
||||||
{
|
{
|
||||||
int nSprite = headspritestat[1];;
|
int nSprite = headspritestat[1];;
|
||||||
while ((sprite[nSprite].hitag & 32) && nSprite != -1)
|
while ((sprite[nSprite].flags & 32) && nSprite != -1)
|
||||||
nSprite = nextspritestat[nSprite];
|
nSprite = nextspritestat[nSprite];
|
||||||
if (nSprite == -1)
|
if (nSprite == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -481,7 +481,7 @@ int VectorScan(spritetype *pSprite, int nOffset, int nZOffset, int dx, int dy, i
|
||||||
if (gHitInfo.hitsprite >= 0)
|
if (gHitInfo.hitsprite >= 0)
|
||||||
{
|
{
|
||||||
spritetype *pOther = &sprite[gHitInfo.hitsprite];
|
spritetype *pOther = &sprite[gHitInfo.hitsprite];
|
||||||
if ((pOther->hitag & 8) && !(ac & 1))
|
if ((pOther->flags & 8) && !(ac & 1))
|
||||||
return 3;
|
return 3;
|
||||||
if ((pOther->cstat & 0x30) != 0)
|
if ((pOther->cstat & 0x30) != 0)
|
||||||
return 3;
|
return 3;
|
||||||
|
|
|
@ -288,7 +288,7 @@ void sub_557C4(int x, int y, int interpolation)
|
||||||
pTSprite->statnum = 0;
|
pTSprite->statnum = 0;
|
||||||
pTSprite->owner = pSprite->index;
|
pTSprite->owner = pSprite->index;
|
||||||
pTSprite->extra = pSprite->extra;
|
pTSprite->extra = pSprite->extra;
|
||||||
pTSprite->hitag = pSprite->hitag|0x200;
|
pTSprite->flags = pSprite->hitag|0x200;
|
||||||
LOCATION *pLocation = &gPrevSpriteLoc[pSprite->index];
|
LOCATION *pLocation = &gPrevSpriteLoc[pSprite->index];
|
||||||
pTSprite->x = dx+interpolate(pLocation->x, pSprite->x, interpolation);
|
pTSprite->x = dx+interpolate(pLocation->x, pSprite->x, interpolation);
|
||||||
pTSprite->y = dy+interpolate(pLocation->y, pSprite->y, interpolation);
|
pTSprite->y = dy+interpolate(pLocation->y, pSprite->y, interpolation);
|
||||||
|
|
|
@ -905,7 +905,7 @@ void playerStart(int nPlayer)
|
||||||
pPlayer->q16ang = fix16_from_int(pSprite->ang);
|
pPlayer->q16ang = fix16_from_int(pSprite->ang);
|
||||||
pSprite->type = kDudePlayer1+nPlayer;
|
pSprite->type = kDudePlayer1+nPlayer;
|
||||||
pSprite->clipdist = pDudeInfo->clipdist;
|
pSprite->clipdist = pDudeInfo->clipdist;
|
||||||
pSprite->hitag = 15;
|
pSprite->flags = 15;
|
||||||
pXSprite->burnTime = 0;
|
pXSprite->burnTime = 0;
|
||||||
pXSprite->burnSource = -1;
|
pXSprite->burnSource = -1;
|
||||||
pPlayer->pXSprite->health = pDudeInfo->startHealth<<4;
|
pPlayer->pXSprite->health = pDudeInfo->startHealth<<4;
|
||||||
|
@ -1396,7 +1396,7 @@ void CheckPickUp(PLAYER *pPlayer)
|
||||||
{
|
{
|
||||||
spritetype *pItem = &sprite[nSprite];
|
spritetype *pItem = &sprite[nSprite];
|
||||||
nNextSprite = nextspritestat[nSprite];
|
nNextSprite = nextspritestat[nSprite];
|
||||||
if (pItem->hitag&32)
|
if (pItem->flags&32)
|
||||||
continue;
|
continue;
|
||||||
int dx = klabs(x-pItem->x)>>4;
|
int dx = klabs(x-pItem->x)>>4;
|
||||||
if (dx > 48)
|
if (dx > 48)
|
||||||
|
@ -2282,7 +2282,7 @@ int playerDamageSprite(int nSource, PLAYER *pPlayer, DAMAGE_TYPE nDamageType, in
|
||||||
powerupClear(pPlayer);
|
powerupClear(pPlayer);
|
||||||
if (nXSector > 0 && xsector[nXSector].Exit)
|
if (nXSector > 0 && xsector[nXSector].Exit)
|
||||||
trTriggerSector(pSprite->sectnum, &xsector[nXSector], 43);
|
trTriggerSector(pSprite->sectnum, &xsector[nXSector], 43);
|
||||||
pSprite->hitag |= 7;
|
pSprite->flags |= 7;
|
||||||
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
||||||
{
|
{
|
||||||
if (gPlayer[p].at2ee == nSprite && gPlayer[p].at1fe > 0)
|
if (gPlayer[p].at2ee == nSprite && gPlayer[p].at1fe > 0)
|
||||||
|
|
|
@ -99,11 +99,11 @@ void UpdateSprite(int nXSprite, SEQFRAME *pFrame)
|
||||||
dassert(nSprite >= 0 && nSprite < kMaxSprites);
|
dassert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
dassert(pSprite->extra == nXSprite);
|
dassert(pSprite->extra == nXSprite);
|
||||||
if (pSprite->hitag & 2)
|
if (pSprite->flags & 2)
|
||||||
{
|
{
|
||||||
if (tilesiz[pSprite->picnum].y != tilesiz[seqGetTile(pFrame)].y || picanm[pSprite->picnum].yofs != picanm[seqGetTile(pFrame)].yofs
|
if (tilesiz[pSprite->picnum].y != tilesiz[seqGetTile(pFrame)].y || picanm[pSprite->picnum].yofs != picanm[seqGetTile(pFrame)].yofs
|
||||||
|| (pFrame->at3_0 && pFrame->at3_0 != pSprite->yrepeat))
|
|| (pFrame->at3_0 && pFrame->at3_0 != pSprite->yrepeat))
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
}
|
}
|
||||||
pSprite->picnum = seqGetTile(pFrame);
|
pSprite->picnum = seqGetTile(pFrame);
|
||||||
if (pFrame->at5_0)
|
if (pFrame->at5_0)
|
||||||
|
@ -146,21 +146,21 @@ void UpdateSprite(int nXSprite, SEQFRAME *pFrame)
|
||||||
else
|
else
|
||||||
pSprite->cstat &= ~4096;
|
pSprite->cstat &= ~4096;
|
||||||
if (pFrame->at5_6)
|
if (pFrame->at5_6)
|
||||||
pSprite->hitag |= 256;
|
pSprite->flags |= 256;
|
||||||
else
|
else
|
||||||
pSprite->hitag &= ~256;
|
pSprite->flags &= ~256;
|
||||||
if (pFrame->at5_7)
|
if (pFrame->at5_7)
|
||||||
pSprite->hitag |= 8;
|
pSprite->flags |= 8;
|
||||||
else
|
else
|
||||||
pSprite->hitag &= ~8;
|
pSprite->flags &= ~8;
|
||||||
if (pFrame->at6_3)
|
if (pFrame->at6_3)
|
||||||
pSprite->hitag |= 1024;
|
pSprite->flags |= 1024;
|
||||||
else
|
else
|
||||||
pSprite->hitag &= ~1024;
|
pSprite->flags &= ~1024;
|
||||||
if (pFrame->at6_4)
|
if (pFrame->at6_4)
|
||||||
pSprite->hitag |= 2048;
|
pSprite->flags |= 2048;
|
||||||
else
|
else
|
||||||
pSprite->hitag &= ~2048;
|
pSprite->flags &= ~2048;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateWall(int nXWall, SEQFRAME *pFrame)
|
void UpdateWall(int nXWall, SEQFRAME *pFrame)
|
||||||
|
@ -510,7 +510,7 @@ void seqProcess(int a1)
|
||||||
int nSprite = xsprite[nXSprite].reference;
|
int nSprite = xsprite[nXSprite].reference;
|
||||||
dassert(nSprite >= 0 && nSprite < kMaxSprites);
|
dassert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||||
evKill(nSprite, 3);
|
evKill(nSprite, 3);
|
||||||
if ((sprite[nSprite].hitag & 16) && sprite[nSprite].zvel >= 200 && sprite[nSprite].zvel < 254)
|
if ((sprite[nSprite].flags & 16) && sprite[nSprite].inittype >= 200 && sprite[nSprite].inittype < 254)
|
||||||
evPost(nSprite, 3, gGameOptions.nMonsterSettings, (COMMAND_ID)9);
|
evPost(nSprite, 3, gGameOptions.nMonsterSettings, (COMMAND_ID)9);
|
||||||
else
|
else
|
||||||
DeleteSprite(nSprite);
|
DeleteSprite(nSprite);
|
||||||
|
|
|
@ -90,7 +90,7 @@ char SetSpriteState(int nSprite, XSPRITE* pXSprite, int nState)
|
||||||
pXSprite->busy = nState << 16;
|
pXSprite->busy = nState << 16;
|
||||||
pXSprite->state = nState;
|
pXSprite->state = nState;
|
||||||
evKill(nSprite, 3);
|
evKill(nSprite, 3);
|
||||||
if ((sprite[nSprite].hitag & 16) != 0 && sprite[nSprite].zvel >= kDudeBase && sprite[nSprite].zvel < kDudeMax)
|
if ((sprite[nSprite].flags & 16) != 0 && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||||
{
|
{
|
||||||
pXSprite->respawnPending = 3;
|
pXSprite->respawnPending = 3;
|
||||||
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, CALLBACK_ID_9);
|
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, CALLBACK_ID_9);
|
||||||
|
@ -115,7 +115,7 @@ char modernTypeSetSpriteState(int nSprite, XSPRITE *pXSprite, int nState)
|
||||||
pXSprite->busy = nState<<16;
|
pXSprite->busy = nState<<16;
|
||||||
pXSprite->state = nState;
|
pXSprite->state = nState;
|
||||||
evKill(nSprite, 3);
|
evKill(nSprite, 3);
|
||||||
if ((sprite[nSprite].hitag & 16) != 0 && sprite[nSprite].zvel >= kDudeBase && sprite[nSprite].zvel < kDudeMax)
|
if ((sprite[nSprite].flags & 16) != 0 && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||||
{
|
{
|
||||||
pXSprite->respawnPending = 3;
|
pXSprite->respawnPending = 3;
|
||||||
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, CALLBACK_ID_9);
|
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, CALLBACK_ID_9);
|
||||||
|
@ -315,7 +315,7 @@ void sub_43CF8(spritetype *pSprite, XSPRITE *pXSprite, EVENT a3)
|
||||||
if (!pXSprite->stateTimer)
|
if (!pXSprite->stateTimer)
|
||||||
{
|
{
|
||||||
spritetype *pTarget = &sprite[nTarget];
|
spritetype *pTarget = &sprite[nTarget];
|
||||||
if (pTarget->statnum == 6 && !(pTarget->hitag&32) && pTarget->extra > 0 && pTarget->extra < kMaxXSprites)
|
if (pTarget->statnum == 6 && !(pTarget->flags&32) && pTarget->extra > 0 && pTarget->extra < kMaxXSprites)
|
||||||
{
|
{
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
GetSpriteExtents(pSprite, &top, &bottom);
|
GetSpriteExtents(pSprite, &top, &bottom);
|
||||||
|
@ -474,7 +474,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT a3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// force send command to all TX id in a range
|
// force send command to all TX id in a range
|
||||||
if (pSprite->hitag & kModernTypeFlag1) {
|
if (pSprite->flags & kModernTypeFlag1) {
|
||||||
for (pXSprite->txID = pXSprite->data1; pXSprite->txID <= pXSprite->data4; pXSprite->txID++) {
|
for (pXSprite->txID = pXSprite->data1; pXSprite->txID <= pXSprite->data4; pXSprite->txID++) {
|
||||||
if (pXSprite->txID > 0)
|
if (pXSprite->txID > 0)
|
||||||
evSend(nSprite, 3, pXSprite->txID, (COMMAND_ID)pXSprite->command);
|
evSend(nSprite, 3, pXSprite->txID, (COMMAND_ID)pXSprite->command);
|
||||||
|
@ -493,7 +493,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT a3)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// force send command to all TX id specified in data
|
// force send command to all TX id specified in data
|
||||||
if (pSprite->hitag & kModernTypeFlag1) {
|
if (pSprite->flags & kModernTypeFlag1) {
|
||||||
for (int i = 0; i <= 3; i++) {
|
for (int i = 0; i <= 3; i++) {
|
||||||
if ((pXSprite->txID = GetDataVal(pSprite, i)) > 0)
|
if ((pXSprite->txID = GetDataVal(pSprite, i)) > 0)
|
||||||
evSend(nSprite, 3, pXSprite->txID, (COMMAND_ID)pXSprite->command);
|
evSend(nSprite, 3, pXSprite->txID, (COMMAND_ID)pXSprite->command);
|
||||||
|
@ -575,7 +575,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT a3)
|
||||||
break;
|
break;
|
||||||
case 414:
|
case 414:
|
||||||
if (SetSpriteState(nSprite, pXSprite, 1))
|
if (SetSpriteState(nSprite, pXSprite, 1))
|
||||||
pSprite->hitag |= 7;
|
pSprite->flags |= 7;
|
||||||
break;
|
break;
|
||||||
case 408:
|
case 408:
|
||||||
if (SetSpriteState(nSprite, pXSprite, 0))
|
if (SetSpriteState(nSprite, pXSprite, 0))
|
||||||
|
@ -816,7 +816,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT a3)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 400:
|
case 400:
|
||||||
if (pSprite->hitag&16)
|
if (pSprite->flags&16)
|
||||||
return;
|
return;
|
||||||
fallthrough__;
|
fallthrough__;
|
||||||
case 418:
|
case 418:
|
||||||
|
@ -1022,7 +1022,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT a3)
|
||||||
case COMMAND_ID_21:
|
case COMMAND_ID_21:
|
||||||
|
|
||||||
// force OFF after *all* TX objects reach the goal value
|
// force OFF after *all* TX objects reach the goal value
|
||||||
if (pSprite->hitag == 0 && goalValueIsReached(pXSprite)) {
|
if (pSprite->flags == 0 && goalValueIsReached(pXSprite)) {
|
||||||
evPost(nSprite, 3, 0, COMMAND_ID_0);
|
evPost(nSprite, 3, 0, COMMAND_ID_0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1189,7 +1189,7 @@ void stopWindOnSectors(XSPRITE* pXSource) {
|
||||||
for (int i = bucketHead[pXSource->txID]; i < bucketHead[pXSource->txID + 1]; i++) {
|
for (int i = bucketHead[pXSource->txID]; i < bucketHead[pXSource->txID + 1]; i++) {
|
||||||
if (rxBucket[i].type != 6) continue;
|
if (rxBucket[i].type != 6) continue;
|
||||||
XSECTOR * pXSector = &xsector[sector[rxBucket[i].index].extra];
|
XSECTOR * pXSector = &xsector[sector[rxBucket[i].index].extra];
|
||||||
if ((pXSector->state == 1 && !pXSector->windAlways) || (sprite[pXSource->reference].hitag & kModernTypeFlag1))
|
if ((pXSector->state == 1 && !pXSector->windAlways) || (sprite[pXSource->reference].flags & kModernTypeFlag1))
|
||||||
pXSector->windVel = 0;
|
pXSector->windVel = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1219,7 +1219,7 @@ void useTeleportTarget(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
if (pXSource->data1 < kMaxPlayers) // relative to connected players
|
if (pXSource->data1 < kMaxPlayers) // relative to connected players
|
||||||
if (pXSource->data1 != (i + 1))
|
if (pXSource->data1 != (i + 1))
|
||||||
continue;
|
continue;
|
||||||
else if (pXSource->data1 < (kDudePlayer1 + kMaxPlayers)) // absolute lotag
|
else if (pXSource->data1 < (kDudePlayer1 + kMaxPlayers)) // absolute type
|
||||||
if (pXSource->data1 >= kDudePlayer1 && (pXSource->data1 + (kDudePlayer1 - 1)) == gPlayer[i].pSprite->type)
|
if (pXSource->data1 >= kDudePlayer1 && (pXSource->data1 + (kDudePlayer1 - 1)) == gPlayer[i].pSprite->type)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1235,7 +1235,7 @@ void useTeleportTarget(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
pSprite->x = pSource->x; pSprite->y = pSource->y;
|
pSprite->x = pSource->x; pSprite->y = pSource->y;
|
||||||
pSprite->z += (sector[pSource->sectnum].floorz - sector[pSprite->sectnum].floorz);
|
pSprite->z += (sector[pSource->sectnum].floorz - sector[pSprite->sectnum].floorz);
|
||||||
|
|
||||||
if (pSource->hitag & kModernTypeFlag1) // force telefrag
|
if (pSource->flags & kModernTypeFlag1) // force telefrag
|
||||||
TeleFrag(pSprite->xvel, pSource->sectnum);
|
TeleFrag(pSprite->xvel, pSource->sectnum);
|
||||||
|
|
||||||
changespritesect((short)pSprite->xvel, pSource->sectnum);
|
changespritesect((short)pSprite->xvel, pSource->sectnum);
|
||||||
|
@ -1255,7 +1255,7 @@ void useTeleportTarget(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
|
|
||||||
if (IsPlayerSprite(pSprite)) {
|
if (IsPlayerSprite(pSprite)) {
|
||||||
|
|
||||||
PLAYER* pPlayer = &gPlayer[pSprite->lotag - kDudePlayer1];
|
PLAYER* pPlayer = &gPlayer[pSprite->type - kDudePlayer1];
|
||||||
playerResetInertia(pPlayer);
|
playerResetInertia(pPlayer);
|
||||||
|
|
||||||
if (pXSource->data2 == 1) {
|
if (pXSource->data2 == 1) {
|
||||||
|
@ -1321,7 +1321,7 @@ void useSectorWindGen(XSPRITE* pXSource, sectortype* pSector) {
|
||||||
nXSector = sector[pXSector->reference].extra;
|
nXSector = sector[pXSector->reference].extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pSource->hitag) {
|
if (pSource->flags) {
|
||||||
pXSector->panAlways = 1;
|
pXSector->panAlways = 1;
|
||||||
pXSector->windAlways = 1;
|
pXSector->windAlways = 1;
|
||||||
} else if (forceWind)
|
} else if (forceWind)
|
||||||
|
@ -1393,7 +1393,7 @@ void useSpriteDamager(XSPRITE* pXSource, spritetype* pSprite) {
|
||||||
if (pXSource->data1 < kMaxPlayers) // relative to connected players
|
if (pXSource->data1 < kMaxPlayers) // relative to connected players
|
||||||
if (pXSource->data1 != (i + 1))
|
if (pXSource->data1 != (i + 1))
|
||||||
continue;
|
continue;
|
||||||
else if (pXSource->data1 < (kDudePlayer1 + kMaxPlayers)) // absolute lotag
|
else if (pXSource->data1 < (kDudePlayer1 + kMaxPlayers)) // absolute type
|
||||||
if (pXSource->data1 >= kDudePlayer1 && (pXSource->data1 + (kDudePlayer1 - 1)) == gPlayer[i].pSprite->type)
|
if (pXSource->data1 >= kDudePlayer1 && (pXSource->data1 + (kDudePlayer1 - 1)) == gPlayer[i].pSprite->type)
|
||||||
continue;
|
continue;
|
||||||
actDamageSprite(sprite[pXSource->reference].xvel, gPlayer[i].pSprite, (DAMAGE_TYPE) dmgType, dmg);
|
actDamageSprite(sprite[pXSource->reference].xvel, gPlayer[i].pSprite, (DAMAGE_TYPE) dmgType, dmg);
|
||||||
|
@ -1525,7 +1525,7 @@ void OperateWall(int nWall, XWALL *pXWall, EVENT a3)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (pWall->lotag) {
|
switch (pWall->type) {
|
||||||
// by NoOne: make 1-Way switch type for walls to work...
|
// by NoOne: make 1-Way switch type for walls to work...
|
||||||
case 21:
|
case 21:
|
||||||
if (VanillaMode()) break;
|
if (VanillaMode()) break;
|
||||||
|
@ -1749,9 +1749,9 @@ void TranslateSector(int nSector, int a2, int a3, int a4, int a5, int a6, int a7
|
||||||
for (int nSprite = headspritesect[nSector]; nSprite >= 0; nSprite = nextspritesect[nSprite])
|
for (int nSprite = headspritesect[nSector]; nSprite >= 0; nSprite = nextspritesect[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
// By NoOne: allow to move markers by sector movements in game if hitag 1 is added in editor.
|
// By NoOne: allow to move markers by sector movements in game if flags 1 is added in editor.
|
||||||
if (pSprite->statnum == 10 || pSprite->statnum == 16) {
|
if (pSprite->statnum == 10 || pSprite->statnum == 16) {
|
||||||
if (!(pSprite->hitag & kModernTypeFlag1)) continue;
|
if (!(pSprite->flags & kModernTypeFlag1)) continue;
|
||||||
}
|
}
|
||||||
x = baseSprite[nSprite].x;
|
x = baseSprite[nSprite].x;
|
||||||
y = baseSprite[nSprite].y;
|
y = baseSprite[nSprite].y;
|
||||||
|
@ -1813,8 +1813,8 @@ void ZTranslateSector(int nSector, XSECTOR *pXSector, int a3, int a4)
|
||||||
viewBackupSpriteLoc(nSprite, pSprite);
|
viewBackupSpriteLoc(nSprite, pSprite);
|
||||||
pSprite->z += pSector->floorz-oldZ;
|
pSprite->z += pSector->floorz-oldZ;
|
||||||
}
|
}
|
||||||
else if (pSprite->hitag&2)
|
else if (pSprite->flags&2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
else if (oldZ <= bottom && !(pSprite->cstat&48))
|
else if (oldZ <= bottom && !(pSprite->cstat&48))
|
||||||
{
|
{
|
||||||
viewBackupSpriteLoc(nSprite, pSprite);
|
viewBackupSpriteLoc(nSprite, pSprite);
|
||||||
|
@ -2090,7 +2090,7 @@ int HDoorBusy(unsigned int nSector, unsigned int a2)
|
||||||
nWave = pXSector->at7_5;
|
nWave = pXSector->at7_5;
|
||||||
spritetype *pSprite1 = &sprite[pXSector->at2c_0];
|
spritetype *pSprite1 = &sprite[pXSector->at2c_0];
|
||||||
spritetype *pSprite2 = &sprite[pXSector->at2e_0];
|
spritetype *pSprite2 = &sprite[pXSector->at2e_0];
|
||||||
TranslateSector(nSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, pSprite1->ang, pSprite2->x, pSprite2->y, pSprite2->ang, pSector->lotag == 616);
|
TranslateSector(nSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, pSprite1->ang, pSprite2->x, pSprite2->y, pSprite2->ang, pSector->type == 616);
|
||||||
ZTranslateSector(nSector, pXSector, a2, nWave);
|
ZTranslateSector(nSector, pXSector, a2, nWave);
|
||||||
pXSector->busy = a2;
|
pXSector->busy = a2;
|
||||||
if (pXSector->command == 5 && pXSector->txID)
|
if (pXSector->command == 5 && pXSector->txID)
|
||||||
|
@ -2117,7 +2117,7 @@ int RDoorBusy(unsigned int nSector, unsigned int a2)
|
||||||
else
|
else
|
||||||
nWave = pXSector->at7_5;
|
nWave = pXSector->at7_5;
|
||||||
spritetype *pSprite = &sprite[pXSector->at2c_0];
|
spritetype *pSprite = &sprite[pXSector->at2c_0];
|
||||||
TranslateSector(nSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), pSprite->x, pSprite->y, pSprite->x, pSprite->y, 0, pSprite->x, pSprite->y, pSprite->ang, pSector->lotag == 617);
|
TranslateSector(nSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), pSprite->x, pSprite->y, pSprite->x, pSprite->y, 0, pSprite->x, pSprite->y, pSprite->ang, pSector->type == 617);
|
||||||
ZTranslateSector(nSector, pXSector, a2, nWave);
|
ZTranslateSector(nSector, pXSector, a2, nWave);
|
||||||
pXSector->busy = a2;
|
pXSector->busy = a2;
|
||||||
if (pXSector->command == 5 && pXSector->txID)
|
if (pXSector->command == 5 && pXSector->txID)
|
||||||
|
@ -2375,7 +2375,7 @@ void OperateSector(unsigned int nSector, XSECTOR *pXSector, EVENT a3)
|
||||||
pXSector->locked = 0;
|
pXSector->locked = 0;
|
||||||
// By NoOne: reset counter sector state and make it work again after unlock, so it can be used again.
|
// By NoOne: reset counter sector state and make it work again after unlock, so it can be used again.
|
||||||
// See callback.cpp for more info.
|
// See callback.cpp for more info.
|
||||||
if (pSector->lotag == kSecCounter) {
|
if (pSector->type == kSecCounter) {
|
||||||
pXSector->state = 0;
|
pXSector->state = 0;
|
||||||
evPost(nSector, 6, 0, CALLBACK_ID_12);
|
evPost(nSector, 6, 0, CALLBACK_ID_12);
|
||||||
}
|
}
|
||||||
|
@ -2383,7 +2383,7 @@ void OperateSector(unsigned int nSector, XSECTOR *pXSector, EVENT a3)
|
||||||
case 8:
|
case 8:
|
||||||
pXSector->locked ^= 1;
|
pXSector->locked ^= 1;
|
||||||
// same as above...
|
// same as above...
|
||||||
if (pSector->lotag == kSecCounter && pXSector->locked != 1) {
|
if (pSector->type == kSecCounter && pXSector->locked != 1) {
|
||||||
pXSector->state = 0;
|
pXSector->state = 0;
|
||||||
evPost(nSector, 6, 0, CALLBACK_ID_12);
|
evPost(nSector, 6, 0, CALLBACK_ID_12);
|
||||||
}
|
}
|
||||||
|
@ -2401,7 +2401,7 @@ void OperateSector(unsigned int nSector, XSECTOR *pXSector, EVENT a3)
|
||||||
pXSector->at1b_3 = 1;
|
pXSector->at1b_3 = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
switch (pSector->lotag)
|
switch (pSector->type)
|
||||||
{
|
{
|
||||||
case 602:
|
case 602:
|
||||||
OperateDoor(nSector, pXSector, a3, BUSYID_1);
|
OperateDoor(nSector, pXSector, a3, BUSYID_1);
|
||||||
|
@ -2493,7 +2493,7 @@ void LinkSector(int nSector, XSECTOR *pXSector, EVENT a3)
|
||||||
{
|
{
|
||||||
sectortype *pSector = §or[nSector];
|
sectortype *pSector = §or[nSector];
|
||||||
int nBusy = GetSourceBusy(a3);
|
int nBusy = GetSourceBusy(a3);
|
||||||
switch (pSector->lotag)
|
switch (pSector->type)
|
||||||
{
|
{
|
||||||
case 602:
|
case 602:
|
||||||
VSpriteBusy(nSector, nBusy);
|
VSpriteBusy(nSector, nBusy);
|
||||||
|
@ -2824,7 +2824,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
if (pSource->type == kModernConcussSprite) {
|
if (pSource->type == kModernConcussSprite) {
|
||||||
/* - Concussing any physics affected sprite with give strength - */
|
/* - Concussing any physics affected sprite with give strength - */
|
||||||
if (type != 3) return;
|
if (type != 3) return;
|
||||||
else if ((sprite[nDest].hitag & kPhysMove) || (sprite[nDest].hitag & kPhysGravity) || isDebris(nDest))
|
else if ((sprite[nDest].flags & kPhysMove) || (sprite[nDest].flags & kPhysGravity) || isDebris(nDest))
|
||||||
useConcussSprite(pXSource, &sprite[nDest]);
|
useConcussSprite(pXSource, &sprite[nDest]);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2881,9 +2881,9 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
/* - data4 = step value - */
|
/* - data4 = step value - */
|
||||||
/* - min > max = sub, min < max = sum - */
|
/* - min > max = sub, min < max = sum - */
|
||||||
|
|
||||||
/* - hitag: 0 = force OFF if goal value was reached for all objects - */
|
/* - flags: 0 = force OFF if goal value was reached for all objects - */
|
||||||
/* - hitag: 2 = force swap min and max if goal value was reached - */
|
/* - flags: 2 = force swap min and max if goal value was reached - */
|
||||||
/* - hitag: 3 = force reset counter - */
|
/* - flags: 3 = force reset counter - */
|
||||||
|
|
||||||
int data = getDataFieldOfObject(type, nDest, pXSource->data1);
|
int data = getDataFieldOfObject(type, nDest, pXSource->data1);
|
||||||
if (data == -65535) return;
|
if (data == -65535) return;
|
||||||
|
@ -2895,7 +2895,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
|
|
||||||
if ((data += pXSource->data4) >= pXSource->data3) {
|
if ((data += pXSource->data4) >= pXSource->data3) {
|
||||||
|
|
||||||
switch (pSource->hitag) {
|
switch (pSource->flags) {
|
||||||
case kModernTypeFlag0:
|
case kModernTypeFlag0:
|
||||||
case kModernTypeFlag1:
|
case kModernTypeFlag1:
|
||||||
if (data > pXSource->data3) data = pXSource->data3;
|
if (data > pXSource->data3) data = pXSource->data3;
|
||||||
|
@ -2920,7 +2920,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
if (data < pXSource->data3) data = pXSource->data3;
|
if (data < pXSource->data3) data = pXSource->data3;
|
||||||
|
|
||||||
if ((data -= pXSource->data4) <= pXSource->data3) {
|
if ((data -= pXSource->data4) <= pXSource->data3) {
|
||||||
switch (pSource->hitag) {
|
switch (pSource->flags) {
|
||||||
case kModernTypeFlag0:
|
case kModernTypeFlag0:
|
||||||
case kModernTypeFlag1:
|
case kModernTypeFlag1:
|
||||||
if (data < pXSource->data3) data = pXSource->data3;
|
if (data < pXSource->data3) data = pXSource->data3;
|
||||||
|
@ -2952,30 +2952,30 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
/* - data3 = sprite data3 - */
|
/* - data3 = sprite data3 - */
|
||||||
/* - data4 = sprite data4 - */
|
/* - data4 = sprite data4 - */
|
||||||
|
|
||||||
/* - hitag: 1 = treat "ignore value" as actual value - */
|
/* - flags: 1 = treat "ignore value" as actual value - */
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 6:
|
case 6:
|
||||||
if ((pSource->hitag & kModernTypeFlag1) || (pXSource->data1 != -1 && pXSource->data1 != 32767))
|
if ((pSource->flags & kModernTypeFlag1) || (pXSource->data1 != -1 && pXSource->data1 != 32767))
|
||||||
setDataValueOfObject(type, nDest, 1, pXSource->data1);
|
setDataValueOfObject(type, nDest, 1, pXSource->data1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if ((pSource->hitag & kModernTypeFlag1) || (pXSource->data1 != -1 && pXSource->data1 != 32767))
|
if ((pSource->flags & kModernTypeFlag1) || (pXSource->data1 != -1 && pXSource->data1 != 32767))
|
||||||
setDataValueOfObject(type, nDest, 1, pXSource->data1);
|
setDataValueOfObject(type, nDest, 1, pXSource->data1);
|
||||||
|
|
||||||
if ((pSource->hitag & kModernTypeFlag1) || (pXSource->data2 != -1 && pXSource->data2 != 32767))
|
if ((pSource->flags & kModernTypeFlag1) || (pXSource->data2 != -1 && pXSource->data2 != 32767))
|
||||||
setDataValueOfObject(type, nDest, 2, pXSource->data2);
|
setDataValueOfObject(type, nDest, 2, pXSource->data2);
|
||||||
|
|
||||||
if ((pSource->hitag & kModernTypeFlag1) || (pXSource->data3 != -1 && pXSource->data3 != 32767))
|
if ((pSource->flags & kModernTypeFlag1) || (pXSource->data3 != -1 && pXSource->data3 != 32767))
|
||||||
setDataValueOfObject(type, nDest, 3, pXSource->data3);
|
setDataValueOfObject(type, nDest, 3, pXSource->data3);
|
||||||
|
|
||||||
if ((pSource->hitag & kModernTypeFlag1) || (pXSource->data4 != -1 && pXSource->data1 != 65535))
|
if ((pSource->flags & kModernTypeFlag1) || (pXSource->data4 != -1 && pXSource->data1 != 65535))
|
||||||
setDataValueOfObject(type, nDest, 4, pXSource->data4);
|
setDataValueOfObject(type, nDest, 4, pXSource->data4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
if ((pSource->hitag & kModernTypeFlag1) || (pXSource->data1 != -1 && pXSource->data1 != 32767))
|
if ((pSource->flags & kModernTypeFlag1) || (pXSource->data1 != -1 && pXSource->data1 != 32767))
|
||||||
setDataValueOfObject(type, nDest, 1, pXSource->data1);
|
setDataValueOfObject(type, nDest, 1, pXSource->data1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3005,7 +3005,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
pXSector->phase = (pXSource->data4 > 255) ? 255 : pXSource->data4;
|
pXSector->phase = (pXSource->data4 > 255) ? 255 : pXSource->data4;
|
||||||
|
|
||||||
// force shadeAlways
|
// force shadeAlways
|
||||||
if (pSource->hitag & kModernTypeFlag1)
|
if (pSource->flags & kModernTypeFlag1)
|
||||||
pXSector->shadeAlways = true;
|
pXSector->shadeAlways = true;
|
||||||
|
|
||||||
// add to shadeList if amplitude was set to 0 previously
|
// add to shadeList if amplitude was set to 0 previously
|
||||||
|
@ -3042,7 +3042,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
if (type != 3 || !IsDudeSprite(&sprite[nDest]) || sprite[nDest].statnum != 6) return;
|
if (type != 3 || !IsDudeSprite(&sprite[nDest]) || sprite[nDest].statnum != 6) return;
|
||||||
spritetype* pSprite = &sprite[nDest]; XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
spritetype* pSprite = &sprite[nDest]; XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
||||||
spritetype* pTarget = NULL; XSPRITE* pXTarget = NULL; int receiveHp = 33 + Random(33);
|
spritetype* pTarget = NULL; XSPRITE* pXTarget = NULL; int receiveHp = 33 + Random(33);
|
||||||
DUDEINFO* pDudeInfo = &dudeInfo[pSprite->lotag - kDudeBase]; int matesPerEnemy = 1;
|
DUDEINFO* pDudeInfo = &dudeInfo[pSprite->type - kDudeBase]; int matesPerEnemy = 1;
|
||||||
|
|
||||||
// dude is burning?
|
// dude is burning?
|
||||||
if (pXSprite->burnTime > 0 && pXSprite->burnSource >= 0 && pXSprite->burnSource < kMaxSprites) {
|
if (pXSprite->burnTime > 0 && pXSprite->burnSource >= 0 && pXSprite->burnSource < kMaxSprites) {
|
||||||
|
@ -3076,12 +3076,12 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
if (pXSource->data4 == 3) {
|
if (pXSource->data4 == 3) {
|
||||||
aiSetTarget(pXSprite, pSprite->x, pSprite->y, pSprite->z);
|
aiSetTarget(pXSprite, pSprite->x, pSprite->y, pSprite->z);
|
||||||
aiSetGenIdleState(pSprite, pXSprite);
|
aiSetGenIdleState(pSprite, pXSprite);
|
||||||
if (pSprite->lotag == kCustomDude)
|
if (pSprite->type == kCustomDude)
|
||||||
removeLeech(leechIsDropped(pSprite));
|
removeLeech(leechIsDropped(pSprite));
|
||||||
}
|
}
|
||||||
else if (pXSource->data4 == 4) {
|
else if (pXSource->data4 == 4) {
|
||||||
aiSetTarget(pXSprite, pPlayer->x, pPlayer->y, pPlayer->z);
|
aiSetTarget(pXSprite, pPlayer->x, pPlayer->y, pPlayer->z);
|
||||||
if (pSprite->lotag == kCustomDude)
|
if (pSprite->type == kCustomDude)
|
||||||
removeLeech(leechIsDropped(pSprite));
|
removeLeech(leechIsDropped(pSprite));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3091,9 +3091,9 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
pTarget = &sprite[pXSprite->target]; pXTarget = &xsprite[pTarget->extra];
|
pTarget = &sprite[pXSprite->target]; pXTarget = &xsprite[pTarget->extra];
|
||||||
|
|
||||||
if (unitCanFly(pSprite) && isMeleeUnit(pTarget) && !unitCanFly(pTarget))
|
if (unitCanFly(pSprite) && isMeleeUnit(pTarget) && !unitCanFly(pTarget))
|
||||||
pSprite->hitag |= 0x0002;
|
pSprite->flags |= 0x0002;
|
||||||
else if (unitCanFly(pSprite))
|
else if (unitCanFly(pSprite))
|
||||||
pSprite->hitag &= ~0x0002;
|
pSprite->flags &= ~0x0002;
|
||||||
|
|
||||||
if (!IsDudeSprite(pTarget) || pXTarget->health < 1 || !dudeCanSeeTarget(pXSprite, pDudeInfo, pTarget)) {
|
if (!IsDudeSprite(pTarget) || pXTarget->health < 1 || !dudeCanSeeTarget(pXSprite, pDudeInfo, pTarget)) {
|
||||||
aiSetTarget(pXSprite, pSprite->x, pSprite->y, pSprite->z);
|
aiSetTarget(pXSprite, pSprite->x, pSprite->y, pSprite->z);
|
||||||
|
@ -3139,7 +3139,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
if (pXMate->data4 > 0 && pXMate->health < pXMate->data4)
|
if (pXMate->data4 > 0 && pXMate->health < pXMate->data4)
|
||||||
actHealDude(pXMate, receiveHp, pXMate->data4);
|
actHealDude(pXMate, receiveHp, pXMate->data4);
|
||||||
else {
|
else {
|
||||||
DUDEINFO* pTDudeInfo = &dudeInfo[pMate->lotag - kDudeBase];
|
DUDEINFO* pTDudeInfo = &dudeInfo[pMate->type - kDudeBase];
|
||||||
if (pXMate->health < pTDudeInfo->startHealth)
|
if (pXMate->health < pTDudeInfo->startHealth)
|
||||||
actHealDude(pXMate, receiveHp, pTDudeInfo->startHealth);
|
actHealDude(pXMate, receiveHp, pTDudeInfo->startHealth);
|
||||||
}
|
}
|
||||||
|
@ -3367,13 +3367,13 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
XSECTOR *pXSector = &xsector[sector[nDest].extra];
|
XSECTOR *pXSector = &xsector[sector[nDest].extra];
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767)) {
|
if (valueIsBetween(pXSource->data3, -1, 32767)) {
|
||||||
sector[nDest].floorpal = pXSource->data3;
|
sector[nDest].floorpal = pXSource->data3;
|
||||||
if (pSource->hitag & kModernTypeFlag1)
|
if (pSource->flags & kModernTypeFlag1)
|
||||||
pXSector->floorpal = pXSource->data3;
|
pXSector->floorpal = pXSource->data3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data4, -1, 65535)) {
|
if (valueIsBetween(pXSource->data4, -1, 65535)) {
|
||||||
sector[nDest].ceilingpal = pXSource->data4;
|
sector[nDest].ceilingpal = pXSource->data4;
|
||||||
if (pSource->hitag & kModernTypeFlag1)
|
if (pSource->flags & kModernTypeFlag1)
|
||||||
pXSector->ceilpal = pXSource->data4;
|
pXSector->ceilpal = pXSource->data4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3407,7 +3407,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
/* - properties changer can change various properties of sprite/wall/sector via TX ID - */
|
/* - properties changer can change various properties of sprite/wall/sector via TX ID - */
|
||||||
/* - data1 = sector underwater status - */
|
/* - data1 = sector underwater status - */
|
||||||
/* - data2 = sector visibility - */
|
/* - data2 = sector visibility - */
|
||||||
/* - data3 = sector ceiling cstat / sprite / wall hitag - */
|
/* - data3 = sector ceiling cstat / sprite / wall flags - */
|
||||||
/* - data4 = sector floor / sprite / wall cstat - */
|
/* - data4 = sector floor / sprite / wall cstat - */
|
||||||
int old = -1;
|
int old = -1;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -3440,11 +3440,11 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
||||||
|
|
||||||
if (valueIsBetween(pXSource->data3, -1, 32767)) {
|
if (valueIsBetween(pXSource->data3, -1, 32767)) {
|
||||||
old = pSprite->hitag; pSprite->hitag = pXSource->data3; // set new hitag
|
old = pSprite->flags; pSprite->flags = pXSource->data3; // set new flags
|
||||||
|
|
||||||
// and handle exceptions
|
// and handle exceptions
|
||||||
if ((old & kHitagFree) && !(pSprite->hitag & kHitagFree)) pSprite->hitag |= kHitagFree;
|
if ((old & kHitagFree) && !(pSprite->flags & kHitagFree)) pSprite->flags |= kHitagFree;
|
||||||
if ((old & kHitagRespawn) && !(pSprite->hitag & kHitagRespawn)) pSprite->hitag |= kHitagRespawn;
|
if ((old & kHitagRespawn) && !(pSprite->flags & kHitagRespawn)) pSprite->flags |= kHitagRespawn;
|
||||||
|
|
||||||
// prepare things for different (debris) physics.
|
// prepare things for different (debris) physics.
|
||||||
if (pSprite->statnum == 4 && debrisGetFreeIndex() >= 0) thing2debris = true;
|
if (pSprite->statnum == 4 && debrisGetFreeIndex() >= 0) thing2debris = true;
|
||||||
|
@ -3459,19 +3459,19 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
case 16: // path marker
|
case 16: // path marker
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// store physics attributes in xsprite to avoid setting hitag for modern types!
|
// store physics attributes in xsprite to avoid setting flags for modern types!
|
||||||
int flags = (pXSprite->physAttr != 0) ? pXSprite->physAttr : 0;
|
int flags = (pXSprite->physAttr != 0) ? pXSprite->physAttr : 0;
|
||||||
|
|
||||||
if (thing2debris) {
|
if (thing2debris) {
|
||||||
|
|
||||||
// converting thing to debris
|
// converting thing to debris
|
||||||
if ((pSprite->hitag & kPhysMove) != 0) flags |= kPhysMove;
|
if ((pSprite->flags & kPhysMove) != 0) flags |= kPhysMove;
|
||||||
else flags &= ~kPhysMove;
|
else flags &= ~kPhysMove;
|
||||||
|
|
||||||
if ((pSprite->hitag & kPhysGravity) != 0) flags |= (kPhysGravity | kPhysFalling);
|
if ((pSprite->flags & kPhysGravity) != 0) flags |= (kPhysGravity | kPhysFalling);
|
||||||
else flags &= ~(kPhysGravity | kPhysFalling);
|
else flags &= ~(kPhysGravity | kPhysFalling);
|
||||||
|
|
||||||
pSprite->hitag &= ~(kPhysMove | kPhysGravity | kPhysFalling);
|
pSprite->flags &= ~(kPhysMove | kPhysGravity | kPhysFalling);
|
||||||
xvel[nDest] = yvel[nDest] = zvel[nDest] = 0; pXSprite->restState = pXSprite->state;
|
xvel[nDest] = yvel[nDest] = zvel[nDest] = 0; pXSprite->restState = pXSprite->state;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -3549,7 +3549,7 @@ void pastePropertiesInObj(int type, int nDest, EVENT event) {
|
||||||
} else if (nIndex != -1) {
|
} else if (nIndex != -1) {
|
||||||
pXSprite->physAttr = flags;
|
pXSprite->physAttr = flags;
|
||||||
xvel[nDest] = yvel[nDest] = zvel[nDest] = 0;
|
xvel[nDest] = yvel[nDest] = zvel[nDest] = 0;
|
||||||
if (pSprite->lotag >= kThingBase && pSprite->lotag < kThingMax)
|
if (pSprite->type >= kThingBase && pSprite->type < kThingMax)
|
||||||
changespritestat(nDest, 4); // if it was a thing - restore statnum
|
changespritestat(nDest, 4); // if it was a thing - restore statnum
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3869,7 +3869,7 @@ bool getDudesForTargetChg(XSPRITE* pXSprite) {
|
||||||
void disturbDudesInSight(spritetype* pSprite, int max) {
|
void disturbDudesInSight(spritetype* pSprite, int max) {
|
||||||
spritetype* pDude = NULL; XSPRITE* pXDude = NULL;
|
spritetype* pDude = NULL; XSPRITE* pXDude = NULL;
|
||||||
XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
XSPRITE* pXSprite = &xsprite[pSprite->extra];
|
||||||
DUDEINFO* pDudeInfo = &dudeInfo[pSprite->lotag - kDudeBase];
|
DUDEINFO* pDudeInfo = &dudeInfo[pSprite->type - kDudeBase];
|
||||||
for (int nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
for (int nSprite = headspritestat[6]; nSprite >= 0; nSprite = nextspritestat[nSprite]) {
|
||||||
pDude = &sprite[nSprite];
|
pDude = &sprite[nSprite];
|
||||||
if (pDude->xvel == pSprite->xvel || !IsDudeSprite(pDude) || pDude->extra < 0)
|
if (pDude->xvel == pSprite->xvel || !IsDudeSprite(pDude) || pDude->extra < 0)
|
||||||
|
@ -3944,7 +3944,7 @@ bool IsKillableDude(spritetype* pSprite) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isAnnoyingUnit(spritetype* pDude) {
|
bool isAnnoyingUnit(spritetype* pDude) {
|
||||||
switch (pDude->lotag) {
|
switch (pDude->type) {
|
||||||
case 212: // hand
|
case 212: // hand
|
||||||
case 213: // brown spider
|
case 213: // brown spider
|
||||||
case 214: // red spider
|
case 214: // red spider
|
||||||
|
@ -3965,7 +3965,7 @@ bool isAnnoyingUnit(spritetype* pDude) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool unitCanFly(spritetype* pDude) {
|
bool unitCanFly(spritetype* pDude) {
|
||||||
switch (pDude->lotag) {
|
switch (pDude->type) {
|
||||||
case 219: // bat
|
case 219: // bat
|
||||||
case 206: // gargoyle
|
case 206: // gargoyle
|
||||||
case 207: // stone gargoyle
|
case 207: // stone gargoyle
|
||||||
|
@ -3977,7 +3977,7 @@ bool unitCanFly(spritetype* pDude) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isMeleeUnit(spritetype* pDude) {
|
bool isMeleeUnit(spritetype* pDude) {
|
||||||
switch (pDude->lotag) {
|
switch (pDude->type) {
|
||||||
case 203: // axe zombie
|
case 203: // axe zombie
|
||||||
case 205: // earth zombie
|
case 205: // earth zombie
|
||||||
case 206: // gargoyle
|
case 206: // gargoyle
|
||||||
|
@ -4042,8 +4042,8 @@ void ProcessMotion(void)
|
||||||
for (int nSprite = headspritesect[nSector]; nSprite >= 0; nSprite = nextspritesect[nSprite])
|
for (int nSprite = headspritesect[nSector]; nSprite >= 0; nSprite = nextspritesect[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&2)
|
if (pSprite->flags&2)
|
||||||
pSprite->hitag |= 4;
|
pSprite->flags |= 4;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int top, bottom;
|
int top, bottom;
|
||||||
|
@ -4153,13 +4153,13 @@ void trInit(void)
|
||||||
{
|
{
|
||||||
if (sprite[i].statnum < kStatFree)
|
if (sprite[i].statnum < kStatFree)
|
||||||
{
|
{
|
||||||
sprite[i].zvel = sprite[i].type;
|
sprite[i].inittype = sprite[i].type;
|
||||||
baseSprite[i].x = sprite[i].x;
|
baseSprite[i].x = sprite[i].x;
|
||||||
baseSprite[i].y = sprite[i].y;
|
baseSprite[i].y = sprite[i].y;
|
||||||
baseSprite[i].z = sprite[i].z;
|
baseSprite[i].z = sprite[i].z;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprite[i].zvel = -1;
|
sprite[i].inittype = -1;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < numwalls; i++)
|
for (int i = 0; i < numwalls; i++)
|
||||||
{
|
{
|
||||||
|
@ -4185,7 +4185,7 @@ void trInit(void)
|
||||||
XSECTOR *pXSector = &xsector[nXSector];
|
XSECTOR *pXSector = &xsector[nXSector];
|
||||||
if (pXSector->state)
|
if (pXSector->state)
|
||||||
pXSector->busy = 65536;
|
pXSector->busy = 65536;
|
||||||
switch (pSector->lotag)
|
switch (pSector->type)
|
||||||
{
|
{
|
||||||
case kSecCounter:
|
case kSecCounter:
|
||||||
//By NoOne: no need to trigger once it, instead lock so it can be unlocked and used again.
|
//By NoOne: no need to trigger once it, instead lock so it can be unlocked and used again.
|
||||||
|
@ -4201,7 +4201,7 @@ void trInit(void)
|
||||||
{
|
{
|
||||||
spritetype *pSprite1 = &sprite[pXSector->at2c_0];
|
spritetype *pSprite1 = &sprite[pXSector->at2c_0];
|
||||||
spritetype *pSprite2 = &sprite[pXSector->at2e_0];
|
spritetype *pSprite2 = &sprite[pXSector->at2e_0];
|
||||||
TranslateSector(i, 0, -65536, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, pSprite1->ang, pSprite2->x, pSprite2->y, pSprite2->ang, pSector->lotag == 616);
|
TranslateSector(i, 0, -65536, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, pSprite1->ang, pSprite2->x, pSprite2->y, pSprite2->ang, pSector->type == 616);
|
||||||
for (int j = 0; j < pSector->wallnum; j++)
|
for (int j = 0; j < pSector->wallnum; j++)
|
||||||
{
|
{
|
||||||
baseWall[pSector->wallptr+j].x = wall[pSector->wallptr+j].x;
|
baseWall[pSector->wallptr+j].x = wall[pSector->wallptr+j].x;
|
||||||
|
@ -4213,7 +4213,7 @@ void trInit(void)
|
||||||
baseSprite[nSprite].y = sprite[nSprite].y;
|
baseSprite[nSprite].y = sprite[nSprite].y;
|
||||||
baseSprite[nSprite].z = sprite[nSprite].z;
|
baseSprite[nSprite].z = sprite[nSprite].z;
|
||||||
}
|
}
|
||||||
TranslateSector(i, 0, pXSector->busy, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, pSprite1->ang, pSprite2->x, pSprite2->y, pSprite2->ang, pSector->lotag == 616);
|
TranslateSector(i, 0, pXSector->busy, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, pSprite1->ang, pSprite2->x, pSprite2->y, pSprite2->ang, pSector->type == 616);
|
||||||
ZTranslateSector(i, pXSector, pXSector->busy, 1);
|
ZTranslateSector(i, pXSector, pXSector->busy, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4221,7 +4221,7 @@ void trInit(void)
|
||||||
case 617:
|
case 617:
|
||||||
{
|
{
|
||||||
spritetype *pSprite1 = &sprite[pXSector->at2c_0];
|
spritetype *pSprite1 = &sprite[pXSector->at2c_0];
|
||||||
TranslateSector(i, 0, -65536, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, 0, pSprite1->x, pSprite1->y, pSprite1->ang, pSector->lotag == 617);
|
TranslateSector(i, 0, -65536, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, 0, pSprite1->x, pSprite1->y, pSprite1->ang, pSector->type == 617);
|
||||||
for (int j = 0; j < pSector->wallnum; j++)
|
for (int j = 0; j < pSector->wallnum; j++)
|
||||||
{
|
{
|
||||||
baseWall[pSector->wallptr+j].x = wall[pSector->wallptr+j].x;
|
baseWall[pSector->wallptr+j].x = wall[pSector->wallptr+j].x;
|
||||||
|
@ -4233,7 +4233,7 @@ void trInit(void)
|
||||||
baseSprite[nSprite].y = sprite[nSprite].y;
|
baseSprite[nSprite].y = sprite[nSprite].y;
|
||||||
baseSprite[nSprite].z = sprite[nSprite].z;
|
baseSprite[nSprite].z = sprite[nSprite].z;
|
||||||
}
|
}
|
||||||
TranslateSector(i, 0, pXSector->busy, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, 0, pSprite1->x, pSprite1->y, pSprite1->ang, pSector->lotag == 617);
|
TranslateSector(i, 0, pXSector->busy, pSprite1->x, pSprite1->y, pSprite1->x, pSprite1->y, 0, pSprite1->x, pSprite1->y, pSprite1->ang, pSector->type == 617);
|
||||||
ZTranslateSector(i, pXSector, pXSector->busy, 1);
|
ZTranslateSector(i, pXSector, pXSector->busy, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4283,9 +4283,9 @@ void trInit(void)
|
||||||
break;
|
break;
|
||||||
case 414:
|
case 414:
|
||||||
if (pXSprite->state)
|
if (pXSprite->state)
|
||||||
sprite[i].hitag |= 7;
|
sprite[i].flags |= 7;
|
||||||
else
|
else
|
||||||
sprite[i].hitag &= ~7;
|
sprite[i].flags &= ~7;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pXSprite->Vector)
|
if (pXSprite->Vector)
|
||||||
|
@ -4377,7 +4377,7 @@ void ActivateGenerator(int nSprite)
|
||||||
if (pXSprite->dropMsg > 0) {
|
if (pXSprite->dropMsg > 0) {
|
||||||
for (short nItem = headspritestat[3]; nItem >= 0; nItem = nextspritestat[nItem]) {
|
for (short nItem = headspritestat[3]; nItem >= 0; nItem = nextspritestat[nItem]) {
|
||||||
spritetype* pItem = &sprite[nItem];
|
spritetype* pItem = &sprite[nItem];
|
||||||
if (pItem->lotag == pXSprite->dropMsg && pItem->x == pSprite->x && pItem->y == pSprite->y && pItem->z == pSprite->z) {
|
if (pItem->type == pXSprite->dropMsg && pItem->x == pSprite->x && pItem->y == pSprite->y && pItem->z == pSprite->z) {
|
||||||
gFX.fxSpawn((FX_ID)29, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
gFX.fxSpawn((FX_ID)29, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
deletesprite(nItem);
|
deletesprite(nItem);
|
||||||
break;
|
break;
|
||||||
|
@ -4498,7 +4498,7 @@ void UniMissileTrapSeqCallback(int, int nXSprite)
|
||||||
if (pMissile != NULL) {
|
if (pMissile != NULL) {
|
||||||
|
|
||||||
// inherit some properties of the generator
|
// inherit some properties of the generator
|
||||||
if (pSprite->hitag & kModernTypeFlag1) {
|
if (pSprite->flags & kModernTypeFlag1) {
|
||||||
|
|
||||||
pMissile->xrepeat = pSprite->xrepeat;
|
pMissile->xrepeat = pSprite->xrepeat;
|
||||||
pMissile->yrepeat = pSprite->yrepeat;
|
pMissile->yrepeat = pSprite->yrepeat;
|
||||||
|
|
|
@ -258,7 +258,7 @@ void viewInitializePrediction(void)
|
||||||
predict.at54 = gMe->pSprite->y;
|
predict.at54 = gMe->pSprite->y;
|
||||||
predict.at58 = gMe->pSprite->z;
|
predict.at58 = gMe->pSprite->z;
|
||||||
predict.at68 = gMe->pSprite->sectnum;
|
predict.at68 = gMe->pSprite->sectnum;
|
||||||
predict.at73 = gMe->pSprite->hitag;
|
predict.at73 = gMe->pSprite->flags;
|
||||||
predict.at5c = xvel[gMe->pSprite->index];
|
predict.at5c = xvel[gMe->pSprite->index];
|
||||||
predict.at60 = yvel[gMe->pSprite->index];
|
predict.at60 = yvel[gMe->pSprite->index];
|
||||||
predict.at64 = zvel[gMe->pSprite->index];
|
predict.at64 = zvel[gMe->pSprite->index];
|
||||||
|
@ -608,7 +608,7 @@ void fakeMoveDude(spritetype *pSprite)
|
||||||
if (nSector == -1)
|
if (nSector == -1)
|
||||||
nSector = predict.at68;
|
nSector = predict.at68;
|
||||||
|
|
||||||
if (sector[nSector].lotag >= 612 && sector[nSector].lotag <= 617)
|
if (sector[nSector].type >= 612 && sector[nSector].type <= 617)
|
||||||
{
|
{
|
||||||
short nSector2 = nSector;
|
short nSector2 = nSector;
|
||||||
pushmove_old((int32_t*)&predict.at50, (int32_t*)&predict.at54, (int32_t*)&predict.at58, &nSector2, wd, tz, bz, CLIPMASK0);
|
pushmove_old((int32_t*)&predict.at50, (int32_t*)&predict.at54, (int32_t*)&predict.at58, &nSector2, wd, tz, bz, CLIPMASK0);
|
||||||
|
@ -2176,7 +2176,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
||||||
}
|
}
|
||||||
|
|
||||||
int nSprite = pTSprite->owner;
|
int nSprite = pTSprite->owner;
|
||||||
if (gViewInterpolate && TestBitString(gInterpolateSprite, nSprite) && !(pTSprite->hitag&512))
|
if (gViewInterpolate && TestBitString(gInterpolateSprite, nSprite) && !(pTSprite->flags&512))
|
||||||
{
|
{
|
||||||
LOCATION *pPrevLoc = &gPrevSpriteLoc[nSprite];
|
LOCATION *pPrevLoc = &gPrevSpriteLoc[nSprite];
|
||||||
pTSprite->x = interpolate(pPrevLoc->x, pTSprite->x, gInterpolate);
|
pTSprite->x = interpolate(pPrevLoc->x, pTSprite->x, gInterpolate);
|
||||||
|
@ -2267,7 +2267,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
||||||
// Can be overridden by def script
|
// Can be overridden by def script
|
||||||
if (usevoxels && gDetail >= 4 && videoGetRenderMode() != REND_POLYMER && tiletovox[pTSprite->picnum] == -1 && voxelIndex[pTSprite->picnum] != -1)
|
if (usevoxels && gDetail >= 4 && videoGetRenderMode() != REND_POLYMER && tiletovox[pTSprite->picnum] == -1 && voxelIndex[pTSprite->picnum] != -1)
|
||||||
{
|
{
|
||||||
if ((pTSprite->hitag&16) == 0)
|
if ((pTSprite->flags&16) == 0)
|
||||||
{
|
{
|
||||||
pTSprite->cstat |= 48;
|
pTSprite->cstat |= 48;
|
||||||
pTSprite->cstat &= ~(4|8);
|
pTSprite->cstat &= ~(4|8);
|
||||||
|
@ -2327,7 +2327,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
||||||
}
|
}
|
||||||
nShade += tileShade[pTSprite->picnum];
|
nShade += tileShade[pTSprite->picnum];
|
||||||
pTSprite->shade = ClipRange(nShade, -128, 127);
|
pTSprite->shade = ClipRange(nShade, -128, 127);
|
||||||
if ((pTSprite->hitag&16) && sprite[pTSprite->owner].owner == 3)
|
if ((pTSprite->flags&16) && sprite[pTSprite->owner].owner == 3)
|
||||||
{
|
{
|
||||||
dassert(pTXSprite != NULL);
|
dassert(pTXSprite != NULL);
|
||||||
pTSprite->xrepeat = 48;
|
pTSprite->xrepeat = 48;
|
||||||
|
@ -2350,15 +2350,15 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
||||||
{
|
{
|
||||||
pTSprite->shade = ClipRange(pTSprite->shade-16-QRandom(8), -128, 127);
|
pTSprite->shade = ClipRange(pTSprite->shade-16-QRandom(8), -128, 127);
|
||||||
}
|
}
|
||||||
if (pTSprite->hitag&256)
|
if (pTSprite->flags&256)
|
||||||
{
|
{
|
||||||
viewAddEffect(nTSprite, VIEW_EFFECT_6);
|
viewAddEffect(nTSprite, VIEW_EFFECT_6);
|
||||||
}
|
}
|
||||||
if (pTSprite->hitag&1024)
|
if (pTSprite->flags&1024)
|
||||||
{
|
{
|
||||||
pTSprite->cstat |= 4;
|
pTSprite->cstat |= 4;
|
||||||
}
|
}
|
||||||
if (pTSprite->hitag&2048)
|
if (pTSprite->flags&2048)
|
||||||
{
|
{
|
||||||
pTSprite->cstat |= 8;
|
pTSprite->cstat |= 8;
|
||||||
}
|
}
|
||||||
|
@ -2620,7 +2620,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
||||||
{
|
{
|
||||||
pTSprite->pal = pSector->floorpal;
|
pTSprite->pal = pSector->floorpal;
|
||||||
}
|
}
|
||||||
if (pTSprite->hitag&1)
|
if (pTSprite->flags&1)
|
||||||
{
|
{
|
||||||
if (getflorzofslope(pTSprite->sectnum, pTSprite->x, pTSprite->y) >= cZ)
|
if (getflorzofslope(pTSprite->sectnum, pTSprite->x, pTSprite->y) >= cZ)
|
||||||
{
|
{
|
||||||
|
|
|
@ -327,9 +327,9 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
continue;
|
continue;
|
||||||
if (!gGameOptions.bFriendlyFire && IsTargetTeammate(pPlayer, pSprite))
|
if (!gGameOptions.bFriendlyFire && IsTargetTeammate(pPlayer, pSprite))
|
||||||
continue;
|
continue;
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
if (!(pSprite->hitag&8))
|
if (!(pSprite->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite->x;
|
int x2 = pSprite->x;
|
||||||
int y2 = pSprite->y;
|
int y2 = pSprite->y;
|
||||||
|
@ -383,7 +383,7 @@ void UpdateAimVector(PLAYER * pPlayer)
|
||||||
pSprite = &sprite[nSprite];
|
pSprite = &sprite[nSprite];
|
||||||
if (!gGameOptions.bFriendlyFire && IsTargetTeammate(pPlayer, pSprite))
|
if (!gGameOptions.bFriendlyFire && IsTargetTeammate(pPlayer, pSprite))
|
||||||
continue;
|
continue;
|
||||||
if (!(pSprite->hitag&8))
|
if (!(pSprite->flags&8))
|
||||||
continue;
|
continue;
|
||||||
int x2 = pSprite->x;
|
int x2 = pSprite->x;
|
||||||
int y2 = pSprite->y;
|
int y2 = pSprite->y;
|
||||||
|
@ -2469,7 +2469,7 @@ void sub_51340(spritetype *pMissile, int a2)
|
||||||
if (nSprite != nOwner || v4)
|
if (nSprite != nOwner || v4)
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
if (TestBitString(va4, pSprite->sectnum) && CheckProximity(pSprite, x, y, z, nSector, nDist))
|
if (TestBitString(va4, pSprite->sectnum) && CheckProximity(pSprite, x, y, z, nSector, nDist))
|
||||||
{
|
{
|
||||||
|
@ -2485,7 +2485,7 @@ void sub_51340(spritetype *pMissile, int a2)
|
||||||
for (int nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
for (int nSprite = headspritestat[4]; nSprite >= 0; nSprite = nextspritestat[nSprite])
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &sprite[nSprite];
|
spritetype *pSprite = &sprite[nSprite];
|
||||||
if (pSprite->hitag&32)
|
if (pSprite->flags&32)
|
||||||
continue;
|
continue;
|
||||||
if (TestBitString(va4, pSprite->sectnum) && CheckProximity(pSprite, x, y, z, nSector, nDist))
|
if (TestBitString(va4, pSprite->sectnum) && CheckProximity(pSprite, x, y, z, nSector, nDist))
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,10 @@ typedef struct
|
||||||
StructTracker(Sector, int8_t) floorshade;
|
StructTracker(Sector, int8_t) floorshade;
|
||||||
StructTracker(Sector, uint8_t) floorpal, floorxpanning, floorypanning;
|
StructTracker(Sector, uint8_t) floorpal, floorxpanning, floorypanning;
|
||||||
StructTracker(Sector, uint8_t) /*CM_CEILINGZ:*/ visibility, fogpal;
|
StructTracker(Sector, uint8_t) /*CM_CEILINGZ:*/ visibility, fogpal;
|
||||||
StructTracker(Sector, int16_t) lotag, hitag;
|
union {
|
||||||
|
StructTracker(Sector, int16_t) lotag, type;
|
||||||
|
};
|
||||||
|
StructTracker(Sector, int16_t) hitag;
|
||||||
StructTracker(Sector, int16_t) extra;
|
StructTracker(Sector, int16_t) extra;
|
||||||
} StructName(sectortypev7);
|
} StructName(sectortypev7);
|
||||||
|
|
||||||
|
@ -83,7 +86,10 @@ typedef struct
|
||||||
StructTracker(Wall, int16_t) picnum, overpicnum;
|
StructTracker(Wall, int16_t) picnum, overpicnum;
|
||||||
StructTracker(Wall, int8_t) shade;
|
StructTracker(Wall, int8_t) shade;
|
||||||
StructTracker(Wall, uint8_t) pal, xrepeat, yrepeat, xpanning, ypanning;
|
StructTracker(Wall, uint8_t) pal, xrepeat, yrepeat, xpanning, ypanning;
|
||||||
StructTracker(Wall, int16_t) lotag, hitag;
|
union {
|
||||||
|
StructTracker(Wall, int16_t) lotag, type;
|
||||||
|
};
|
||||||
|
StructTracker(Wall, int16_t) hitag;
|
||||||
StructTracker(Wall, int16_t) extra;
|
StructTracker(Wall, int16_t) extra;
|
||||||
} StructName(walltypev7);
|
} StructName(walltypev7);
|
||||||
|
|
||||||
|
@ -183,18 +189,21 @@ typedef struct
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
StructTracker(Sprite, int16_t) xvel;
|
StructTracker(Sprite, int16_t) xvel, index;
|
||||||
StructTracker(Sprite, int16_t) index;
|
};
|
||||||
|
StructTracker(Sprite, int16_t) yvel;
|
||||||
|
union {
|
||||||
|
StructTracker(Sprite, int16_t) zvel, inittype;
|
||||||
};
|
};
|
||||||
StructTracker(Sprite, int16_t) yvel, zvel;
|
|
||||||
};
|
};
|
||||||
vec3_16_t vel;
|
vec3_16_t vel;
|
||||||
};
|
};
|
||||||
union {
|
union {
|
||||||
StructTracker(Sprite, int16_t) lotag;
|
StructTracker(Sprite, int16_t) lotag, type;
|
||||||
StructTracker(Sprite, int16_t) type;
|
};
|
||||||
|
union {
|
||||||
|
StructTracker(Sprite, int16_t) hitag, flags;
|
||||||
};
|
};
|
||||||
StructTracker(Sprite, int16_t) hitag;
|
|
||||||
StructTracker(Sprite, int16_t) extra;
|
StructTracker(Sprite, int16_t) extra;
|
||||||
} StructName(spritetypev7);
|
} StructName(spritetypev7);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue