tilenum=pp->model;
static void InfoTarget(int s, PKGx6C *pp) // rewritten to work also with map-tiles, not only static ones by LB{	int tilenum,x1,y1,x2,y2,x,y;	signed char z;	unsigned long int pos;	tile_st tile;	map_st map1;	land_st land;	if(pp->TxLoc==-1 || pp->TyLoc==-1) return;	x=pp->TxLoc;	y=pp->TyLoc;	z=pp->TzLoc;	if (pp->model==0)	// damn osi not me why the tilenum is only send for static tiles, LB	{	// manually calculating the ID's if it's a maptype		x1=x/8;		y1=y/8;		x2=(x-(x1*8));		y2=(y-(y1*8));		pos=(x1*512*196)+(y1*196)+(y2*24)+(x2*3)+4;		fseek(mapfile, pos, SEEK_SET);		fread(&map1, 3, 1, mapfile);		Map->SeekLand(map1.id, &land);		clConsole.send("type: map-tile\n");		clConsole.send("tilenum: %i\n",map1.id);		clConsole.send("Flag1:%x\n", land.flag1);		clConsole.send("Flag2:%x\n", land.flag2);		clConsole.send("Flag3:%x\n", land.flag3);		clConsole.send("Flag4:%x\n", land.flag4);		clConsole.send("Unknown1:%lx\n", land.unknown1);		clConsole.send("Unknown2:%x\n", land.unknown2);		clConsole.send("Name:%s\n", land.name);	}	else	{		tilenum=pp->model; // lb, bugfix		Map->SeekTile(tilenum, &tile);		clConsole.send("type: static-tile\n");		clConsole.send("tilenum: %i\n",tilenum);		clConsole.send("Flag1:%x\n", tile.flag1);		clConsole.send("Flag2:%x\n", tile.flag2);		clConsole.send("Flag3:%x\n", tile.flag3);		clConsole.send("Flag4:%x\n", tile.flag4);		clConsole.send("Weight:%x\n", tile.weight);		clConsole.send("Layer:%x\n", tile.layer);		clConsole.send("Anim:%lx\n", tile.animation);		clConsole.send("Unknown1:%lx\n", tile.unknown1);		clConsole.send("Unknown2:%x\n", tile.unknown2);		clConsole.send("Unknown3:%x\n", tile.unknown3);		clConsole.send("Height:%x\n", tile.height);		clConsole.send("Name:%s\n", tile.name);	}	sysmessage(s, "Item info has been dumped to the console.");	clConsole.send("\n");}