AW: [CF-Devel] cfclient issues

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri May 23 23:51:46 CDT 2003


  Fixed in CVS.

  There have been some of those in the past also - slowly they get fixed as 
discovered, as the fix is easy.  Just no one has bothered to look at all the 
code which could generate such cases.



Michael Toennies wrote:
>
     
      I find some bad bug in player movement,
     
     >
     
      which can course this client affects too.
     
     >
     
     
     >
     
      Because we track in the client now more accurate
     
     >
     
      what happens on the map, this bug will come in effect -
     
     >
     
      missing
     
     >
     
     
     >
     
      esrv_map_scroll(&op->contr->socket, freearr_x[dir],freearr_y[dir]);
     
     >
     
     
     >
     
      functions when the player moves.
     
     >
     
     
     >
     
      This is the right way to move a player (from move_ob() ).
     
     >
     
     
     >
     
      	remove_ob(op);
     
     >
     
      	op->x+=freearr_x[dir];
     
     >
     
      	op->y+=freearr_y[dir];
     
     >
     
      	insert_ob_in_map(op,op->map,originator,0);
     
     >
     
      	/* Currently, assume that players will only be single space objects */
     
     >
     
      	if (op->type==PLAYER) {
     
     >
     
      	    esrv_map_scroll(&op->contr->socket, freearr_x[dir],freearr_y[dir]);
     
     >
     
      	    op->contr->socket.update_look=1;
     
     >
     
      	    op->contr->socket.look_position=0;
     
     >
     
      	}
     
     >
     
     
     >
     
      This is, how for example the shop_mat function teleports a player back
     
     >
     
      in the shop when he can't pay all unpaid items:
     
     >
     
     
     >
     
         else {
     
     >
     
      	/* if we get here, a player tried to leave a shop but was not able
     
     >
     
      	 * to afford the items he has.  We try to move the player so that
     
     >
     
      	 * they are not on the mat anymore
     
     >
     
      	 */
     
     >
     
     
     >
     
      	int i = find_free_spot (op->arch, op->map, op->x, op->y, 1, 9);
     
     >
     
      	if(i == -1) {
     
     >
     
      	    LOG (llevError, "Internal shop-mat problem.\n");
     
     >
     
      	} else {
     
     >
     
      	    remove_ob (op);
     
     >
     
      	    op->x += freearr_x[i];
     
     >
     
      	    op->y += freearr_y[i];
     
     >
     
      	    rv = insert_ob_in_map (op, op->map, shop_mat,0) == NULL;
     
     >
     
      	}
     
     >
     
          }
     
     >
     
     
     >
     
      The map scroll cmd is missed. This will bring every feature out of track,
     
     >
     
      which
     
     >
     
      depends on exactly map data & position data.
     
     >
     
     
     >
     
      You will notice this effect sometimes, when you get ported/moved, and a
     
     >
     
      "shadow"
     
     >
     
      of your player char animation stays on the position where you was before.
     
     >
     
     
     >
     
      This missing scroll cmds are numerous in the code - better to check every
     
     >
     
      insert_ob_in_map() and add it when needed.
     
     >
     
     
     >
     
     
     >
     
      _______________________________________________
     
     >
     
      crossfire-devel mailing list
     
     >
     
     
      crossfire-devel at lists.real-time.com
      
      
     >
     
     
      https://mailman.real-time.com/mailman/listinfo/crossfire-devel
      
      
     


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list