mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-07 16:31:17 +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
|
void JS_ProcessEchoSpot()
|
||||||
JS_ProcessEchoSpot()
|
|
||||||
{
|
{
|
||||||
int j,dist;
|
|
||||||
PLAYER* pp = Player+screenpeek;
|
PLAYER* pp = Player+screenpeek;
|
||||||
int16_t reverb;
|
int16_t reverb;
|
||||||
bool reverb_set = false;
|
bool reverb_set = false;
|
||||||
|
@ -427,14 +425,11 @@ JS_ProcessEchoSpot()
|
||||||
SWStatIterator it(STAT_ECHO);
|
SWStatIterator it(STAT_ECHO);
|
||||||
while (auto actor = it.Next())
|
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);
|
if (dist <= maxdist) // tag4 = ang
|
||||||
j += abs(actor->int_pos().Y - pp->int_ppos().Y);
|
|
||||||
if (j < dist)
|
|
||||||
dist = j;
|
|
||||||
|
|
||||||
if (dist <= SP_TAG4(actor)) // tag4 = ang
|
|
||||||
{
|
{
|
||||||
reverb = SP_TAG2(actor);
|
reverb = SP_TAG2(actor);
|
||||||
if (reverb > 200) reverb = 200;
|
if (reverb > 200) reverb = 200;
|
||||||
|
|
Loading…
Reference in a new issue