[next] Objects with a color and a translation can crash the game
Example Lua script: ColorAndTranslationTest.lua
This Lua script is supposed to randomly assign a skincolor and translation to every blue crawla spawned. However, it has a tendency to crash the game. This can be reproduced by simply adding this Lua script and loading GFZ1. If the game doesn't immediately crash, either load GFZ1 again, or run through the zone until it crashes.
The game can also crash if you supply a skincolor and translation to v.getColormap
.
According to the RPT crash dumps I've gotten in figuring out this out, the problematic line, as of the time of writing this, appears to be line 1132 in r_translation.c
:
colorcache_t *cache = tr->skincolor_remaps[skinnum][skincolor];
Also, just an observation, but it looks like R_GetTranslationForThing
doesn't account for an mobj's colorized
field at all.