Gets the total number of object faces that exist in a mine
| 442 | |
| 443 | // Gets the total number of object faces that exist in a mine |
| 444 | int GetTotalObjectFaces(int terrain) { |
| 445 | int i; |
| 446 | int facecount = 0; |
| 447 | |
| 448 | for (i = 0; i <= Highest_object_index; i++) { |
| 449 | if (Objects[i].type != OBJ_NONE) { |
| 450 | if ((terrain != 0) != (OBJECT_OUTSIDE(&Objects[i]) != 0)) |
| 451 | continue; |
| 452 | |
| 453 | if (Objects[i].lighting_render_type == LRT_LIGHTMAPS) { |
| 454 | poly_model *po = &Poly_models[Objects[i].rtype.pobj_info.model_num]; |
| 455 | |
| 456 | if (!po->new_style) |
| 457 | continue; |
| 458 | |
| 459 | facecount += CountFacesInPolymodel(po); |
| 460 | } |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | return facecount; |
| 465 | } |
| 466 | |
| 467 | // Gets the total number of object faces that exist in a room |
| 468 | int GetTotalObjectFacesForSingleRoom(int roomnum) { |
no test coverage detected