mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 03:01:36 +00:00
- wrap clipdist copy
This commit is contained in:
parent
51c059657b
commit
3fc592c505
5 changed files with 17 additions and 12 deletions
|
@ -280,6 +280,11 @@ public:
|
|||
{
|
||||
spr. clipdist = val;
|
||||
}
|
||||
|
||||
void copy_clipdist(DCoreActor* other)
|
||||
{
|
||||
spr. clipdist = other->spr. clipdist;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -2190,7 +2190,7 @@ int ParseState::parse(void)
|
|||
break;
|
||||
case concmd_clipdist:
|
||||
insptr++;
|
||||
g_ac->spr.clipdist = (uint8_t) *insptr;
|
||||
g_ac->spr.clipdist = (uint8_t) *insptr;
|
||||
insptr++;
|
||||
break;
|
||||
case concmd_cstat:
|
||||
|
|
|
@ -812,7 +812,7 @@ void CreatePushBlock(sectortype* pSector)
|
|||
|
||||
sBlockInfo[nBlock].field_8 = mindist * worldtoint;
|
||||
|
||||
pActor->spr.clipdist = (int(mindist * worldtoint) & 0xFF) << 2;
|
||||
pActor->spr.clipdist = (int(mindist * worldtoint) & 0xFF) << 2;
|
||||
pSector->extra = nBlock;
|
||||
}
|
||||
|
||||
|
|
|
@ -1190,7 +1190,7 @@ int SpawnRadiationCloud(DSWActor* actor)
|
|||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = 32;
|
||||
actorNew->spr.yrepeat = 32;
|
||||
actorNew->spr.clipdist = actor->spr.clipdist;
|
||||
actorNew->copy_clipdist(actor);
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
actorNew->user.spal = actorNew->spr.pal = PALETTE_PLAYER6;
|
||||
|
@ -1695,7 +1695,7 @@ int InitCaltrops(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = 64;
|
||||
actorNew->spr.shade = -15;
|
||||
// !FRANK - clipbox must be <= weapon otherwise can clip thru walls
|
||||
actorNew->spr.clipdist = actor->spr.clipdist;
|
||||
actorNew->copy_clipdist(actor);
|
||||
actorNew->user.WeaponNum = actor->user.WeaponNum;
|
||||
actorNew->user.Radius = 200;
|
||||
actorNew->user.ceiling_dist = 3;
|
||||
|
@ -1738,7 +1738,7 @@ int InitPhosphorus(DSWActor* actor)
|
|||
if (actor->spr.clipdist > 0)
|
||||
actorNew->spr.clipdist = actor->spr.clipdist-1;
|
||||
else
|
||||
actorNew->spr.clipdist = actor->spr.clipdist;
|
||||
actorNew->copy_clipdist(actor);
|
||||
actorNew->user.WeaponNum = actor->user.WeaponNum;
|
||||
actorNew->user.Radius = 600;
|
||||
actorNew->user.ceiling_dist = 3;
|
||||
|
@ -1808,7 +1808,7 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
|
|||
actorNew->spr.yrepeat = 64-RandomRange(35);
|
||||
actorNew->spr.xrepeat = 64-RandomRange(35);
|
||||
actorNew->spr.shade = -15;
|
||||
actorNew->spr.clipdist = actor->spr.clipdist;
|
||||
actorNew->copy_clipdist(actor);
|
||||
actorNew->user.WeaponNum = actor->user.WeaponNum;
|
||||
actorNew->user.Radius = 600;
|
||||
actorNew->user.ceiling_dist = 3;
|
||||
|
|
|
@ -9663,7 +9663,7 @@ int SpawnExtraMicroMini(DSWActor* actor)
|
|||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = actor->spr.xrepeat;
|
||||
actorNew->spr.shade = actor->spr.shade;
|
||||
actorNew->spr.clipdist = actor->spr.clipdist;
|
||||
actorNew->copy_clipdist(actor);
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
NewStateGroup(actorNew, &sg_MicroMini[0]);
|
||||
|
@ -10352,7 +10352,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, DAngle ang)
|
|||
expActor->spr.shade = -128;
|
||||
expActor->spr.xrepeat = 218;
|
||||
expActor->spr.yrepeat = 152;
|
||||
expActor->spr.clipdist = actor->spr.clipdist;
|
||||
expActor->copy_clipdist(actor);
|
||||
expActor->user.ceiling_dist = (16);
|
||||
expActor->user.floor_dist = (16);
|
||||
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
|
@ -10415,7 +10415,7 @@ void SpawnNuclearExp(DSWActor* actor)
|
|||
expActor->spr.shade = -128;
|
||||
expActor->spr.xrepeat = 255;
|
||||
expActor->spr.yrepeat = 255;
|
||||
expActor->spr.clipdist = actor->spr.clipdist;
|
||||
expActor->copy_clipdist(actor);
|
||||
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
expActor->user.spal = expActor->spr.pal = PALETTE_PLAYER1; // Set nuke puff to gray
|
||||
|
@ -10646,7 +10646,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, DAngle ang)
|
|||
expActor->spr.shade = -40;
|
||||
expActor->spr.xrepeat = 32;
|
||||
expActor->spr.yrepeat = 32;
|
||||
expActor->spr.clipdist = actor->spr.clipdist;
|
||||
expActor->copy_clipdist(actor);
|
||||
expActor->user.ceiling_dist = (16);
|
||||
expActor->user.floor_dist = (16);
|
||||
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
|
@ -10721,7 +10721,7 @@ void SpawnGrenadeExp(DSWActor* actor)
|
|||
expActor->spr.shade = -40;
|
||||
expActor->spr.xrepeat = 64 + 32;
|
||||
expActor->spr.yrepeat = 64 + 32;
|
||||
expActor->spr.clipdist = actor->spr.clipdist;
|
||||
expActor->copy_clipdist(actor);
|
||||
expActor->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
expActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
expActor->user.Radius = DamageData[DMG_GRENADE_EXP].radius;
|
||||
|
@ -13107,7 +13107,7 @@ int InitStar(PLAYER* pp)
|
|||
actorNew2->spr.shade = actorNew->spr.shade;
|
||||
|
||||
actorNew2->spr.extra = actorNew->spr.extra;
|
||||
actorNew2->spr.clipdist = actorNew->spr.clipdist;
|
||||
actorNew2->copy_clipdist(actorNew);
|
||||
actorNew2->user.WeaponNum = actorNew->user.WeaponNum;
|
||||
actorNew2->user.Radius = actorNew->user.Radius;
|
||||
actorNew2->user.ceiling_dist = actorNew->user.ceiling_dist;
|
||||
|
|
Loading…
Reference in a new issue