--- deliantra/server/socket/request.C 2012/01/03 11:25:37 1.186
+++ deliantra/server/socket/request.C 2016/11/16 23:42:03 1.193
@@ -1,24 +1,24 @@
/*
* This file is part of Deliantra, the Roguelike Realtime MMORPG.
- *
- * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
+ *
+ * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
* Copyright (©) 2001 Mark Wedel
* Copyright (©) 1992 Frank Tore Johansen
- *
+ *
* Deliantra is free software: you can redistribute it and/or modify it under
* the terms of the Affero GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the Affero GNU General Public License
* and the GNU General Public License along with this program. If not, see
* .
- *
+ *
* The authors can be reached via e-mail to
*/
@@ -196,7 +196,7 @@
socket.current_region = reg;
}
- // first try to aovid a full newmap on tiled map scrolls
+ // first try to avoid a full newmap on tiled map scrolls
if (socket.current_map != ob->map && !socket.force_newmap)
{
rv_vector rv;
@@ -278,6 +278,8 @@
* RequestInfo is sort of a meta command. There is some specific
* request of information, but we call other functions to provide
* that information.
+ * requestinfo is completely deprecated, use resource exti request
+ * and the fxix or http protocols.
*/
void
RequestInfo (char *buf, int len, client *ns)
@@ -498,50 +500,6 @@
pl->count = 0;
}
-/**
- * This handles the general commands from the client (ie, north, fire, cast,
- * etc.). It is a lot like PlayerCmd above, but is called with the
- * 'ncom' method which gives more information back to the client so it
- * can throttle.
- */
-void
-NewPlayerCmd (char *buf, int len, player *pl)
-{
- if (len <= 6)
- {
- LOG (llevDebug, "%s: corrupt ncom command <%s>: not long enough (%d) - discarding\n", pl->ns->host, buf, len);
- return;
- }
-
- uint16 cmdid = net_uint16 ((uint8 *)buf);
- sint32 repeat = net_sint32 ((uint8 *)buf + 2);
-
- /* -1 is special - no repeat, but don't update */
- if (repeat != -1)
- pl->count = repeat;
-
- buf += 6; //len -= 6;
-
- execute_newserver_command (pl->ob, buf);
-
- /* Perhaps something better should be done with a left over count.
- * Cleaning up the input should probably be done first - all actions
- * for the command that issued the count should be done before any other
- * commands.
- */
- pl->count = 0;
-
- //TODO: schmorp thinks whatever this calculates, it makes no sense at all
- int time = pl->ob->has_active_speed ()
- ? (int) (MAX_TIME / pl->ob->speed)
- : MAX_TIME * 100;
-
- /* Send confirmation of command execution now */
- packet sl ("comc");
- sl << uint16 (cmdid) << uint32 (time);
- pl->ns->send_packet (sl);
-}
-
/** This is a reply to a previous query. */
void
ReplyCmd (char *buf, int len, client *ns)
@@ -1237,7 +1195,7 @@
static void
append_spell (player *pl, packet &sl, object *spell)
{
- int i, skill = 0;
+ int skill = 0;
if (!(spell->name))
{
@@ -1274,8 +1232,10 @@
<< uint8 (skill)
<< uint32 (spell->path_attuned)
<< uint32 (spell->face)
- << data8 (spell->name)
- << data16 (spell->msg);
+ << data8 (spell->name);
+
+ if (pl->ns->monitor_spells < 2)
+ sl << data16 (spell->msg);
}
/**