Break apart a polygon model into pieces of debris
| 1028 | } |
| 1029 | // Break apart a polygon model into pieces of debris |
| 1030 | void BreakApartModel(object *obj, float explosion_mag, int death_flags) { |
| 1031 | poly_model *pm = GetPolymodelPointer(obj->rtype.pobj_info.model_num); |
| 1032 | if (pm->n_models > 1) { |
| 1033 | int i; |
| 1034 | |
| 1035 | // Create debris pieces from subobjects |
| 1036 | for (i = 1; i < pm->n_models; i++) |
| 1037 | CreateSubobjectDebris(obj, i, explosion_mag, death_flags); |
| 1038 | // Change size for collision purposes |
| 1039 | obj->size = Poly_models[obj->rtype.pobj_info.model_num].submodel[0].rad; |
| 1040 | } |
| 1041 | } |
| 1042 | // Splinter stuff |
| 1043 | #define MAX_SPLINTERS_PER_OBJECT 10 |
| 1044 | // Creates individual face particles from the main body of an object |
no test coverage detected