313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
entity &e = ents[i];
if (e.type == NOTUSED)
continue;
if (!ents[i].spawned && e.type != TELEPORT && e.type != JUMPPAD)
continue;
if (OUTBORD(e.x, e.y))
continue;
vec v = {e.x, e.y, S(e.x, e.y)->floor + player1->eyeheight};
vdist(dist, t, player1->o, v);
if (dist < (e.type == TELEPORT ? 4 : 2.5))
pickup(i, player1);
};
};
void
|
>
|
|
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
entity &e = ents[i];
if (e.type == NOTUSED)
continue;
if (!ents[i].spawned && e.type != TELEPORT && e.type != JUMPPAD)
continue;
if (OUTBORD(e.x, e.y))
continue;
vec v = {(float)e.x, (float)e.y,
(float)S(e.x, e.y)->floor + player1->eyeheight};
vdist(dist, t, player1->o, v);
if (dist < (e.type == TELEPORT ? 4 : 2.5))
pickup(i, player1);
};
};
void
|