| 123 | COMMAND(shiftweapon, "i"); |
| 124 | |
| 125 | void quicknadethrow(bool on) |
| 126 | { |
| 127 | if(player1->state != CS_ALIVE) return; |
| 128 | if(on) |
| 129 | { |
| 130 | if(player1->weapons[GUN_GRENADE]->mag > 0) |
| 131 | { |
| 132 | if(player1->weaponsel->type != GUN_GRENADE) selectweapon(player1->weapons[GUN_GRENADE]); |
| 133 | if(player1->weaponsel->type == GUN_GRENADE || player1->nextweaponsel->type == GUN_GRENADE) |
| 134 | { |
| 135 | if(!(player1->weaponsel->type == GUN_GRENADE && player1->nextweaponsel->type != GUN_GRENADE)) attack(true); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | else |
| 140 | { |
| 141 | if(player1->weaponsel->type == GUN_GRENADE || player1->nextweaponsel->type == GUN_GRENADE) |
| 142 | { |
| 143 | attack(false); |
| 144 | quicknade = true; |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | COMMAND(quicknadethrow, "d"); |
| 149 | |
| 150 | COMMANDF(currentprimary, "", () { intret(player1->primweap->type); }); |
nothing calls this directly
no test coverage detected