mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- Blood: replaced all calls to randomAngle with RandomAngle
This commit is contained in:
parent
a8cc6c1189
commit
4500fe6325
5 changed files with 6 additions and 12 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -52,10 +52,5 @@ void wsrand(int seed)
|
|||
wRandSeed = seed;
|
||||
}
|
||||
|
||||
DAngle randomAngle()
|
||||
{
|
||||
return DAngle::fromQ16(wrand());
|
||||
}
|
||||
|
||||
|
||||
END_BLD_NS
|
||||
|
|
|
@ -35,7 +35,6 @@ void playlogos();
|
|||
unsigned int qrand(void);
|
||||
int wrand(void);
|
||||
void wsrand(int);
|
||||
DAngle randomAngle();
|
||||
|
||||
void FireInit(void);
|
||||
void FireProcess(void);
|
||||
|
|
|
@ -3057,7 +3057,7 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
|
|||
{
|
||||
auto tempang = nAng;
|
||||
while (tempang == nAng)
|
||||
nAng = randomAngle();
|
||||
nAng = RandomAngle();
|
||||
}
|
||||
|
||||
if (chgDstAng)
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue