forces opening of cockpit.
| 385 | } |
| 386 | // forces opening of cockpit. |
| 387 | void OpenCockpit() { |
| 388 | // this should allow for opening cockpit while in closing mode. |
| 389 | // do this to insure that an immediate call to CloseCockpit will force it to close again. |
| 390 | if (Cockpit_info.this_keyframe <= COCKPIT_COMPLETE_FRAME) { |
| 391 | Cockpit_info.state = COCKPIT_STATE_QUASI; |
| 392 | Cockpit_info.this_keyframe = COCKPIT_DORMANT_FRAME; |
| 393 | Cockpit_info.next_keyframe = COCKPIT_COMPLETE_FRAME; |
| 394 | if (Cockpit_info.frame_time > 0.0f) |
| 395 | Cockpit_info.frame_time = COCKPIT_ANIM_TIME - Cockpit_info.frame_time; |
| 396 | } |
| 397 | Sound_system.Play2dSound(Cockpit_info.snd_open); |
| 398 | // load hud information for cockpit. |
| 399 | LoadCockpitInfo(Ships[Cockpit_info.ship_index].cockpit_name, NULL); |
| 400 | } |
| 401 | // forces complete closing of cockpit |
| 402 | void CloseCockpit() { |
| 403 | // this should allow for closing cockpit while in opening mode. |
no test coverage detected