mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- started removing wrappers. ScaleX() and ScaleY() done.
No manual changes in here.
This commit is contained in:
parent
4aa765675e
commit
51768439a9
73 changed files with 337 additions and 347 deletions
|
@ -516,7 +516,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
|
|||
const int32_t cosang = bcos(actor->int_ang());
|
||||
const int32_t sinang = bsin(actor->int_ang());
|
||||
vec2_t const span = { tileWidth(tilenum), tileHeight(tilenum) };
|
||||
vec2_t const repeat = { int(actor->spr.ScaleX() * scaletoint), int(actor->spr.ScaleY() * scaletoint) };
|
||||
vec2_t const repeat = { int(actor->spr.scale.X * scaletoint), int(actor->spr.scale.Y * scaletoint) };
|
||||
vec2_t adjofs = { tileLeftOffset(tilenum), tileTopOffset(tilenum) };
|
||||
|
||||
if (actor->spr.cstat & CSTAT_SPRITE_XFLIP)
|
||||
|
|
|
@ -482,7 +482,7 @@ size_t DCoreActor::PropagateMark()
|
|||
|
||||
double DCoreActor::GetOffsetAndHeight(double& height)
|
||||
{
|
||||
double yscale = spr.ScaleY();
|
||||
double yscale = spr.scale.Y;
|
||||
height = tileHeight(spr.picnum) * yscale;
|
||||
double zofs = (spr.cstat & CSTAT_SPRITE_YCENTER) ? height * 0.5 : 0;
|
||||
return zofs - tileTopOffset(spr.picnum) * yscale;
|
||||
|
|
|
@ -645,7 +645,7 @@ void DrawAutomapAlignmentFacing(const spritetype& spr, const DVector2& bpos, con
|
|||
|
||||
void DrawAutomapAlignmentWall(const spritetype& spr, const DVector2& bpos, const DVector2& cangvect, const double czoom, const DVector2& xydim, const PalEntry& col)
|
||||
{
|
||||
auto xrep = spr.ScaleX();
|
||||
auto xrep = spr.scale.X;
|
||||
auto xspan = tileWidth(spr.picnum);
|
||||
auto xoff = tileLeftOffset(spr.picnum) + spr.xoffset;
|
||||
|
||||
|
@ -671,8 +671,8 @@ void DrawAutomapAlignmentWall(const spritetype& spr, const DVector2& bpos, const
|
|||
|
||||
void DrawAutomapAlignmentFloor(const spritetype& spr, const DVector2& bpos, const DVector2& cangvect, const double czoom, const DVector2& xydim, const PalEntry& col)
|
||||
{
|
||||
auto xrep = spr.ScaleX();
|
||||
auto yrep = spr.ScaleY();
|
||||
auto xrep = spr.scale.X;
|
||||
auto yrep = spr.scale.Y;
|
||||
auto xspan = tileWidth(spr.picnum);
|
||||
auto yspan = tileHeight(spr.picnum);
|
||||
auto xoff = tileLeftOffset(spr.picnum);
|
||||
|
|
|
@ -227,7 +227,7 @@ void GetWallSpritePosition(const spritetypebase* spr, const DVector2& pos, DVect
|
|||
xoffset = tex->GetDisplayLeftOffset() + spr->xoffset;
|
||||
}
|
||||
|
||||
auto p = spr->angle.ToVector().Rotated90CW() * spr->ScaleX();
|
||||
auto p = spr->angle.ToVector().Rotated90CW() * spr->scale.X;
|
||||
|
||||
if (spr->cstat & CSTAT_SPRITE_XFLIP) xoffset = -xoffset;
|
||||
double origin = (width * 0.5) + xoffset;
|
||||
|
@ -249,8 +249,8 @@ void TGetFlatSpritePosition(const spritetypebase* spr, const DVector2& pos, DVec
|
|||
|
||||
double width, height, leftofs, topofs;
|
||||
double sloperatio = sqrt(heinum * heinum + SLOPEVAL_FACTOR * SLOPEVAL_FACTOR) * (1. / SLOPEVAL_FACTOR);
|
||||
double _xrepeat = spr->ScaleX();
|
||||
double _yrepeat = spr->ScaleY();
|
||||
double _xrepeat = spr->scale.X;
|
||||
double _yrepeat = spr->scale.Y;
|
||||
|
||||
int xo = heinum ? 0 : spr->xoffset;
|
||||
int yo = heinum ? 0 : spr->yoffset;
|
||||
|
@ -573,7 +573,7 @@ double intersectSprite(DCoreActor* actor, const DVector3& start, const DVector3&
|
|||
if (factor < 0 || factor > maxfactor) return -1;
|
||||
|
||||
|
||||
auto sprwidth = tileWidth(actor->spr.picnum) * actor->spr.ScaleX() * 0.5;
|
||||
auto sprwidth = tileWidth(actor->spr.picnum) * actor->spr.scale.X * 0.5;
|
||||
auto point = start + direction * factor;
|
||||
|
||||
// Using proper distance here, Build originally used the sum of x- and y-distance
|
||||
|
|
|
@ -522,16 +522,6 @@ struct spritetypebase
|
|||
{
|
||||
return scale;
|
||||
}
|
||||
|
||||
double ScaleX() const
|
||||
{
|
||||
return scale.X;
|
||||
}
|
||||
|
||||
double ScaleY() const
|
||||
{
|
||||
return scale.Y;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -675,7 +675,7 @@ void BunchDrawer::ProcessSection(int sectionnum, bool portal)
|
|||
CoreSectIterator it(sectnum);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
if ((actor->spr.cstat & CSTAT_SPRITE_INVISIBLE) || actor->spr.ScaleX() == 0 || actor->spr.ScaleY() == 0) // skip invisible sprites
|
||||
if ((actor->spr.cstat & CSTAT_SPRITE_INVISIBLE) || actor->spr.scale.X == 0 || actor->spr.scale.Y == 0) // skip invisible sprites
|
||||
continue;
|
||||
|
||||
auto viewvec = actor->spr.pos.XY() - DVector2(viewx, -viewy); // note that viewy is in render coordinates
|
||||
|
|
|
@ -278,7 +278,7 @@ void HWDrawInfo::DispatchSprites()
|
|||
int tilenum = tspr->picnum;
|
||||
auto actor = tspr->ownerActor;
|
||||
|
||||
if (actor == nullptr || tspr->ScaleX() == 0 || tspr->ScaleY() == 0 || (unsigned)tilenum >= MAXTILES)
|
||||
if (actor == nullptr || tspr->scale.X == 0 || tspr->scale.Y == 0 || (unsigned)tilenum >= MAXTILES)
|
||||
continue;
|
||||
|
||||
actor->spr.cstat2 |= CSTAT2_SPRITE_MAPPED;
|
||||
|
|
|
@ -371,8 +371,8 @@ void HWSprite::Process(HWDrawInfo* di, tspritetype* spr, sectortype* sector, int
|
|||
}
|
||||
|
||||
// convert to render space.
|
||||
float sx = (float)spr->ScaleX() * 0.8f; // weird Build fuckery. Face sprites are rendered at 80% width only.
|
||||
float sy = (float)spr->ScaleY();
|
||||
float sx = (float)spr->scale.X * 0.8f; // weird Build fuckery. Face sprites are rendered at 80% width only.
|
||||
float sy = (float)spr->scale.Y;
|
||||
float width = xsize * sx;
|
||||
float height = ysize * sy;
|
||||
float xoff = tilexoff * sx;
|
||||
|
@ -479,7 +479,7 @@ bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, tspritetype* spr, s
|
|||
FVector3 translatevec = { 0, 0, voxel->zadd * voxel->scale };
|
||||
|
||||
float basescale = voxel->bscale;
|
||||
float sprxscale = (float)spr->ScaleX() * 0.8f * basescale;
|
||||
float sprxscale = (float)spr->scale.X * 0.8f * basescale;
|
||||
if ((spr->ownerActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_WALL)
|
||||
{
|
||||
sprxscale *= 1.25f;
|
||||
|
@ -504,13 +504,13 @@ bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, tspritetype* spr, s
|
|||
translatevec.X *= sprxscale;
|
||||
scalevec.Y *= sprxscale;
|
||||
translatevec.Y *= sprxscale;
|
||||
float sprzscale = (float)spr->ScaleY() * basescale;
|
||||
float sprzscale = (float)spr->scale.Y * basescale;
|
||||
scalevec.Z *= sprzscale;
|
||||
translatevec.Z *= sprzscale;
|
||||
|
||||
float zpos = (float)(spr->pos.Z + ownerActor->sprext.position_offset.Z);
|
||||
float zscale = ((spr->cstat & CSTAT_SPRITE_YFLIP) && (spr->ownerActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != 0) ? -1.f : 1.f;
|
||||
zpos -= (spr->yoffset * spr->ScaleY()) * zscale * basescale;
|
||||
zpos -= (spr->yoffset * spr->scale.Y) * zscale * basescale;
|
||||
|
||||
x = (spr->pos.X + ownerActor->sprext.position_offset.X);
|
||||
z = -zpos;
|
||||
|
|
|
@ -1104,10 +1104,10 @@ int HWWall::CheckWallSprite(tspritetype* spr, tspritetype* last)
|
|||
if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->angle != last->angle) return 3;
|
||||
|
||||
// if the horizontal orientation changes we need to recalculate the walls this attaches to, but not the positioning.
|
||||
if (spr->ScaleX() != last->ScaleX() || spr->xoffset != last->xoffset || spr->picnum != last->picnum || ((spr->cstat ^ last->cstat) & CSTAT_SPRITE_XFLIP)) return 2;
|
||||
if (spr->scale.X != last->scale.X || spr->xoffset != last->xoffset || spr->picnum != last->picnum || ((spr->cstat ^ last->cstat) & CSTAT_SPRITE_XFLIP)) return 2;
|
||||
|
||||
// only y-positioning changed - we need to re-check the wall tiers this sprite attaches to
|
||||
if(spr->ScaleY() != last->ScaleY() || spr->yoffset != last->yoffset || ((spr->cstat ^ last->cstat) & (CSTAT_SPRITE_YFLIP | CSTAT_SPRITE_YCENTER))) return 1;
|
||||
if(spr->scale.Y != last->scale.Y || spr->yoffset != last->yoffset || ((spr->cstat ^ last->cstat) & (CSTAT_SPRITE_YFLIP | CSTAT_SPRITE_YCENTER))) return 1;
|
||||
|
||||
// all remaining properties only affect the render style which is not relevant for positioning a wall sprite
|
||||
return 0;
|
||||
|
@ -1187,7 +1187,7 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, tspritetype* spr, sectortype* sec
|
|||
if (spr->cstat & CSTAT_SPRITE_YFLIP)
|
||||
topofs = -topofs;
|
||||
|
||||
float yscale = spr->ScaleY();
|
||||
float yscale = spr->scale.Y;
|
||||
float sprz = spr->pos.Z - topofs * yscale;
|
||||
|
||||
if (spr->cstat & CSTAT_SPRITE_YCENTER)
|
||||
|
|
|
@ -2573,7 +2573,7 @@ static void ConcussSprite(DBloodActor* source, DBloodActor* actor, const DVector
|
|||
|
||||
if (mass > 0)
|
||||
{
|
||||
double size = (tileWidth(actor->spr.picnum) * actor->spr.ScaleX() * tileHeight(actor->spr.picnum) * actor->spr.ScaleY()) / 0x20000;
|
||||
double size = (tileWidth(actor->spr.picnum) * actor->spr.scale.X * tileHeight(actor->spr.picnum) * actor->spr.scale.Y) / 0x20000;
|
||||
actor->vel += vect * Scale(damage, size, mass);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -921,7 +921,7 @@ void aiSetTarget(DBloodActor* actor, DBloodActor* target)
|
|||
{
|
||||
actor->SetTarget(target);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(target->spr.type);
|
||||
double eyeHeight = (pDudeInfo->eyeHeight * target->spr.ScaleY());
|
||||
double eyeHeight = (pDudeInfo->eyeHeight * target->spr.scale.Y);
|
||||
actor->xspr.TargetPos = target->spr.pos.plusZ(-eyeHeight);
|
||||
}
|
||||
}
|
||||
|
@ -1501,7 +1501,7 @@ void aiThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvec.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
|
||||
|
@ -1546,7 +1546,7 @@ void aiLookForTarget(DBloodActor* actor)
|
|||
double nDist = dvec.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvec.Angle());
|
||||
|
|
|
@ -70,8 +70,8 @@ void batBiteSeqCallback(int, DBloodActor* actor)
|
|||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
DUDEINFO* pDudeInfoT = getDudeInfo(pTarget->spr.type);
|
||||
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (pDudeInfoT->eyeHeight * pTarget->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (pDudeInfoT->eyeHeight * pTarget->spr.scale.Y);
|
||||
actFireVector(actor, 0., 0., DVector3(actor->spr.angle.ToVector() * 64, height2 - height), kVectorBatBite);
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ static void batThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvec.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvec.Angle());
|
||||
|
@ -166,8 +166,8 @@ static void batThinkPonder(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvec.Angle());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (getDudeInfo(pTarget->spr.type)->eyeHeight * pTarget->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (getDudeInfo(pTarget->spr.type)->eyeHeight * pTarget->spr.scale.Y);
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (cansee(pTarget->spr.pos, pTarget->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -260,9 +260,9 @@ static void batThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvec.Angle());
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.ScaleY();
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y;
|
||||
// Should be dudeInfo[pTarget->spr.type-kDudeBase]
|
||||
double height2 = pDudeInfo->eyeHeight * pTarget->spr.ScaleY();
|
||||
double height2 = pDudeInfo->eyeHeight * pTarget->spr.scale.Y;
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (cansee(pTarget->spr.pos, pTarget->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
|
|
@ -233,7 +233,7 @@ static void beastThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dv.Angle());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
@ -364,7 +364,7 @@ static void beastThinkSwimChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -80,8 +80,8 @@ void eelBiteSeqCallback(int, DBloodActor* actor)
|
|||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.scale.Y);
|
||||
DVector3 vect(actor->spr.angle.ToVector() * 1024, height2 - height);
|
||||
|
||||
actFireVector(actor, 0., 0., vect, kVectorBoneelBite);
|
||||
|
@ -115,7 +115,7 @@ static void eelThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvect.Angle());
|
||||
|
@ -181,8 +181,8 @@ static void eelThinkPonder(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (getDudeInfo(target->spr.type)->eyeHeight * target->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (getDudeInfo(target->spr.type)->eyeHeight * target->spr.scale.Y);
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -276,7 +276,7 @@ static void eelThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double top, bottom;
|
||||
double top2, bottom2;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
|
|
@ -195,7 +195,7 @@ static void burnThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -152,7 +152,7 @@ static void calebThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
@ -251,7 +251,7 @@ static void calebThinkSwimChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ void cerberusBiteSeqCallback(int, DBloodActor* actor)
|
|||
void cerberusBurnSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.ScaleY() * 0.25;
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y * 0.25;
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
|
||||
DVector3 pos(actor->spr.pos.XY(), height);
|
||||
|
@ -140,7 +140,7 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
|||
{
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.ScaleY() * 0.25;
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y * 0.25;
|
||||
|
||||
DVector3 pos(actor->spr.pos.XY(), height);
|
||||
//auto pos = actor->spr.pos.plusZ(height); // what it probably should be
|
||||
|
@ -181,7 +181,7 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
|||
if (nDeltaAngle <= DAngle45)
|
||||
{
|
||||
DUDEINFO* pDudeInfo2 = getDudeInfo(actor2->spr.type);
|
||||
double height1 = (pDudeInfo2->aimHeight * actor2->spr.ScaleY());
|
||||
double height1 = (pDudeInfo2->aimHeight * actor2->spr.scale.Y);
|
||||
double tz1 = actor2->spr.pos.Z - height - actor->spr.pos.Z;
|
||||
|
||||
if (cansee(pos, actor->sector(), pos2, actor2->sector()))
|
||||
|
@ -246,7 +246,7 @@ static void cerberusThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvect.Angle());
|
||||
|
@ -352,7 +352,7 @@ static void cerberusThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -264,7 +264,7 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
if (nDist > 0 && nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -81,8 +81,8 @@ void SlashFSeqCallback(int, DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.scale.Y);
|
||||
DVector3 vec(actor->spr.angle.ToVector() * 64, height - height2);
|
||||
|
||||
actFireVector(actor, 0, 0, vec, kVectorGargSlash);
|
||||
|
@ -104,7 +104,7 @@ void BlastSSeqCallback(int, DBloodActor* actor)
|
|||
wrand(); // ???
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
auto target = actor->GetTarget();
|
||||
double height = (actor->spr.ScaleY() * getDudeInfo(actor->spr.type)->eyeHeight);
|
||||
double height = (actor->spr.scale.Y * getDudeInfo(actor->spr.type)->eyeHeight);
|
||||
DVector3 pos(actor->spr.pos.XY(), height);
|
||||
|
||||
DVector3 Aim(actor->spr.angle.ToVector(), actor->dudeSlope);
|
||||
|
@ -202,7 +202,7 @@ static void gargThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvect.Angle());
|
||||
|
@ -321,9 +321,9 @@ static void gargThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dxyAngle);
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.ScaleY();
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y;
|
||||
// Should be dudeInfo[target->spr.type-kDudeBase]
|
||||
double height2 = pDudeInfo->eyeHeight * target->spr.ScaleY();
|
||||
double height2 = pDudeInfo->eyeHeight * target->spr.scale.Y;
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
|
|
@ -66,8 +66,8 @@ void ghostSlashSeqCallback(int, DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.scale.Y);
|
||||
DVector3 dv(actor->spr.angle.ToVector() * 64, height - height2);
|
||||
|
||||
sfxPlay3DSound(actor, 1406, 0, 0);
|
||||
|
@ -91,7 +91,7 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
|
|||
wrand(); // ???
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
auto target = actor->GetTarget();
|
||||
double height = (actor->spr.ScaleY() * getDudeInfo(actor->spr.type)->eyeHeight);
|
||||
double height = (actor->spr.scale.Y * getDudeInfo(actor->spr.type)->eyeHeight);
|
||||
DVector3 pos(actor->spr.pos.XY(), height);
|
||||
|
||||
DVector3 Aim(actor->spr.angle.ToVector(), actor->dudeSlope);
|
||||
|
@ -183,7 +183,7 @@ static void ghostThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvect.Angle());
|
||||
|
@ -300,9 +300,9 @@ static void ghostThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dxyAngle);
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.ScaleY();
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y;
|
||||
// Should be dudeInfo[target->spr.type-kDudeBase]
|
||||
double height2 = pDudeInfo->eyeHeight * target->spr.ScaleY();
|
||||
double height2 = pDudeInfo->eyeHeight * target->spr.scale.Y;
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
|
|
@ -137,7 +137,7 @@ static void gillThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
@ -235,7 +235,7 @@ static void gillThinkSwimChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
|
|
@ -104,7 +104,7 @@ static void handThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -116,7 +116,7 @@ static void houndThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -89,7 +89,7 @@ static void innocThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -199,7 +199,7 @@ static void aiPodChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -101,7 +101,7 @@ static void ratThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -209,7 +209,7 @@ static void spidThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -61,7 +61,7 @@ void sub_71A90(int, DBloodActor* actor)
|
|||
void tchernobogBurnSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
double height = actor->spr.ScaleY() * pDudeInfo->eyeHeight * 0.25;
|
||||
double height = actor->spr.scale.Y * pDudeInfo->eyeHeight * 0.25;
|
||||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
DVector3 pos(actor->spr.pos.XY(), height);
|
||||
|
||||
|
@ -120,7 +120,7 @@ void tchernobogBurnSeqCallback2(int, DBloodActor* actor)
|
|||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
double height = actor->spr.ScaleY() * pDudeInfo->eyeHeight * 0.25;
|
||||
double height = actor->spr.scale.Y * pDudeInfo->eyeHeight * 0.25;
|
||||
|
||||
DVector3 pos(actor->spr.pos.XY(), height);
|
||||
DVector3 Aim(actor->spr.angle.ToVector(), -actor->dudeSlope);
|
||||
|
@ -209,7 +209,7 @@ static void sub_725A4(DBloodActor* actor)
|
|||
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
|
@ -281,7 +281,7 @@ static void tchernobogThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDist < pDudeInfo->SeeDist() && abs(nDeltaAngle) <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -192,12 +192,12 @@ void punchCallback(int, DBloodActor* actor)
|
|||
auto const target = actor->GetTarget();
|
||||
if (target != nullptr)
|
||||
{
|
||||
double nZOffset1 = getDudeInfo(actor->spr.type)->eyeHeight * actor->spr.ScaleY();
|
||||
double nZOffset1 = getDudeInfo(actor->spr.type)->eyeHeight * actor->spr.scale.Y;
|
||||
double nZOffset2 = 0;
|
||||
|
||||
|
||||
if (target->IsDudeActor())
|
||||
nZOffset2 = getDudeInfo(target->spr.type)->eyeHeight * target->spr.ScaleY();
|
||||
nZOffset2 = getDudeInfo(target->spr.type)->eyeHeight * target->spr.scale.Y;
|
||||
|
||||
if (!playGenDudeSound(actor, kGenDudeSndAttackMelee))
|
||||
sfxPlay3DSound(actor, 530, 1, 0);
|
||||
|
@ -352,9 +352,9 @@ static void ThrowThing(DBloodActor* actor, bool impact)
|
|||
if (Chance(0x5000)) spawned->spr.cstat |= CSTAT_SPRITE_XFLIP;
|
||||
if (Chance(0x5000)) spawned->spr.cstat |= CSTAT_SPRITE_YFLIP;
|
||||
|
||||
if (spawned->spr.ScaleX() > 0.9375 ) spawned->xspr.data1 = 43;
|
||||
else if (spawned->spr.ScaleX() > 0.625) spawned->xspr.data1 = 33;
|
||||
else if (spawned->spr.ScaleX() > 0.46875) spawned->xspr.data1 = 23;
|
||||
if (spawned->spr.scale.X > 0.9375 ) spawned->xspr.data1 = 43;
|
||||
else if (spawned->spr.scale.X > 0.625) spawned->xspr.data1 = 33;
|
||||
else if (spawned->spr.scale.X > 0.46875) spawned->xspr.data1 = 23;
|
||||
else spawned->xspr.data1 = 12;
|
||||
return;
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
DAngle losAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
|
||||
if (dist > pDudeInfo->SeeDist() || !cansee(target->spr.pos, target->sector(),
|
||||
actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
|
@ -882,8 +882,8 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
|
||||
}
|
||||
|
||||
double wd1 = tileWidth(hitactor->spr.picnum) * hitactor->spr.ScaleX();
|
||||
double wd2 = tileWidth(actor->spr.picnum) * actor->spr.ScaleX();
|
||||
double wd1 = tileWidth(hitactor->spr.picnum) * hitactor->spr.scale.X;
|
||||
double wd2 = tileWidth(actor->spr.picnum) * actor->spr.scale.X;
|
||||
if (wd1 < (wd2 * 8))
|
||||
{
|
||||
//viewSetSystemMessage("OBJ SIZE: %d DUDE SIZE: %d", wd1, wd2);
|
||||
|
@ -1580,7 +1580,7 @@ static void scaleDamage(DBloodActor* actor)
|
|||
}
|
||||
|
||||
// take in account scale of sprite
|
||||
int yscale = int(actor->spr.ScaleY() * 64);
|
||||
int yscale = int(actor->spr.scale.Y * 64);
|
||||
if (yscale < 64)
|
||||
{
|
||||
for (int i = 0; i < kDmgMax; i++) curScale[i] += (64 - yscale);
|
||||
|
@ -1703,7 +1703,7 @@ static int getDispersionModifier(DBloodActor* actor, int minDisp, int maxDisp)
|
|||
|
||||
static double getRangeAttackDist(DBloodActor* actor, double minDist, double maxDist)
|
||||
{
|
||||
int yscale = int(actor->spr.ScaleY() * 64);
|
||||
int yscale = int(actor->spr.scale.Y * 64);
|
||||
int dist = 0;
|
||||
int seqId = actor->xspr.data2;
|
||||
int mul = 550;
|
||||
|
@ -1799,7 +1799,7 @@ void dudeLeechOperate(DBloodActor* actor, const EVENT& event)
|
|||
actor->spr.angle = (atpos - actor->spr.pos.XY()).Angle();
|
||||
DVector3 dv;
|
||||
dv.XY() = actor->spr.angle.ToVector() * 64;
|
||||
double tz = actTarget->spr.pos.Z - (actTarget->spr.ScaleY() * pDudeInfo->aimHeight);
|
||||
double tz = actTarget->spr.pos.Z - (actTarget->spr.scale.Y * pDudeInfo->aimHeight);
|
||||
double dz = (tz - top - 1) / nDist * 4;
|
||||
int nMissileType = kMissileLifeLeechAltNormal + (actor->xspr.data3 ? 1 : 0);
|
||||
int t2;
|
||||
|
@ -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->clipdist = clamp((actor->spr.ScaleX() + actor->spr.ScaleY()) * 8, 1., 30.);
|
||||
actor->clipdist = clamp((actor->spr.scale.X + actor->spr.scale.Y) * 8, 1., 30.);
|
||||
if (propId) break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@ void HackSeqCallback(int, DBloodActor* actor)
|
|||
DVector3 dv;
|
||||
dv.XY() = (actor->xspr.TargetPos.XY() - actor->spr.pos.XY()).Resized(64);
|
||||
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.scale.Y);
|
||||
dv.Z = height - height2;
|
||||
|
||||
sfxPlay3DSound(actor, 1101, 1, 0);
|
||||
|
@ -134,7 +134,7 @@ static void zombaThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
@ -181,7 +181,7 @@ static void zombaThinkPonder(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
@ -219,7 +219,7 @@ static void myThinkTarget(DBloodActor* actor)
|
|||
double nDist = dvect.Length();
|
||||
if (nDist > pDudeInfo->SeeDist() && nDist > pDudeInfo->HearDist())
|
||||
continue;
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (!cansee(ppos, pSector, actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
continue;
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, dvect.Angle());
|
||||
|
|
|
@ -52,9 +52,9 @@ void zombfHackSeqCallback(int, DBloodActor* actor)
|
|||
if (!actor->ValidateTarget(__FUNCTION__)) return;
|
||||
auto target = actor->GetTarget();
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.ScaleY() * 0.25;
|
||||
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y * 0.25;
|
||||
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
||||
double height2 = pDudeInfoT->eyeHeight * target->spr.ScaleY() * 0.25;
|
||||
double height2 = pDudeInfoT->eyeHeight * target->spr.scale.Y * 0.25;
|
||||
actFireVector(actor, 0, 0, DVector3(actor->spr.angle.ToVector() * 64, height - height2), kVectorCleaver);
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,8 @@ void PukeSeqCallback(int, DBloodActor* actor)
|
|||
|
||||
DVector2 dv = (actor->xspr.TargetPos.XY() - actor->spr.pos.XY()).Resized(64);
|
||||
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
double height2 = (pDudeInfoT->eyeHeight * target->spr.scale.Y);
|
||||
double z = (height - height2) * 0.25;
|
||||
|
||||
sfxPlay3DSound(actor, 1203, 1, 0);
|
||||
|
@ -128,7 +128,7 @@ static void zombfThinkChase(DBloodActor* actor)
|
|||
if (nDist <= pDudeInfo->SeeDist())
|
||||
{
|
||||
DAngle nDeltaAngle = absangle(actor->spr.angle, nAngle);
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (cansee(target->spr.pos, target->sector(), actor->spr.pos.plusZ(-height), actor->sector()))
|
||||
{
|
||||
if (nDeltaAngle <= pDudeInfo->Periphery())
|
||||
|
|
|
@ -288,7 +288,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pos.Z = pTSprite->pos.Z;
|
||||
pNSprite->picnum = 908;
|
||||
pNSprite->statnum = kStatDecoration;
|
||||
s = (tileWidth(pTSprite->picnum) * pTSprite->ScaleX()) / 64.;
|
||||
s = (tileWidth(pTSprite->picnum) * pTSprite->scale.X) / 64.;
|
||||
pNSprite->SetScale(s, s);
|
||||
break;
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pos.Z = top;
|
||||
pNSprite->picnum = 2101;
|
||||
pNSprite->shade = -128;
|
||||
s = (tileWidth(pTSprite->picnum) * pTSprite->ScaleX()) / 32.;
|
||||
s = (tileWidth(pTSprite->picnum) * pTSprite->scale.X) / 32.;
|
||||
pNSprite->SetScale(s, s);
|
||||
break;
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pos.Z = bottom;
|
||||
pNSprite->picnum = 2101;
|
||||
pNSprite->shade = -128;
|
||||
s = (tileWidth(pTSprite->picnum) * pTSprite->ScaleX()) / 32.;
|
||||
s = (tileWidth(pTSprite->picnum) * pTSprite->scale.X) / 32.;
|
||||
pNSprite->SetScale(s, s);
|
||||
break;
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pal = 5;
|
||||
int height = tileHeight(pNSprite->picnum);
|
||||
int center = height / 2 + tileTopOffset(pNSprite->picnum);
|
||||
pNSprite->pos.Z -= (pNSprite->ScaleY()) * (height - center);
|
||||
pNSprite->pos.Z -= (pNSprite->scale.Y) * (height - center);
|
||||
break;
|
||||
}
|
||||
case kViewEffectFlareHalo:
|
||||
|
@ -455,7 +455,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
if (gDetail > 1)
|
||||
pNSprite->cstat |= CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_TRANS_FLIP;
|
||||
pNSprite->shade = ClipLow(pTSprite->shade - 32, -128);
|
||||
pNSprite->SetScale(pTSprite->ScaleX(), 1);
|
||||
pNSprite->SetScale(pTSprite->scale.X, 1);
|
||||
pNSprite->picnum = 775;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ void fxFlameLick(DBloodActor* actor, sectortype*) // 0
|
|||
GetActorExtents(actor, &top, &bottom);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
double nDist = (actor->spr.ScaleX() * tileWidth(actor->spr.picnum)) * (1. / 4);
|
||||
double nDist = (actor->spr.scale.X * tileWidth(actor->spr.picnum)) * (1. / 4);
|
||||
DAngle nAngle = RandomAngle();
|
||||
DVector2 dv = nAngle.ToVector() * nDist;
|
||||
DVector2 pos = actor->spr.pos.XY() + dv;
|
||||
|
@ -223,7 +223,7 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8
|
|||
if (!actor) return;
|
||||
if (actor->vel.Z)
|
||||
{
|
||||
double nDist = (actor->spr.ScaleX() * tileWidth(actor->spr.picnum)) * (1. / 2);
|
||||
double nDist = (actor->spr.scale.X * tileWidth(actor->spr.picnum)) * (1. / 2);
|
||||
DVector3 pos = actor->spr.pos + (actor->spr.angle - DAngle90).ToVector() * nDist;
|
||||
auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), pos);
|
||||
if (pFX)
|
||||
|
@ -342,7 +342,7 @@ void PlayerBubble(DBloodActor* actor, sectortype*) // 10
|
|||
GetActorExtents(actor, &top, &bottom);
|
||||
for (int i = 0; i < (pPlayer->bubbleTime >> 6); i++)
|
||||
{
|
||||
double nDist = (actor->spr.ScaleX() * tileWidth(actor->spr.picnum)) * (1. / 2);
|
||||
double nDist = (actor->spr.scale.X * tileWidth(actor->spr.picnum)) * (1. / 2);
|
||||
DVector2 pos = actor->spr.pos.XY() + actor->spr.angle.ToVector() * nDist;
|
||||
double z = bottom - RandomD(bottom - top, 8);
|
||||
auto pFX = gFX.fxSpawnActor((FX_ID)(FX_23 + Random(3)), actor->sector(), DVector3(pos, z));
|
||||
|
@ -371,7 +371,7 @@ void EnemyBubble(DBloodActor* actor, sectortype*) // 11
|
|||
for (int i = 0; i < int(abs(actor->vel.Z) * 0.25); i++)
|
||||
{
|
||||
auto nAngle = RandomAngle();
|
||||
double nDist = (actor->spr.ScaleX() * tileWidth(actor->spr.picnum)) * (1. / 2);
|
||||
double nDist = (actor->spr.scale.X * tileWidth(actor->spr.picnum)) * (1. / 2);
|
||||
DVector2 pos = actor->spr.pos.XY() + nAngle.ToVector() * nDist;
|
||||
double z = bottom - RandomD(bottom - top, 8);
|
||||
|
||||
|
|
|
@ -87,8 +87,8 @@ void GetSpriteExtents(spritetypebase const* const pSprite, double* top, double*
|
|||
{
|
||||
int height = tileHeight(pSprite->picnum);
|
||||
int center = height / 2 + tileTopOffset(pSprite->picnum);
|
||||
*top -= pSprite->ScaleY() * center;
|
||||
*bottom += pSprite->ScaleY() * (height - center);
|
||||
*top -= pSprite->scale.Y * center;
|
||||
*bottom += pSprite->scale.Y * (height - center);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,14 +276,14 @@ int VectorScan(DBloodActor* actor, double nOffset, double nZOffset, const DVecto
|
|||
if (tileWidth(nPicnum) == 0 || tileHeight(nPicnum) == 0)
|
||||
return SS_SPRITE;
|
||||
|
||||
double height = (tileHeight(nPicnum) * other->spr.ScaleY());
|
||||
double height = (tileHeight(nPicnum) * other->spr.scale.Y);
|
||||
double otherZ = other->spr.pos.Z;
|
||||
if (other->spr.cstat & CSTAT_SPRITE_YCENTER)
|
||||
otherZ += height / 2;
|
||||
|
||||
int nTopOfs = tileTopOffset(nPicnum);
|
||||
if (nTopOfs)
|
||||
otherZ -= (nTopOfs * other->spr.ScaleY());
|
||||
otherZ -= (nTopOfs * other->spr.scale.Y);
|
||||
assert(height > 0);
|
||||
|
||||
double height2 = (otherZ - gHitInfo.hitpos.Z) * tileHeight(nPicnum) / height;
|
||||
|
@ -292,7 +292,7 @@ int VectorScan(DBloodActor* actor, double nOffset, double nZOffset, const DVecto
|
|||
|
||||
if (height2 >= 0 && height2 < tileHeight(nPicnum))
|
||||
{
|
||||
double width = (tileWidth(nPicnum) * other->spr.ScaleX()) * 0.75; // should actually be 0.8 to match the renderer!
|
||||
double width = (tileWidth(nPicnum) * other->spr.scale.X) * 0.75; // should actually be 0.8 to match the renderer!
|
||||
double check1 = ((pos.Y - other->spr.pos.Y) * vel.X - (pos.X - other->spr.pos.X) * vel.Y) / vel.XY().Length();
|
||||
assert(width > 0);
|
||||
|
||||
|
|
|
@ -1432,8 +1432,8 @@ int getSpriteMassBySize(DBloodActor* actor)
|
|||
}
|
||||
|
||||
SPRITEMASS* cached = &actor->spriteMass;
|
||||
if (((seqId >= 0 && seqId == cached->seqId) || actor->spr.picnum == cached->picnum) && actor->spr.ScaleX() == cached->scale.X &&
|
||||
actor->spr.ScaleY() == cached->scale.Y && clipDist == cached->clipDist)
|
||||
if (((seqId >= 0 && seqId == cached->seqId) || actor->spr.picnum == cached->picnum) && actor->spr.scale.X == cached->scale.X &&
|
||||
actor->spr.scale.Y == cached->scale.Y && clipDist == cached->clipDist)
|
||||
{
|
||||
return cached->mass;
|
||||
}
|
||||
|
@ -1457,8 +1457,8 @@ int getSpriteMassBySize(DBloodActor* actor)
|
|||
clipDist = max(actor->clipdist, 0.25);
|
||||
int x = tileWidth(picnum);
|
||||
int y = tileHeight(picnum);
|
||||
int xscale = int(actor->spr.ScaleX() * 64);
|
||||
int yscale = int(actor->spr.ScaleY() * 64);
|
||||
int xscale = int(actor->spr.scale.X * 64);
|
||||
int yscale = int(actor->spr.scale.Y * 64);
|
||||
|
||||
// take surface type into account
|
||||
switch (tileGetSurfType(actor->spr.picnum))
|
||||
|
@ -1513,8 +1513,8 @@ int getSpriteMassBySize(DBloodActor* actor)
|
|||
cached->airVel = ClipRange(400 - cached->mass, 32, 400);
|
||||
cached->fraction = ClipRange(60000 - (cached->mass << 7), 8192, 60000);
|
||||
|
||||
cached->scale.X = actor->spr.ScaleX();
|
||||
cached->scale.Y = actor->spr.ScaleY();
|
||||
cached->scale.X = actor->spr.scale.X;
|
||||
cached->scale.Y = actor->spr.scale.Y;
|
||||
cached->picnum = actor->spr.picnum;
|
||||
cached->seqId = seqId;
|
||||
cached->clipDist = actor->clipdist;
|
||||
|
@ -1572,7 +1572,7 @@ void debrisConcuss(DBloodActor* owneractor, int listIndex, const DVector3& pos,
|
|||
|
||||
dmg = int(dmg * (0x4000 / (0x4000 + dv.LengthSquared())));
|
||||
bool thing = (actor->spr.type >= kThingBase && actor->spr.type < kThingMax);
|
||||
int size = (tileWidth(actor->spr.picnum) * actor->spr.ScaleX() * tileHeight(actor->spr.picnum) * actor->spr.ScaleY()) * 2048;
|
||||
int size = (tileWidth(actor->spr.picnum) * actor->spr.scale.X * tileHeight(actor->spr.picnum) * actor->spr.scale.Y) * 2048;
|
||||
if (actor->xspr.physAttr & kPhysDebrisExplode)
|
||||
{
|
||||
if (actor->spriteMass.mass > 0)
|
||||
|
@ -1605,7 +1605,7 @@ void debrisBubble(DBloodActor* actor)
|
|||
GetActorExtents(actor, &top, &bottom);
|
||||
for (unsigned int i = 0; i < 1 + Random(5); i++) {
|
||||
|
||||
double nDist = actor->spr.ScaleX() * tileWidth(actor->spr.picnum) * 0.5; // original code ended with * 8 which is 1/2 map unit.
|
||||
double nDist = actor->spr.scale.X * tileWidth(actor->spr.picnum) * 0.5; // original code ended with * 8 which is 1/2 map unit.
|
||||
DAngle nAngle = RandomAngle();
|
||||
DVector3 pos;
|
||||
pos.XY() = actor->spr.pos.XY() + nAngle.ToVector() * nDist;
|
||||
|
@ -3326,7 +3326,7 @@ void useEffectGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
pos = bottom;
|
||||
break;
|
||||
case 2: // middle
|
||||
pos = actor->spr.pos.Z + (tileHeight(actor->spr.picnum) / 2 + tileTopOffset(actor->spr.picnum)) * actor->spr.ScaleY();
|
||||
pos = actor->spr.pos.Z + (tileHeight(actor->spr.picnum) / 2 + tileTopOffset(actor->spr.picnum)) * actor->spr.scale.Y;
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
|
@ -3768,7 +3768,7 @@ void useSeqSpawnerGen(DBloodActor* sourceactor, int objType, sectortype* pSector
|
|||
break;
|
||||
case 4:
|
||||
// this had no value shift and no repeat handling, which looks like a bug.
|
||||
pos.Z += (tileHeight(iactor->spr.picnum) / 2 + tileTopOffset(iactor->spr.picnum)) * iactor->spr.ScaleY();
|
||||
pos.Z += (tileHeight(iactor->spr.picnum) / 2 + tileTopOffset(iactor->spr.picnum)) * iactor->spr.scale.Y;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
|
@ -3984,9 +3984,9 @@ bool condCheckMixed(DBloodActor* aCond, const EVENT& event, int cmpOp, bool PUSH
|
|||
case 27: return condCmp(actor->spr.shade, arg1, arg2, cmpOp);
|
||||
case 28: return (arg3) ? condCmp((actor->spr.cstat & ESpriteFlags::FromInt(arg3)), arg1, arg2, cmpOp) : (actor->spr.cstat & ESpriteFlags::FromInt(arg1));
|
||||
case 29: return (arg3) ? condCmp((actor->spr.hitag & arg3), arg1, arg2, cmpOp) : (actor->spr.hitag & arg1);
|
||||
case 30: return condCmp(int(actor->spr.ScaleX() * INV_REPEAT_SCALE), arg1, arg2, cmpOp);
|
||||
case 30: return condCmp(int(actor->spr.scale.X * INV_REPEAT_SCALE), arg1, arg2, cmpOp);
|
||||
case 31: return condCmp(actor->spr.xoffset, arg1, arg2, cmpOp);
|
||||
case 32: return condCmp(int(actor->spr.ScaleY() * INV_REPEAT_SCALE), arg1, arg2, cmpOp);
|
||||
case 32: return condCmp(int(actor->spr.scale.Y * INV_REPEAT_SCALE), arg1, arg2, cmpOp);
|
||||
case 33: return condCmp(actor->spr.yoffset, arg1, arg2, cmpOp);
|
||||
}
|
||||
}
|
||||
|
@ -4434,7 +4434,7 @@ bool condCheckDude(DBloodActor* aCond, int cmpOp, bool PUSH)
|
|||
condError(aCond, "Dude #%d has no target!", objActor->GetIndex());
|
||||
|
||||
DUDEINFO* pInfo = getDudeInfo(objActor->spr.type);
|
||||
double height = (pInfo->eyeHeight * objActor->spr.ScaleY());
|
||||
double height = (pInfo->eyeHeight * objActor->spr.scale.Y);
|
||||
|
||||
auto delta = targ->spr.pos.XY() - objActor->spr.pos.XY();
|
||||
|
||||
|
@ -5152,7 +5152,7 @@ bool aiFightDudeCanSeeTarget(DBloodActor* dudeactor, DUDEINFO* pDudeInfo, DBlood
|
|||
// check target
|
||||
if (dv.Length() < pDudeInfo->SeeDist())
|
||||
{
|
||||
double height = (pDudeInfo->eyeHeight * dudeactor->spr.ScaleY());
|
||||
double height = (pDudeInfo->eyeHeight * dudeactor->spr.scale.Y);
|
||||
|
||||
// is there a line of sight to the target?
|
||||
if (cansee(dudeactor->spr.pos, dudeactor->sector(), targetactor->spr.pos.plusZ(-height), targetactor->sector()))
|
||||
|
@ -6526,10 +6526,10 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
if (canInherit != 0)
|
||||
{
|
||||
if (canInherit & 0x2)
|
||||
missileactor->spr.SetScaleX((from == kModernTypeFlag1) ? sourceactor->spr.ScaleX() : actor->spr.ScaleX());
|
||||
missileactor->spr.SetScaleX((from == kModernTypeFlag1) ? sourceactor->spr.scale.X : actor->spr.scale.X);
|
||||
|
||||
if (canInherit & 0x1)
|
||||
missileactor->spr.SetScaleY((from == kModernTypeFlag1) ? sourceactor->spr.ScaleY() : actor->spr.ScaleY());
|
||||
missileactor->spr.SetScaleY((from == kModernTypeFlag1) ? sourceactor->spr.scale.Y : actor->spr.scale.Y);
|
||||
|
||||
if (canInherit & 0x4)
|
||||
missileactor->spr.pal = (from == kModernTypeFlag1) ? sourceactor->spr.pal : actor->spr.pal;
|
||||
|
@ -8232,7 +8232,7 @@ void aiPatrolAlarmLite(DBloodActor* actor, DBloodActor* targetactor)
|
|||
if (dudeactor->xspr.health <= 0)
|
||||
continue;
|
||||
|
||||
double eaz2 = (getDudeInfo(targetactor->spr.type)->eyeHeight * targetactor->spr.ScaleY());
|
||||
double eaz2 = (getDudeInfo(targetactor->spr.type)->eyeHeight * targetactor->spr.scale.Y);
|
||||
double nDist = (dudeactor->spr.pos.XY() - actor->spr.pos.XY()).LengthSquared();
|
||||
if (nDist >= kPatrolAlarmSeeDistSq || !cansee(DVector3(actor->spr.pos, zt1), actor->sector(), dudeactor->spr.pos.plusZ(-eaz2), dudeactor->sector()))
|
||||
{
|
||||
|
@ -8264,7 +8264,7 @@ void aiPatrolAlarmFull(DBloodActor* actor, DBloodActor* targetactor, bool chain)
|
|||
if (actor->xspr.health <= 0)
|
||||
return;
|
||||
|
||||
double eaz2 = (getDudeInfo(actor->spr.type)->eyeHeight * actor->spr.ScaleY());
|
||||
double eaz2 = (getDudeInfo(actor->spr.type)->eyeHeight * actor->spr.scale.Y);
|
||||
auto pos2 = actor->spr.pos.plusZ(-eaz2);
|
||||
|
||||
auto pSect2 = actor->sector();
|
||||
|
@ -8284,7 +8284,7 @@ void aiPatrolAlarmFull(DBloodActor* actor, DBloodActor* targetactor, bool chain)
|
|||
if (dudeactor->xspr.health <= 0)
|
||||
continue;
|
||||
|
||||
double eaz1 = (getDudeInfo(dudeactor->spr.type)->eyeHeight * dudeactor->spr.ScaleY());
|
||||
double eaz1 = (getDudeInfo(dudeactor->spr.type)->eyeHeight * dudeactor->spr.scale.Y);
|
||||
auto pos1 = dudeactor->spr.pos.plusZ(-eaz1);
|
||||
|
||||
auto pSect1 = dudeactor->sector();
|
||||
|
@ -8420,7 +8420,7 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
|
|||
if (nDistf <= seeDistf)
|
||||
{
|
||||
double scratch;
|
||||
double eyeAboveZ = (pDudeInfo->eyeHeight * actor->spr.ScaleY());
|
||||
double eyeAboveZ = (pDudeInfo->eyeHeight * actor->spr.scale.Y);
|
||||
if (nDistf < seeDistf / 8) GetActorExtents(pPlayer->actor, &pos.Z, &scratch); //use ztop of the target sprite
|
||||
if (!cansee(pos, plActor->sector(), actor->spr.pos - eyeAboveZ, actor->sector()))
|
||||
continue;
|
||||
|
|
|
@ -245,7 +245,7 @@ void UpdateSprite(DBloodActor* actor, SEQFRAME* pFrame)
|
|||
if (actor->spr.flags & 2)
|
||||
{
|
||||
if (tileHeight(actor->spr.picnum) != tileHeight(seqGetTile(pFrame)) || tileTopOffset(actor->spr.picnum) != tileTopOffset(seqGetTile(pFrame))
|
||||
|| (pFrame->scaley && pFrame->scaley != int(actor->spr.ScaleY() * INV_REPEAT_SCALE)))
|
||||
|| (pFrame->scaley && pFrame->scaley != int(actor->spr.scale.Y * INV_REPEAT_SCALE)))
|
||||
actor->spr.flags |= 4;
|
||||
}
|
||||
actor->spr.picnum = seqGetTile(pFrame);
|
||||
|
|
|
@ -273,7 +273,7 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
|||
pos.XY() += target->vel.XY() * nDist * (65536. / 0x1aaaaa);
|
||||
auto angBak = actor->spr.angle;
|
||||
actor->spr.angle = (pos.XY() - actor->spr.pos.XY()).Angle();
|
||||
double tz = target->spr.pos.Z - (target->spr.ScaleY() * pDudeInfo->aimHeight);
|
||||
double tz = target->spr.pos.Z - (target->spr.scale.Y * pDudeInfo->aimHeight);
|
||||
auto dvec = DVector3(actor->spr.angle.ToVector(), ((tz - top - 1) / nDist) * (1. / 16.));
|
||||
int nMissileType = kMissileLifeLeechAltNormal + (actor->xspr.data3 ? 1 : 0);
|
||||
if (auto missile = actFireMissile(actor, 0, (top - actor->spr.pos.Z) - 1, dvec, nMissileType))
|
||||
|
|
|
@ -494,7 +494,7 @@ void UpdateAimVector(PLAYER* pPlayer)
|
|||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
if (cansee(pos, plActor->sector(), pos2, actor->sector()))
|
||||
{
|
||||
double center = (actor->spr.ScaleY() * pDudeInfo->aimHeight);
|
||||
double center = (actor->spr.scale.Y * pDudeInfo->aimHeight);
|
||||
double dzCenter = (pos2.Z - center) - pos.Z;
|
||||
|
||||
nClosest = nDist2;
|
||||
|
|
|
@ -421,7 +421,7 @@ void moveplayers(void)
|
|||
auto psp = ps[otherp].GetActor();
|
||||
if (psp->spr.extra > 0)
|
||||
{
|
||||
if (act->spr.ScaleY() > 0.5 && psp->spr.ScaleY() < 0.5)
|
||||
if (act->spr.scale.Y > 0.5 && psp->spr.scale.Y < 0.5)
|
||||
{
|
||||
if (other < 1400/16. && p->knee_incs == 0)
|
||||
{
|
||||
|
@ -478,14 +478,14 @@ void moveplayers(void)
|
|||
|
||||
act->spr.cstat = 0;
|
||||
|
||||
if (act->spr.ScaleX() < 0.65625)
|
||||
if (act->spr.scale.X < 0.65625)
|
||||
{
|
||||
act->spr.AddScaleX(0.0625);
|
||||
act->spr.cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
}
|
||||
else act->spr.SetScaleX(0.65625);
|
||||
|
||||
if (act->spr.ScaleY() < 0.5625)
|
||||
if (act->spr.scale.Y < 0.5625)
|
||||
act->spr.AddScaleY(4);
|
||||
else
|
||||
{
|
||||
|
@ -867,7 +867,7 @@ void moveflammable(DDukeActor* actor, int pool)
|
|||
}
|
||||
}
|
||||
|
||||
scale = actor->spr.ScaleX() - (krand() & 7) * REPEAT_SCALE;
|
||||
scale = actor->spr.scale.X - (krand() & 7) * REPEAT_SCALE;
|
||||
if (scale < 0.15625)
|
||||
{
|
||||
deletesprite(actor);
|
||||
|
@ -876,7 +876,7 @@ void moveflammable(DDukeActor* actor, int pool)
|
|||
|
||||
actor->spr.SetScaleX(scale);
|
||||
|
||||
scale = actor->spr.ScaleY() - (krand() & 7) * REPEAT_SCALE;
|
||||
scale = actor->spr.scale.Y - (krand() & 7) * REPEAT_SCALE;
|
||||
if (scale < 0.0625)
|
||||
{
|
||||
deletesprite(actor);
|
||||
|
@ -926,7 +926,7 @@ void detonate(DDukeActor *actor, int explosion)
|
|||
|
||||
actor->spr.pos.Z -= 32;
|
||||
|
||||
if ((actor->temp_data[3] == 1 && actor->spr.ScaleX() != 0) || actor->spr.lotag == -99)
|
||||
if ((actor->temp_data[3] == 1 && actor->spr.scale.X != 0) || actor->spr.lotag == -99)
|
||||
{
|
||||
int x = actor->spr.extra;
|
||||
spawn(actor, explosion);
|
||||
|
@ -934,7 +934,7 @@ void detonate(DDukeActor *actor, int explosion)
|
|||
S_PlayActorSound(PIPEBOMB_EXPLODE, actor);
|
||||
}
|
||||
|
||||
if (actor->spr.ScaleX() != 0)
|
||||
if (actor->spr.scale.X != 0)
|
||||
for (int x = 0; x < 8; x++) RANDOMSCRAP(actor);
|
||||
|
||||
deletesprite(actor);
|
||||
|
@ -1163,7 +1163,7 @@ void moveooz(DDukeActor* actor, int seenine, int seeninedead, int ooz, int explo
|
|||
int j;
|
||||
if (actor->spr.shade != -32 && actor->spr.shade != -33)
|
||||
{
|
||||
if (actor->spr.ScaleX() != 0)
|
||||
if (actor->spr.scale.X != 0)
|
||||
j = (fi.ifhitbyweapon(actor) >= 0);
|
||||
else
|
||||
j = 0;
|
||||
|
@ -1196,7 +1196,7 @@ void moveooz(DDukeActor* actor, int seenine, int seeninedead, int ooz, int explo
|
|||
}
|
||||
else
|
||||
{
|
||||
if (actor->spr.ScaleX() > 0)
|
||||
if (actor->spr.scale.X > 0)
|
||||
{
|
||||
actor->temp_data[2]++;
|
||||
if (actor->temp_data[2] == 3)
|
||||
|
@ -1352,7 +1352,7 @@ void rpgexplode(DDukeActor *actor, int hit, const DVector3 &pos, int EXPLOSION2,
|
|||
if (!explosion) return;
|
||||
explosion->spr.pos = pos;
|
||||
|
||||
if (actor->spr.ScaleX() < 0.15625)
|
||||
if (actor->spr.scale.X < 0.15625)
|
||||
{
|
||||
explosion->spr.SetScale(0.09375, 0.09375);
|
||||
}
|
||||
|
@ -1369,7 +1369,7 @@ void rpgexplode(DDukeActor *actor, int hit, const DVector3 &pos, int EXPLOSION2,
|
|||
if (newextra > 0) actor->spr.extra = newextra;
|
||||
S_PlayActorSound(playsound, actor);
|
||||
|
||||
if (actor->spr.ScaleX() >= 0.15625)
|
||||
if (actor->spr.scale.X >= 0.15625)
|
||||
{
|
||||
int x = actor->spr.extra;
|
||||
fi.hitradius(actor, gs.rpgblastradius, x >> 2, x >> 1, x - (x >> 2), x);
|
||||
|
@ -1976,7 +1976,7 @@ void camera(DDukeActor *actor)
|
|||
|
||||
void forcesphereexplode(DDukeActor *actor)
|
||||
{
|
||||
double size = actor->spr.ScaleX();
|
||||
double size = actor->spr.scale.X;
|
||||
if (actor->temp_data[1] > 0)
|
||||
{
|
||||
actor->temp_data[1]--;
|
||||
|
@ -2290,7 +2290,7 @@ bool bloodpool(DDukeActor* actor, bool puke)
|
|||
actor->temp_data[2]++;
|
||||
if (attackerflag(actor, SFLAG_FLAMMABLEPOOLEFFECT))
|
||||
{
|
||||
if (actor->spr.ScaleX() < 1 && actor->spr.ScaleY() < 1)
|
||||
if (actor->spr.scale.X < 1 && actor->spr.scale.Y < 1)
|
||||
{
|
||||
actor->spr.AddScaleX((krand() & 3) * REPEAT_SCALE);
|
||||
actor->spr.AddScaleY((krand() & 3) * REPEAT_SCALE);
|
||||
|
@ -2298,7 +2298,7 @@ bool bloodpool(DDukeActor* actor, bool puke)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (actor->spr.ScaleX() < 0.5 && actor->spr.ScaleY() < 0.5)
|
||||
if (actor->spr.scale.X < 0.5 && actor->spr.scale.Y < 0.5)
|
||||
{
|
||||
actor->spr.AddScaleX((krand() & 3) * REPEAT_SCALE);
|
||||
actor->spr.AddScaleY((krand() & 3) * REPEAT_SCALE);
|
||||
|
@ -2306,7 +2306,7 @@ bool bloodpool(DDukeActor* actor, bool puke)
|
|||
}
|
||||
}
|
||||
|
||||
if (xx < 844 / 16. && actor->spr.ScaleX() > 0.09375 && actor->spr.ScaleY() > 0.09375)
|
||||
if (xx < 844 / 16. && actor->spr.scale.X > 0.09375 && actor->spr.scale.Y > 0.09375)
|
||||
{
|
||||
if (actor->spr.pal == 0 && (krand() & 255) < 16 && !puke)
|
||||
{
|
||||
|
@ -2510,7 +2510,7 @@ void gutsdir(DDukeActor* actor, int gtype, int n, int p)
|
|||
{
|
||||
double scale;
|
||||
|
||||
if (badguy(actor) && actor->spr.ScaleX() < 0.25)
|
||||
if (badguy(actor) && actor->spr.scale.X < 0.25)
|
||||
scale = 0.125;
|
||||
else scale = 0.5;
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
double radius = r * inttoworld;
|
||||
static const uint8_t statlist[] = { STAT_DEFAULT, STAT_ACTOR, STAT_STANDABLE, STAT_PLAYER, STAT_FALLER, STAT_ZOMBIEACTOR, STAT_MISC };
|
||||
|
||||
if(actor->spr.picnum != SHRINKSPARK && !(actor->spr.picnum == RPG && actor->spr.ScaleX() < 0.171875))
|
||||
if(actor->spr.picnum != SHRINKSPARK && !(actor->spr.picnum == RPG && actor->spr.scale.X < 0.171875))
|
||||
{
|
||||
BFSSectorSearch search(actor->sector());
|
||||
|
||||
|
@ -335,7 +335,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
}
|
||||
else if (act2->spr.extra >= 0 && act2 != actor && (actorflag(act2, SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL)))
|
||||
{
|
||||
if (actor->spr.picnum == SHRINKSPARK && act2->spr.picnum != SHARK && (act2 == Owner || act2->spr.ScaleX() < 0.375))
|
||||
if (actor->spr.picnum == SHRINKSPARK && act2->spr.picnum != SHARK && (act2 == Owner || act2->spr.scale.X < 0.375))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
|
|||
{
|
||||
int bg = badguy(actor);
|
||||
|
||||
if (actor->spr.statnum == STAT_MISC || (bg && actor->spr.ScaleX() < 0.0625))
|
||||
if (actor->spr.statnum == STAT_MISC || (bg && actor->spr.scale.X < 0.0625))
|
||||
{
|
||||
actor->spr.pos += change;
|
||||
if (bg)
|
||||
|
@ -450,11 +450,11 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
|
|||
auto dasectp = actor->sector();
|
||||
|
||||
auto ppos = actor->spr.pos;
|
||||
ppos.Z -= (tileHeight(actor->spr.picnum) * actor->spr.ScaleY()) * 0.5;
|
||||
ppos.Z -= (tileHeight(actor->spr.picnum) * actor->spr.scale.Y) * 0.5;
|
||||
|
||||
if (bg)
|
||||
{
|
||||
if (actor->spr.ScaleX() > 0.9375 )
|
||||
if (actor->spr.scale.X > 0.9375 )
|
||||
clipmove(ppos, &dasectp, change * 0.5, 64., 4., 4., cliptype, result);
|
||||
else
|
||||
{
|
||||
|
@ -540,7 +540,7 @@ void guts_d(DDukeActor* actor, int gtype, int n, int p)
|
|||
double scale;
|
||||
uint8_t pal;
|
||||
|
||||
if (badguy(actor) && actor->spr.ScaleX() < 0.25)
|
||||
if (badguy(actor) && actor->spr.scale.X < 0.25)
|
||||
scale = 0.125;
|
||||
else scale = 0.5;
|
||||
|
||||
|
@ -640,10 +640,10 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
else
|
||||
{
|
||||
if (actor->hitextra == 0)
|
||||
if (actor->attackertype == SHRINKSPARK && actor->spr.ScaleX() < 0.375)
|
||||
if (actor->attackertype == SHRINKSPARK && actor->spr.scale.X < 0.375)
|
||||
return -1;
|
||||
|
||||
if (isWorldTour() && actor->attackertype == FIREFLY && actor->spr.ScaleX() < 0.75)
|
||||
if (isWorldTour() && actor->attackertype == FIREFLY && actor->spr.scale.X < 0.75)
|
||||
{
|
||||
if (actor->attackertype != RADIUSEXPLOSION && actor->attackertype != RPG)
|
||||
return -1;
|
||||
|
@ -1045,7 +1045,7 @@ static void movefireext(DDukeActor* actor)
|
|||
static void moveviewscreen(DDukeActor* actor)
|
||||
{
|
||||
const double VIEWSCR_DIST = 1024; // was originally 2048, was increased to 8192 by EDuke32 and RedNukem, but with high resolutions the resulting 512 map units are still too low.
|
||||
if (actor->spr.ScaleX() == 0) deletesprite(actor);
|
||||
if (actor->spr.scale.X == 0) deletesprite(actor);
|
||||
else
|
||||
{
|
||||
double a;
|
||||
|
@ -1081,14 +1081,14 @@ CLEAR_THE_BOLT2:
|
|||
actor->temp_data[2]--;
|
||||
return;
|
||||
}
|
||||
if ((actor->spr.ScaleX() == 0 && actor->spr.ScaleY()) == 0)
|
||||
if ((actor->spr.scale.X == 0 && actor->spr.scale.Y) == 0)
|
||||
{
|
||||
actor->spr.SetScale(actor->temp_pos.X, actor->temp_pos.Y);
|
||||
}
|
||||
if ((krand() & 8) == 0)
|
||||
{
|
||||
actor->temp_pos.X = actor->spr.ScaleX();
|
||||
actor->temp_pos.Y = actor->spr.ScaleY();
|
||||
actor->temp_pos.X = actor->spr.scale.X;
|
||||
actor->temp_pos.Y = actor->spr.scale.Y;
|
||||
actor->temp_data[2] = global_random & 4;
|
||||
actor->spr.SetScale(0, 0);
|
||||
goto CLEAR_THE_BOLT2;
|
||||
|
@ -1126,14 +1126,14 @@ CLEAR_THE_BOLT:
|
|||
sectp->ceilingshade = 20;
|
||||
return;
|
||||
}
|
||||
if (actor->spr.ScaleX() == 0 && actor->spr.ScaleY() == 0)
|
||||
if (actor->spr.scale.X == 0 && actor->spr.scale.Y == 0)
|
||||
{
|
||||
actor->spr.SetScale(actor->temp_pos.X, actor->temp_pos.Y);
|
||||
}
|
||||
else if ((krand() & 8) == 0)
|
||||
{
|
||||
actor->temp_pos.X = actor->spr.ScaleX();
|
||||
actor->temp_pos.Y = actor->spr.ScaleY();
|
||||
actor->temp_pos.X = actor->spr.scale.X;
|
||||
actor->temp_pos.Y = actor->spr.scale.Y;
|
||||
actor->temp_data[2] = global_random & 4;
|
||||
actor->spr.SetScale(0, 0);
|
||||
goto CLEAR_THE_BOLT;
|
||||
|
@ -1322,7 +1322,7 @@ static bool movefireball(DDukeActor* actor)
|
|||
ball->vel = trail->temp_pos2;
|
||||
}
|
||||
}
|
||||
double scale = actor->spr.ScaleX() * siz;
|
||||
double scale = actor->spr.scale.X * siz;
|
||||
ball->spr.SetScale(scale, scale);
|
||||
ball->spr.cstat = actor->spr.cstat;
|
||||
ball->spr.extra = 0;
|
||||
|
@ -1479,9 +1479,9 @@ static bool weaponhitsector(DDukeActor* proj, const DVector3& oldpos, bool fireb
|
|||
bounce(proj);
|
||||
ssp(proj, CLIPMASK1);
|
||||
proj->spr.extra >>= 1;
|
||||
if (proj->spr.ScaleX() > 0.125 )
|
||||
if (proj->spr.scale.X > 0.125 )
|
||||
proj->spr.AddScaleX(-0.03125);
|
||||
if (proj->spr.ScaleY() > 0.125 )
|
||||
if (proj->spr.scale.Y > 0.125 )
|
||||
proj->spr.AddScaleY(-0.03125);
|
||||
proj->spr.yint--;
|
||||
return true;
|
||||
|
@ -1518,7 +1518,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
switch (proj->spr.picnum)
|
||||
{
|
||||
case RPG:
|
||||
if (proj->attackertype != BOSS2 && proj->spr.ScaleX() >= 0.15625 && proj->sector()->lotag != 2)
|
||||
if (proj->attackertype != BOSS2 && proj->spr.scale.X >= 0.15625 && proj->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
|
@ -1626,7 +1626,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
auto spawned = spawn(proj, EXPLOSION2);
|
||||
if (spawned)
|
||||
{
|
||||
auto scale = proj->spr.ScaleX() * 0.5;
|
||||
auto scale = proj->spr.scale.X * 0.5;
|
||||
spawned->spr.SetScale(scale,scale);
|
||||
if (coll.type == kHitSector)
|
||||
{
|
||||
|
@ -1643,7 +1643,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
auto spawned = spawn(proj, EXPLOSION2);
|
||||
if (spawned)
|
||||
{
|
||||
auto scale = proj->spr.ScaleX() * 0.5;
|
||||
auto scale = proj->spr.scale.X * 0.5;
|
||||
spawned->spr.SetScale(scale,scale);
|
||||
}
|
||||
}
|
||||
|
@ -1663,7 +1663,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (proj->spr.picnum == RPG && proj->sector()->lotag == 2 && proj->spr.ScaleX() >= 0.15625 && rnd(140))
|
||||
else if (proj->spr.picnum == RPG && proj->sector()->lotag == 2 && proj->spr.scale.X >= 0.15625 && rnd(140))
|
||||
spawn(proj, WATERBUBBLE);
|
||||
|
||||
}
|
||||
|
@ -2275,8 +2275,8 @@ static void greenslime(DDukeActor *actor)
|
|||
actor->spr.cstat &= ~CSTAT_SPRITE_YFLIP;
|
||||
actor->spr.picnum = GREENSLIME + 4;
|
||||
|
||||
if (actor->spr.ScaleX() > 0.5 ) actor->spr.AddScaleX(-(krand() & 7) * REPEAT_SCALE);
|
||||
if (actor->spr.ScaleY() > 0.25 ) actor->spr.AddScaleY(-(krand() & 7) * REPEAT_SCALE);
|
||||
if (actor->spr.scale.X > 0.5 ) actor->spr.AddScaleX(-(krand() & 7) * REPEAT_SCALE);
|
||||
if (actor->spr.scale.Y > 0.25 ) actor->spr.AddScaleY(-(krand() & 7) * REPEAT_SCALE);
|
||||
else
|
||||
{
|
||||
actor->spr.SetScale(0.625, 0.25);
|
||||
|
@ -2299,10 +2299,10 @@ static void greenslime(DDukeActor *actor)
|
|||
actor->spr.pos = s5->spr.pos + s5->spr.angle.ToVector() * 0.5;
|
||||
actor->spr.picnum = GREENSLIME + 2 + (global_random & 1);
|
||||
|
||||
if (actor->spr.ScaleY() < 1) actor->spr.AddScaleY(0.03125);
|
||||
if (actor->spr.scale.Y < 1) actor->spr.AddScaleY(0.03125);
|
||||
else
|
||||
{
|
||||
if (actor->spr.ScaleX() < 0.5) actor->spr.AddScaleY(0.0625);
|
||||
if (actor->spr.scale.X < 0.5) actor->spr.AddScaleY(0.0625);
|
||||
else
|
||||
{
|
||||
actor->temp_data[0] = -1;
|
||||
|
@ -2393,8 +2393,8 @@ static void greenslime(DDukeActor *actor)
|
|||
if (actor->temp_data[0] == 1)
|
||||
{
|
||||
actor->spr.picnum = GREENSLIME;
|
||||
if (actor->spr.ScaleY() < 0.625) actor->spr.AddScaleY(0.125);
|
||||
if (actor->spr.ScaleX() > 0.125 ) actor->spr.AddScaleX(-0.0625);
|
||||
if (actor->spr.scale.Y < 0.625) actor->spr.AddScaleY(0.125);
|
||||
if (actor->spr.scale.X > 0.125 ) actor->spr.AddScaleX(-0.0625);
|
||||
if (actor->vel.Z > -12)
|
||||
actor->vel.Z -= 348 / 256.;
|
||||
actor->spr.pos.Z += actor->vel.Z;
|
||||
|
@ -2419,8 +2419,8 @@ static void greenslime(DDukeActor *actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (actor->spr.ScaleY() < 0.5625) actor->spr.AddScaleY(0.125);
|
||||
if (actor->spr.ScaleX() > 0.125 ) actor->spr.AddScaleX(-0.0625);
|
||||
if (actor->spr.scale.Y < 0.5625) actor->spr.AddScaleY(0.125);
|
||||
if (actor->spr.scale.X > 0.125 ) actor->spr.AddScaleX(-0.0625);
|
||||
}
|
||||
|
||||
if (actor->spr.pos.Z > actor->floorz - 8)
|
||||
|
@ -2457,10 +2457,10 @@ static void flamethrowerflame(DDukeActor *actor)
|
|||
getglobalz(actor);
|
||||
|
||||
int ds = actor->temp_data[0] / 6;
|
||||
if (actor->spr.ScaleX() < 0.1250)
|
||||
if (actor->spr.scale.X < 0.1250)
|
||||
{
|
||||
actor->spr.AddScaleX(ds * REPEAT_SCALE);
|
||||
actor->spr.SetScaleY(actor->spr.ScaleX());
|
||||
actor->spr.SetScaleY(actor->spr.scale.X);
|
||||
}
|
||||
actor->clipdist += ds * 0.25;
|
||||
if (actor->temp_data[0] <= 2)
|
||||
|
@ -2518,7 +2518,7 @@ static void flamethrowerflame(DDukeActor *actor)
|
|||
fi.checkhitceiling(actor->sector());
|
||||
}
|
||||
|
||||
if (actor->spr.ScaleX() >= 0.15625)
|
||||
if (actor->spr.scale.X >= 0.15625)
|
||||
{
|
||||
int x = actor->spr.extra;
|
||||
fi.hitradius(actor, gs.rpgblastradius, x >> 2, x >> 1, x - (x >> 2), x);
|
||||
|
@ -2676,7 +2676,7 @@ DETONATEB:
|
|||
RANDOMSCRAP(actor);
|
||||
}
|
||||
|
||||
if (actor->spr.ScaleY())
|
||||
if (actor->spr.scale.Y)
|
||||
{
|
||||
actor->spr.SetScaleY(0);
|
||||
return;
|
||||
|
@ -2759,7 +2759,7 @@ void moveactors_d(void)
|
|||
{
|
||||
auto sectp = act->sector();
|
||||
|
||||
if (act->spr.ScaleX() == 0 || sectp == nullptr)
|
||||
if (act->spr.scale.X == 0 || sectp == nullptr)
|
||||
{
|
||||
deletesprite(act);
|
||||
continue;
|
||||
|
@ -2941,7 +2941,7 @@ static void fireflyflyingeffect(DDukeActor *actor)
|
|||
return;
|
||||
}
|
||||
|
||||
if (Owner->spr.ScaleX() >= 0.375 || Owner->spr.pal == 1)
|
||||
if (Owner->spr.scale.X >= 0.375 || Owner->spr.pal == 1)
|
||||
actor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
else
|
||||
actor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
|
@ -2972,7 +2972,7 @@ void moveexplosions_d(void) // STATNUM 5
|
|||
DukeStatIterator it(STAT_MISC);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (!act->insector() || act->spr.ScaleX() == 0)
|
||||
if (!act->insector() || act->spr.scale.X == 0)
|
||||
{
|
||||
deletesprite(act);
|
||||
continue;
|
||||
|
@ -3620,7 +3620,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
|
||||
if (a && actor->spr.picnum != ROTATEGUN)
|
||||
{
|
||||
if (xvel < 960 && actor->spr.ScaleX() > 0.25 )
|
||||
if (xvel < 960 && actor->spr.scale.X > 0.25 )
|
||||
{
|
||||
|
||||
daxvel = -(1024 - xvel) * maptoworld;
|
||||
|
|
|
@ -220,7 +220,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
double radius = r * inttoworld;
|
||||
static const uint8_t statlist[] = { STAT_DEFAULT, STAT_ACTOR, STAT_STANDABLE, STAT_PLAYER, STAT_FALLER, STAT_ZOMBIEACTOR, STAT_MISC };
|
||||
|
||||
if (actor->spr.ScaleX() >= 0.17675 || !(actor->spr.picnum == RPG || ((isRRRA()) && actor->spr.picnum == RPG2)))
|
||||
if (actor->spr.scale.X >= 0.17675 || !(actor->spr.picnum == RPG || ((isRRRA()) && actor->spr.picnum == RPG2)))
|
||||
{
|
||||
BFSSectorSearch search(actor->sector());
|
||||
|
||||
|
@ -367,7 +367,7 @@ int movesprite_ex_r(DDukeActor* actor, const DVector3& change, unsigned int clip
|
|||
{
|
||||
int bg = badguy(actor);
|
||||
|
||||
if (actor->spr.statnum == 5 || (bg && actor->spr.ScaleX() < 0.0625))
|
||||
if (actor->spr.statnum == 5 || (bg && actor->spr.scale.X < 0.0625))
|
||||
{
|
||||
actor->spr.pos += change;
|
||||
if (bg)
|
||||
|
@ -378,11 +378,11 @@ int movesprite_ex_r(DDukeActor* actor, const DVector3& change, unsigned int clip
|
|||
auto dasectp = actor->sector();
|
||||
|
||||
auto ppos = actor->spr.pos;
|
||||
ppos.Z -= (tileHeight(actor->spr.picnum) * actor->spr.ScaleY()) * 0.5;
|
||||
ppos.Z -= (tileHeight(actor->spr.picnum) * actor->spr.scale.Y) * 0.5;
|
||||
|
||||
if (bg)
|
||||
{
|
||||
if (actor->spr.ScaleX() > 0.9375 )
|
||||
if (actor->spr.scale.X > 0.9375 )
|
||||
clipmove(ppos, &dasectp, change * 0.5, 64., 4., 4., cliptype, result);
|
||||
else
|
||||
{
|
||||
|
@ -446,7 +446,7 @@ void guts_r(DDukeActor* actor, int gtype, int n, int p)
|
|||
double scale;
|
||||
uint8_t pal;
|
||||
|
||||
if (badguy(actor) && actor->spr.ScaleX() < 0.25)
|
||||
if (badguy(actor) && actor->spr.scale.X < 0.25)
|
||||
scale = 0.0625;
|
||||
else scale = 0.25;
|
||||
|
||||
|
@ -543,7 +543,7 @@ int ifhitbyweapon_r(DDukeActor *actor)
|
|||
else
|
||||
{
|
||||
if (actor->hitextra == 0)
|
||||
if (actor->spr.ScaleX() < 0.375)
|
||||
if (actor->spr.scale.X < 0.375)
|
||||
return -1;
|
||||
|
||||
actor->spr.extra -= actor->hitextra;
|
||||
|
@ -763,14 +763,14 @@ CLEAR_THE_BOLT:
|
|||
sectp->ceilingshade = 20;
|
||||
return;
|
||||
}
|
||||
if (actor->spr.ScaleX() == 0 && actor->spr.ScaleY() == 0)
|
||||
if (actor->spr.scale.X == 0 && actor->spr.scale.Y == 0)
|
||||
{
|
||||
actor->spr.SetScale(actor->temp_pos.X, actor->temp_pos.Y);
|
||||
}
|
||||
else if ((krand() & 8) == 0)
|
||||
{
|
||||
actor->temp_pos.X = actor->spr.ScaleX();
|
||||
actor->temp_pos.Y = actor->spr.ScaleY();
|
||||
actor->temp_pos.X = actor->spr.scale.X;
|
||||
actor->temp_pos.Y = actor->spr.scale.Y;
|
||||
actor->temp_data[2] = global_random & 4;
|
||||
actor->spr.SetScale(0, 0);
|
||||
goto CLEAR_THE_BOLT;
|
||||
|
@ -909,7 +909,7 @@ void movestandables_r(void)
|
|||
static void chickenarrow(DDukeActor* actor)
|
||||
{
|
||||
actor->spr.hitag++;
|
||||
if (actor->attackertype != BOSS2 && actor->spr.ScaleX() >= 0.15625 && actor->sector()->lotag != 2)
|
||||
if (actor->attackertype != BOSS2 && actor->spr.scale.X >= 0.15625 && actor->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(actor, SMALLSMOKE);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
|
@ -1053,9 +1053,9 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const DVector3& oldpo
|
|||
if (wal->overpicnum != MIRROR && wal->picnum != MIRROR)
|
||||
{
|
||||
proj->spr.extra >>= 1;
|
||||
if (proj->spr.ScaleX() > 0.125 )
|
||||
if (proj->spr.scale.X > 0.125 )
|
||||
proj->spr.AddScaleX(-0.03125);
|
||||
if (proj->spr.ScaleY() > 0.125 )
|
||||
if (proj->spr.scale.Y > 0.125 )
|
||||
proj->spr.AddScaleY(-0.03125);
|
||||
proj->spr.yint--;
|
||||
}
|
||||
|
@ -1082,7 +1082,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const DVector3& oldpo
|
|||
j->spr.SetScale(0.125, 0.125);
|
||||
j->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL;
|
||||
j->spr.angle += DAngle90;
|
||||
j->clipdist = proj->spr.ScaleX() * tileWidth(proj->spr.picnum) * 0.125;
|
||||
j->clipdist = proj->spr.scale.X * tileWidth(proj->spr.picnum) * 0.125;
|
||||
}
|
||||
}
|
||||
deletesprite(proj);
|
||||
|
@ -1137,9 +1137,9 @@ bool weaponhitsector(DDukeActor *proj, const DVector3& oldpos)
|
|||
bounce(proj);
|
||||
ssp(proj, CLIPMASK1);
|
||||
proj->spr.extra >>= 1;
|
||||
if (proj->spr.ScaleX() > 0.125 )
|
||||
if (proj->spr.scale.X > 0.125 )
|
||||
proj->spr.AddScaleX(-0.03125);
|
||||
if (proj->spr.ScaleY() > 0.125 )
|
||||
if (proj->spr.scale.Y > 0.125 )
|
||||
proj->spr.AddScaleY(-0.03125);
|
||||
proj->spr.yint--;
|
||||
return true;
|
||||
|
@ -1179,7 +1179,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
switch (proj->spr.picnum)
|
||||
{
|
||||
case RPG:
|
||||
if (proj->attackertype != BOSS2 && proj->spr.ScaleX() >= 0.15625 && proj->sector()->lotag != 2)
|
||||
if (proj->attackertype != BOSS2 && proj->spr.scale.X >= 0.15625 && proj->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
|
@ -1199,7 +1199,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
}
|
||||
else
|
||||
makeitfall(proj);
|
||||
if (proj->spr.ScaleX() >= 0.15625 && proj->sector()->lotag != 2)
|
||||
if (proj->spr.scale.X >= 0.15625 && proj->sector()->lotag != 2)
|
||||
{
|
||||
auto spawned = spawn(proj, SMALLSMOKE);
|
||||
if (spawned) spawned->spr.pos.Z += 1;
|
||||
|
@ -1280,7 +1280,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
auto spawned = spawn(proj, 1441);
|
||||
if (spawned)
|
||||
{
|
||||
auto scale = proj->spr.ScaleX() * 0.5;
|
||||
auto scale = proj->spr.scale.X * 0.5;
|
||||
spawned->spr.SetScale(scale, scale);
|
||||
if (coll.type == kHitSector)
|
||||
{
|
||||
|
@ -1296,7 +1296,7 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
deletesprite(proj);
|
||||
return;
|
||||
}
|
||||
if ((proj->spr.picnum == RPG || (isRRRA() && proj->spr.picnum == RPG2)) && proj->sector()->lotag == 2 && proj->spr.ScaleX() >= 0.15625 && rnd(184))
|
||||
if ((proj->spr.picnum == RPG || (isRRRA() && proj->spr.picnum == RPG2)) && proj->sector()->lotag == 2 && proj->spr.scale.X >= 0.15625 && rnd(184))
|
||||
spawn(proj, WATERBUBBLE);
|
||||
|
||||
}
|
||||
|
@ -1854,7 +1854,7 @@ static void rrra_specialstats()
|
|||
else if (enemysizecheat == 2)
|
||||
{
|
||||
act->spr.MultScale(0.5);
|
||||
act->clipdist = act->spr.ScaleX(), tileHeight(act->spr.picnum) * 0.125;
|
||||
act->clipdist = act->spr.scale.X, tileHeight(act->spr.picnum) * 0.125;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2443,7 +2443,7 @@ DETONATEB:
|
|||
}
|
||||
}
|
||||
|
||||
if (actor->spr.ScaleY())
|
||||
if (actor->spr.scale.Y)
|
||||
{
|
||||
actor->spr.SetScaleY(0);
|
||||
return;
|
||||
|
@ -2615,7 +2615,7 @@ void moveactors_r(void)
|
|||
{
|
||||
bool deleteafterexecute = false; // taking a cue here from RedNukem to not run scripts on deleted sprites.
|
||||
|
||||
if( act->spr.ScaleX() == 0 || !act->insector())
|
||||
if( act->spr.scale.X == 0 || !act->insector())
|
||||
{
|
||||
deletesprite(act);
|
||||
continue;
|
||||
|
@ -2872,7 +2872,7 @@ void moveexplosions_r(void) // STATNUM 5
|
|||
t = &act->temp_data[0];
|
||||
auto sectp = act->sector();
|
||||
|
||||
if (!act->insector() || act->spr.ScaleX() == 0)
|
||||
if (!act->insector() || act->spr.scale.X == 0)
|
||||
{
|
||||
deletesprite(act);
|
||||
continue;
|
||||
|
@ -3617,7 +3617,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
|
||||
if (a)
|
||||
{
|
||||
if (xvel < 960 && actor->spr.ScaleX() > 0.25 )
|
||||
if (xvel < 960 && actor->spr.scale.X > 0.25 )
|
||||
{
|
||||
|
||||
daxvel = -(1024 - xvel) * maptoworld;
|
||||
|
|
|
@ -322,7 +322,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
|
||||
newtspr->statnum = 99;
|
||||
|
||||
newtspr->SetScaleY(max(t->ScaleY() * 0.125, 0.0625));
|
||||
newtspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625));
|
||||
|
||||
newtspr->shade = t->shade;
|
||||
newtspr->cstat = 0;
|
||||
|
@ -389,8 +389,8 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
if (ps[p].on_crane == nullptr && (h->sector()->lotag & 0x7ff) != 1)
|
||||
{
|
||||
double v = h->spr.pos.Z - ps[p].GetActor()->floorz + 3;
|
||||
if (v > 4 && h->spr.ScaleY() > 0.5 && h->spr.extra > 0)
|
||||
h->spr.yoffset = (int8_t)(v / h->spr.ScaleY());
|
||||
if (v > 4 && h->spr.scale.Y > 0.5 && h->spr.extra > 0)
|
||||
h->spr.yoffset = (int8_t)(v / h->spr.scale.Y);
|
||||
else h->spr.yoffset = 0;
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
|
||||
if (!h->GetOwner()) continue;
|
||||
|
||||
if (t->pos.Z > h->floorz && t->ScaleX() < 0.5)
|
||||
if (t->pos.Z > h->floorz && t->scale.X < 0.5)
|
||||
t->pos.Z = h->floorz;
|
||||
|
||||
break;
|
||||
|
@ -572,7 +572,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
|
||||
shadowspr->statnum = 99;
|
||||
|
||||
shadowspr->SetScaleY(max(t->ScaleY() * 0.125, 0.0625));
|
||||
shadowspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625));
|
||||
shadowspr->shade = 127;
|
||||
shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
|
||||
newtspr->statnum = 99;
|
||||
|
||||
newtspr->SetScaleY(max(t->ScaleY() * 0.125, 0.0625));
|
||||
newtspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625));
|
||||
|
||||
newtspr->shade = t->shade;
|
||||
newtspr->cstat = 0;
|
||||
|
@ -430,8 +430,8 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
if (ps[p].on_crane == nullptr && (h->sector()->lotag & 0x7ff) != 1)
|
||||
{
|
||||
double v = h->spr.pos.Z - ps[p].GetActor()->floorz + 3;
|
||||
if (v > 4 && h->spr.ScaleY() > 0.5 && h->spr.extra > 0)
|
||||
h->spr.yoffset = (int8_t)(v / h->spr.ScaleY());
|
||||
if (v > 4 && h->spr.scale.Y > 0.5 && h->spr.extra > 0)
|
||||
h->spr.yoffset = (int8_t)(v / h->spr.scale.Y);
|
||||
else h->spr.yoffset = 0;
|
||||
}
|
||||
|
||||
|
@ -458,7 +458,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
|
||||
if (!h->GetOwner()) continue;
|
||||
|
||||
if (t->pos.Z > h->floorz && t->ScaleX() < 0.5)
|
||||
if (t->pos.Z > h->floorz && t->scale.X < 0.5)
|
||||
t->pos.Z = h->floorz;
|
||||
|
||||
if (ps[p].OnMotorcycle && p == screenpeek)
|
||||
|
@ -721,7 +721,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
|
||||
shadowspr->statnum = 99;
|
||||
|
||||
shadowspr->SetScaleY(max(t->ScaleY() * 0.125, 0.0625));
|
||||
shadowspr->SetScaleY(max(t->scale.Y * 0.125, 0.0625));
|
||||
shadowspr->shade = 127;
|
||||
shadowspr->cstat |= CSTAT_SPRITE_TRANSLUCENT;
|
||||
|
||||
|
|
|
@ -396,7 +396,7 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
|
|||
DukeSectIterator it(ii);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act == ps[screenpeek].actor || (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) || act->spr.cstat == CSTAT_SPRITE_BLOCK_ALL || act->spr.ScaleX() == 0) continue;
|
||||
if (act == ps[screenpeek].actor || (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) || act->spr.cstat == CSTAT_SPRITE_BLOCK_ALL || act->spr.scale.X == 0) continue;
|
||||
|
||||
if ((act->spr.cstat & CSTAT_SPRITE_BLOCK_ALL) != 0)
|
||||
{
|
||||
|
@ -430,7 +430,7 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
|
|||
auto& pp = ps[p];
|
||||
auto act = pp.GetActor();
|
||||
int i = TILE_APLAYERTOP + (act->vel.X > 1 && pp.on_ground ? (PlayClock >> 4) & 3 : 0);
|
||||
double j = clamp(czoom * act->spr.ScaleY() + abs(pp.truefz - pp.pos.Z) * REPEAT_SCALE, 0.333, 2.);
|
||||
double j = clamp(czoom * act->spr.scale.Y + abs(pp.truefz - pp.pos.Z) * REPEAT_SCALE, 0.333, 2.);
|
||||
|
||||
auto const vec = OutAutomapVector(mxy - cpos, cangvect, czoom, xydim);
|
||||
auto const daang = -((!SyncInput() ? act->spr.angle : act->interpolatedangle(interpfrac)) - cang).Normalized360().Degrees();
|
||||
|
|
|
@ -1202,11 +1202,11 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
case ACTOR_XREPEAT:
|
||||
if (bSet) act->spr.SetScaleX(lValue * REPEAT_SCALE);
|
||||
else SetGameVarID(lVar2, int(act->spr.ScaleX() * INV_REPEAT_SCALE), sActor, sPlayer);
|
||||
else SetGameVarID(lVar2, int(act->spr.scale.X * INV_REPEAT_SCALE), sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_YREPEAT:
|
||||
if (bSet) act->spr.SetScaleY(lValue * REPEAT_SCALE);
|
||||
else SetGameVarID(lVar2, int(act->spr.ScaleY() * INV_REPEAT_SCALE), sActor, sPlayer);
|
||||
else SetGameVarID(lVar2, int(act->spr.scale.Y * INV_REPEAT_SCALE), sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_XOFFSET:
|
||||
if (bSet) act->spr.xoffset = lValue;
|
||||
|
@ -1386,7 +1386,7 @@ static int ifcanshoottarget(DDukeActor *actor, int g_p, int g_x)
|
|||
double sclip;
|
||||
DAngle angdif;
|
||||
|
||||
if (badguy(actor) && actor->spr.ScaleX() > 0.875)
|
||||
if (badguy(actor) && actor->spr.scale.X > 0.875)
|
||||
{
|
||||
sclip = 3084 / 16.;
|
||||
angdif = DAngle22_5 * 3 / 8;
|
||||
|
@ -1729,16 +1729,16 @@ int ParseState::parse(void)
|
|||
// 1.4, so instead of patching the CONs I'll surruptitiously patch the code here
|
||||
//if (!isPlutoPak() && *insptr == 0) *insptr = 4;
|
||||
|
||||
double siz = ((*insptr) * REPEAT_SCALE - g_ac->spr.ScaleX());
|
||||
g_ac->spr.SetScaleX(clamp(g_ac->spr.ScaleX() + Sgn(siz) * REPEAT_SCALE, 0., 4.));
|
||||
double siz = ((*insptr) * REPEAT_SCALE - g_ac->spr.scale.X);
|
||||
g_ac->spr.SetScaleX(clamp(g_ac->spr.scale.X + Sgn(siz) * REPEAT_SCALE, 0., 4.));
|
||||
|
||||
insptr++;
|
||||
|
||||
auto scale = g_ac->spr.ScaleY();
|
||||
auto scale = g_ac->spr.scale.Y;
|
||||
if ((g_ac->isPlayer() && scale < 0.5626) || *insptr * REPEAT_SCALE < scale || (scale * (tileHeight(g_ac->spr.picnum) + 8)) < g_ac->floorz - g_ac->ceilingz)
|
||||
{
|
||||
siz = ((*insptr) * REPEAT_SCALE - g_ac->spr.ScaleY());
|
||||
g_ac->spr.SetScaleY(clamp(g_ac->spr.ScaleY() + Sgn(siz) * REPEAT_SCALE, 0., 4.));
|
||||
siz = ((*insptr) * REPEAT_SCALE - g_ac->spr.scale.Y);
|
||||
g_ac->spr.SetScaleY(clamp(g_ac->spr.scale.Y + Sgn(siz) * REPEAT_SCALE, 0., 4.));
|
||||
}
|
||||
|
||||
insptr++;
|
||||
|
@ -2298,7 +2298,7 @@ int ParseState::parse(void)
|
|||
case concmd_ifsizedown:
|
||||
g_ac->spr.AddScaleX(-REPEAT_SCALE);
|
||||
g_ac->spr.AddScaleY(-REPEAT_SCALE);
|
||||
parseifelse(g_ac->spr.ScaleX() <= 5 * REPEAT_SCALE);
|
||||
parseifelse(g_ac->spr.scale.X <= 5 * REPEAT_SCALE);
|
||||
break;
|
||||
case concmd_ifwind:
|
||||
parseifelse(WindTime > 0);
|
||||
|
@ -2414,7 +2414,7 @@ int ParseState::parse(void)
|
|||
j = 1;
|
||||
else if( (l& pkicking) && ( ps[g_p].quick_kick > 0 || ( ps[g_p].curr_weapon == KNEE_WEAPON && ps[g_p].kickback_pic > 0 ) ) )
|
||||
j = 1;
|
||||
else if( (l& pshrunk) && ps[g_p].GetActor()->spr.ScaleX() < (isRR() ? 0.125 : 0.5))
|
||||
else if( (l& pshrunk) && ps[g_p].GetActor()->spr.scale.X < (isRR() ? 0.125 : 0.5))
|
||||
j = 1;
|
||||
else if( (l& pjetpack) && ps[g_p].jetpack_on )
|
||||
j = 1;
|
||||
|
@ -2422,7 +2422,7 @@ int ParseState::parse(void)
|
|||
j = 1;
|
||||
else if( (l& ponground) && ps[g_p].on_ground)
|
||||
j = 1;
|
||||
else if( (l& palive) && ps[g_p].GetActor()->spr.ScaleX() > (isRR() ? 0.125 : 0.5) && ps[g_p].GetActor()->spr.extra > 0 && ps[g_p].timebeforeexit == 0)
|
||||
else if( (l& palive) && ps[g_p].GetActor()->spr.scale.X > (isRR() ? 0.125 : 0.5) && ps[g_p].GetActor()->spr.extra > 0 && ps[g_p].timebeforeexit == 0)
|
||||
j = 1;
|
||||
else if( (l& pdead) && ps[g_p].GetActor()->spr.extra <= 0)
|
||||
j = 1;
|
||||
|
@ -2790,7 +2790,7 @@ int ParseState::parse(void)
|
|||
}
|
||||
case concmd_pstomp:
|
||||
insptr++;
|
||||
if( ps[g_p].knee_incs == 0 && ps[g_p].GetActor()->spr.ScaleX() >= (isRR()? 0.140625 : 0.625) )
|
||||
if( ps[g_p].knee_incs == 0 && ps[g_p].GetActor()->spr.scale.X >= (isRR()? 0.140625 : 0.625) )
|
||||
if (cansee(g_ac->spr.pos.plusZ(-4), g_ac->sector(), ps[g_p].pos.plusZ(16), ps[g_p].GetActor()->sector()))
|
||||
{
|
||||
ps[g_p].knee_incs = 1;
|
||||
|
@ -3683,7 +3683,7 @@ void LoadActor(DDukeActor *actor, int p, int x)
|
|||
{
|
||||
if (badguy(actor))
|
||||
{
|
||||
if (actor->spr.ScaleX() > 0.9375 ) return;
|
||||
if (actor->spr.scale.X > 0.9375 ) return;
|
||||
if (ud.respawn_monsters == 1 && actor->spr.extra <= 0) return;
|
||||
}
|
||||
else if (ud.respawn_items == 1 && (actor->spr.cstat & CSTAT_SPRITE_INVISIBLE)) return;
|
||||
|
@ -3766,7 +3766,7 @@ void execute(DDukeActor *actor,int p,double xx)
|
|||
{
|
||||
if (badguy(actor))
|
||||
{
|
||||
if (actor->spr.ScaleX() > 0.9375 ) goto quit;
|
||||
if (actor->spr.scale.X > 0.9375 ) goto quit;
|
||||
if (ud.respawn_monsters == 1 && actor->spr.extra <= 0) goto quit;
|
||||
}
|
||||
else if (ud.respawn_items == 1 && (actor->spr.cstat & CSTAT_SPRITE_INVISIBLE)) goto quit;
|
||||
|
|
|
@ -236,7 +236,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
looking_arc = p->angle.looking_arc(interpfrac);
|
||||
hard_landing *= 8.;
|
||||
|
||||
gun_pos -= fabs(p->GetActor()->spr.ScaleX() < 0.5 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
|
||||
gun_pos -= fabs(p->GetActor()->spr.scale.X < 0.5 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
|
||||
gun_pos -= hard_landing;
|
||||
|
||||
weapon_xoffset = (160)-90;
|
||||
|
@ -295,7 +295,7 @@ void displayweapon_d(int snum, double interpfrac)
|
|||
}
|
||||
}
|
||||
|
||||
if (p->GetActor()->spr.ScaleX() < 0.625)
|
||||
if (p->GetActor()->spr.scale.X < 0.625)
|
||||
{
|
||||
//shrunken..
|
||||
animateshrunken(p, weapon_xoffset, looking_arc, look_anghalf, FIST, shade, o, interpfrac);
|
||||
|
|
|
@ -137,7 +137,7 @@ void displayweapon_r(int snum, double interpfrac)
|
|||
looking_arc = p->angle.looking_arc(interpfrac);
|
||||
hard_landing *= 8.;
|
||||
|
||||
gun_pos -= fabs(p->GetActor()->spr.ScaleX() < 0.125 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
|
||||
gun_pos -= fabs(p->GetActor()->spr.scale.X < 0.125 ? BobVal(weapon_sway * 4.) * 32 : BobVal(weapon_sway * 0.5) * 16);
|
||||
gun_pos -= hard_landing;
|
||||
|
||||
weapon_xoffset = (160)-90;
|
||||
|
@ -289,7 +289,7 @@ void displayweapon_r(int snum, double interpfrac)
|
|||
return;
|
||||
}
|
||||
|
||||
if (p->GetActor()->spr.ScaleX() < 0.125)
|
||||
if (p->GetActor()->spr.scale.X < 0.125)
|
||||
{
|
||||
animateshrunken(p, weapon_xoffset, looking_arc, look_anghalf, FIST, shade, o, interpfrac);
|
||||
}
|
||||
|
|
|
@ -314,7 +314,7 @@ DDukeActor* aim(DDukeActor* actor, int abase)
|
|||
DukeStatIterator it(aimstats[k]);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.ScaleX() > 0 && act->spr.extra >= 0 && (act->spr.cstat & (CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_INVISIBLE)) == CSTAT_SPRITE_BLOCK_ALL)
|
||||
if (act->spr.scale.X > 0 && act->spr.extra >= 0 && (act->spr.cstat & (CSTAT_SPRITE_BLOCK_ALL | CSTAT_SPRITE_INVISIBLE)) == CSTAT_SPRITE_BLOCK_ALL)
|
||||
if (badguy(act) || k < 2)
|
||||
{
|
||||
if (badguy(act) || act->isPlayer())
|
||||
|
@ -326,7 +326,7 @@ DDukeActor* aim(DDukeActor* actor, int abase)
|
|||
actor != act)
|
||||
continue;
|
||||
|
||||
if (gotshrinker && act->spr.ScaleX() < 0.46875 && !actorflag(act, SFLAG_SHRINKAUTOAIM)) continue;
|
||||
if (gotshrinker && act->spr.scale.X < 0.46875 && !actorflag(act, SFLAG_SHRINKAUTOAIM)) continue;
|
||||
if (gotfreezer && act->spr.pal == 1) continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
|
|||
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
|
||||
switch (aimed->spr.picnum)
|
||||
{
|
||||
case GREENSLIME:
|
||||
|
@ -589,7 +589,7 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
|
|||
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) - 12;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) - 12;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
|
@ -676,7 +676,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
aimed = aim(actor, AUTO_AIM_ANGLE);
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) + 8;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 8;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
if (aimed->spr.picnum != RECON)
|
||||
|
@ -698,7 +698,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
{
|
||||
double zoffs = 32;
|
||||
if (isWorldTour()) // Twentieth Anniversary World Tour
|
||||
zoffs *= (actor->spr.ScaleY() * 0.8);
|
||||
zoffs *= (actor->spr.scale.Y * 0.8);
|
||||
pos.Z += zoffs;
|
||||
}
|
||||
else if (actor->spr.picnum == BOSS2)
|
||||
|
@ -706,7 +706,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
vel += 8;
|
||||
double zoffs = 24;
|
||||
if (isWorldTour()) // Twentieth Anniversary World Tour
|
||||
zoffs *= (actor->spr.ScaleY() * 0.8);
|
||||
zoffs *= (actor->spr.scale.Y * 0.8);
|
||||
pos.Z -= zoffs;
|
||||
}
|
||||
|
||||
|
@ -749,7 +749,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
|
||||
if (isWorldTour()) // Twentieth Anniversary World Tour
|
||||
{
|
||||
float siz = actor->spr.ScaleY() * 0.8;
|
||||
float siz = actor->spr.scale.Y * 0.8;
|
||||
spawnofs *= siz;
|
||||
aoffs *= siz;
|
||||
}
|
||||
|
@ -765,7 +765,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
DAngle aoffs = DAngle22_5 / 16. - DAngle45 + randomAngle(90);
|
||||
|
||||
if (isWorldTour()) { // Twentieth Anniversary World Tour
|
||||
double siz = actor->spr.ScaleY() * 0.9143;
|
||||
double siz = actor->spr.scale.Y * 0.9143;
|
||||
spawnofs *= siz;
|
||||
aoffs *= siz;
|
||||
}
|
||||
|
@ -897,7 +897,7 @@ static void shootgrowspark(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
|
|||
auto aimed = aim(actor, AUTO_AIM_ANGLE);
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
|
||||
switch (aimed->spr.picnum)
|
||||
{
|
||||
case GREENSLIME:
|
||||
|
@ -1006,7 +1006,7 @@ static void shootshrinker(DDukeActor* actor, int p, const DVector3& pos, DAngle
|
|||
auto aimed = isNamWW2GI() ? nullptr : aim(actor, AUTO_AIM_ANGLE);
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5);
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5);
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal - 4) * 48) / dist;
|
||||
ang = (aimed->spr.pos.XY() - pos.XY()).Angle();
|
||||
|
@ -1076,7 +1076,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
|||
else
|
||||
{
|
||||
sang = actor->spr.angle;
|
||||
spos = actor->spr.pos.plusZ(-(actor->spr.ScaleY() * tileHeight(actor->spr.picnum) * 0.5) + 4);
|
||||
spos = actor->spr.pos.plusZ(-(actor->spr.scale.Y * tileHeight(actor->spr.picnum) * 0.5) + 4);
|
||||
|
||||
if (actor->spr.picnum != ROTATEGUN)
|
||||
{
|
||||
|
@ -1180,7 +1180,7 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum
|
|||
{
|
||||
int i, j, k;
|
||||
auto p = &ps[snum];
|
||||
if (p->last_pissed_time <= (26 * 218) && p->show_empty_weapon == 0 && p->kickback_pic == 0 && p->quick_kick == 0 && p->GetActor()->spr.ScaleX() > 0.5 && p->access_incs == 0 && p->knee_incs == 0)
|
||||
if (p->last_pissed_time <= (26 * 218) && p->show_empty_weapon == 0 && p->kickback_pic == 0 && p->quick_kick == 0 && p->GetActor()->spr.scale.X > 0.5 && p->access_incs == 0 && p->knee_incs == 0)
|
||||
{
|
||||
if ((p->weapon_pos == 0 || (p->holster_weapon && p->weapon_pos == -9)))
|
||||
{
|
||||
|
@ -2529,7 +2529,7 @@ static void operateweapon(int snum, ESyncBits actions)
|
|||
fi.shoot(pact, FREEZEBLAST);
|
||||
checkavailweapon(p);
|
||||
}
|
||||
if (pact->spr.ScaleX() < 0.5)
|
||||
if (pact->spr.scale.X < 0.5)
|
||||
{
|
||||
p->okickback_pic = p->kickback_pic = 0; break;
|
||||
}
|
||||
|
@ -2627,7 +2627,7 @@ static void processweapon(int snum, ESyncBits actions)
|
|||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
int shrunk = (pact->spr.ScaleY() < 0.5);
|
||||
int shrunk = (pact->spr.scale.Y < 0.5);
|
||||
|
||||
if (isNamWW2GI() && (actions & SB_HOLSTER)) // 'Holster Weapon
|
||||
{
|
||||
|
@ -2737,7 +2737,7 @@ void processinput_d(int snum)
|
|||
psectlotag = psectp->lotag;
|
||||
p->spritebridge = 0;
|
||||
|
||||
shrunk = (pact->spr.ScaleY() < 0.5);
|
||||
shrunk = (pact->spr.scale.Y < 0.5);
|
||||
getzrange(p->pos, psectp, &ceilingz, chz, &floorz, clz, 10.1875, CLIPMASK0);
|
||||
|
||||
p->truefz = getflorzofslopeptr(psectp, p->pos);
|
||||
|
@ -2773,7 +2773,7 @@ void processinput_d(int snum)
|
|||
p->footprintcount = 0;
|
||||
p->spritebridge = 1;
|
||||
}
|
||||
else if (badguy(clz.actor()) && clz.actor()->spr.ScaleX() > 0.375 && abs(pact->spr.pos.Z - clz.actor()->spr.pos.Z) < 84)
|
||||
else if (badguy(clz.actor()) && clz.actor()->spr.scale.X > 0.375 && abs(pact->spr.pos.Z - clz.actor()->spr.pos.Z) < 84)
|
||||
{
|
||||
auto ang = (clz.actor()->spr.pos - p->pos).Angle();
|
||||
p->vel.XY() -= ang.ToVector();
|
||||
|
@ -2817,7 +2817,7 @@ void processinput_d(int snum)
|
|||
return;
|
||||
}
|
||||
|
||||
if (p->GetActor()->spr.ScaleX() < 0.625 && p->jetpack_on == 0)
|
||||
if (p->GetActor()->spr.scale.X < 0.625 && p->jetpack_on == 0)
|
||||
{
|
||||
p->ofistsign = p->fistsign;
|
||||
p->fistsign += p->GetActor()->vel.X * 16;
|
||||
|
|
|
@ -213,7 +213,7 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
|
|||
auto aimed = aim(actor, AUTO_AIM_ANGLE);
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * 16) / dist;
|
||||
ang = (aimed->spr.pos - pos).Angle();
|
||||
|
@ -503,7 +503,7 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
|
|||
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) - 12;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) - 12;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
|
@ -589,7 +589,7 @@ static void shootrpg(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int atw
|
|||
else
|
||||
act90 = aimed;
|
||||
}
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) + 8;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 8;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
if (aimed->spr.picnum != RECON)
|
||||
|
@ -740,7 +740,7 @@ static void shootwhip(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int at
|
|||
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed->spr.ScaleX() * tileHeight(aimed->spr.picnum)) * 0.5) -12;
|
||||
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) -12;
|
||||
double dist = (ps[p].GetActor()->spr.pos.XY() - aimed->spr.pos.XY()).Length();
|
||||
zvel = ((aimed->spr.pos.Z - pos.Z - dal) * vel) / dist;
|
||||
ang = (aimed->spr.pos.XY() - pos.XY()).Angle();
|
||||
|
@ -833,7 +833,7 @@ void shoot_r(DDukeActor* actor, int atwith)
|
|||
{
|
||||
p = -1;
|
||||
sang = actor->spr.angle;
|
||||
spos = actor->spr.pos.plusZ(-(actor->spr.ScaleY() * tileHeight(actor->spr.picnum) * 0.5) - 3);
|
||||
spos = actor->spr.pos.plusZ(-(actor->spr.scale.Y * tileHeight(actor->spr.picnum) * 0.5) - 3);
|
||||
|
||||
if (badguy(actor))
|
||||
{
|
||||
|
@ -940,7 +940,7 @@ void selectweapon_r(int snum, int weap)
|
|||
{
|
||||
int i, j, k;
|
||||
auto p = &ps[snum];
|
||||
if (p->last_pissed_time <= (26 * 218) && p->show_empty_weapon == 0 && p->kickback_pic == 0 && p->quick_kick == 0 && p->GetActor()->spr.ScaleX() > 0.125 && p->access_incs == 0 && p->knee_incs == 0)
|
||||
if (p->last_pissed_time <= (26 * 218) && p->show_empty_weapon == 0 && p->kickback_pic == 0 && p->quick_kick == 0 && p->GetActor()->spr.scale.X > 0.125 && p->access_incs == 0 && p->knee_incs == 0)
|
||||
{
|
||||
if ((p->weapon_pos == 0 || (p->holster_weapon && p->weapon_pos == -9)))
|
||||
{
|
||||
|
@ -3236,7 +3236,7 @@ static void processweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
int shrunk = (pact->spr.ScaleY() < 0.125);
|
||||
int shrunk = (pact->spr.scale.Y < 0.125);
|
||||
|
||||
if (p->detonate_count > 0)
|
||||
{
|
||||
|
@ -3350,7 +3350,7 @@ void processinput_r(int snum)
|
|||
|
||||
p->spritebridge = 0;
|
||||
|
||||
shrunk = (pact->spr.ScaleY() < 0.125);
|
||||
shrunk = (pact->spr.scale.Y < 0.125);
|
||||
double tempfz;
|
||||
if (pact->clipdist == 16)
|
||||
{
|
||||
|
@ -3426,7 +3426,7 @@ void processinput_r(int snum)
|
|||
{
|
||||
doVehicleHit();
|
||||
}
|
||||
else if (badguy(clz.actor()) && clz.actor()->spr.ScaleX() > 0.375 && abs(pact->spr.pos.Z - clz.actor()->spr.pos.Z) < 84)
|
||||
else if (badguy(clz.actor()) && clz.actor()->spr.scale.X > 0.375 && abs(pact->spr.pos.Z - clz.actor()->spr.pos.Z) < 84)
|
||||
{
|
||||
auto ang = (clz.actor()->spr.pos - p->pos).Angle();
|
||||
p->vel.XY() -= ang.ToVector();
|
||||
|
@ -3495,7 +3495,7 @@ void processinput_r(int snum)
|
|||
return;
|
||||
}
|
||||
|
||||
if (p->GetActor()->spr.ScaleX() < 0.125 && p->jetpack_on == 0)
|
||||
if (p->GetActor()->spr.scale.X < 0.125 && p->jetpack_on == 0)
|
||||
{
|
||||
p->ofistsign = p->fistsign;
|
||||
p->fistsign += p->GetActor()->vel.X * 16;
|
||||
|
|
|
@ -249,7 +249,7 @@ void cacheit_d(void)
|
|||
DukeSectIterator it(§);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->spr.ScaleX() != 0 && act->spr.ScaleY() != 0 && (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) == 0)
|
||||
if (act->spr.scale.X != 0 && act->spr.scale.Y != 0 && (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) == 0)
|
||||
cachespritenum(act);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -387,7 +387,7 @@ void cacheit_r(void)
|
|||
DukeSectIterator it(§);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
if(act->spr.ScaleX() != 0 && act->spr.ScaleY() != 0 && (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) == 0)
|
||||
if(act->spr.scale.X != 0 && act->spr.scale.Y != 0 && (act->spr.cstat & CSTAT_SPRITE_INVISIBLE) == 0)
|
||||
cachespritenum(act);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1364,7 +1364,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
{
|
||||
if (badguy(targ) == 1)
|
||||
{
|
||||
if (isWorldTour() && targ->spr.picnum == FIREFLY && targ->spr.ScaleX() < 0.75)
|
||||
if (isWorldTour() && targ->spr.picnum == FIREFLY && targ->spr.scale.X < 0.75)
|
||||
break;
|
||||
|
||||
if (proj->spr.picnum == RPG) proj->spr.extra <<= 1;
|
||||
|
@ -1413,7 +1413,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
ChangeActorStat(targ, 1);
|
||||
targ->timetosleep = SLEEPTIME;
|
||||
}
|
||||
if ((targ->spr.ScaleX() < 0.375 || targ->spr.picnum == SHARK) && proj->spr.picnum == SHRINKSPARK) return;
|
||||
if ((targ->spr.scale.X < 0.375 || targ->spr.picnum == SHARK) && proj->spr.picnum == SHRINKSPARK) return;
|
||||
}
|
||||
|
||||
if (targ->spr.statnum != 2)
|
||||
|
@ -1458,7 +1458,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
}
|
||||
}
|
||||
|
||||
if (targ->spr.ScaleX() < 0.375 && proj->spr.picnum == SHRINKSPARK)
|
||||
if (targ->spr.scale.X < 0.375 && proj->spr.picnum == SHRINKSPARK)
|
||||
return;
|
||||
|
||||
auto hitowner = targ->GetHitOwner();
|
||||
|
|
|
@ -231,7 +231,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
|
|||
}
|
||||
|
||||
// Init the size
|
||||
if (act->spr.ScaleX() == 0 || act->spr.ScaleY() == 0)
|
||||
if (act->spr.scale.X == 0 || act->spr.scale.Y == 0)
|
||||
act->spr.SetScale(REPEAT_SCALE, REPEAT_SCALE);
|
||||
|
||||
if (actorflag(act, SFLAG_BADGUY))
|
||||
|
|
|
@ -108,7 +108,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.SetScale(0.25, 0.25);
|
||||
return act;
|
||||
case LAVAPOOLBUBBLE:
|
||||
if (actj->spr.ScaleX() < 0.46875)
|
||||
if (actj->spr.scale.X < 0.46875)
|
||||
return act;
|
||||
act->SetOwner(actj);
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
|
@ -742,8 +742,8 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case SIDEBOLT1 + 1:
|
||||
case SIDEBOLT1 + 2:
|
||||
case SIDEBOLT1 + 3:
|
||||
act->temp_pos.X = act->spr.ScaleX();
|
||||
act->temp_pos.Y = act->spr.ScaleY();
|
||||
act->temp_pos.X = act->spr.scale.X;
|
||||
act->temp_pos.Y = act->spr.scale.Y;
|
||||
[[fallthrough]];
|
||||
case MASTERSWITCH:
|
||||
if (act->spr.picnum == MASTERSWITCH)
|
||||
|
@ -1105,7 +1105,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case OOZFILTER:
|
||||
|
||||
act->spr.shade = -16;
|
||||
if (act->spr.ScaleX() <= 0.125)
|
||||
if (act->spr.scale.X <= 0.125)
|
||||
{
|
||||
act->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
act->spr.SetScale(0, 0);
|
||||
|
|
|
@ -705,8 +705,8 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case BOLT1 + 1:
|
||||
case BOLT1 + 2:
|
||||
case BOLT1 + 3:
|
||||
act->temp_pos.X = act->spr.ScaleX();
|
||||
act->temp_pos.Y = act->spr.ScaleY();
|
||||
act->temp_pos.X = act->spr.scale.X;
|
||||
act->temp_pos.Y = act->spr.scale.Y;
|
||||
[[fallthrough]];
|
||||
case MASTERSWITCH:
|
||||
if (act->spr.picnum == MASTERSWITCH)
|
||||
|
@ -1287,7 +1287,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case OOZFILTER:
|
||||
|
||||
act->spr.shade = -16;
|
||||
if (act->spr.ScaleX() <= 0.125)
|
||||
if (act->spr.scale.X <= 0.125)
|
||||
{
|
||||
act->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
act->spr.SetScale(0, 0);
|
||||
|
|
|
@ -129,7 +129,7 @@ public:
|
|||
|
||||
void setClipDistFromTile()
|
||||
{
|
||||
clipdist = spr.ScaleX() * tileWidth(spr.picnum) * 0.125;
|
||||
clipdist = spr.scale.X * tileWidth(spr.picnum) * 0.125;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -268,7 +268,7 @@ void BuildExplosion(DExhumedActor* pActor)
|
|||
edx = 34;
|
||||
}
|
||||
|
||||
BuildAnim(nullptr, edx, 0, pActor->spr.pos, pActor->sector(), pActor->spr.ScaleX(), 4);
|
||||
BuildAnim(nullptr, edx, 0, pActor->spr.pos, pActor->sector(), pActor->spr.scale.X, 4);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -284,7 +284,7 @@ void BuildSplash(DExhumedActor* pActor, sectortype* pSector)
|
|||
|
||||
if (pActor->spr.statnum != 200)
|
||||
{
|
||||
double rep = pActor->spr.ScaleX();
|
||||
double rep = pActor->spr.scale.X;
|
||||
nScale = rep + RandomFloat(rep);
|
||||
nSound = kSound0;
|
||||
}
|
||||
|
|
|
@ -807,7 +807,7 @@ void AIBullet::Tick(RunListEvent* ev)
|
|||
|
||||
if (nFlag & 0x80)
|
||||
{
|
||||
BuildAnim(nullptr, 45, 0, pActor->spr.pos, pActor->sector(), pActor->spr.ScaleX(), 0);
|
||||
BuildAnim(nullptr, 45, 0, pActor->spr.pos, pActor->sector(), pActor->spr.scale.X, 0);
|
||||
}
|
||||
|
||||
BulletList[nBullet].nFrame++;
|
||||
|
|
|
@ -440,7 +440,7 @@ void StartRegenerate(DExhumedActor* pActor)
|
|||
if (pos >= Regenerates.Size())
|
||||
{
|
||||
// ?? CHECKME
|
||||
pActor->spr.xint = pActor->spr.ScaleX() * INV_REPEAT_SCALE;
|
||||
pActor->spr.xint = pActor->spr.scale.X * INV_REPEAT_SCALE;
|
||||
pActor->spr.inittype = pActor->spr.shade;
|
||||
pActor->spr.yint = pActor->spr.pal;
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ void DoRegenerates()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pActor->spr.ScaleX() < s)
|
||||
if (pActor->spr.scale.X < s)
|
||||
{
|
||||
pActor->spr.AddScaleX(0.03125);
|
||||
pActor->spr.AddScaleY(0.03125);
|
||||
|
|
|
@ -402,7 +402,7 @@ Collision movespritez(DExhumedActor* pActor, double z, double height, double cli
|
|||
|
||||
double GetActorHeight(DExhumedActor* actor)
|
||||
{
|
||||
return tileHeight(actor->spr.picnum) * actor->spr.ScaleY();
|
||||
return tileHeight(actor->spr.picnum) * actor->spr.scale.Y;
|
||||
}
|
||||
|
||||
DExhumedActor* insertActor(sectortype* s, int st)
|
||||
|
|
|
@ -1463,12 +1463,12 @@ void AISpark::Tick(RunListEvent* ev)
|
|||
pActor->spr.shade += 3;
|
||||
pActor->spr.AddScaleX(-0.03125);
|
||||
|
||||
if (pActor->spr.ScaleX() >= 0.0625 && pActor->spr.shade <= 100)
|
||||
if (pActor->spr.scale.X >= 0.0625 && pActor->spr.shade <= 100)
|
||||
{
|
||||
pActor->spr.AddScaleY(-0.03125);
|
||||
|
||||
// calling BuildSpark() with 2nd parameter as '1' will set kTile986
|
||||
if (pActor->spr.picnum == kTile986 && int((pActor->spr.ScaleX() * INV_REPEAT_SCALE)) & 2) // hack alert
|
||||
if (pActor->spr.picnum == kTile986 && int((pActor->spr.scale.X * INV_REPEAT_SCALE)) & 2) // hack alert
|
||||
{
|
||||
BuildSpark(pActor, 2);
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ void DestroyEgg(int nEgg)
|
|||
|
||||
if (QueenEgg[nEgg].nAction != 4)
|
||||
{
|
||||
BuildAnim(nullptr, 34, 0, pActor->spr.pos, pActor->sector(), pActor->spr.ScaleX(), 4);
|
||||
BuildAnim(nullptr, 34, 0, pActor->spr.pos, pActor->sector(), pActor->spr.scale.X, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1531,7 +1531,7 @@ void AIQueen::Damage(RunListEvent* ev)
|
|||
QueenList[nQueen].nHealth = 4000;
|
||||
QueenList[nQueen].nAction = 7;
|
||||
|
||||
BuildAnim(nullptr, 36, 0, pActor->spr.pos.plusZ(-30), pActor->sector(), pActor->spr.ScaleX(), 4);
|
||||
BuildAnim(nullptr, 36, 0, pActor->spr.pos.plusZ(-30), pActor->sector(), pActor->spr.scale.X, 4);
|
||||
break;
|
||||
case 2:
|
||||
QueenList[nQueen].nHealth = 4000;
|
||||
|
|
|
@ -381,16 +381,16 @@ void DoSpiritHead()
|
|||
|
||||
if (nHeadStage == 1)
|
||||
{
|
||||
if (pSpiritSpr->spr.ScaleX() > nSpiritScale.X)
|
||||
if (pSpiritSpr->spr.scale.X > nSpiritScale.X)
|
||||
{
|
||||
pSpiritSpr->spr.AddScaleX(-0.03125);
|
||||
if (pSpiritSpr->spr.ScaleX() < nSpiritScale.X)
|
||||
if (pSpiritSpr->spr.scale.X < nSpiritScale.X)
|
||||
pSpiritSpr->spr.SetScaleX(nSpiritScale.X);
|
||||
}
|
||||
if (pSpiritSpr->spr.ScaleY() > nSpiritScale.Y)
|
||||
if (pSpiritSpr->spr.scale.Y > nSpiritScale.Y)
|
||||
{
|
||||
pSpiritSpr->spr.AddScaleY(-0.03125);
|
||||
if (pSpiritSpr->spr.ScaleY() < nSpiritScale.Y)
|
||||
if (pSpiritSpr->spr.scale.Y < nSpiritScale.Y)
|
||||
pSpiritSpr->spr.SetScaleY(nSpiritScale.Y);
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ void AISoul::Tick(RunListEvent* ev)
|
|||
|
||||
seq_MoveSequence(pActor, SeqOffsets[kSeqSet] + 75, 0);
|
||||
|
||||
if (pActor->spr.ScaleX() < 0.5)
|
||||
if (pActor->spr.scale.X < 0.5)
|
||||
{
|
||||
pActor->spr.AddScaleX(REPEAT_SCALE);
|
||||
pActor->spr.AddScaleY(REPEAT_SCALE);
|
||||
|
|
|
@ -105,7 +105,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& view, double
|
|||
if ((pTSprite->picnum == kTorch1 || pTSprite->picnum == kTorch2) && (pTSprite->cstat & CSTAT_SPRITE_YCENTER) == 0)
|
||||
{
|
||||
pTSprite->cstat |= CSTAT_SPRITE_YCENTER;
|
||||
double nTileY = (tileHeight(pTSprite->picnum) * pTSprite->ScaleY()) * 0.5;
|
||||
double nTileY = (tileHeight(pTSprite->picnum) * pTSprite->scale.Y) * 0.5;
|
||||
pTSprite->pos.Z -= nTileY;
|
||||
}
|
||||
|
||||
|
|
|
@ -955,8 +955,8 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
|
||||
|
||||
// Not mature enough yet
|
||||
if (actor->spr.ScaleX() != 1 || actor->spr.ScaleY() != 1) return false;
|
||||
if (hitActor->spr.ScaleX() != 1 || hitActor->spr.ScaleY() != 1) return false;
|
||||
if (actor->spr.scale.X != 1 || actor->spr.scale.Y != 1) return false;
|
||||
if (hitActor->spr.scale.X != 1 || hitActor->spr.scale.Y != 1) return false;
|
||||
|
||||
// Kill a rival
|
||||
// Only males fight
|
||||
|
@ -993,8 +993,8 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
if (!hitActor->hasU() || hitActor->user.ID != BUNNY_RUN_R0) return false;
|
||||
|
||||
// Not mature enough to mate yet
|
||||
if (actor->spr.ScaleX() != 1 || actor->spr.ScaleY() != 1) return false;
|
||||
if (hitActor->spr.ScaleX() != 1 || hitActor->spr.ScaleY() != 1) return false;
|
||||
if (actor->spr.scale.X != 1 || actor->spr.scale.Y != 1) return false;
|
||||
if (hitActor->spr.scale.X != 1 || hitActor->spr.scale.Y != 1) return false;
|
||||
|
||||
if (hitActor->user.ShellNum <= 0 && hitActor->user.WaitTics <= 0 && actor->user.WaitTics <= 0)
|
||||
{
|
||||
|
@ -1462,8 +1462,8 @@ int DoBunnyGrowUp(DSWActor* actor)
|
|||
{
|
||||
actor->spr.AddScaleX(REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(REPEAT_SCALE);
|
||||
if ((actor->spr.ScaleX()) > 1) actor->spr.SetScaleX(1);
|
||||
if ((actor->spr.ScaleY()) > 1) actor->spr.SetScaleY(1);
|
||||
if ((actor->spr.scale.X) > 1) actor->spr.SetScaleX(1);
|
||||
if ((actor->spr.scale.Y) > 1) actor->spr.SetScaleY(1);
|
||||
actor->user.Counter = 60;
|
||||
}
|
||||
|
||||
|
|
|
@ -872,7 +872,7 @@ int DoCoolgMove(DSWActor* actor)
|
|||
{
|
||||
actor->spr.AddScaleX(-REPEAT_SCALE);
|
||||
actor->spr.shade++;
|
||||
if (actor->spr.ScaleX() < 0.0625) actor->spr.SetScaleX(0.0625);
|
||||
if (actor->spr.scale.X < 0.0625) actor->spr.SetScaleX(0.0625);
|
||||
if (actor->spr.shade > 126)
|
||||
{
|
||||
actor->spr.shade = 127;
|
||||
|
@ -884,7 +884,7 @@ int DoCoolgMove(DSWActor* actor)
|
|||
actor->spr.hitag = 0;
|
||||
actor->spr.AddScaleX(REPEAT_SCALE);
|
||||
actor->spr.shade--;
|
||||
if (actor->spr.ScaleX() > 0.65625) actor->spr.SetScaleX(0.65625);
|
||||
if (actor->spr.scale.X > 0.65625) actor->spr.SetScaleX(0.65625);
|
||||
if (actor->spr.shade < -10) actor->spr.shade = -10;
|
||||
}
|
||||
else if (actor->user.FlagOwner == 0)
|
||||
|
|
|
@ -300,11 +300,11 @@ void DoShadows(tspriteArray& tsprites, tspritetype* tsp, double viewz)
|
|||
|
||||
tsp->sectp = sect;
|
||||
|
||||
if (tsp->ScaleY() > 0.25)
|
||||
if (tsp->scale.Y > 0.25)
|
||||
{
|
||||
double sizey = tileHeight(tsp->picnum) * tsp->ScaleY();
|
||||
scale.Y = (tsp->ScaleY() * 0.25) - (sizey / 2048.);
|
||||
scale.X = tsp->ScaleX();
|
||||
double sizey = tileHeight(tsp->picnum) * tsp->scale.Y;
|
||||
scale.Y = (tsp->scale.Y * 0.25) - (sizey / 2048.);
|
||||
scale.X = tsp->scale.X;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1466,7 +1466,7 @@ bool GameInterface::DrawAutomapPlayer(const DVector2& mxy, const DVector2& cpos,
|
|||
auto vect = OutAutomapVector(mxy - cpos, cangvect, czoom, xydim);
|
||||
|
||||
// This repeat scale is correct.
|
||||
double sc = czoom * actor->spr.ScaleY() * 2;
|
||||
double sc = czoom * actor->spr.scale.Y * 2;
|
||||
|
||||
DrawTexture(twod, tileGetTexture(1196 + pspr_ndx[myconnectindex], true), vect.X, vect.Y, DTA_ScaleX, sc, DTA_ScaleY, sc, DTA_Rotate, daang,
|
||||
DTA_CenterOffsetRel, 2, DTA_TranslationIndex, TRANSLATION(Translation_Remap, actor->spr.pal), DTA_Color, shadeToLight(actor->spr.shade),
|
||||
|
|
|
@ -204,7 +204,7 @@ int StdRandomRange(int range);
|
|||
|
||||
inline double GetSpriteSizeZ(const spritetypebase* sp)
|
||||
{
|
||||
return (tileHeight(sp->picnum) * sp->ScaleY());
|
||||
return (tileHeight(sp->picnum) * sp->scale.Y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1989,7 +1989,7 @@ inline DVector3 ActorVectOfMiddle(DSWActor* actor)
|
|||
|
||||
inline double ActorSizeZ(DSWActor* actor)
|
||||
{
|
||||
return (tileHeight(actor->spr.picnum) * actor->spr.ScaleY());
|
||||
return (tileHeight(actor->spr.picnum) * actor->spr.scale.Y);
|
||||
}
|
||||
|
||||
inline double ActorUpperZ(DSWActor* actor)
|
||||
|
@ -2020,7 +2020,7 @@ inline double ActorSizeToTop(DSWActor* a)
|
|||
|
||||
inline void SetActorSizeX(DSWActor* sp)
|
||||
{
|
||||
sp->clipdist = tileWidth(sp->spr.picnum) * sp->spr.ScaleX() * 0.25;
|
||||
sp->clipdist = tileWidth(sp->spr.picnum) * sp->spr.scale.X * 0.25;
|
||||
}
|
||||
|
||||
inline bool Facing(DSWActor* actor1, DSWActor* actor2)
|
||||
|
|
|
@ -2638,7 +2638,7 @@ void SpriteSetup(void)
|
|||
if (!actor->hasU())
|
||||
SpawnUser(actor, ST1, nullptr);
|
||||
|
||||
if (actor->spr.ScaleX() == 1 && actor->spr.ScaleY() == 1) // clear default scale.
|
||||
if (actor->spr.scale.X == 1 && actor->spr.scale.Y == 1) // clear default scale.
|
||||
actor->spr.SetScale(0, 0);
|
||||
|
||||
change_actor_stat(actor, STAT_SPAWN_SPOT);
|
||||
|
|
|
@ -3418,7 +3418,7 @@ AutoShrap:
|
|||
case SHRAP_EXPLOSION:
|
||||
{
|
||||
auto spnum = SpawnLargeExp(parentActor);
|
||||
double size = spnum->spr.ScaleX() + shrap_delta_size * REPEAT_SCALE;
|
||||
double size = spnum->spr.scale.X + shrap_delta_size * REPEAT_SCALE;
|
||||
spnum->spr.SetScale(size, size);
|
||||
|
||||
return false;
|
||||
|
@ -3427,7 +3427,7 @@ AutoShrap:
|
|||
case SHRAP_LARGE_EXPLOSION:
|
||||
{
|
||||
auto spnum = SpawnLargeExp(parentActor);
|
||||
double size = spnum->spr.ScaleX() + shrap_delta_size * REPEAT_SCALE;
|
||||
double size = spnum->spr.scale.X + shrap_delta_size * REPEAT_SCALE;
|
||||
spnum->spr.SetScale(size, size);
|
||||
|
||||
InitPhosphorus(spnum);
|
||||
|
@ -4586,7 +4586,7 @@ int DoFireballFlames(DSWActor* actor)
|
|||
actor->spr.AddScaleX(-REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(-REPEAT_SCALE);
|
||||
|
||||
if (actor->spr.ScaleX() <= 0)
|
||||
if (actor->spr.scale.X <= 0)
|
||||
{
|
||||
if (actor->user.attachActor != nullptr)
|
||||
{
|
||||
|
@ -4600,7 +4600,7 @@ int DoFireballFlames(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
// grow until the right size
|
||||
if (actor->spr.ScaleX() <= actor->user.Counter * REPEAT_SCALE)
|
||||
if (actor->spr.scale.X <= actor->user.Counter * REPEAT_SCALE)
|
||||
{
|
||||
actor->spr.AddScaleX(3 * REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(3 * REPEAT_SCALE);
|
||||
|
@ -4664,7 +4664,7 @@ int DoBreakFlames(DSWActor* actor)
|
|||
actor->spr.AddScaleX(-REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(-REPEAT_SCALE);
|
||||
|
||||
if (actor->spr.ScaleX() <= 0)
|
||||
if (actor->spr.scale.X <= 0)
|
||||
{
|
||||
if (actor->user.attachActor != nullptr)
|
||||
{
|
||||
|
@ -4678,7 +4678,7 @@ int DoBreakFlames(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
// grow until the right size
|
||||
if (actor->spr.ScaleX() <= actor->user.Counter * REPEAT_SCALE)
|
||||
if (actor->spr.scale.X <= actor->user.Counter * REPEAT_SCALE)
|
||||
{
|
||||
actor->spr.AddScaleX(3 * REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(3 * REPEAT_SCALE);
|
||||
|
@ -4721,8 +4721,8 @@ int SetSuicide(DSWActor* actor)
|
|||
int DoActorScale(DSWActor* actor)
|
||||
{
|
||||
actor->user.scale_speed = 70;
|
||||
actor->user.scale_value = int(actor->spr.ScaleX() * INV_REPEAT_SCALE) << 8;
|
||||
actor->user.scale_tgt = int(actor->spr.ScaleX() * INV_REPEAT_SCALE) + 25;
|
||||
actor->user.scale_value = int(actor->spr.scale.X * INV_REPEAT_SCALE) << 8;
|
||||
actor->user.scale_tgt = int(actor->spr.scale.X * INV_REPEAT_SCALE) + 25;
|
||||
|
||||
if (actor->user.scale_tgt > 256)
|
||||
{
|
||||
|
@ -4736,8 +4736,8 @@ int DoActorScale(DSWActor* actor)
|
|||
int DoRipperGrow(DSWActor* actor)
|
||||
{
|
||||
actor->user.scale_speed = 70;
|
||||
actor->user.scale_value = int(actor->spr.ScaleX() * INV_REPEAT_SCALE) << 8;
|
||||
actor->user.scale_tgt = int(actor->spr.ScaleX() * INV_REPEAT_SCALE) + 20;
|
||||
actor->user.scale_value = int(actor->spr.scale.X * INV_REPEAT_SCALE) << 8;
|
||||
actor->user.scale_tgt = int(actor->spr.scale.X * INV_REPEAT_SCALE) + 20;
|
||||
|
||||
if (actor->user.scale_tgt > 128)
|
||||
{
|
||||
|
@ -7808,7 +7808,7 @@ int DoPlasmaDone(DSWActor* actor)
|
|||
actor->spr.AddScaleY(-0.0625);
|
||||
actor->user.Counter += 2;
|
||||
|
||||
if (actor->spr.ScaleY() < 0.09375)
|
||||
if (actor->spr.scale.Y < 0.09375)
|
||||
{
|
||||
KillActor(actor);
|
||||
return 0;
|
||||
|
@ -9648,7 +9648,7 @@ int SpawnExtraMicroMini(DSWActor* actor)
|
|||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Micro[0][0], actor->sector(), actor->spr.pos, actor->spr.angle, actor->vel.X);
|
||||
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.SetScale(actor->spr.ScaleX(), actor->spr.ScaleX());
|
||||
actorNew->spr.SetScale(actor->spr.scale.X, actor->spr.scale.X);
|
||||
actorNew->spr.shade = actor->spr.shade;
|
||||
actorNew->copy_clipdist(actor);
|
||||
|
||||
|
@ -10894,7 +10894,7 @@ void SpawnMeteorExp(DSWActor* actor)
|
|||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
expActor->spr.shade = -40;
|
||||
if (actor->spr.ScaleY() < 1)
|
||||
if (actor->spr.scale.Y < 1)
|
||||
{
|
||||
// small
|
||||
expActor->spr.SetScale(1, 1);
|
||||
|
@ -10945,7 +10945,7 @@ int DoFireball(DSWActor* actor)
|
|||
{
|
||||
actor->spr.AddScaleX(-REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(-REPEAT_SCALE);
|
||||
if (actor->spr.ScaleX() <= 0.578125)
|
||||
if (actor->spr.scale.X <= 0.578125)
|
||||
{
|
||||
SpawnSmokePuff(actor);
|
||||
KillActor(actor);
|
||||
|
@ -11126,7 +11126,7 @@ int DoNapalm(DSWActor* actor)
|
|||
{
|
||||
actor->spr.AddScaleX(-REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(-REPEAT_SCALE);
|
||||
if (actor->spr.ScaleX() <= 0.46875)
|
||||
if (actor->spr.scale.X <= 0.46875)
|
||||
{
|
||||
SpawnSmokePuff(actor);
|
||||
KillActor(actor);
|
||||
|
@ -11296,7 +11296,7 @@ int DoSerpMeteor(DSWActor* actor)
|
|||
auto oldv = actor->spr.pos;
|
||||
|
||||
actor->spr.AddScaleX(MISSILEMOVETICS * 2 * REPEAT_SCALE);
|
||||
if (actor->spr.ScaleX() > 1.25)
|
||||
if (actor->spr.scale.X > 1.25)
|
||||
actor->spr.SetScaleX(1.25);
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
@ -11341,7 +11341,7 @@ int DoSerpMeteor(DSWActor* actor)
|
|||
int DoMirvMissile(DSWActor* actor)
|
||||
{
|
||||
actor->spr.AddScaleX(MISSILEMOVETICS * 2 * REPEAT_SCALE);
|
||||
if (actor->spr.ScaleX() > 1.25)
|
||||
if (actor->spr.scale.X > 1.25)
|
||||
actor->spr.SetScaleX(1.25);
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
@ -11527,7 +11527,7 @@ int DoRing(DSWActor* actor)
|
|||
|
||||
actor->spr.AddScaleX(-REPEAT_SCALE);
|
||||
actor->spr.AddScaleY(-REPEAT_SCALE);
|
||||
if (actor->spr.ScaleX() <= 0.46875)
|
||||
if (actor->spr.scale.X <= 0.46875)
|
||||
{
|
||||
SpawnSmokePuff(actor);
|
||||
KillActor(actor);
|
||||
|
@ -18247,18 +18247,18 @@ int DoFloorBlood(DSWActor* actor)
|
|||
scale = 0.625;
|
||||
|
||||
// Make pool of blood seem to grow
|
||||
if (actor->spr.ScaleX() < scale && actor->spr.ScaleX() > 0.0625)
|
||||
if (actor->spr.scale.X < scale && actor->spr.scale.X > 0.0625)
|
||||
{
|
||||
actor->spr.AddScaleX(REPEAT_SCALE);
|
||||
}
|
||||
|
||||
if (actor->spr.ScaleY() < scale && actor->spr.ScaleX() < scale && actor->spr.ScaleX() > 0.0625)
|
||||
if (actor->spr.scale.Y < scale && actor->spr.scale.X < scale && actor->spr.scale.X > 0.0625)
|
||||
{
|
||||
actor->spr.AddScaleY(REPEAT_SCALE);
|
||||
}
|
||||
|
||||
// See if any players stepped in blood
|
||||
if (actor->spr.ScaleX() > 0.0625 && actor->spr.ScaleY() > 0.0625)
|
||||
if (actor->spr.scale.X > 0.0625 && actor->spr.scale.Y > 0.0625)
|
||||
{
|
||||
TRAVERSE_CONNECT(pnum)
|
||||
{
|
||||
|
@ -18275,10 +18275,10 @@ int DoFloorBlood(DSWActor* actor)
|
|||
}
|
||||
|
||||
// If blood has already grown to max size, we can shrink it
|
||||
if (actor->spr.ScaleX() == 0.625 && actor->spr.ScaleY() > 0.15625)
|
||||
if (actor->spr.scale.X == 0.625 && actor->spr.scale.Y > 0.15625)
|
||||
{
|
||||
actor->spr.AddScaleY(-0.15625);
|
||||
if (actor->spr.ScaleY() <= 0.15625) // Shrink it down and don't use it anymore
|
||||
if (actor->spr.scale.Y <= 0.15625) // Shrink it down and don't use it anymore
|
||||
actor->spr.SetScale(0.0625, 0.0625);
|
||||
}
|
||||
}
|
||||
|
@ -18297,7 +18297,7 @@ int DoFloorBlood(DSWActor* actor)
|
|||
int DoWallBlood(DSWActor* actor)
|
||||
{
|
||||
// Make blood drip down the wall
|
||||
if (actor->spr.ScaleY() < 1.25)
|
||||
if (actor->spr.scale.Y < 1.25)
|
||||
{
|
||||
actor->spr.AddScaleY(REPEAT_SCALE);
|
||||
actor->spr.pos.Z += 0.5;
|
||||
|
|
Loading…
Reference in a new issue