1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

fixed hunting flashes

This commit is contained in:
Zeno Rogue 2019-12-08 19:33:17 +01:00
parent 26fb19e7a8
commit e5a2116958

View File

@ -4118,8 +4118,22 @@ void drawFlashes() {
for(int k=0; k<isize(flashes); k++) {
bool kill = true;
flashdata& f = flashes[k];
ADC(V, f.where) {
bool copies = false;
ADC(V, f.where) copies = true, draw_flash(f, V, kill);
forCellIdEx(c2, id, f.where) if(!copies) ADC(V, c2) {
draw_flash(f, V * currentmap->iadj(f.where, id), kill);
copies = true;
}
if(kill) {
f = flashes[isize(flashes)-1];
flashes.pop_back(); k--;
}
}
#endif
}
#if CAP_QUEUE
EX void draw_flash(struct flashdata& f, const transmatrix& V, bool& kill) {
int tim = ticks - f.t;
if(tim <= f.size && !f.spd) kill = false;
@ -4147,11 +4161,11 @@ void drawFlashes() {
int flashcol = f.color;
if(u > 500) flashcol = gradient(flashcol, 0, 500, u, 1100);
flashcol = darkena(flashcol, 0, 0xFF);
#if MAXMDIM >= 4
#if MAXMDIM >= 4
if(GDIM == 3)
queueball(V * zpush(cgi.GROIN1), rad, flashcol, itDiamond);
else
#endif
#endif
{
PRING(a) curvepoint(V*xspinpush0(a * M_PI / cgi.S42, rad));
queuecurve(flashcol, 0x8080808, PPR::LINE);
@ -4168,11 +4182,11 @@ void drawFlashes() {
int flashcol = f.color;
if(u > 1000) flashcol = gradient(flashcol, 0, 1000, u, 2200);
flashcol = darkena(flashcol, 0, 0xFF);
#if MAXMDIM >= 4
#if MAXMDIM >= 4
if(GDIM == 3)
queueball(V * zpush(cgi.GROIN1), rad, flashcol, itRuby);
else
#endif
#endif
{
PRING(a) curvepoint(V*xspinpush0(a * M_PI / cgi.S42, rad));
queuecurve(flashcol, 0x8080808, PPR::LINE);
@ -4180,13 +4194,7 @@ void drawFlashes() {
}
}
}
if(kill) {
f = flashes[isize(flashes)-1];
flashes.pop_back(); k--;
}
}
#endif
}
#endif
EX bool allowIncreasedSight() {
if(cheater || autocheat) return true;