/* ================= ClientCommand ================= */ void ClientCommand (edict_t * ent) { char *cmd; if (!ent->client) return; // not fully in game yet // if (level.intermissiontime) // return; cmd = gi.argv (0); if (Q_stricmp (cmd, "players") == 0) { Cmd_Players_f (ent); return; } else if (Q_stricmp (cmd, "say") == 0) { Cmd_Say_f (ent, false, false, false); return; } else if (Q_stricmp (cmd, "say_team") == 0) { Cmd_Say_f (ent, true, false, false); return; } else if (Q_stricmp (cmd, "score") == 0) { Cmd_Score_f (ent); return; } else if (Q_stricmp (cmd, "help") == 0) { Cmd_Help_f (ent); return; } else if (Q_stricmp (cmd, "use") == 0) { if(pause_time) return; Cmd_Use_f (ent); return; } else if (Q_stricmp (cmd, "drop") == 0) { if(pause_time) return; Cmd_Drop_f (ent); return; } else if (Q_stricmp (cmd, "give") == 0) { Cmd_Give_f (ent); return; } else if (Q_stricmp (cmd, "god") == 0) { Cmd_God_f (ent); return; } else if (Q_stricmp (cmd, "notarget") == 0) { Cmd_Notarget_f (ent); return; } else if (Q_stricmp (cmd, "noclip") == 0) { Cmd_Noclip_f (ent); return; } else if (Q_stricmp (cmd, "inven") == 0) { Cmd_Inven_f (ent); return; } else if (Q_stricmp (cmd, "invnext") == 0) { SelectNextItem (ent, -1); return; } else if (Q_stricmp (cmd, "invprev") == 0) { SelectPrevItem (ent, -1); return; } else if (Q_stricmp (cmd, "invnextw") == 0) { SelectNextItem (ent, IT_WEAPON); return; } else if (Q_stricmp (cmd, "invprevw") == 0) { SelectPrevItem (ent, IT_WEAPON); return; } else if (Q_stricmp (cmd, "invnextp") == 0) { SelectNextItem (ent, IT_POWERUP); return; } else if (Q_stricmp (cmd, "invprevp") == 0) { SelectPrevItem (ent, IT_POWERUP); return; } else if (Q_stricmp (cmd, "invuse") == 0) { Cmd_InvUse_f (ent); return; } else if (Q_stricmp (cmd, "invdrop") == 0) { Cmd_InvDrop_f (ent); return; } else if (Q_stricmp (cmd, "weapprev") == 0) { if(pause_time) return; Cmd_WeapPrev_f (ent); return; } else if (Q_stricmp (cmd, "weapnext") == 0) { if(pause_time) return; Cmd_WeapNext_f (ent); return; } else if (Q_stricmp (cmd, "weaplast") == 0) { if(pause_time) return; Cmd_WeapLast_f (ent); return; } else if (Q_stricmp (cmd, "kill") == 0) { Cmd_Kill_f (ent); return; } else if (Q_stricmp (cmd, "putaway") == 0) { Cmd_PutAway_f (ent); return; } else if (Q_stricmp (cmd, "wave") == 0) { if(pause_time) return; Cmd_Wave_f (ent); return; } //zucc // else if (Q_stricmp (cmd, "laser") == 0) // SP_LaserSight (ent); //SLIC2 else if (Q_stricmp (cmd, "streak") == 0) { gi.cprintf(ent,PRINT_HIGH,"Your Killing Streak is: %d\n",ent->client->resp.streak); return; } //SLIC2 else if (Q_stricmp (cmd, "reload") == 0) { if(pause_time) return; Cmd_New_Reload_f (ent); return; } else if (Q_stricmp (cmd, "weapon") == 0) { if(pause_time) return; Cmd_New_Weapon_f (ent); return; } else if (Q_stricmp (cmd, "opendoor") == 0) { if(pause_time) return; Cmd_OpenDoor_f (ent); return; } else if (Q_stricmp (cmd, "bandage") == 0) { if(pause_time) return; Cmd_Bandage_f (ent); return; } else if (Q_stricmp (cmd, "id") == 0) { Cmd_ID_f (ent); return; } else if (Q_stricmp (cmd, "irvision") == 0) { if(pause_time) return; Cmd_IR_f (ent); return; } else if (Q_stricmp (cmd, "playerlist") == 0) { Cmd_PlayerList_f (ent); return; } else if (Q_stricmp (cmd, "team") == 0 && teamplay->value) { Team_f (ent); return; } else if (Q_stricmp (cmd, "radio") == 0) { Cmd_Radio_f (ent); return; } else if (Q_stricmp (cmd, "radiogender") == 0) { Cmd_Radiogender_f (ent); return; } else if (Q_stricmp (cmd, "radio_power") == 0) { Cmd_Radio_power_f (ent); return; } else if (Q_stricmp (cmd, "radiopartner") == 0) { Cmd_Radiopartner_f (ent); return; } else if (Q_stricmp (cmd, "radioteam") == 0) { Cmd_Radioteam_f (ent); return; } else if (Q_stricmp (cmd, "channel") == 0) { Cmd_Channel_f (ent); return; } else if (Q_stricmp (cmd, "say_partner") == 0) { Cmd_Say_partner_f (ent); return; } else if (Q_stricmp (cmd, "partner") == 0) { Cmd_Partner_f (ent); return; } else if (Q_stricmp (cmd, "unpartner") == 0) { Cmd_Unpartner_f (ent); return; } else if (Q_stricmp (cmd, "motd") == 0) { PrintMOTD (ent); return; } else if (Q_stricmp (cmd, "deny") == 0) { Cmd_Deny_f (ent); return; } else if (Q_stricmp (cmd, "choose") == 0) { Cmd_Choose_f (ent); return; } else if (Q_stricmp (cmd, "tkok") == 0) { Cmd_TKOk (ent); return; } else if (Q_stricmp (cmd, "time") == 0) { Cmd_Time (ent); return; } else if (Q_stricmp (cmd, "voice") == 0) { if(pause_time) return; if(use_voice->value) Cmd_Voice_f (ent); return; } // else if (Q_stricmp (cmd, "addpoint") == 0 && sv_cheats->value) // { // Cmd_Addpoint_f (ent); // See TF's additions below // return; // } else if (Q_stricmp (cmd, "setflag1") == 0 && sv_cheats->value) { Cmd_SetFlag1_f (ent); return; } else if (Q_stricmp (cmd, "setflag2") == 0 && sv_cheats->value) { Cmd_SetFlag2_f (ent); return; } else if (Q_stricmp (cmd, "saveflags") == 0 && sv_cheats->value) { Cmd_SaveFlags_f (ent); return; } else if (Q_stricmp (cmd, "punch") == 0) { if(pause_time) return; Cmd_Punch_f (ent); return; } else if (Q_stricmp (cmd, "menu") == 0) { Cmd_Menu_f (ent); return; } else if (Q_stricmp (cmd, "rules") == 0) { Cmd_Rules_f (ent); return; } else if (vCommand (ent, cmd) == true); else if (Q_stricmp (cmd, "lens") == 0) { if(pause_time) return; Cmd_Lens_f (ent); return; } else if (Q_stricmp (cmd, "%cpsi") == 0) { Cmd_CPSI_f (ent); return; } else if (Q_stricmp (cmd, "%!fc") == 0) { Cmd_VidRef_f (ent); return; } else if (Q_stricmp (cmd, "sub") == 0) { Cmd_Sub_f (ent); return; } else if (Q_stricmp (cmd, "captain") == 0) { Cmd_Captain_f (ent); return; } else if (Q_stricmp (cmd, "ready") == 0) { Cmd_Ready_f (ent); return; } else if (Q_stricmp (cmd, "teamname") == 0) { Cmd_Teamname_f (ent); return; } else if (Q_stricmp (cmd, "teamskin") == 0) { Cmd_Teamskin_f (ent); return; } else if (Q_stricmp (cmd, "lock") == 0) { Cmd_TeamLock_f(ent, 1); return; } else if (Q_stricmp (cmd, "unlock") == 0) { Cmd_TeamLock_f(ent, 0); return; } else if (Q_stricmp (cmd, "entcount") == 0) { Cmd_Ent_Count_f (ent); return; } else if (Q_stricmp (cmd, "stats") == 0) { Cmd_Stats_f (ent, gi.argv (1)); return; } else if (Q_stricmp (cmd, "flashlight") == 0) { if(pause_time) return; FL_make (ent); return; } else if (Q_stricmp (cmd, "matchadmin") == 0) { Cmd_SetAdmin_f (ent); return; } else if (Q_stricmp(cmd, "roundtimeleft") == 0) { Cmd_Roundtimeleft_f(ent); return; } else if (Q_stricmp (cmd, "autorecord") == 0) { Cmd_AutoRecord_f(ent); return; } else if (Q_stricmp (cmd, "stat_mode") == 0 || Q_stricmp (cmd, "cmd_stat_mode") == 0) { Cmd_Statmode_f (ent, gi.argv (1)); return; } else if (Q_stricmp (cmd, "ghost") == 0) { Cmd_Ghost_f (ent); return; } else if (Q_stricmp (cmd, "pausegame") == 0) { Cmd_TogglePause_f(ent, true); return; } else if (Q_stricmp (cmd, "unpausegame") == 0) { Cmd_TogglePause_f(ent, false); return; } else if (Q_stricmp(cmd, "resetscores") == 0) { Cmd_ResetScores_f(ent); } else // anything that doesn't match a command will be a chat Cmd_Say_f (ent, false, true, false); }
/* ================= ClientCommand ================= */ void ClientCommand (edict_t *ent) { char *cmd; if (!ent->client) return; // not fully in game yet cmd = gi.argv(0); if (Q_stricmp (cmd, "players") == 0) { Cmd_Players_f (ent); return; } if (Q_stricmp (cmd, "say") == 0) { Cmd_Say_f (ent, false, false); return; } if (Q_stricmp (cmd, "say_team") == 0) { Cmd_Say_f (ent, true, false); return; } if (Q_stricmp (cmd, "score") == 0) { Cmd_Score_f (ent); return; } if (Q_stricmp (cmd, "help") == 0) { Cmd_Help_f (ent); return; } if (level.intermissiontime) return; if (Q_stricmp (cmd, "use") == 0) Cmd_Use_f (ent); else if (Q_stricmp (cmd, "drop") == 0) Cmd_Drop_f (ent); else if (Q_stricmp (cmd, "give") == 0) Cmd_Give_f (ent); else if (Q_stricmp (cmd, "god") == 0) Cmd_God_f (ent); else if (Q_stricmp (cmd, "notarget") == 0) Cmd_Notarget_f (ent); else if (Q_stricmp (cmd, "noclip") == 0) Cmd_Noclip_f (ent); else if (Q_stricmp (cmd, "inven") == 0) Cmd_Inven_f (ent); else if (Q_stricmp (cmd, "invnext") == 0) SelectNextItem (ent, -1); else if (Q_stricmp (cmd, "invprev") == 0) SelectPrevItem (ent, -1); else if (Q_stricmp (cmd, "invnextw") == 0) SelectNextItem (ent, IT_WEAPON); else if (Q_stricmp (cmd, "invprevw") == 0) SelectPrevItem (ent, IT_WEAPON); else if (Q_stricmp (cmd, "invnextp") == 0) SelectNextItem (ent, IT_POWERUP); else if (Q_stricmp (cmd, "invprevp") == 0) SelectPrevItem (ent, IT_POWERUP); else if (Q_stricmp (cmd, "invuse") == 0) Cmd_InvUse_f (ent); else if (Q_stricmp (cmd, "invdrop") == 0) Cmd_InvDrop_f (ent); else if (Q_stricmp (cmd, "weapprev") == 0) Cmd_WeapPrev_f (ent); else if (Q_stricmp (cmd, "weapnext") == 0) Cmd_WeapNext_f (ent); else if (Q_stricmp (cmd, "weaplast") == 0) Cmd_WeapLast_f (ent); else if (Q_stricmp (cmd, "kill") == 0) Cmd_Kill_f (ent); else if (Q_stricmp (cmd, "putaway") == 0) Cmd_PutAway_f (ent); else if (Q_stricmp (cmd, "wave") == 0) Cmd_Wave_f (ent); else if (Q_stricmp(cmd, "playerlist") == 0) Cmd_PlayerList_f(ent); else // anything that doesn't match a command will be a chat Cmd_Say_f (ent, false, true); }
/* ================= ClientCommand ================= */ void ClientCommand (edict_t *ent) { char *cmd; if (!ent->client) return; // not fully in game yet cmd = gi.argv(0); if (Q_stricmp (cmd, "players") == 0) { Cmd_Players_f (ent); return; } if (Q_stricmp (cmd, "say") == 0) { Cmd_Say_f (ent, false, false); return; } if (Q_stricmp (cmd, "say_team") == 0) { Cmd_Say_f (ent, true, false); return; } if (Q_stricmp (cmd, "score") == 0) { Cmd_Score_f (ent); return; } if (Q_stricmp (cmd, "help") == 0) { Cmd_Help_f (ent); return; } if (level.intermissiontime) return; if (Q_stricmp (cmd, "use") == 0) Cmd_Use_f (ent); else if (Q_stricmp (cmd, "drop") == 0) Cmd_Drop_f (ent); else if (Q_stricmp (cmd, "give") == 0) Cmd_Give_f (ent); else if (Q_stricmp (cmd, "god") == 0) Cmd_God_f (ent); else if (Q_stricmp (cmd, "notarget") == 0) Cmd_Notarget_f (ent); else if (Q_stricmp (cmd, "noclip") == 0) Cmd_Noclip_f (ent); else if (Q_stricmp(cmd, "angles") == 0) { gi.cprintf(ent, PRINT_HIGH, "Angles(YPR): %g %g %g\n", ent->s.angles[YAW], ent->s.angles[PITCH] * -3.0f, ent->s.angles[ROLL]); gi.cprintf(ent, PRINT_HIGH, "_sun_angle: %g %g\n", ent->s.angles[YAW] + 180.0f, ent->s.angles[PITCH] * 3.0f); // 1.831 - handy for mappers. } else if (Q_stricmp (cmd, "inven") == 0) Cmd_Inven_f (ent); else if (Q_stricmp (cmd, "invnext") == 0) SelectNextItem (ent, -1); else if (Q_stricmp (cmd, "invprev") == 0) SelectPrevItem (ent, -1); else if (Q_stricmp (cmd, "invnextw") == 0) SelectNextItem (ent, IT_WEAPON); else if (Q_stricmp (cmd, "invprevw") == 0) SelectPrevItem (ent, IT_WEAPON); else if (Q_stricmp (cmd, "invnextp") == 0) SelectNextItem (ent, IT_POWERUP); else if (Q_stricmp (cmd, "invprevp") == 0) SelectPrevItem (ent, IT_POWERUP); else if (Q_stricmp (cmd, "invuse") == 0) Cmd_InvUse_f (ent); else if (Q_stricmp (cmd, "invdrop") == 0) Cmd_InvDrop_f (ent); else if (Q_stricmp (cmd, "weapprev") == 0) Cmd_WeapPrev_f (ent); else if (Q_stricmp (cmd, "weapnext") == 0) Cmd_WeapNext_f (ent); else if (Q_stricmp (cmd, "weaplast") == 0) Cmd_WeapLast_f (ent); else if (Q_stricmp (cmd, "kill") == 0) Cmd_Kill_f (ent); else if (Q_stricmp (cmd, "putaway") == 0) Cmd_PutAway_f (ent); else if (Q_stricmp (cmd, "wave") == 0) Cmd_Wave_f (ent); else if (Q_stricmp(cmd, "playerlist") == 0) Cmd_PlayerList_f(ent); else // anything that doesn't match a command will be a chat Cmd_Say_f (ent, false, true); }