equal
deleted
inserted
replaced
105 useThisActions, hasLowGrav: boolean; |
105 useThisActions, hasLowGrav: boolean; |
106 begin |
106 begin |
107 BotLevel:= Me^.Hedgehog^.BotLevel; |
107 BotLevel:= Me^.Hedgehog^.BotLevel; |
108 aiWindSpeed:= hwFloat2Float(cWindSpeed); |
108 aiWindSpeed:= hwFloat2Float(cWindSpeed); |
109 aiLaserSighting:= (cLaserSighting) or (HHHasAmmo(Me^.Hedgehog^, amLaserSight) > 0); |
109 aiLaserSighting:= (cLaserSighting) or (HHHasAmmo(Me^.Hedgehog^, amLaserSight) > 0); |
|
110 aiGravity:= cGravity; |
|
111 aiGravityf:= cGravityf; |
110 hasLowGrav:= HHHasAmmo(Me^.Hedgehog^, amLowGravity) > 0; |
112 hasLowGrav:= HHHasAmmo(Me^.Hedgehog^, amLowGravity) > 0; |
111 useThisActions:= false; |
113 useThisActions:= false; |
112 Me^.AIHints:= Me^.AIHints and (not aihAmmosChanged); |
114 Me^.AIHints:= Me^.AIHints and (not aihAmmosChanged); |
113 |
115 |
114 for l:= 0 to 1 do // 0 = test with normal gravity. 1 = test with low gravity |
116 for l:= 0 to 1 do // 0 = test with normal gravity. 1 = test with low gravity |
291 else inc(a) |
293 else inc(a) |
292 until (a = aa) or (CurrentHedgehog^.MultiShootAttacks > 0) {shooting same weapon} |
294 until (a = aa) or (CurrentHedgehog^.MultiShootAttacks > 0) {shooting same weapon} |
293 or StopThinking |
295 or StopThinking |
294 end |
296 end |
295 end; |
297 end; |
|
298 aiGravity:= cGravity; |
|
299 aiGravityf:= cGravityf; |
296 end; |
300 end; |
297 |
301 |
298 procedure Walk(Me: PGear; var Actions: TActions); |
302 procedure Walk(Me: PGear; var Actions: TActions); |
299 const FallPixForBranching = cHHRadius; |
303 const FallPixForBranching = cHHRadius; |
300 var |
304 var |
479 currHedgehogIndex, itHedgehog, switchesNum, i: Longword; |
483 currHedgehogIndex, itHedgehog, switchesNum, i: Longword; |
480 switchImmediatelyAvailable: boolean; |
484 switchImmediatelyAvailable: boolean; |
481 Actions: TActions; |
485 Actions: TActions; |
482 begin |
486 begin |
483 dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; |
487 dmgMod:= 0.01 * hwFloat2Float(cDamageModifier) * cDamagePercent; |
|
488 aiGravity:= cGravity; |
|
489 aiGravityf:= cGravityf; |
484 StartTicks:= GameTicks; |
490 StartTicks:= GameTicks; |
485 |
491 |
486 currHedgehogIndex:= CurrentTeam^.CurrHedgehog; |
492 currHedgehogIndex:= CurrentTeam^.CurrHedgehog; |
487 itHedgehog:= currHedgehogIndex; |
493 itHedgehog:= currHedgehogIndex; |
488 switchesNum:= 0; |
494 switchesNum:= 0; |