equal
deleted
inserted
replaced
104 a, aa: TAmmoType; |
104 a, aa: TAmmoType; |
105 useThisActions: boolean; |
105 useThisActions: boolean; |
106 begin |
106 begin |
107 BotLevel:= Me^.Hedgehog^.BotLevel; |
107 BotLevel:= Me^.Hedgehog^.BotLevel; |
108 aiWindSpeed:= hwFloat2Float(cWindSpeed); |
108 aiWindSpeed:= hwFloat2Float(cWindSpeed); |
|
109 aiGravity:= cGravity; |
|
110 aiGravityf:= cGravityf; |
109 aiLaserSighting:= (cLaserSighting) or (HHHasAmmo(Me^.Hedgehog^, amLaserSight) > 0); |
111 aiLaserSighting:= (cLaserSighting) or (HHHasAmmo(Me^.Hedgehog^, amLaserSight) > 0); |
110 useThisActions:= false; |
112 useThisActions:= false; |
111 Me^.AIHints:= Me^.AIHints and (not aihAmmosChanged); |
113 Me^.AIHints:= Me^.AIHints and (not aihAmmosChanged); |
112 |
114 |
113 for i:= 0 to Pred(Targets.Count) do |
115 for i:= 0 to Pred(Targets.Count) do |
308 // unselect weapon if we cannot move because of mouse cursor being shown |
310 // unselect weapon if we cannot move because of mouse cursor being shown |
309 if (Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then |
311 if (Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0 then |
310 AddAction(Actions, aia_Weapon, Longword(amNothing), 100 + random(200), 0, 0); |
312 AddAction(Actions, aia_Weapon, Longword(amNothing), 100 + random(200), 0, 0); |
311 |
313 |
312 if ((CurrentHedgehog^.MultiShootAttacks = 0) or ((Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoMoveAfter) = 0)) |
314 if ((CurrentHedgehog^.MultiShootAttacks = 0) or ((Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoMoveAfter) = 0)) |
313 and (CurrentHedgehog^.Effects[heArtillery] = 0) and (cGravityf <> 0) then |
315 and (CurrentHedgehog^.Effects[heArtillery] = 0) and (aiGravityf <> 0) then |
314 begin |
316 begin |
315 tmp:= random(2) + 1; |
317 tmp:= random(2) + 1; |
316 Push(Actions, Me^, tmp); |
318 Push(Actions, Me^, tmp); |
317 Push(Actions, Me^, tmp xor 3); |
319 Push(Actions, Me^, tmp xor 3); |
318 |
320 |