diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/script.c b/src/map/script.c index 28d06a8f1..d6462384d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -19680,7 +19680,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walktoxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -19851,7 +19851,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walktoxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -19990,7 +19990,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walktoxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -20123,7 +20123,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walktoxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -20257,7 +20257,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walktoxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_SPEED: @@ -20386,7 +20386,7 @@ static BUILDIN(setunitdata) unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); break; case UDT_WALKTOXY: - if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + if (unit->walktoxy(bl, (short)val, (short)val2, 2) != 0) unit->movepos(bl, (short) val, (short) val2, 0, 0); break; case UDT_CLASS: @@ -21121,7 +21121,10 @@ static BUILDIN(unitwalk) if (script_hasdata(st, 4)) { int x = script_getnum(st, 3); int y = script_getnum(st, 4); - script_pushint(st, unit->walktoxy(bl, x, y, 0));// We'll use harder calculations. + if (unit->walktoxy(bl, x, y, 0) == 0) // We'll use harder calculations. + script_pushint(st, 1); + else + script_pushint(st, 0); } else { int target_id = script_getnum(st, 3); |