mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
should no longer freeze when maxv/unit or maxv/tank is negative or too large
This commit is contained in:
parent
3c867a7ff0
commit
49564b2e0e
@ -118,14 +118,14 @@ void display(int id, int y, ld val, ld maxv, ld tank, ld unit) {
|
||||
queuecurve(sId, col, col, PPR::ZERO);
|
||||
}
|
||||
|
||||
if(unit) for(ld u=unit; u<maxv-1e-3; u+=unit) {
|
||||
if(unit > 0 && maxv / unit <= siz/2 + 1e-6) for(ld u=unit; u<maxv-1e-3; u+=unit) {
|
||||
ld at = sta + siz * u / maxv;
|
||||
curvepoint(atscreenpos(at, top, 1) * C0);
|
||||
curvepoint(atscreenpos(at, ctr, 1) * C0);
|
||||
queuecurve(sId, 0x80, 0, PPR::ZERO);
|
||||
}
|
||||
|
||||
for(ld u=tank; u<maxv-1e-3; u+=tank) {
|
||||
if(tank > 0 && maxv / tank <= siz/2 + 1e-6) for(ld u=tank; u<maxv-1e-3; u+=tank) {
|
||||
ld at = sta + siz * (1 - u / maxv);
|
||||
curvepoint(atscreenpos(at, ctr, 1) * C0);
|
||||
curvepoint(atscreenpos(at, bot, 1) * C0);
|
||||
|
Loading…
Reference in New Issue
Block a user