mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-07 20:02:50 +00:00
fixed hunting flashes
This commit is contained in:
parent
26fb19e7a8
commit
e5a2116958
32
graph.cpp
32
graph.cpp
@ -4118,8 +4118,22 @@ void drawFlashes() {
|
|||||||
for(int k=0; k<isize(flashes); k++) {
|
for(int k=0; k<isize(flashes); k++) {
|
||||||
bool kill = true;
|
bool kill = true;
|
||||||
flashdata& f = flashes[k];
|
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;
|
int tim = ticks - f.t;
|
||||||
|
|
||||||
if(tim <= f.size && !f.spd) kill = false;
|
if(tim <= f.size && !f.spd) kill = false;
|
||||||
@ -4147,11 +4161,11 @@ void drawFlashes() {
|
|||||||
int flashcol = f.color;
|
int flashcol = f.color;
|
||||||
if(u > 500) flashcol = gradient(flashcol, 0, 500, u, 1100);
|
if(u > 500) flashcol = gradient(flashcol, 0, 500, u, 1100);
|
||||||
flashcol = darkena(flashcol, 0, 0xFF);
|
flashcol = darkena(flashcol, 0, 0xFF);
|
||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
if(GDIM == 3)
|
if(GDIM == 3)
|
||||||
queueball(V * zpush(cgi.GROIN1), rad, flashcol, itDiamond);
|
queueball(V * zpush(cgi.GROIN1), rad, flashcol, itDiamond);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
PRING(a) curvepoint(V*xspinpush0(a * M_PI / cgi.S42, rad));
|
PRING(a) curvepoint(V*xspinpush0(a * M_PI / cgi.S42, rad));
|
||||||
queuecurve(flashcol, 0x8080808, PPR::LINE);
|
queuecurve(flashcol, 0x8080808, PPR::LINE);
|
||||||
@ -4168,11 +4182,11 @@ void drawFlashes() {
|
|||||||
int flashcol = f.color;
|
int flashcol = f.color;
|
||||||
if(u > 1000) flashcol = gradient(flashcol, 0, 1000, u, 2200);
|
if(u > 1000) flashcol = gradient(flashcol, 0, 1000, u, 2200);
|
||||||
flashcol = darkena(flashcol, 0, 0xFF);
|
flashcol = darkena(flashcol, 0, 0xFF);
|
||||||
#if MAXMDIM >= 4
|
#if MAXMDIM >= 4
|
||||||
if(GDIM == 3)
|
if(GDIM == 3)
|
||||||
queueball(V * zpush(cgi.GROIN1), rad, flashcol, itRuby);
|
queueball(V * zpush(cgi.GROIN1), rad, flashcol, itRuby);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
PRING(a) curvepoint(V*xspinpush0(a * M_PI / cgi.S42, rad));
|
PRING(a) curvepoint(V*xspinpush0(a * M_PI / cgi.S42, rad));
|
||||||
queuecurve(flashcol, 0x8080808, PPR::LINE);
|
queuecurve(flashcol, 0x8080808, PPR::LINE);
|
||||||
@ -4180,13 +4194,7 @@ void drawFlashes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(kill) {
|
#endif
|
||||||
f = flashes[isize(flashes)-1];
|
|
||||||
flashes.pop_back(); k--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
EX bool allowIncreasedSight() {
|
EX bool allowIncreasedSight() {
|
||||||
if(cheater || autocheat) return true;
|
if(cheater || autocheat) return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user