mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-19 15:31:57 +00:00
- replaced all set_native_clipdist in Blood
This commit is contained in:
parent
ed5b35453a
commit
84dfe98f17
7 changed files with 19 additions and 14 deletions
|
@ -2383,7 +2383,7 @@ static void actInitThings()
|
|||
// but what if it have voxel model...?
|
||||
if (!gModernMap)
|
||||
#endif
|
||||
act->set_native_clipdist(thingInfo[nType].clipdist);
|
||||
act->clipdist = thingInfo[nType].fClipdist();
|
||||
|
||||
act->spr.flags = thingInfo[nType].flags;
|
||||
if (act->spr.flags & kPhysGravity) act->spr.flags |= kPhysFalling;
|
||||
|
@ -2480,12 +2480,12 @@ static void actInitDudes()
|
|||
if (gModernMap) break;
|
||||
[[fallthrough]];
|
||||
default:
|
||||
act->set_native_clipdist(dudeInfo[nType].clipdist);
|
||||
act->clipdist = dudeInfo[nType].fClipdist();
|
||||
act->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
|
||||
break;
|
||||
}
|
||||
#else
|
||||
act->set_native_clipdist(dudeInfo[nType].clipdist);
|
||||
act->clipdist = dudeInfo[nType].fClipdist();
|
||||
act->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
|
||||
#endif
|
||||
|
||||
|
@ -6190,7 +6190,7 @@ DBloodActor* actSpawnDude(DBloodActor* source, int nType, double dist)
|
|||
SetActor(spawned, pos);
|
||||
|
||||
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_BLOOD_BIT1;
|
||||
spawned->set_native_clipdist(getDudeInfo(nDude + kDudeBase)->clipdist);
|
||||
spawned->clipdist = getDudeInfo(nDude + kDudeBase)->fClipdist();
|
||||
spawned->xspr.health = getDudeInfo(nDude + kDudeBase)->startHealth << 4;
|
||||
spawned->xspr.respawn = 1;
|
||||
if (getSequence(getDudeInfo(nDude + kDudeBase)->seqStartID))
|
||||
|
@ -6247,7 +6247,7 @@ DBloodActor* actSpawnThing(sectortype* pSector, const DVector3& pos, int nThingT
|
|||
assert(actor->hasX());
|
||||
const THINGINFO* pThingInfo = &thingInfo[nType];
|
||||
actor->xspr.health = pThingInfo->startHealth << 4;
|
||||
actor->set_native_clipdist(pThingInfo->clipdist);
|
||||
actor->clipdist = pThingInfo->fClipdist();
|
||||
actor->spr.flags = pThingInfo->flags;
|
||||
if (actor->spr.flags & 2) actor->spr.flags |= 4;
|
||||
actor->spr.cstat |= pThingInfo->cstat;
|
||||
|
@ -6466,7 +6466,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, double xyoff, double zoff, DVect
|
|||
spawned->spr.type = nType;
|
||||
spawned->spr.shade = pMissileInfo->shade;
|
||||
spawned->spr.pal = 0;
|
||||
spawned->set_native_clipdist(pMissileInfo->clipDist);
|
||||
spawned->clipdist = pMissileInfo->fClipDist();
|
||||
spawned->spr.flags = 1;
|
||||
spawned->spr.xrepeat = pMissileInfo->xrepeat;
|
||||
spawned->spr.yrepeat = pMissileInfo->yrepeat;
|
||||
|
|
|
@ -79,6 +79,8 @@ struct THINGINFO
|
|||
uint8_t xrepeat; // xrepeat
|
||||
uint8_t yrepeat; // yrepeat
|
||||
int dmgControl[kDamageMax]; // damage
|
||||
|
||||
double fClipdist() const { return clipdist * 0.25; }
|
||||
};
|
||||
|
||||
struct AMMOITEMDATA
|
||||
|
|
|
@ -1880,7 +1880,7 @@ DBloodActor* genDudeSpawn(DBloodActor* source, DBloodActor* actor, double nDist)
|
|||
spawned->spr.angle = actor->spr.angle;
|
||||
SetActor(spawned, pos);
|
||||
spawned->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_BLOOD_BIT1;
|
||||
spawned->set_native_clipdist(dudeInfo[nType - kDudeBase].clipdist);
|
||||
spawned->clipdist = dudeInfo[nType - kDudeBase].fClipdist();
|
||||
|
||||
// inherit weapon, seq and sound settings.
|
||||
spawned->xspr.data1 = source->xspr.data1;
|
||||
|
@ -2476,7 +2476,7 @@ bool genDudePrepare(DBloodActor* actor, int propId)
|
|||
if (!(actor->sector()->floorstat & CSTAT_SECTOR_SKY))
|
||||
actor->spr.pos.Z += min(actor->sector()->floorz - zBot, 0.);
|
||||
|
||||
actor->set_native_clipdist(ClipRange((actor->spr.xrepeat + actor->spr.yrepeat) >> 1, 4, 120));
|
||||
actor->clipdist = clamp((actor->spr.xrepeat + actor->spr.yrepeat) * 0.125, 1., 30.);
|
||||
if (propId) break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ void Respawn(DBloodActor* actor, sectortype*) // 9
|
|||
|
||||
switch (actor->spr.type) {
|
||||
default:
|
||||
actor->set_native_clipdist(getDudeInfo(nType + kDudeBase)->clipdist);
|
||||
actor->clipdist = getDudeInfo(nType + kDudeBase)->fClipdist();
|
||||
if (getSequence(getDudeInfo(nType + kDudeBase)->seqStartID))
|
||||
seqSpawn(getDudeInfo(nType + kDudeBase)->seqStartID, actor, -1);
|
||||
break;
|
||||
|
@ -304,7 +304,7 @@ void Respawn(DBloodActor* actor, sectortype*) // 9
|
|||
actor->SetTarget(nullptr);
|
||||
}
|
||||
#else
|
||||
actor->set_native_clipdist(getDudeInfo(nType + kDudeBase)->clipdist);
|
||||
actor->clipdist = getDudeInfo(nType + kDudeBase)->fClipdist();
|
||||
actor->xspr.health = getDudeInfo(nType + kDudeBase)->startHealth << 4;
|
||||
if (getSequence(getDudeInfo(nType + kDudeBase)->seqStartID))
|
||||
seqSpawn(getDudeInfo(nType + kDudeBase)->seqStartID, actor, -1);
|
||||
|
|
|
@ -83,6 +83,9 @@ struct DUDEINFO {
|
|||
{
|
||||
return DAngle::fromQ16(angSpeed << 3);
|
||||
}
|
||||
|
||||
double fClipdist() const { return clipdist * 0.25; }
|
||||
|
||||
};
|
||||
|
||||
extern DUDEINFO dudeInfo[kDudeMax - kDudeBase];
|
||||
|
|
|
@ -274,7 +274,7 @@ static DBloodActor* nnExtSpawnDude(DBloodActor* sourceactor, DBloodActor* origin
|
|||
pDudeActor->spr.angle = angle;
|
||||
|
||||
pDudeActor->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
|
||||
pDudeActor->set_native_clipdist(getDudeInfo(nType)->clipdist);
|
||||
pDudeActor->clipdist = getDudeInfo(nType)->fClipdist();
|
||||
|
||||
pDudeActor->xspr.respawn = 1;
|
||||
pDudeActor->xspr.health = getDudeInfo(nType)->startHealth << 4;
|
||||
|
@ -9187,7 +9187,7 @@ void callbackUniMissileBurst(DBloodActor* actor, sectortype*) // 22
|
|||
}
|
||||
|
||||
burstactor->spr.pal = actor->spr.pal;
|
||||
burstactor->set_native_clipdist(actor->native_clipdist() / 4);
|
||||
burstactor->clipdist = actor->clipdist * 0.25;
|
||||
burstactor->spr.flags = actor->spr.flags;
|
||||
burstactor->spr.xrepeat = actor->spr.xrepeat / 2;
|
||||
burstactor->spr.yrepeat = actor->spr.yrepeat / 2;
|
||||
|
|
|
@ -693,7 +693,7 @@ void playerSetRace(PLAYER* pPlayer, int nLifeMode)
|
|||
pPlayer->lifeMode = nLifeMode;
|
||||
|
||||
// By NoOne: don't forget to change clipdist for grow and shrink modes
|
||||
pPlayer->actor->set_native_clipdist(pDudeInfo->clipdist);
|
||||
pPlayer->actor->clipdist = pDudeInfo->fClipdist();
|
||||
|
||||
for (int i = 0; i < 7; i++)
|
||||
pDudeInfo->damageVal[i] = MulScale(Handicap[gSkill], pDudeInfo->startDamage[i], 8);
|
||||
|
@ -812,7 +812,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
actor->spr.pal = 11 + (pPlayer->teamId & 3);
|
||||
actor->spr.angle = pPlayer->angle.ang = pStartZone->angle;
|
||||
actor->spr.type = kDudePlayer1 + nPlayer;
|
||||
actor->set_native_clipdist(pDudeInfo->clipdist);
|
||||
actor->clipdist = pDudeInfo->fClipdist();
|
||||
actor->spr.flags = 15;
|
||||
actor->xspr.burnTime = 0;
|
||||
actor->SetBurnSource(nullptr);
|
||||
|
|
Loading…
Reference in a new issue