1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-31 19:36:16 +00:00

fixed a crash when drawing aura in some projections

This commit is contained in:
Zeno Rogue 2022-03-01 09:23:51 +01:00
parent aaeab82425
commit 0429c8353a

View File

@ -3058,7 +3058,7 @@ EX void addaura(shiftpoint h, color_t col, int fd) {
if(!haveaura_cached) return; if(!haveaura_cached) return;
apply_joukowsky_aura(h); apply_joukowsky_aura(h);
int r = int(2*AURA + atan2(h[1], h[0]) * AURA / 2 / M_PI) % AURA; int r = gmod(atan2(h[1], h[0]) * AURA / 2 / M_PI, AURA);
aurac[r][3] += auramemo << fd; aurac[r][3] += auramemo << fd;
col = darkened(col); col = darkened(col);
aurac[r][0] += (col>>16)&255; aurac[r][0] += (col>>16)&255;