Closed zturtleman closed 7 years ago
Maybe put them in a file in gamedata so engine/renderer, bspc, q3map2 could all read from the same place?
The renderer only actually needs the value for SURF_NODRAW, the rest are based on parsing surfaceParm tokens. Fixed in 38e26a72799ec4142ba41e2ea294f07667dbc887.
The botlib uses CONTENTS_* though. It would be best to move the game-specific botlib code out of engine. Hmm...
Fixed some hardcoded contents in 489e030262b0235731e154acae31909c489cb0bd to be set by game VM. Flags for water, lava, and slime in be_aasmove.c still need to be made changeable. I think the CONTENTS* in be_aas_reach.c is okay because they (should) only be used by BSPC. be_aas_reach.c is compiled into the engine though.
Remaining issues solved by adding botlib to Game VM in Spearmint 0.5.
Q3 and RTCW/ET have slightly different surface and content flags. SoF2/JK2/JA have major changes.
Need to completely abstract surface and content flags in engine, allowing games/mods to reorder or remove known flags. Not the the prettiest thing, but seems like the best way to support existing maps for games ported to Spearmint.
Renderers reads surfaceParms from shaders, will need to get tokens/flags from cgame/ui vm.
BSPC should be modified to handle RTCW/ET surface/content flags too? :-/