| 995 | // --------------------------------------------------------------------------- |
| 996 | |
| 997 | void DoWeapons(game_controls *controls) { |
| 998 | // reset some values |
| 999 | controls->fire_primary_down_count = 0; |
| 1000 | controls->fire_primary_down_time = 0; |
| 1001 | controls->fire_primary_down_state = false; |
| 1002 | controls->fire_secondary_down_count = 0; |
| 1003 | controls->fire_secondary_down_time = 0; |
| 1004 | controls->fire_flare_down_count = 0; |
| 1005 | |
| 1006 | // only read controls in game interface mode. |
| 1007 | if (Game_interface_mode != GAME_INTERFACE) |
| 1008 | return; |
| 1009 | |
| 1010 | // Reads in values to Controls structure |
| 1011 | if (!Doing_input_message) |
| 1012 | DoKeyboardWeapons(controls); |
| 1013 | |
| 1014 | DoControllerWeapons(controls); |
| 1015 | } |
| 1016 | |
| 1017 | void DoKeyboardWeapons(game_controls *controls) { |
| 1018 | ct_packet fire_primary_key_time; |
no test coverage detected