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
This commit is contained in:
Bukz
2013-03-30 18:19:12 +00:00
parent 2c37c1279a
commit c0d60d0fc6
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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)
{