equal
deleted
inserted
replaced
3298 |
3298 |
3299 Ammo^[CurSlot, CurAmmo].Timer := flags and not 2; |
3299 Ammo^[CurSlot, CurAmmo].Timer := flags and not 2; |
3300 // make the ball visible |
3300 // make the ball visible |
3301 end; |
3301 end; |
3302 |
3302 |
3303 if destroyGear then deleteGear(oldPortal); |
3303 if destroyGear then oldPortal^.Timer:= 0; |
3304 end; |
3304 end; |
3305 |
3305 |
3306 begin |
3306 begin |
|
3307 if (Gear^.Timer < 1) then |
|
3308 begin |
|
3309 deleteGear(Gear); |
|
3310 EXIT; |
|
3311 end; |
|
3312 |
3307 doPortalColorSwitch(); |
3313 doPortalColorSwitch(); |
3308 |
3314 |
3309 Gear^.X := Gear^.X + Gear^.dX; |
3315 Gear^.X := Gear^.X + Gear^.dX; |
3310 Gear^.Y := Gear^.Y + Gear^.dY; |
3316 Gear^.Y := Gear^.Y + Gear^.dY; |
3311 x := hwRound(Gear^.X); |
3317 x := hwRound(Gear^.X); |
3376 |
3382 |
3377 iterator := GearsList; |
3383 iterator := GearsList; |
3378 while iterator <> nil do |
3384 while iterator <> nil do |
3379 begin |
3385 begin |
3380 if (iterator^.Kind = gtPortal) then |
3386 if (iterator^.Kind = gtPortal) then |
3381 if (iterator <> newPortal) then |
3387 if (iterator <> newPortal) and (iterator^.Timer > 0) then |
3382 begin |
3388 begin |
3383 if (iterator^.Tag and 2) = (newPortal^.Tag and 2) then |
3389 if (iterator^.Tag and 2) = (newPortal^.Tag and 2) then |
3384 begin |
3390 begin |
3385 iterator := iterator^.PrevGear; |
3391 iterator^.Timer:= 0; |
3386 deleteGear(iterator^.NextGear); |
|
3387 continue; |
|
3388 end |
3392 end |
3389 else |
3393 else |
3390 begin |
3394 begin |
3391 // link portals with each other |
3395 // link portals with each other |
3392 newPortal^.IntersectGear := iterator; |
3396 newPortal^.IntersectGear := iterator; |