370 lastTurnChecksum:= SDLNet_Read32(@headcmd^.str[2]); |
370 lastTurnChecksum:= SDLNet_Read32(@headcmd^.str[2]); |
371 AddFileLog('got cmd "N": time '+IntToStr(hiTicks shl 16 + headcmd^.loTime)) |
371 AddFileLog('got cmd "N": time '+IntToStr(hiTicks shl 16 + headcmd^.loTime)) |
372 end; |
372 end; |
373 'p': begin |
373 'p': begin |
374 x32:= SDLNet_Read32(@(headcmd^.str[2])); |
374 x32:= SDLNet_Read32(@(headcmd^.str[2])); |
375 y32:= SDLNet_Read32(@(headcmd^.str[4])); |
375 y32:= SDLNet_Read32(@(headcmd^.str[6])); |
376 doPut(x32, y32, false) |
376 doPut(x32, y32, false) |
377 end; |
377 end; |
378 'P': begin |
378 'P': begin |
379 // these are equations solved for CursorPoint |
379 // these are equations solved for CursorPoint |
380 // SDLNet_Read16(@(headcmd^.X)) == CursorPoint.X - WorldDx; |
380 // SDLNet_Read16(@(headcmd^.X)) == CursorPoint.X - WorldDx; |
381 // SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy; |
381 // SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy; |
382 if CurrentTeam^.ExtDriven then |
382 if CurrentTeam^.ExtDriven then |
383 begin |
383 begin |
384 TargetCursorPoint.X:= LongInt(SDLNet_Read32(@(headcmd^.str[2]))) + WorldDx; |
384 TargetCursorPoint.X:= LongInt(SDLNet_Read32(@(headcmd^.str[2]))) + WorldDx; |
385 TargetCursorPoint.Y:= cScreenHeight - LongInt(SDLNet_Read32(@(headcmd^.str[4]))) - WorldDy; |
385 TargetCursorPoint.Y:= cScreenHeight - LongInt(SDLNet_Read32(@(headcmd^.str[6]))) - WorldDy; |
386 if not bShowAmmoMenu and autoCameraOn then |
386 if not bShowAmmoMenu and autoCameraOn then |
387 CursorPoint:= TargetCursorPoint |
387 CursorPoint:= TargetCursorPoint |
388 end |
388 end |
389 end; |
389 end; |
390 'w': ParseCommand('setweap ' + headcmd^.str[2], true); |
390 'w': ParseCommand('setweap ' + headcmd^.str[2], true); |