mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-27 18:24:40 +00:00
SidewaysFreezeThruster::init: fix infinite loop under MinGW
This commit is contained in:
parent
9ff174dd06
commit
455b402731
1 changed files with 10 additions and 2 deletions
|
|
@ -276,12 +276,20 @@ struct SidewaysFreezeThruster : Mobj
|
|||
Vec2<Fixed> h_vector = angle_vector(an);
|
||||
|
||||
// spawn the pipes:
|
||||
for (int i = 0; i < 4; ++i)
|
||||
auto spawn_pipe = [&](int i)
|
||||
{
|
||||
angle_t v_an = ANGLE_45 + (ANGLE_90 * i);
|
||||
Vec2<Fixed> v_vector = vector(v_an) * 32;
|
||||
spawn_piece({h_vector * v_vector.y, v_vector.x}, angle, 2);
|
||||
}
|
||||
};
|
||||
|
||||
// This is unrolled because when it was a for loop,
|
||||
// it ran infinitely, but only under MinGW.
|
||||
// Tested: gcc.exe (Rev2, Built by MSYS2 project) 13.2.0 (32-bit version)
|
||||
spawn_pipe(0);
|
||||
spawn_pipe(1);
|
||||
spawn_pipe(2);
|
||||
spawn_pipe(3);
|
||||
|
||||
// spawn the icons:
|
||||
Vec2<Fixed> v = vector(an) * 32;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue