- Blood: replaced all calls to randomAngle with RandomAngle

This commit is contained in:
Christoph Oelckers 2022-09-26 18:25:53 +02:00
parent a8cc6c1189
commit 4500fe6325
5 changed files with 6 additions and 12 deletions

View file

@ -448,7 +448,7 @@ void fxBloodBits(DBloodActor* actor, sectortype*) // 14
double top, bottom;
GetActorExtents(actor, &top, &bottom);
actor->spr.pos.Z += floorZ - bottom;
DAngle nAngle = randomAngle();
DAngle nAngle = RandomAngle();
int nDist = Random(16);
auto pos = nAngle.ToVector() * nDist * 4;
gFX.fxSpawnActor(FX_48, actor->sector(), DVector3(pos, actor->spr.pos.Z), 0);
@ -638,7 +638,7 @@ void fxPodBloodSplat(DBloodActor* actor, sectortype*) // 19
double top, bottom;
GetActorExtents(actor, &top, &bottom);
actor->spr.pos.Z += floorZ - bottom;
DAngle nAngle = randomAngle();
DAngle nAngle = RandomAngle();
int nDist = Random(16);
auto pos = actor->spr.pos.XY() + nAngle.ToVector() * nDist * 4;

View file

@ -52,10 +52,5 @@ void wsrand(int seed)
wRandSeed = seed;
}
DAngle randomAngle()
{
return DAngle::fromQ16(wrand());
}
END_BLD_NS

View file

@ -35,7 +35,6 @@ void playlogos();
unsigned int qrand(void);
int wrand(void);
void wsrand(int);
DAngle randomAngle();
void FireInit(void);
void FireProcess(void);

View file

@ -3057,7 +3057,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
{
auto tempang = nAng;
while (tempang == nAng)
nAng = randomAngle();
nAng = RandomAngle();
}
if (chgDstAng)

View file

@ -160,9 +160,9 @@ void viewInit(void)
for (int i = 0; i < 16; i++)
{
random_angles[i][0] = randomAngle();
random_angles[i][1] = randomAngle();
random_angles[i][2] = randomAngle();
random_angles[i][0] = RandomAngle();
random_angles[i][1] = RandomAngle();
random_angles[i][2] = RandomAngle();
}
}