--- moveto.c.0 2005-01-03 15:17:31.000000000 +0000
+++ moveto.c 2005-01-03 15:17:50.000000000 +0000
@@ -5,12 +5,17 @@
*
* 29/06/04 - Started by Smong (to prove writing modules is easy).
*
+ * 01/07/04 - Changed SPEC to SHIP_SPEC.
+ *
+ * 03/01/05 - Updated for asss 1.3.2.
+ *
*/
#include <stdlib.h>
#include "asss.h"
-local void Cmoveto(const char *params, Player *p, const Target *target);
+local void Cmoveto(const char *command, const char *params, Player *p,
+ const Target *target);
local void do_checksum(struct S2CWeapons *pkt);
local void move_player(Player *p, int x, int y, ticks_t delta);
@@ -48,7 +53,8 @@
"Args: <x coord> <y coord>\n"
"Moves target player to coordinate x,y.\n";
-local void Cmoveto(const char *params, Player *p, const Target *target)
+local void Cmoveto(const char *command, const char *params, Player *p,
+ const Target *target)
{
char *next;
int x, y;
@@ -70,12 +76,14 @@
for (l = LLGetHead(&set); l; l = l->next)
{
p = l->data;
- if (p->p_ship == SPEC || !IS_STANDARD(p)) continue;
+ if (p->p_ship == SHIP_SPEC || !IS_STANDARD(p)) continue;
move_player(p, x, y, now);
}
}
+EXPORT const char info_moveto[] = "v1.1 smong <soinsg@hotmail.com>";
+
EXPORT int MM_moveto(int action, Imodman *mm_, Arena *arena)
{
if (action == MM_LOAD)
@@ -85,12 +93,12 @@
cmd = mm->GetInterface(I_CMDMAN, ALLARENAS);
pd = mm->GetInterface(I_PLAYERDATA, ALLARENAS);
if (!net || !cmd || !pd) return MM_FAIL;
- cmd->AddCommand("moveto", Cmoveto, moveto_help);
+ cmd->AddCommand("moveto", Cmoveto, ALLARENAS, moveto_help);
return MM_OK;
}
else if (action == MM_UNLOAD)
{
- cmd->RemoveCommand("moveto", Cmoveto);
+ cmd->RemoveCommand("moveto", Cmoveto, ALLARENAS);
mm->ReleaseInterface(net);
mm->ReleaseInterface(cmd);
mm->ReleaseInterface(pd);