From b8bd958ed247ae14aa2ee900bb29a9eb6392392e Mon Sep 17 00:00:00 2001 From: ac_stef Date: Fri, 26 Dec 2008 18:47:27 +0000 Subject: [PATCH] editmapmsg command added git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4071 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/scripts.cfg | 2 ++ source/src/console.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/config/scripts.cfg b/config/scripts.cfg index 87c1a57c..d18fa133 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -8,6 +8,8 @@ alias editent [ ] ] +alias editmapmsg [ saycommand ( concatword [/mapmsg ] (getmapmsg) ) ] + // Auto-completions alias mapcomplete [complete $arg1 "packages/maps/official packages/maps" cgz] mapcommands = "map tdm coop dm lms ts ctf pf lss osok tosok htf vip tktf ktf" diff --git a/source/src/console.cpp b/source/src/console.cpp index 556f085a..c9e31608 100644 --- a/source/src/console.cpp +++ b/source/src/console.cpp @@ -217,9 +217,17 @@ void mapmsg(char *s) s_strncpy(hdr.maptitle, text, 128); } +void getmapmsg(void) +{ + string text; + s_strncpy(text, hdr.maptitle, 128); + result(text); +} + COMMAND(saycommand, ARG_CONC); COMMAND(inputcommand, ARG_3STR); COMMAND(mapmsg, ARG_1STR); +COMMAND(getmapmsg, ARG_NONE); #if !defined(WIN32) && !defined(__APPLE__) #include