mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 21:20:39 +00:00
- floatified JS_ProcessEchoSpot
This commit is contained in:
parent
1501558139
commit
fe8a059726
1 changed files with 5 additions and 10 deletions
|
@ -415,10 +415,8 @@ void drawroomstotile(int daposx, int daposy, int daposz,
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
JS_ProcessEchoSpot()
|
||||
void JS_ProcessEchoSpot()
|
||||
{
|
||||
int j,dist;
|
||||
PLAYER* pp = Player+screenpeek;
|
||||
int16_t reverb;
|
||||
bool reverb_set = false;
|
||||
|
@ -427,14 +425,11 @@ JS_ProcessEchoSpot()
|
|||
SWStatIterator it(STAT_ECHO);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
dist = 0x7fffffff;
|
||||
double maxdist = SP_TAG4(actor) * maptoworld;
|
||||
auto v = actor->spr.pos.XY() - pp->pos.XY();
|
||||
double dist = abs(v.X) + abs(v.Y);
|
||||
|
||||
j = abs(actor->int_pos().X - pp->int_ppos().X);
|
||||
j += abs(actor->int_pos().Y - pp->int_ppos().Y);
|
||||
if (j < dist)
|
||||
dist = j;
|
||||
|
||||
if (dist <= SP_TAG4(actor)) // tag4 = ang
|
||||
if (dist <= maxdist) // tag4 = ang
|
||||
{
|
||||
reverb = SP_TAG2(actor);
|
||||
if (reverb > 200) reverb = 200;
|
||||
|
|
Loading…
Reference in a new issue