I want to add a new content like you have (CONTENTS_WATER) lets call it CONTENTS_NEW
I do this:
in surfaceflags.h:
#define CONTENTS_NEW 0x100000000
in bg_pmove.c:
in static void PM_SetWaterLevel( void )
I add this:
if ( cont & CONTENTS_NEW ) {
Com_Printf(“IN NEWn”);
} else
Com_Printf(“NOT IN NEWn”);
I change the ‘surfaceparm water’ in a water shader to ‘surfaceparm newcontent’.
in custinfoparms.txt I add a flag:
newcontent 0x100000000
and it won’t work… when I’m in the CONTENTS_NEW brush I recieve the message ‘NOT IN NEW’
if I change the surfaceparm back to water in that shader and the CONTENTS_NEW in CONTENTS_WATER in bg_pmove.c :
if ( cont & CONTENTS_WATER ) {
Com_Printf(“IN NEWn”);
} else
Com_Printf(“NOT IN NEWn”);
I recieve the ‘IN NEW’ message when I’m in the CONTENTS_WATER brush…
what I’m doing wrong to detect when I’m in a new contents-thing.
If I do the same with new surface-flags, it works fine, but not with these new contents-flags …
thanks !