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

Function WBClearInfo

Descent3/robotfire.cpp:307–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307void WBClearInfo(object *obj) {
308 int i, j;
309 poly_model *pm = &Poly_models[obj->rtype.pobj_info.model_num];
310 int num_wbs = pm->num_wbs;
311
312 if (obj->type == OBJ_PLAYER)
313 num_wbs = MAX_WBS_PER_OBJ;
314
315 for (i = 0; i < num_wbs; i++) {
316 obj->dynamic_wb[i].last_fire_time = -1.0f;
317 obj->dynamic_wb[i].cur_firing_mask = 0;
318
319 for (j = 0; j < MAX_WB_TURRETS; j++) {
320 obj->dynamic_wb[i].norm_turret_angle[j] = 0.0f;
321 obj->dynamic_wb[i].turret_direction[j] = WB_MOVE_STILL;
322 obj->dynamic_wb[i].turret_next_think_time[j] = 0.0f;
323 }
324
325 obj->dynamic_wb[i].wb_anim_mask = 0;
326 obj->dynamic_wb[i].wb_anim_frame = 0.0f;
327
328 vm_MakeZero(&obj->dynamic_wb[i].cur_target);
329
330 obj->dynamic_wb[i].flags = DWBF_ENABLED | DWBF_AUTOMATIC;
331 }
332}
333
334void WBClearInfo(otype_wb_info static_wb[]) {
335 int i;

Callers 5

ObjInitPlayerFunction · 0.70
ObjInitGenericFunction · 0.70
AllocShipFunction · 0.70
AllocObjectIDFunction · 0.70
PlayerChangeShipFunction · 0.70

Calls 1

vm_MakeZeroFunction · 0.85

Tested by

no test coverage detected