- floatified AddFlow

This commit is contained in:
Christoph Oelckers 2022-09-10 20:30:04 +02:00
parent 029e0f6fa4
commit 489f45ef99
4 changed files with 8 additions and 10 deletions

View file

@ -178,8 +178,8 @@ void AddFlash(sectortype* pSector, const DVector3& pos, int val);
void SetTorch(int nPlayer, int bTorchOnOff);
void UndoFlashes();
void DoLights();
void AddFlow(sectortype* pSect, int nSpeed, int b, int ang = -1);
void AddFlow(walltype* pWall, int nSpeed, int b, int ang = -1);
void AddFlow(sectortype* pSect, int nSpeed, int b, DAngle ang = -minAngle);
void AddFlow(walltype* pWall, int nSpeed, int b);
void BuildFlash(int nPlayer, int nVal);
void AddGlow(sectortype* pSector, int nVal);
void AddFlicker(sectortype* pSector, int nVal);

View file

@ -245,8 +245,6 @@ Collision CheckCloseRange(int nPlayer, DVector3& pos, sectortype* *ppSector)
{
auto pActor = PlayerList[nPlayer].pActor;
int ang = pActor->int_ang();
HitInfo hit{};
hitscan(pos, *ppSector, DVector3(pActor->spr.angle.ToVector() * 1024, 0 ), hit, CLIPMASK1);

View file

@ -634,7 +634,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
}
case 88:
{
AddFlow(pActor->sector(), nSpeed, 0, pActor->int_ang());
AddFlow(pActor->sector(), nSpeed, 0, pActor->spr.angle);
DeleteActor(pActor);
return;
@ -649,7 +649,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
}
case 78:
{
AddFlow(pActor->sector(), nSpeed, 1, pActor->int_ang());
AddFlow(pActor->sector(), nSpeed, 1, pActor->spr.angle);
auto pSector = pActor->sector();
pSector->Flag |= 0x8000;

View file

@ -617,7 +617,7 @@ void DoFlickers()
}
}
void AddFlow(sectortype* pSector, int nSpeed, int b, int nAngle)
void AddFlow(sectortype* pSector, int nSpeed, int b, DAngle nAngle)
{
if (nFlowCount >= kMaxFlows || b >= 2)
return;
@ -627,8 +627,8 @@ void AddFlow(sectortype* pSector, int nSpeed, int b, int nAngle)
int nPic = pSector->floorpicnum;
sFlowInfo[nFlow].angcos = float(-cos(nAngle * BAngRadian) * nSpeed);
sFlowInfo[nFlow].angsin = float(sin(nAngle * BAngRadian) * nSpeed);
sFlowInfo[nFlow].angcos = float(-nAngle.Cos() * nSpeed);
sFlowInfo[nFlow].angsin = float(nAngle.Sin() * nSpeed);
sFlowInfo[nFlow].pSector = pSector;
StartInterpolation(pSector, b ? Interp_Sect_CeilingPanX : Interp_Sect_FloorPanX);
@ -638,7 +638,7 @@ void AddFlow(sectortype* pSector, int nSpeed, int b, int nAngle)
}
void AddFlow(walltype* pWall, int nSpeed, int b, int nAngle)
void AddFlow(walltype* pWall, int nSpeed, int b)
{
if (nFlowCount >= kMaxFlows || b < 2)
return;