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

Function DoWeapons

Descent3/Controls.cpp:997–1015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

995// ---------------------------------------------------------------------------
996
997void 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
1017void DoKeyboardWeapons(game_controls *controls) {
1018 ct_packet fire_primary_key_time;

Callers 1

ReadPlayerControlsFunction · 0.85

Calls 2

DoKeyboardWeaponsFunction · 0.85
DoControllerWeaponsFunction · 0.85

Tested by

no test coverage detected