past cones are displayed too, not only future cones

This commit is contained in:
Zeno Rogue 2022-09-29 11:38:54 +02:00
parent b26ce4a067
commit 293c271c7f
2 changed files with 5 additions and 6 deletions

View File

@ -170,7 +170,7 @@ void draw_game_cell(const cell_to_draw& cd) {
// println(hlog, current * V * h);
println(hlog, "cr shift = ", cr.shift);
});
if(cr.shift > 0 && cr.shift < M_PI) {
if(cr.shift < M_PI && cr.shift < M_PI) {
vector<hyperpoint> pts;
for(int i=0; i<=360; i++) {
hybrid::in_actual([&]{
@ -180,7 +180,7 @@ void draw_game_cell(const cell_to_draw& cd) {
});
}
for(auto h: pts) curvepoint(h);
queuecurve(shiftless(Id), 0xFF0000C0, 0x00000060, PPR::SUPERLINE);
queuecurve(shiftless(Id), 0xFF0000C0, cr.shift > 0 ? 0x00000060 : 0xFFFFFF10, PPR::SUPERLINE);
}
}
}

View File

@ -564,11 +564,10 @@ void view_ds_game() {
auto cr = ds_cross0_light(current.T * lorentz(2, 3, current_ship.shift - current.shift) * h);
pts.push_back(cr.h);
if(cr.shift > 0) ok++; else bad++;
shifts.push_back(cr.shift);
}
if(bad == 0) {
for(auto h: pts) curvepoint(h);
queuecurve(shiftless(sphereflip), 0xFF0000C0, 0x00000060, PPR::SUPERLINE);
}
for(auto h: pts) curvepoint(h);
queuecurve(shiftless(sphereflip), 0xFF0000C0, bad == 0 ? 0x00000060 : 0xFFFFFF10, PPR::SUPERLINE);
}
}
}