6231 var HH: PHedgehog; |
6231 var HH: PHedgehog; |
6232 i,j,cnt: LongWord; |
6232 i,j,cnt: LongWord; |
6233 s: ansistring; |
6233 s: ansistring; |
6234 begin |
6234 begin |
6235 HH:= Gear^.Hedgehog; |
6235 HH:= Gear^.Hedgehog; |
|
6236 if Gear^.Tag = 0 then |
|
6237 begin |
|
6238 if HH^.Gear <> nil then |
|
6239 begin |
|
6240 if (HH^.Gear^.Damage <> 0) or (HH^.Gear^.Health = 0) or |
|
6241 ((HH^.Gear^.State and (gstMoving or gstHHDeath or gstHHGone or gstDrowning)) <> 0) then |
|
6242 Gear^.Tag:= 1; |
|
6243 end |
|
6244 else if HH^.GearHidden = nil then |
|
6245 Gear^.Tag:= 1; |
|
6246 if (Gear^.Tag = 1) and (Gear = CurAmmoGear) then |
|
6247 CurAmmoGear:= nil; |
|
6248 end; |
|
6249 |
6236 if Gear^.Pos = 2 then |
6250 if Gear^.Pos = 2 then |
6237 begin |
6251 begin |
6238 StopSoundChan(Gear^.SoundChannel); |
6252 StopSoundChan(Gear^.SoundChannel); |
6239 Gear^.SoundChannel:= -1; |
6253 Gear^.SoundChannel:= -1; |
6240 if (Gear^.Timer = 0) then |
6254 if (Gear^.Timer = 0) then |
6241 begin |
6255 begin |
6242 if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then |
6256 if (HH^.Gear <> nil) and (HH^.Gear^.State and gstInvisible = 0) then |
6243 begin |
6257 begin |
6244 AfterAttack; |
6258 if Gear^.Tag = 0 then |
6245 if Gear = CurAmmoGear then CurAmmoGear := nil; |
6259 AfterAttack; |
6246 if (HH^.Gear^.Damage = 0) and (HH^.Gear^.Health > 0) and |
6260 if Gear = CurAmmoGear then |
6247 ((Gear^.State and (gstMoving or gstHHDeath or gstHHGone)) = 0) then |
6261 CurAmmoGear:= nil; |
6248 HideHog(HH) |
6262 if Gear^.Tag = 0 then |
|
6263 HideHog(HH); |
6249 end |
6264 end |
6250 else if (HH^.GearHidden <> nil) then |
6265 else if (HH^.GearHidden <> nil) then |
6251 begin |
6266 begin |
6252 RestoreHog(HH); |
6267 RestoreHog(HH); |
6253 s:= ansistring(HH^.Name); |
6268 s:= ansistring(HH^.Name); |