6 #include <format/format.h> 7 #include "../../clib/logfacility.h" 8 #include "../globals/uvars.h" 9 #include "../realms/realm.h" 19 void test_drop(
unsigned short chrx,
unsigned short chry,
short chrz,
unsigned short dropx,
20 unsigned short dropy,
short dropz,
bool exp_result,
short exp_z )
23 tmp <<
"POL DropHeight(" << chrx <<
"," << chry <<
"," << chrz <<
"," << dropx <<
"," << dropy
24 <<
"," << dropz <<
"): " 25 <<
"Expect " << exp_result <<
"," << exp_z <<
": ";
30 tmp <<
"Got " << result <<
"," << newz <<
": ";
31 if ( exp_result != result )
57 test_drop( 1432, 1696, 0, 1433, 1696, 0,
true, 0 );
59 test_drop( 1437, 1687, 0, 1437, 1688, 0,
true, 0 );
62 test_drop( 1328, 1645, 72, 1328, 1644, 78,
true, 78 );
65 test_drop( 2564, 489, 0, 2564, 489, 0,
true, 0 );
66 test_drop( 2564, 489, 42, 2564, 489, 42,
false, 0 );
69 test_drop( 5310, 735, 0, 5310, 735, 0,
true, 0 );
72 test_drop( 5304, 2488, 39, 5304, 2489, 35,
true, 35 );
75 test_drop( 5210, 3616, 0, 5210, 3615, 5,
true, 2 );
bool dropheight(unsigned short dropx, unsigned short dropy, short dropz, short chrz, short *newz, Multi::UMulti **pmulti)
Realms::Realm * main_realm