mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 08:30:35 +00:00
- floatified angles in useSectorWindGen plus two other set_int_ang.
This commit is contained in:
parent
a618161387
commit
a8cc6c1189
3 changed files with 10 additions and 8 deletions
|
@ -6489,7 +6489,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, int xyoff, int zoff, int dx, int
|
|||
spawned->spr.xrepeat = pMissileInfo->xrepeat;
|
||||
spawned->spr.yrepeat = pMissileInfo->yrepeat;
|
||||
spawned->spr.picnum = pMissileInfo->picnum;
|
||||
spawned->set_int_ang((actor->int_ang() + pMissileInfo->angleOfs) & 2047);
|
||||
spawned->spr.angle = actor->spr.angle += DAngle::fromBuild(pMissileInfo->angleOfs);
|
||||
spawned->set_int_bvel_x(MulScale(pMissileInfo->velocity, dx, 14));
|
||||
spawned->set_int_bvel_y(MulScale(pMissileInfo->velocity, dy, 14));
|
||||
spawned->set_int_bvel_z(MulScale(pMissileInfo->velocity, dz, 14));
|
||||
|
|
|
@ -479,7 +479,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
if (cl_showweapon == 2 && r_voxels && nVoxel != -1)
|
||||
{
|
||||
auto gView = &gPlayer[gViewIndex];
|
||||
pNSprite->set_int_ang((gView->actor->int_ang() + 512) & 2047); // always face viewer
|
||||
pNSprite->angle = gView->actor->spr.angle += DAngle90; // always face viewer
|
||||
pNSprite->cstat |= CSTAT_SPRITE_ALIGNMENT_SLAB;
|
||||
pNSprite->cstat &= ~CSTAT_SPRITE_YFLIP;
|
||||
pNSprite->picnum = nVoxel;
|
||||
|
|
|
@ -3430,12 +3430,12 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector)
|
|||
if ((sourceactor->spr.flags & kModernTypeFlag1))
|
||||
pXSector->panAlways = pXSector->windAlways = 1;
|
||||
|
||||
int ang = sourceactor->int_ang();
|
||||
DAngle angle = sourceactor->spr.angle;
|
||||
if (sourceactor->xspr.data4 <= 0)
|
||||
{
|
||||
if ((sourceactor->xspr.data1 & 0x0002))
|
||||
{
|
||||
while (sourceactor->int_ang() == ang)
|
||||
while (sourceactor->spr.angle == angle)
|
||||
sourceactor->spr.angle = RandomAngle();
|
||||
}
|
||||
}
|
||||
|
@ -3443,13 +3443,15 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector)
|
|||
else if (sourceactor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE) sourceactor->spr.angle -= mapangle(sourceactor->xspr.data4);
|
||||
else if (sourceactor->xspr.sysData1 == 0)
|
||||
{
|
||||
if ((ang += sourceactor->xspr.data4) >= kAng180) sourceactor->xspr.sysData1 = 1;
|
||||
sourceactor->set_int_ang(ClipHigh(ang, kAng180));
|
||||
angle += mapangle(sourceactor->xspr.data4);
|
||||
if (angle >= DAngle180) sourceactor->xspr.sysData1 = 1;
|
||||
sourceactor->spr.angle = min(angle, DAngle180);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((ang -= sourceactor->xspr.data4) <= -kAng180) sourceactor->xspr.sysData1 = 0;
|
||||
sourceactor->set_int_ang(ClipLow(ang, -kAng180));
|
||||
angle -= mapangle(sourceactor->xspr.data4);
|
||||
if (angle <= -DAngle180) sourceactor->xspr.sysData1 = 0;
|
||||
sourceactor->spr.angle = max(angle, -DAngle180);
|
||||
}
|
||||
|
||||
pXSector->windAng = sourceactor->spr.angle;
|
||||
|
|
Loading…
Reference in a new issue