[iortcw] 97/497: Added +vstr command so players can customize various commands without resolving to scripts.
Simon McVittie
smcv at debian.org
Wed Sep 21 19:47:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit 408efe15c254527672b85760bd29e59bc49a2d46
Author: nate.afk at gmail.com <nate.afk at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date: Mon Apr 28 02:18:34 2014 +0000
Added +vstr command so players can customize various commands without resolving to scripts.
---
MP/code/cgame/cg_consolecmds.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/MP/code/cgame/cg_consolecmds.c b/MP/code/cgame/cg_consolecmds.c
index eff46ff..c6b5302 100644
--- a/MP/code/cgame/cg_consolecmds.c
+++ b/MP/code/cgame/cg_consolecmds.c
@@ -524,6 +524,33 @@ static void CG_DumpLocation_f( void ) {
(int) cg.snap->ps.origin[0], (int) cg.snap->ps.origin[1], (int) cg.snap->ps.origin[2] );
}
+/*
+===================
+L0
+
++vstr
+===================
+*/
+void CG_vstrDown_f(void) {
+ if (trap_Argc() == 5) {
+ trap_SendConsoleCommand(va("vstr %s;", CG_Argv(1)));
+ }
+ else { CG_Printf("[cgnotify]^3Usage: ^7+vstr [down_vstr] [up_vstr]\n"); }
+}
+
+/*
+===================
+L0
+
+-vstr
+===================
+*/
+void CG_vstrUp_f(void) {
+ if (trap_Argc() == 5) {
+ trap_SendConsoleCommand(va("vstr %s;", CG_Argv(2)));
+ }
+ else { CG_Printf("[cgnotify]^3Usage: ^7+vstr [down_vstr] [up_vstr]\n"); }
+}
typedef struct {
char *cmd;
@@ -581,6 +608,10 @@ static consoleCommand_t commands[] = {
// Arnout
{ "dumploc", CG_DumpLocation_f },
+
+ // L0
+ { "+vstr", CG_vstrDown_f },
+ { "-vstr", CG_vstrUp_f },
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list