changeset 1435 | d4b32ee3caa6 |
parent 1434 | 75fe933483c7 |
child 1495 | 2b2b89bdb5f3 |
1434:75fe933483c7 | 1435:d4b32ee3caa6 |
---|---|
83 dLen: hwFloat; |
83 dLen: hwFloat; |
84 b: boolean; |
84 b: boolean; |
85 end; |
85 end; |
86 end; |
86 end; |
87 |
87 |
88 procedure DeleteGear(Gear: PGear); forward; |
88 procedure DeleteGear(var Gear: PGear); forward; |
89 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); forward; |
89 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); forward; |
90 procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward; |
90 procedure AmmoShove(Ammo: PGear; Damage, Power: LongInt); forward; |
91 //procedure AmmoFlameWork(Ammo: PGear); forward; |
91 //procedure AmmoFlameWork(Ammo: PGear); forward; |
92 function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward; |
92 function CheckGearNear(Gear: PGear; Kind: TGearType; rX, rY: LongInt): PGear; forward; |
93 procedure SpawnBoxOfSmth; forward; |
93 procedure SpawnBoxOfSmth; forward; |
341 end; |
341 end; |
342 InsertGearToList(Result); |
342 InsertGearToList(Result); |
343 AddGear:= Result |
343 AddGear:= Result |
344 end; |
344 end; |
345 |
345 |
346 procedure DeleteGear(Gear: PGear); |
346 procedure DeleteGear(var Gear: PGear); |
347 var team: PTeam; |
347 var team: PTeam; |
348 t: Longword; |
348 t: Longword; |
349 begin |
349 begin |
350 DeleteCI(Gear); |
350 DeleteCI(Gear); |
351 |
351 |
380 {$IFDEF DEBUGFILE}AddFileLog('DeleteGear');{$ENDIF} |
380 {$IFDEF DEBUGFILE}AddFileLog('DeleteGear');{$ENDIF} |
381 if Gear^.TriggerId <> 0 then TickTrigger(Gear^.TriggerId); |
381 if Gear^.TriggerId <> 0 then TickTrigger(Gear^.TriggerId); |
382 if CurAmmoGear = Gear then CurAmmoGear:= nil; |
382 if CurAmmoGear = Gear then CurAmmoGear:= nil; |
383 if FollowGear = Gear then FollowGear:= nil; |
383 if FollowGear = Gear then FollowGear:= nil; |
384 RemoveGearFromList(Gear); |
384 RemoveGearFromList(Gear); |
385 Dispose(Gear) |
385 |
386 Dispose(Gear); |
|
387 |
|
388 Gear:= nil |
|
386 end; |
389 end; |
387 |
390 |
388 function CheckNoDamage: boolean; // returns TRUE in case of no damaged hhs |
391 function CheckNoDamage: boolean; // returns TRUE in case of no damaged hhs |
389 var Gear: PGear; |
392 var Gear: PGear; |
390 begin |
393 begin |
1114 |
1117 |
1115 procedure AddMiscGears; |
1118 procedure AddMiscGears; |
1116 var i: LongInt; |
1119 var i: LongInt; |
1117 begin |
1120 begin |
1118 AddGear(0, 0, gtATStartGame, 0, _0, _0, 2000); |
1121 AddGear(0, 0, gtATStartGame, 0, _0, _0, 2000); |
1122 |
|
1119 if (GameFlags and gfForts) = 0 then |
1123 if (GameFlags and gfForts) = 0 then |
1120 for i:= 0 to Pred(cLandAdditions) do |
1124 for i:= 0 to Pred(cLandAdditions) do |
1121 FindPlace(AddGear(0, 0, gtMine, 0, _0, _0, 0), false, 0, 2048); |
1125 FindPlace(AddGear(0, 0, gtMine, 0, _0, _0, 0), false, 0, 2048); |
1122 end; |
1126 end; |
1123 |
1127 |
1124 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); |
1128 procedure doMakeExplosion(X, Y, Radius: LongInt; Mask: LongWord); |
1125 var Gear: PGear; |
1129 var Gear: PGear; |
1126 dmg, dmgRadius: LongInt; |
1130 dmg, dmgRadius: LongInt; |