hedgewars/uCommandHandlers.pas
branch0.9.19
changeset 8924 13ac59499066
parent 8912 78ea1839aac9
child 9080 9b42757d7e71
equal deleted inserted replaced
8904:6ea838b8dcd5 8924:13ac59499066
    34     cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
    34     cTagsMasksNoHealth: array[0..15] of byte = (3, 2, 11, 1, 0, 0, 0, 0, 0, 10, 0, 9, 0, 0, 0, 0);
    35 
    35 
    36 procedure chGenCmd(var s: shortstring);
    36 procedure chGenCmd(var s: shortstring);
    37 begin
    37 begin
    38 case s[1] of
    38 case s[1] of
    39     'R': if ReadyTimeLeft > 1 then 
    39     'R': if ReadyTimeLeft > 1 then
    40         begin
    40         begin
    41         ReadyTimeLeft:= 1;
    41         ReadyTimeLeft:= 1;
    42         if not isExternalSource then
    42         if not isExternalSource then
    43             SendIPC('c'+s);
    43             SendIPC('c'+s);
    44         end
    44         end
   478     end;
   478     end;
   479 bShowFinger:= false;
   479 bShowFinger:= false;
   480 with CurrentHedgehog^.Gear^ do
   480 with CurrentHedgehog^.Gear^ do
   481     begin
   481     begin
   482     Message:= Message or (gmSlot and InputMask);
   482     Message:= Message or (gmSlot and InputMask);
   483     MsgParam:= slot; 
   483     MsgParam:= slot;
   484     ScriptCall('onSlot', MsgParam);
   484     ScriptCall('onSlot', MsgParam);
   485     end
   485     end
   486 end;
   486 end;
   487 
   487 
   488 procedure chSetWeapon(var s: shortstring);
   488 procedure chSetWeapon(var s: shortstring);
   515     SendIPC('t' + s);
   515     SendIPC('t' + s);
   516 
   516 
   517 with CurrentHedgehog^.Gear^ do
   517 with CurrentHedgehog^.Gear^ do
   518     begin
   518     begin
   519     Message:= Message or (gmAnimate and InputMask);
   519     Message:= Message or (gmAnimate and InputMask);
   520     MsgParam:= byte(s[1]) ; 
   520     MsgParam:= byte(s[1]) ;
   521     ScriptCall('onTaunt', MsgParam);
   521     ScriptCall('onTaunt', MsgParam);
   522     end
   522     end
   523 end;
   523 end;
   524 
   524 
   525 procedure chPut(var s: shortstring);
   525 procedure chPut(var s: shortstring);
   571 
   571 
   572 procedure chSetSeed(var s: shortstring);
   572 procedure chSetSeed(var s: shortstring);
   573 begin
   573 begin
   574 if isDeveloperMode then
   574 if isDeveloperMode then
   575     begin
   575     begin
   576     SetRandomSeed(s);
   576     SetRandomSeed(s, true);
   577     cSeed:= s;
   577     cSeed:= s;
   578     InitStepsFlags:= InitStepsFlags or cifRandomize
   578     InitStepsFlags:= InitStepsFlags or cifRandomize
   579     end
   579     end
   580     end;
   580     end;
   581 
   581