hedgewars/uCommandHandlers.pas
branchwebgl
changeset 8330 aaefa587e277
parent 8096 453917e94e55
parent 8145 6408c0ba4ba1
child 8444 75db7bb8dce8
equal deleted inserted replaced
8116:d24257910f8d 8330:aaefa587e277
    28 implementation
    28 implementation
    29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uRandom, uCaptions
    29 uses uCommands, uTypes, uVariables, uIO, uDebug, uConsts, uScript, uUtils, SDLh, uRandom, uCaptions
    30      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF};
    30      {$IFDEF USE_VIDEO_RECORDING}, uVideoRec {$ENDIF};
    31 
    31 
    32 var prevGState: TGameState = gsConfirm;
    32 var prevGState: TGameState = gsConfirm;
       
    33     cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
       
    34     cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
    33 
    35 
    34 procedure chGenCmd(var s: shortstring);
    36 procedure chGenCmd(var s: shortstring);
    35 begin
    37 begin
    36 case s[1] of
    38 case s[1] of
    37     'R': if ReadyTimeLeft > 1 then 
    39     'R': if ReadyTimeLeft > 1 then
    38         begin
    40         begin
    39         ReadyTimeLeft:= 1;
    41         ReadyTimeLeft:= 1;
    40         if not isExternalSource then
    42         if not isExternalSource then
    41             SendIPC('c'+s);
    43             SendIPC('c'+s);
    42         end
    44         end
   477     end;
   479     end;
   478 bShowFinger:= false;
   480 bShowFinger:= false;
   479 with CurrentHedgehog^.Gear^ do
   481 with CurrentHedgehog^.Gear^ do
   480     begin
   482     begin
   481     Message:= Message or (gmSlot and InputMask);
   483     Message:= Message or (gmSlot and InputMask);
   482     MsgParam:= slot; 
   484     MsgParam:= slot;
   483     ScriptCall('onSlot', MsgParam);
   485     ScriptCall('onSlot', MsgParam);
   484     end
   486     end
   485 end;
   487 end;
   486 
   488 
   487 procedure chSetWeapon(var s: shortstring);
   489 procedure chSetWeapon(var s: shortstring);
   514     SendIPC('t' + s);
   516     SendIPC('t' + s);
   515 
   517 
   516 with CurrentHedgehog^.Gear^ do
   518 with CurrentHedgehog^.Gear^ do
   517     begin
   519     begin
   518     Message:= Message or (gmAnimate and InputMask);
   520     Message:= Message or (gmAnimate and InputMask);
   519     MsgParam:= byte(s[1]) ; 
   521     MsgParam:= byte(s[1]) ;
   520     ScriptCall('onTaunt', MsgParam);
   522     ScriptCall('onTaunt', MsgParam);
   521     end
   523     end
   522 end;
   524 end;
   523 
   525 
   524 procedure chPut(var s: shortstring);
   526 procedure chPut(var s: shortstring);