void MHTokenGroup::PrintMe(FILE *fd, int nTabs) const { PrintTabs(fd, nTabs); fprintf(fd, "{:TokenGroup "); PrintContents(fd, nTabs); PrintTabs(fd, nTabs); fprintf(fd, "}\n"); }
int Q3_BrushContents(mapbrush_t *b) { int contents, i, mixed, hint; side_t *s; s = &b->original_sides[0]; contents = s->contents; // mixed = false; hint = false; for(i = 1; i < b->numsides; i++) { s = &b->original_sides[i]; if(s->contents != contents) { mixed = true; } if(s->surf & (SURF_HINT | SURF_SKIP)) { hint = true; } contents |= s->contents; } //end for // if(hint) { if(contents) { Log_Write("WARNING: hint brush with contents: "); PrintContents(contents); Log_Write("\r\n"); // Log_Write("brush contents is: "); PrintContents(b->contents); Log_Write("\r\n"); } //end if return 0; } //end if //Log_Write("brush %d contents ", nummapbrushes); //PrintContents(contents); //Log_Write("\r\n"); //remove ladder and fog contents contents &= ~(CONTENTS_LADDER | CONTENTS_FOG); // if(mixed) { Log_Write("Entity %i, Brush %i: mixed face contents " , b->entitynum, b->brushnum); PrintContents(contents); Log_Write("\r\n"); // Log_Write("brush contents is: "); PrintContents(b->contents); Log_Write("\r\n"); // if(contents & CONTENTS_DONOTENTER) { return CONTENTS_DONOTENTER; //Log_Print("mixed contents with donotenter\n"); } /* Log_Print("contents:"); PrintContents(contents); Log_Print("\ncontents:"); PrintContents(s->contents); Log_Print("\n"); Log_Print("texture name = %s\n", texinfo[s->texinfo].texture); */ //if liquid brush if(contents & (CONTENTS_LAVA | CONTENTS_SLIME | CONTENTS_WATER)) { return (contents & (CONTENTS_LAVA | CONTENTS_SLIME | CONTENTS_WATER)); } //end if if(contents & CONTENTS_PLAYERCLIP) { return (contents & CONTENTS_PLAYERCLIP); } return (contents & CONTENTS_SOLID); } //end if /* if (contents & CONTENTS_AREAPORTAL) { static int num; Log_Write("Entity %i, Brush %i: area portal %d\r\n", b->entitynum, b->brushnum, num++); } //end if*/ if(contents == (contents & CONTENTS_STRUCTURAL)) { //Log_Print("brush %i is only structural\n", b->brushnum); contents = 0; } //end if if(contents & CONTENTS_DONOTENTER) { Log_Print("brush %i is a donotenter brush, c = %X\n", b->brushnum, contents); } //end if return contents; } //end of the function Q3_BrushContents