hedgewars/uIO.pas
changeset 2645 89aa2aa89066
parent 2643 2074393d4db7
child 2691 c0da3a98c01c
--- a/hedgewars/uIO.pas	Sat Nov 28 02:46:15 2009 +0000
+++ b/hedgewars/uIO.pas	Sat Nov 28 15:22:28 2009 +0000
@@ -261,6 +261,7 @@
 procedure NetGetNextCmd;
 var tmpflag: boolean;
 	s: shortstring;
+	x16, y16: SmallInt;
 begin
 tmpflag:= true;
 
@@ -307,16 +308,16 @@
 			{$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(hiTicks shl 16 + headcmd^.loTime)){$ENDIF}
 			end;
 		'p': begin
-			TargetPoint.X:= SDLNet_Read16(@(headcmd^.X));
-			TargetPoint.Y:= SDLNet_Read16(@(headcmd^.Y));
-			doPut(TargetPoint.X, TargetPoint.Y, true)
+			x16:= SDLNet_Read16(@(headcmd^.X));
+			y16:= SDLNet_Read16(@(headcmd^.Y));
+			doPut(x16, y16, false)
 			end;
 		'P': begin
 			// these are equations solved for CursorPoint
 			// SDLNet_Read16(@(headcmd^.X)) == CursorPoint.X - WorldDx;
 			// SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy;
-			CursorPoint.X:= SDLNet_Read16(@(headcmd^.X)) + WorldDx;
-			CursorPoint.Y:= cScreenHeight - SDLNet_Read16(@(headcmd^.Y)) - WorldDy;
+			CursorPoint.X:= SmallInt(SDLNet_Read16(@(headcmd^.X))) + WorldDx;
+			CursorPoint.Y:= cScreenHeight - SmallInt(SDLNet_Read16(@(headcmd^.Y))) - WorldDy;
 			end;
 		'w': ParseCommand('setweap ' + headcmd^.str[2], true);
 		't': ParseCommand('taunt ' + headcmd^.str[2], true);