Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   map coords (https://postpacific.loc-online.com/showthread.php?t=2850)

zabbix 22.12.2005 17:05

map coords
 
nooblet question: how to translate client coords (/loc) to region coords?
ie 355353 21236 -3732 => 22-24

thanks :roll:

filrip 22.12.2005 18:18

all cube have the same size in X & Y (z does not change the region)
and its 32768.

Each 32768, increase the X region (16... 17 ... 18...) same for Y

So, with a division modulo function, you can know where you are

zabbix 22.12.2005 18:23

k
thanks

hr 22.12.2005 19:47

$geo_x=20+($game_x-$game_x%32768)/32768;
$geo_y=18+($game_y-$game_y%32768)/32768;


All times are GMT. The time now is 15:27.