mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- dumped broken and useless xyrand function.
Didn't work, wasn't used anywhere else, so a properly done local inline is preferable.
This commit is contained in:
parent
32e1f07b60
commit
89816f4582
2 changed files with 5 additions and 9 deletions
|
@ -5230,15 +5230,16 @@ void movefta(void)
|
|||
{
|
||||
if (badguy(act))
|
||||
{
|
||||
double px = ps[p].opos.X - xyrand(64);
|
||||
double py = ps[p].opos.Y - xyrand(64);
|
||||
auto xyrand = []() -> double { return (64 - (krand() & 127)) * maptoworld; };
|
||||
double px = ps[p].opos.X - xyrand();
|
||||
double py = ps[p].opos.Y - xyrand();
|
||||
updatesector(DVector3(px, py, 0), &psect);
|
||||
if (psect == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
double sx = act->spr.pos.X - xyrand(64);
|
||||
double sy = act->spr.pos.Y - xyrand(64);
|
||||
double sx = act->spr.pos.X - xyrand();
|
||||
double sy = act->spr.pos.Y - xyrand();
|
||||
// The second updatesector call here used px and py again and was redundant as coded.
|
||||
|
||||
// SFLAG_MOVEFTA_CHECKSEE is set for all actors in Duke.
|
||||
|
|
|
@ -251,9 +251,4 @@ inline double zrand(int spread)
|
|||
return r * zmaptoworld;
|
||||
}
|
||||
|
||||
inline double xyrand(int mask)
|
||||
{
|
||||
return ((krand() % mask) - (mask << 1) - 1) * maptoworld;
|
||||
}
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
Loading…
Reference in a new issue