| 50 | } |
| 51 | |
| 52 | void selectweapon(weapon *w) |
| 53 | { |
| 54 | if(!w || !player1->weaponsel->deselectable() || ispaused) return; |
| 55 | if(w->selectable()) |
| 56 | { |
| 57 | if(player1->attacking && player1->state == CS_ALIVE) attack(false); |
| 58 | int i = w->type; |
| 59 | // substitute akimbo |
| 60 | weapon *akimbo = player1->weapons[GUN_AKIMBO]; |
| 61 | if(w->type==GUN_PISTOL && akimbo->selectable()) w = akimbo; |
| 62 | |
| 63 | player1->weaponswitch(w); |
| 64 | exechook(HOOK_SP, "onWeaponSwitch", "%d", i); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | void requestweapon(char *ws) |
| 69 | { |
no test coverage detected