[r3245+] Powerup.Colormap broken

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

[r3245+] Powerup.Colormap broken

Post by Gez »

The colormap code refactoring resulted in the default colormap initialization being moved from InitPalette() called by V_Init() to R_InitColormaps() called by R_Init().

The important detail being that V_Init() is called before actors are loaded, but R_Init() is called afterwards.

Since the default colormaps are not yet initialized when actors are parsed, the code in DEFINE_CLASS_PROPERTY_PREFIX(powerup, colormap, FFFfff, Inventory) results in nonsense -- the first will be the inverse map for example. Worse, since R_InitColormaps() starts by cleaning out existing colormaps, it might be possible to have actors using a no-longer existent colormap if you define more of them than there are default colormaps. I haven't actually tried to see what happens then, but it can't be good!

More information on the subject can be found here.
Post Reply

Return to “Closed Bugs [GZDoom]”