hedgewars/uIO.pas
changeset 392 25be13ae29da
parent 371 731ad6d27bd1
child 526 e3689572bb15
--- a/hedgewars/uIO.pas	Sun Feb 04 22:26:13 2007 +0000
+++ b/hedgewars/uIO.pas	Mon Feb 05 19:20:56 2007 +0000
@@ -207,13 +207,13 @@
              {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(extcmd[cmdcurpos].Time)){$ENDIF}
              end;
         'p': begin
-             TargetPoint.X:= SDLNet_Read16(@extcmd[cmdcurpos].X);
-             TargetPoint.Y:= SDLNet_Read16(@extcmd[cmdcurpos].Y);
+             TargetPoint.X:= SmallInt(SDLNet_Read16(@extcmd[cmdcurpos].X));
+             TargetPoint.Y:= SmallInt(SDLNet_Read16(@extcmd[cmdcurpos].Y));
              ParseCommand('put', true)
              end;
         'P': begin
-             CursorPoint.X:= SDLNet_Read16(@extcmd[cmdcurpos].X) + WorldDx;
-             CursorPoint.Y:= SDLNet_Read16(@extcmd[cmdcurpos].Y) + WorldDy;
+             CursorPoint.X:= SmallInt(SDLNet_Read16(@extcmd[cmdcurpos].X) + WorldDx);
+             CursorPoint.Y:= SmallInt(SDLNet_Read16(@extcmd[cmdcurpos].Y) + WorldDy);
              end;
         '1'..'5': ParseCommand('timer ' + extcmd[cmdcurpos].cmd, true);
         #128..char(128 + cMaxSlotIndex): ParseCommand('slot ' + char(byte(extcmd[cmdcurpos].cmd) - 79), true)