Просмотр исходного кода

Fixed knockback not updating the client position of disguised players (bugreport:2308).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13261 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 16 лет назад
Родитель
Сommit
ef5a49688d
2 измененных файлов с 22 добавлено и 18 удалено
  1. 20 16
      src/map/clif.c
  2. 2 2
      src/map/clif.h

+ 20 - 16
src/map/clif.c

@@ -1334,22 +1334,22 @@ int clif_blown(struct block_list *bl)
 /*==========================================
  *
  *------------------------------------------*/
-int clif_fixpos(struct block_list *bl)
+void clif_fixpos(struct block_list *bl)
 {
-	unsigned char buf[16];
-
-	nullpo_retr(0, bl);
+	unsigned char buf[10];
+	nullpo_retv(bl);
 
-	WBUFW(buf,0)=0x88;
-	WBUFL(buf,2)=bl->id;
-	WBUFW(buf,6)=bl->x;
-	WBUFW(buf,8)=bl->y;
+	WBUFW(buf,0) = 0x88;
+	WBUFL(buf,2) = bl->id;
+	WBUFW(buf,6) = bl->x;
+	WBUFW(buf,8) = bl->y;
 	clif_send(buf, packet_len(0x88), bl, AREA);
-	if (disguised(bl)) {
-		WBUFL(buf,2)=-bl->id;
+
+	if( disguised(bl) )
+	{
+		WBUFL(buf,2) = -bl->id;
 		clif_send(buf, packet_len(0x88), bl, SELF);
 	}
-	return 0;
 }
 
 /*==========================================
@@ -7263,18 +7263,22 @@ int clif_charnameupdate (struct map_session_data *ssd)
 	return 0;
 }
 
-int clif_slide(struct block_list *bl, int x, int y){
+void clif_slide(struct block_list *bl, int x, int y)
+{
 	unsigned char buf[10];
-
-	nullpo_retr(0, bl);
+	nullpo_retv(bl);
 
 	WBUFW(buf, 0) = 0x01ff;
 	WBUFL(buf, 2) = bl->id;
 	WBUFW(buf, 6) = x;
 	WBUFW(buf, 8) = y;
-
 	clif_send(buf, packet_len(0x1ff), bl, AREA);
-	return 0;
+
+	if( disguised(bl) )
+	{
+		WBUFL(buf,2) = -bl->id;
+		clif_send(buf, packet_len(0x1ff), bl, SELF);
+	}
 }
 
 /*------------------------------------------

+ 2 - 2
src/map/clif.h

@@ -119,8 +119,8 @@ void clif_move(struct unit_data *ud); //area
 void clif_changemap(struct map_session_data*,short,int,int);	//self
 void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port);	//self
 int clif_blown(struct block_list *); // area
-int clif_slide(struct block_list *,int,int); // area
-int clif_fixpos(struct block_list *);	// area
+void clif_slide(struct block_list *,int,int); // area
+void clif_fixpos(struct block_list *);	// area
 int clif_npcbuysell(struct map_session_data*,int);	//self
 int clif_buylist(struct map_session_data*,struct npc_data*);	//self
 int clif_selllist(struct map_session_data*);	//self