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

Function ShipSelectCallBack

Descent3/pilot.cpp:3403–3422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3401
3402extern float Render_zoom;
3403void ShipSelectCallBack(int c) {
3404 if (!lp_ship_info->idlist)
3405 return;
3406
3407 float size;
3408 ship_model = Ships[lp_ship_info->idlist[c]].model_handle;
3409 if (ship_model == -1) {
3410 mprintf(0, "ship_model is -1\n");
3411 Int3();
3412 }
3413
3414 DoWaitMessage(true);
3415
3416 PageInPolymodel(ship_model, OBJ_PLAYER, &size);
3417 poly_model *pm = GetPolymodelPointer(ship_model);
3418
3419 ship_pos.cam_dist = pm->anim_size / Render_zoom + 5;
3420
3421 DoWaitMessage(false);
3422}
3423
3424extern char LocalCustomGraphicsDir[TABLE_NAME_LEN];
3425extern char LocalCustomSoundsDir[TABLE_NAME_LEN];

Callers 1

PltSelectShipFunction · 0.85

Calls 3

DoWaitMessageFunction · 0.85
PageInPolymodelFunction · 0.85
GetPolymodelPointerFunction · 0.85

Tested by

no test coverage detected