64 function TestCollExcludingMe(Me: PGear; x, y, r: LongInt): boolean; inline; |
64 function TestCollExcludingMe(Me: PGear; x, y, r: LongInt): boolean; inline; |
65 function TraceShoveFall(x, y, dX, dY: Real): LongInt; |
65 function TraceShoveFall(x, y, dX, dY: Real): LongInt; |
66 |
66 |
67 function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline; |
67 function RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline; |
68 function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; |
68 function RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt; |
69 function RateShove(Me: PGear; x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; |
69 function RateShove(x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; |
70 function RateShotgun(Me: PGear; gdX, gdY: real; x, y: LongInt): LongInt; |
70 function RateShotgun(Me: PGear; gdX, gdY: real; x, y: LongInt): LongInt; |
71 function RateHammer(Me: PGear): LongInt; |
71 function RateHammer(Me: PGear): LongInt; |
72 |
72 |
73 function HHGo(Gear, AltGear: PGear; var GoInfo: TGoInfo): boolean; |
73 function HHGo(Gear, AltGear: PGear; var GoInfo: TGoInfo): boolean; |
74 function AIrndSign(num: LongInt): LongInt; |
74 function AIrndSign(num: LongInt): LongInt; |
86 ar: array[0..Pred(MAXBONUS div 8)] of TBonus; // don't use too many |
86 ar: array[0..Pred(MAXBONUS div 8)] of TBonus; // don't use too many |
87 end; |
87 end; |
88 |
88 |
89 const KillScore = 200; |
89 const KillScore = 200; |
90 var friendlyfactor: LongInt = 300; |
90 var friendlyfactor: LongInt = 300; |
91 |
91 |
92 implementation |
92 implementation |
93 uses uCollisions, uVariables, uUtils, uDebug, uLandTexture; |
93 uses uCollisions, uVariables, uUtils, uLandTexture; |
94 |
94 |
95 var |
95 var |
96 KnownExplosion: record |
96 KnownExplosion: record |
97 X, Y, Radius: LongInt |
97 X, Y, Radius: LongInt |
98 end = (X: 0; Y: 0; Radius: 0); |
98 end = (X: 0; Y: 0; Radius: 0); |
455 end; |
455 end; |
456 end; |
456 end; |
457 RateExplosion:= rate; |
457 RateExplosion:= rate; |
458 end; |
458 end; |
459 |
459 |
460 function RateShove(Me: PGear; x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; |
460 function RateShove(x, y, r, power, kick: LongInt; gdX, gdY: real; Flags: LongWord): LongInt; |
461 var i, fallDmg, dmg, rate: LongInt; |
461 var i, fallDmg, dmg, rate: LongInt; |
462 dX, dY, dmgMod: real; |
462 dX, dY, dmgMod: real; |
463 begin |
463 begin |
464 fallDmg:= 0; |
464 fallDmg:= 0; |
465 dX:= gdX * 0.01 * kick; |
465 dX:= gdX * 0.01 * kick; |