hedgewars/uIO.pas
changeset 2407 9f413bd5150e
parent 2403 6c5d504af2ba
child 2574 2f3e5c57359c
equal deleted inserted replaced
2406:2e757b32991e 2407:9f413bd5150e
   303 		'N': begin
   303 		'N': begin
   304 			tmpflag:= false;
   304 			tmpflag:= false;
   305 			{$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(headcmd^.Time)){$ENDIF}
   305 			{$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(headcmd^.Time)){$ENDIF}
   306 			end;
   306 			end;
   307 		'p': begin
   307 		'p': begin
   308 			TargetPoint.X:= SmallInt(SDLNet_Read16(@(headcmd^.X)));
   308 			TargetPoint.X:= SDLNet_Read16(@(headcmd^.X));
   309 			TargetPoint.Y:= SmallInt(SDLNet_Read16(@(headcmd^.Y)));
   309 			TargetPoint.Y:= SDLNet_Read16(@(headcmd^.Y));
   310 			ParseCommand('put', true)
   310 			ParseCommand('put', true)
   311 			end;
   311 			end;
   312 		'P': begin
   312 		'P': begin
   313 			CursorPoint.X:= SmallInt(SDLNet_Read16(@(headcmd^.X)) + WorldDx);
   313 			// these are equations solved for CursorPoint
   314 			CursorPoint.Y:= SmallInt(SDLNet_Read16(@(headcmd^.Y)) + WorldDy);
   314 			// SDLNet_Read16(@(headcmd^.X)):= CursorPoint.X - WorldDx;
       
   315 			// SDLNet_Read16(@(headcmd^.Y)):= cScreenHeight - CursorPoint.Y - WorldDy;
       
   316 			CursorPoint.X:= SDLNet_Read16(@(headcmd^.X)) + WorldDx;
       
   317 			CursorPoint.Y:= cScreenHeight - SDLNet_Read16(@(headcmd^.Y)) - WorldDy;
   315 			end;
   318 			end;
   316 		'w': ParseCommand('setweap ' + headcmd^.str[2], true);
   319 		'w': ParseCommand('setweap ' + headcmd^.str[2], true);
   317 		't': ParseCommand('taunt ' + headcmd^.str[2], true);
   320 		't': ParseCommand('taunt ' + headcmd^.str[2], true);
   318 		'g': ParseCommand('newgrave', true);
   321 		'g': ParseCommand('newgrave', true);
   319 		'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);
   322 		'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true);