hedgewars/uMisc.pas
changeset 2382 bfd378dfc4e7
parent 2376 ece7b87f1334
child 2389 bc3e45a4d5fb
equal deleted inserted replaced
2381:959da8402cac 2382:bfd378dfc4e7
    97 	cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
    97 	cAirPlaneSpeed: hwFloat = (isNegative: false; QWordValue:   3006477107); // 1.4
    98 	cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
    98 	cBombsSpeed   : hwFloat = (isNegative: false; QWordValue:    429496729);
    99 {$WARNINGS ON}
    99 {$WARNINGS ON}
   100 
   100 
   101 var
   101 var
   102 	cSendEmptyPacketTime : LongWord = 2000;
       
   103 	cSendCursorPosTime   : LongWord = 50;
   102 	cSendCursorPosTime   : LongWord = 50;
   104 	ShowCrosshair  : boolean;
   103 	ShowCrosshair : boolean;
   105 	cDrownSpeed,
   104 	cDrownSpeed,
   106 	cMaxWindSpeed,
   105 	cMaxWindSpeed,
   107 	cWindSpeed,
   106 	cWindSpeed,
   108 	cGravity: hwFloat;
   107 	cGravity: hwFloat;
   109 	cDamageModifier: hwFloat;
   108 	cDamageModifier: hwFloat;
   273 r:= SignAs(cLittle, r)
   272 r:= SignAs(cLittle, r)
   274 end;
   273 end;
   275 
   274 
   276 procedure SendStat(sit: TStatInfoType; s: shortstring);
   275 procedure SendStat(sit: TStatInfoType; s: shortstring);
   277 const stc: array [TStatInfoType] of char = 'rDkKH';
   276 const stc: array [TStatInfoType] of char = 'rDkKH';
   278 begin
   277 var buf: shortstring;
   279 SendIPC('i' + stc[sit] + s)
   278 begin
       
   279 buf:= 'i' + stc[sit] + s;
       
   280 SendIPCRaw(@buf[0], length(buf) + 1)
   280 end;
   281 end;
   281 
   282 
   282 function Str2PChar(const s: shortstring): PChar;
   283 function Str2PChar(const s: shortstring): PChar;
   283 const CharArray: array[byte] of Char = '';
   284 const CharArray: array[byte] of Char = '';
   284 begin
   285 begin