hedgewars/uGearsHedgehog.pas
changeset 12286 b4dde7035fe2
parent 12204 0a7d7256d3d8
child 12293 6383323fdd2c
equal deleted inserted replaced
12285:3cdd664f6d0c 12286:b4dde7035fe2
  1230 if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then
  1230 if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then
  1231     AllInactive:= true
  1231     AllInactive:= true
  1232 else if not isInMultiShoot then
  1232 else if not isInMultiShoot then
  1233     AllInactive:= false;
  1233     AllInactive:= false;
  1234 
  1234 
  1235 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
  1235 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) or (LuaEndTurnRequested = true) then
  1236     begin
  1236     begin
  1237     if (Hedgehog^.CurAmmoType = amKnife) then
  1237     if (Hedgehog^.CurAmmoType = amKnife) then
  1238        LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);
  1238        LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);
  1239     if TagTurnTimeLeft = 0 then
  1239     if TagTurnTimeLeft = 0 then
  1240         TagTurnTimeLeft:= TurnTimeLeft;
  1240         TagTurnTimeLeft:= TurnTimeLeft;
  1241     TurnTimeLeft:= 0;
  1241     TurnTimeLeft:= 0;
  1242     if ((HHGear^.State and gstAttacked) = 0) and (HHGear^.Damage = 0) then
  1242     if ((HHGear^.State and gstAttacked) = 0) and (HHGear^.Damage = 0) and (LuaNoEndTurnTaunts = false) then
  1243         begin
  1243         begin
  1244         AddVoice(sndBoring, Hedgehog^.Team^.voicepack);
  1244         AddVoice(sndBoring, Hedgehog^.Team^.voicepack);
  1245         if (GameFlags and gfInfAttack = 0) then
  1245         if (GameFlags and gfInfAttack = 0) then
  1246             begin
  1246             begin
  1247             s:= Hedgehog^.Name;
  1247             s:= Hedgehog^.Name;
  1249             end;
  1249             end;
  1250         end;
  1250         end;
  1251     isCursorVisible:= false;
  1251     isCursorVisible:= false;
  1252     HHGear^.State:= HHGear^.State and (not (gstHHDriven or gstAnimation or gstAttacking));
  1252     HHGear^.State:= HHGear^.State and (not (gstHHDriven or gstAnimation or gstAttacking));
  1253     AttackBar:= 0;
  1253     AttackBar:= 0;
       
  1254     LuaEndTurnRequested:= false;
       
  1255     LuaNoEndTurnTaunts:= false;
  1254     if HHGear^.Damage > 0 then
  1256     if HHGear^.Damage > 0 then
  1255         HHGear^.State:= HHGear^.State and (not (gstHHJumping or gstHHHJump));
  1257         HHGear^.State:= HHGear^.State and (not (gstHHJumping or gstHHHJump));
  1256     exit
  1258     exit
  1257     end;
  1259     end;
  1258 
  1260