mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
fix cultist respawn time (#220)
# Conflicts: # source/blood/src/actor.cpp
This commit is contained in:
parent
64e116a4b1
commit
70b5e67e6f
5 changed files with 12 additions and 12 deletions
|
@ -3665,7 +3665,7 @@ int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE damageType, in
|
|||
switch (pSprite->statnum) {
|
||||
case kStatDude: {
|
||||
if (!IsDudeSprite(pSprite))
|
||||
ThrowError("Bad Dude Failed: initial=%d type=%d %s\n", (int)pSprite->inittype, (int)pSprite->type, (int)(pSprite->flags & 16) ? "RESPAWN" : "NORMAL");
|
||||
ThrowError("Bad Dude Failed: initial=%d type=%d %s\n", (int)pSprite->inittype, (int)pSprite->type, (int)(pSprite->flags & kHitagRespawn) ? "RESPAWN" : "NORMAL");
|
||||
int nType = pSprite->type - kDudeBase; int nDamageFactor = dudeInfo[nType].at70[damageType];
|
||||
|
||||
if (!nDamageFactor) return 0;
|
||||
|
@ -3709,7 +3709,7 @@ int actDamageSprite(int nSource, spritetype *pSprite, DAMAGE_TYPE damageType, in
|
|||
sprite[pSprite->owner].owner = kMaxSprites - 1; // By NoOne: indicates if custom dude had life leech.
|
||||
break;
|
||||
default:
|
||||
if (!(pSprite->flags & 16))
|
||||
if (!(pSprite->flags & kHitagRespawn))
|
||||
actPropagateSpriteOwner(pSprite, &sprite[nSource]);
|
||||
break;
|
||||
}
|
||||
|
@ -5523,7 +5523,7 @@ void actActivateGibObject(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
sfxPlay3DSound(pSprite->x, pSprite->y, pSprite->z, vbp, pSprite->sectnum);
|
||||
if (v8 > 0)
|
||||
actDropObject(pSprite, v8);
|
||||
if (!(pSprite->cstat&32768) && !(pSprite->flags&16))
|
||||
if (!(pSprite->cstat&32768) && !(pSprite->flags&kHitagRespawn))
|
||||
actPostSprite(pSprite->index, kStatFree);
|
||||
}
|
||||
|
||||
|
@ -6763,7 +6763,7 @@ bool actCheckRespawn(spritetype *pSprite)
|
|||
nRespawnTime = mulscale16(nRespawnTime, 0xa000);
|
||||
pSprite->owner = pSprite->statnum;
|
||||
actPostSprite(pSprite->index, kStatRespawn);
|
||||
pSprite->flags |= 16;
|
||||
pSprite->flags |= kHitagRespawn;
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax))
|
||||
{
|
||||
pSprite->cstat &= ~257;
|
||||
|
|
|
@ -257,7 +257,7 @@ void Respawn(int nSprite) // 9
|
|||
ChangeSpriteStat(nSprite, pSprite->owner);
|
||||
pSprite->type = pSprite->inittype;
|
||||
pSprite->owner = -1;
|
||||
pSprite->flags &= ~16;
|
||||
pSprite->flags &= ~kHitagRespawn;
|
||||
xvel[nSprite] = yvel[nSprite] = zvel[nSprite] = 0;
|
||||
pXSprite->respawnPending = 0;
|
||||
pXSprite->burnTime = 0;
|
||||
|
|
|
@ -514,8 +514,8 @@ void seqProcess(int a1)
|
|||
int nSprite = xsprite[nXSprite].reference;
|
||||
dassert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||
evKill(nSprite, 3);
|
||||
if ((sprite[nSprite].flags & 16) && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||
evPost(nSprite, 3, gGameOptions.nMonsterSettings, kCallbackRespawn);
|
||||
if ((sprite[nSprite].flags & kHitagRespawn) && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, kCallbackRespawn);
|
||||
else
|
||||
DeleteSprite(nSprite);
|
||||
break;
|
||||
|
|
|
@ -91,7 +91,7 @@ char SetSpriteState(int nSprite, XSPRITE* pXSprite, int nState)
|
|||
pXSprite->busy = nState << 16;
|
||||
pXSprite->state = nState;
|
||||
evKill(nSprite, 3);
|
||||
if ((sprite[nSprite].flags & 16) != 0 && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||
if ((sprite[nSprite].flags & kHitagRespawn) != 0 && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||
{
|
||||
pXSprite->respawnPending = 3;
|
||||
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, kCallbackRespawn);
|
||||
|
@ -116,7 +116,7 @@ char modernTypeSetSpriteState(int nSprite, XSPRITE *pXSprite, int nState)
|
|||
pXSprite->busy = nState<<16;
|
||||
pXSprite->state = nState;
|
||||
evKill(nSprite, 3);
|
||||
if ((sprite[nSprite].flags & 16) != 0 && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||
if ((sprite[nSprite].flags & kHitagRespawn) != 0 && sprite[nSprite].inittype >= kDudeBase && sprite[nSprite].inittype < kDudeMax)
|
||||
{
|
||||
pXSprite->respawnPending = 3;
|
||||
evPost(nSprite, 3, gGameOptions.nMonsterRespawnTime, kCallbackRespawn);
|
||||
|
@ -1051,7 +1051,7 @@ void OperateSprite(int nSprite, XSPRITE *pXSprite, EVENT event)
|
|||
}
|
||||
break;
|
||||
case kThingTNTBarrel:
|
||||
if (pSprite->flags&16) return;
|
||||
if (pSprite->flags&kHitagRespawn) return;
|
||||
fallthrough__;
|
||||
case kThingArmedTNTStick:
|
||||
case kThingArmedTNTBundle:
|
||||
|
|
|
@ -2260,7 +2260,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
|||
// Can be overridden by def script
|
||||
if (usevoxels && gDetail >= 4 && videoGetRenderMode() != REND_POLYMER && tiletovox[pTSprite->picnum] == -1 && voxelIndex[pTSprite->picnum] != -1)
|
||||
{
|
||||
if ((pTSprite->flags&16) == 0)
|
||||
if ((pTSprite->flags&kHitagRespawn) == 0)
|
||||
{
|
||||
pTSprite->cstat |= 48;
|
||||
pTSprite->cstat &= ~(4|8);
|
||||
|
@ -2320,7 +2320,7 @@ void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t
|
|||
}
|
||||
nShade += tileShade[pTSprite->picnum];
|
||||
pTSprite->shade = ClipRange(nShade, -128, 127);
|
||||
if ((pTSprite->flags&16) && sprite[pTSprite->owner].owner == 3)
|
||||
if ((pTSprite->flags&kHitagRespawn) && sprite[pTSprite->owner].owner == 3)
|
||||
{
|
||||
dassert(pTXSprite != NULL);
|
||||
pTSprite->xrepeat = 48;
|
||||
|
|
Loading…
Reference in a new issue