Exemple #1
0
        public static void SV_ExecuteUserCommand(String s)
        {
            Com.Dprintln("SV_ExecuteUserCommand:" + s);
            SV_USER.ucmd_t u = null;
            Cmd.TokenizeString(s.ToCharArray(), true);
            SV_USER.sv_player = SV_MAIN.sv_client.edict;
            var i = 0;

            for ( ; i < SV_USER.ucmds.Length; i++)
            {
                u = SV_USER.ucmds[i];
                if (Cmd.Argv(0).Equals(u.name))
                {
                    u.r.Run();
                    break;
                }
            }

            if (i == SV_USER.ucmds.Length && SV_INIT.sv.state == Defines.ss_game)
            {
                Cmd.ClientCommand(SV_USER.sv_player);
            }
        }