mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* removed pol_distance/inrange* functions replaced lastxyz with Pos4d * replaced WorldIterator::InVisualRange with InMaxVisualRange returning all objects in maximum update range. Adapted each caller, they now have to check in_visual_range Multis should now be send to clients with its footprint in mind. added testscript for boat moving in/out of range * removed non pos InRange/InBox functions gamestate.update_range doesnt need to be a Vector, renamed * corrected send_action_to_inrange * replaced clip methods with general numeric type clamp function * added Range2d constructor with radius * splitted update_range. chr has now a los_size (how far can it see) and an object has a visible_size (0 for objects 1/2 footprint for multis) * use in_range instead of pol_distance * corrected order of checks * fixed warnings * fixed visual size of multis testclient added wornitems pkt support added tests for los * corechanges
31 lines
658 B
Text
31 lines
658 B
Text
use uo;
|
|
use os;
|
|
include "testutil";
|
|
include "communication";
|
|
|
|
foreach multi in (ListMultisInBox(0,0,-200,10000,10000,200))
|
|
DestroyMulti(multi);
|
|
endforeach
|
|
|
|
var clientcon := getClientConnection();
|
|
if (clientcon)
|
|
clientcon.sendevent(struct{todo:="exit"});
|
|
WaitForClient(0,{EVT_EXIT},2);
|
|
endif
|
|
var a:=FindAccount("testclient0");
|
|
if (a)
|
|
a.deletecharacter(1);
|
|
a.delete();
|
|
endif
|
|
a:=FindAccount("testclient1");
|
|
if (a)
|
|
a.deletecharacter(1);
|
|
a.delete();
|
|
endif
|
|
|
|
var res := GetGlobalProperty("#SnoopingNpc");
|
|
if (res)
|
|
var mob := SystemFindObjectBySerial(res);
|
|
MoveObjectToLocation(mob, 0, 0, 0, flags := MOVEOBJECT_FORCELOCATION);
|
|
mob.Kill();
|
|
endif
|