- hotfix for compiler bug with optimized out if statement.

This needs to be investigated, this hotfix is merely to get it running again for now.
This commit is contained in:
Christoph Oelckers 2023-05-01 12:22:32 +02:00
parent 28e451311b
commit d6a7721802

View file

@ -519,7 +519,8 @@ class RedneckStatusBar : DukeCommonStatusBar
for(int i = 0; i < ammoOrder.Size(); i++) for(int i = 0; i < ammoOrder.Size(); i++)
{ {
int ammonum = ammoorder[i]; int ammonum = ammoorder[i];
if (ammonum == RRWpn.CHICKEN_WEAPON && !isRRRA()) continue; bool myisRRRA = isRRRA(); // temporary hotfix for a compiler bug. The next line makes the compiler assert if it gets optimized out when RRRA is being played.
//if (ammonum == RRWpn.CHICKEN_WEAPON && !myisRRRA) continue;
if (ammonum == RRWpn.MOTORCYCLE_WEAPON && !p.OnMotorcycle) continue; if (ammonum == RRWpn.MOTORCYCLE_WEAPON && !p.OnMotorcycle) continue;
if (ammonum == RRWpn.BOAT_WEAPON && !p.OnBoat) continue; if (ammonum == RRWpn.BOAT_WEAPON && !p.OnBoat) continue;
// dynamite and crossbow dynamite ammo types are coupled. // dynamite and crossbow dynamite ammo types are coupled.