mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 07:11:36 +00:00
Elder:
Added a server cmd for the dropweapon code
This commit is contained in:
parent
9092878c49
commit
e02ad6dcd3
1 changed files with 23 additions and 0 deletions
|
@ -1040,6 +1040,29 @@ static void CG_ServerCommand( void ) {
|
|||
}
|
||||
*/
|
||||
|
||||
if ( !strcmp( cmd, "selectpistol") ) {
|
||||
//CG_Printf("Selecting pistol\n");
|
||||
//trap_SendConsoleCommand(va("cmd weapon %i\n", WP_PISTOL));
|
||||
//Elder: condensed version of Cmd_Weapon
|
||||
if (cg.snap) {
|
||||
switch (cg.snap->ps.weapon) {
|
||||
case WP_PISTOL:
|
||||
case WP_KNIFE:
|
||||
case WP_AKIMBO:
|
||||
case WP_GRENADE:
|
||||
break;
|
||||
default:
|
||||
cg.weaponSelectTime = cg.time;
|
||||
cg.weaponSelect = WP_PISTOL;
|
||||
cg.zoomed = qfalse;
|
||||
cg.zoomLevel = 0;
|
||||
trap_SendClientCommand("unzoom");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
CG_Printf( "Unknown client game command: %s\n", cmd );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue