Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
?moveto (cypher read this)

 
Post new topic   Reply to topic Printable version
 View previous topic  PATCH: VIE encryption (enc_vie.c) Post :: Post afk  View next topic  
Author Message
-Smong-
Guest


Offline

PostPosted: Tue Jun 29, 2004 5:18 pm    Post subject: ?moveto (cypher read this) Reply to topic Reply with quote

Like ?warpto but moves players without speedloss. Note: not tested thoroughly.
Code: Show/Hide
local helptext_t moveto_help =
"Targets: player, freq, or arena\n"
"Args: <x coord> <y coord>\n"
"Moves target player to coordinate x,y.\n";
Don't complain about weapons that are fired after being moved being offset noticeably.




moveto.c - 2.36 KB
File downloaded or viewed 94 time(s)
Back to top
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Tue Jun 29, 2004 6:23 pm    Post subject: Reply to topic Reply with quote

ty much!

next step: getting it to compile biggrin.gif lol.. thanks again.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
-Smong-
Guest


Offline

PostPosted: Mon Jan 03, 2005 10:24 am    Post subject: Reply to topic Reply with quote

Updated for 1.3.2
Code: Show/Hide
--- 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);

You can now get it from here too http://toktok.sscentral.com/ss-asss.html
Back to top
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Mon Jan 03, 2005 1:54 pm    Post subject: Reply to topic Reply with quote

w00t. ty biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 669 page(s) served in previous 5 minutes.

phpBB Created this page in 0.491324 seconds : 31 queries executed (93.4%): GZIP compression disabled