From 8cba55667e661a85dc17bd24b69f4d69c740fd61 Mon Sep 17 00:00:00 2001 From: Bukz Date: Wed, 27 Apr 2011 11:21:44 +0000 Subject: [PATCH] isSpect git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6365 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/resetbinds.cfg | 2 +- source/src/clientgame.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/resetbinds.cfg b/config/resetbinds.cfg index 81a2c80b..6b34f622 100644 --- a/config/resetbinds.cfg +++ b/config/resetbinds.cfg @@ -5,7 +5,7 @@ bind MOUSE1 "attack" bind MOUSE2 [ if $old_editbinds [ if $editing [ showmenu editing ] [ altaction ] ] [ if (&& (alive) (! $editing)) [ altaction ] [ slowtoggle $flystyle ] ] ] -bind MOUSE3 "weapon" +bind MOUSE3 [ if $editing [ showmenu editing ] [ weapon ] ] bind MOUSE4 "universaldelta 1" bind MOUSE5 "universaldelta -1" bind BACKSPACE [ if $editing [ delent ] [ dropflag ] ] diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 1c6e7d87..8f1a6ec9 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -248,6 +248,7 @@ ICOMMANDF(skin_rvsf, ARG_1EST, (char *s) { return _setskin(s, TEAM_RVSF); }); ICOMMANDF(skin, ARG_1EST, (char *s) { return _setskin(s, player1->team); }); int curteam() { return player1->team; } +int isSpect() { return (player1->team==TEAM_SPECT || player1->spectatemode==SM_FLY); } int currole() { return player1->clientrole; } int curmode() { return gamemode; } int curmastermode() { return servstate.mastermode; } @@ -266,6 +267,7 @@ COMMANDN(team, newteam, ARG_1STR); COMMANDN(name, newname, ARG_1STR); COMMAND(benchme, ARG_NONE); COMMAND(curteam, ARG_IVAL); +COMMAND(isSpect, ARG_IVAL); COMMAND(currole, ARG_IVAL); COMMAND(curmode, ARG_IVAL); COMMAND(curmastermode, ARG_IVAL);