305 'N': begin |
306 'N': begin |
306 tmpflag:= false; |
307 tmpflag:= false; |
307 {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(hiTicks shl 16 + headcmd^.loTime)){$ENDIF} |
308 {$IFDEF DEBUGFILE}AddFileLog('got cmd "N": time '+inttostr(hiTicks shl 16 + headcmd^.loTime)){$ENDIF} |
308 end; |
309 end; |
309 'p': begin |
310 'p': begin |
310 TargetPoint.X:= SDLNet_Read16(@(headcmd^.X)); |
311 x16:= SDLNet_Read16(@(headcmd^.X)); |
311 TargetPoint.Y:= SDLNet_Read16(@(headcmd^.Y)); |
312 y16:= SDLNet_Read16(@(headcmd^.Y)); |
312 doPut(TargetPoint.X, TargetPoint.Y, true) |
313 doPut(x16, y16, false) |
313 end; |
314 end; |
314 'P': begin |
315 'P': begin |
315 // these are equations solved for CursorPoint |
316 // these are equations solved for CursorPoint |
316 // SDLNet_Read16(@(headcmd^.X)) == CursorPoint.X - WorldDx; |
317 // SDLNet_Read16(@(headcmd^.X)) == CursorPoint.X - WorldDx; |
317 // SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy; |
318 // SDLNet_Read16(@(headcmd^.Y)) == cScreenHeight - CursorPoint.Y - WorldDy; |
318 CursorPoint.X:= SDLNet_Read16(@(headcmd^.X)) + WorldDx; |
319 CursorPoint.X:= SmallInt(SDLNet_Read16(@(headcmd^.X))) + WorldDx; |
319 CursorPoint.Y:= cScreenHeight - SDLNet_Read16(@(headcmd^.Y)) - WorldDy; |
320 CursorPoint.Y:= cScreenHeight - SmallInt(SDLNet_Read16(@(headcmd^.Y))) - WorldDy; |
320 end; |
321 end; |
321 'w': ParseCommand('setweap ' + headcmd^.str[2], true); |
322 'w': ParseCommand('setweap ' + headcmd^.str[2], true); |
322 't': ParseCommand('taunt ' + headcmd^.str[2], true); |
323 't': ParseCommand('taunt ' + headcmd^.str[2], true); |
323 'g': ParseCommand('newgrave', true); |
324 'g': ParseCommand('newgrave', true); |
324 'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true); |
325 'h': ParseCommand('hogsay ' + copy(headcmd^.str, 2, Pred(headcmd^.len)), true); |