MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / CollideSubmodel

Function CollideSubmodel

physics/newstyle_fi.cpp:306–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void CollideSubmodel(poly_model *pm, bsp_info *sm, uint32_t f_render_sub) {
307 // Don't collide with door housings (That is the 'room' portion of the door)
308 if ((sm->flags & SOF_SHELL) || (sm->flags & SOF_FRONTFACE))
309 return;
310
311 StartPolyModelPosInstance(&sm->mod_pos);
312 vector temp_vec = sm->mod_pos + sm->offset;
313 newstyle_StartInstanceAngles(&temp_vec, &sm->angs);
314
315 // Check my bit to see if I get collided with. :)
316 if (f_render_sub & (0x00000001 << (sm - pm->submodel)))
317 CollideSubmodelFacesUnsorted(pm, sm);
318
319 for (int i = 0; i < sm->num_children; i++) {
320 CollideSubmodel(pm, &pm->submodel[sm->children[i]], f_render_sub);
321 }
322
323 newstyle_DoneInstance();
324 DonePolyModelPosInstance();
325}
326
327void CollidePolygonModel(vector *pos, matrix *orient, int model_num, float *normalized_time, uint32_t f_render_sub) {
328 poly_model *po;

Callers 1

CollidePolygonModelFunction · 0.85

Calls 5

newstyle_DoneInstanceFunction · 0.85
DonePolyModelPosInstanceFunction · 0.85

Tested by

no test coverage detected