From c0d60d0fc65fce5028fb122d8aadc4396ec5f096 Mon Sep 17 00:00:00 2001 From: Bukz Date: Sat, 30 Mar 2013 18:19:12 +0000 Subject: [PATCH] make the go_to console message optional git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7443 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/survival.cfg | 2 +- source/src/client.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/survival.cfg b/config/survival.cfg index b36e1a94..a67cecf5 100644 --- a/config/survival.cfg +++ b/config/survival.cfg @@ -146,7 +146,7 @@ const teleportPlayer [ survTeleported = 1 findCenter if (! $editing) edittoggle - go_to $midZoneX $midZoneY + go_to $midZoneX $midZoneY 0 sleep 25 edittoggle ] ] diff --git a/source/src/client.cpp b/source/src/client.cpp index 0654c35f..466e62d8 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -157,12 +157,13 @@ void whereami() conoutf("you are at (%.2f,%.2f)", player1->o.x, player1->o.y); } -void go_to(float *x, float *y) +void go_to(float *x, float *y, char *showmsg) { if(player1->state != CS_EDITING) return; player1->newpos.x = *x; player1->newpos.y = *y; - conoutf("you are going to (%.2f; %.2f)", *x, *y); + if(!showmsg || !*showmsg || strcmp(showmsg, "0")!=0) + conoutf("you are going to (%.2f; %.2f)", *x, *y); } void disconnect(int onlyclean, int async) @@ -339,7 +340,7 @@ COMMAND(modconnectadmin, "sis"); COMMAND(modlanconnect, ""); COMMANDN(disconnect, trydisconnect, ""); COMMAND(whereami, ""); -COMMAND(go_to, "ff"); +COMMAND(go_to, "ffs"); void current_version(char *text) {