equal
deleted
inserted
replaced
7386 if CheckSentryDestroyed(Gear, sentry_Reloading) then |
7386 if CheckSentryDestroyed(Gear, sentry_Reloading) then |
7387 exit; |
7387 exit; |
7388 |
7388 |
7389 if Gear^.dY.isNegative or (TestCollisionYwithGear(Gear, 1) = 0) then |
7389 if Gear^.dY.isNegative or (TestCollisionYwithGear(Gear, 1) = 0) then |
7390 begin |
7390 begin |
|
7391 DeleteCI(Gear); |
7391 doStepFallingGear(Gear); |
7392 doStepFallingGear(Gear); |
7392 if not (Gear^.Tag in [sentry_Idle, sentry_Reloading]) then |
7393 if not (Gear^.Tag in [sentry_Idle, sentry_Reloading]) then |
7393 ResetSentryState(Gear, sentry_Idle, 1000); |
7394 ResetSentryState(Gear, sentry_Idle, 1000); |
7394 exit; |
7395 exit; |
7395 end; |
7396 end |
|
7397 else |
|
7398 AddCI(Gear); |
7396 |
7399 |
7397 if Gear^.Timer > 0 then dec(Gear^.Timer); |
7400 if Gear^.Timer > 0 then dec(Gear^.Timer); |
7398 |
7401 |
7399 if Gear^.Timer = 0 then |
7402 if Gear^.Timer = 0 then |
7400 begin |
7403 begin |
|
7404 DeleteCI(Gear); |
7401 if Gear^.Tag = sentry_Idle then |
7405 if Gear^.Tag = sentry_Idle then |
7402 begin |
7406 begin |
7403 Gear^.Tag := sentry_Walking; |
7407 Gear^.Tag := sentry_Walking; |
7404 Gear^.Timer := 1000 + GetRandom(3000); |
7408 Gear^.Timer := 1000 + GetRandom(3000); |
7405 if GetRandom(4) = 0 then |
7409 if GetRandom(4) = 0 then |
7472 begin |
7476 begin |
7473 dec(Gear^.WDTimer); |
7477 dec(Gear^.WDTimer); |
7474 Gear^.Timer := 100; |
7478 Gear^.Timer := 100; |
7475 end |
7479 end |
7476 end; |
7480 end; |
|
7481 AddCI(Gear); |
7477 end; |
7482 end; |
7478 |
7483 |
7479 if (Gear^.Tag = sentry_Walking) and ((GameTicks and $1F) = 0) then |
7484 if (Gear^.Tag = sentry_Walking) and ((GameTicks and $1F) = 0) then |
7480 begin |
7485 begin |
|
7486 DeleteCI(Gear); |
7481 if not MakeSentryStep(Gear, 6, false) then |
7487 if not MakeSentryStep(Gear, 6, false) then |
7482 Gear^.Timer := 0 |
7488 Gear^.Timer := 0; |
|
7489 AddCI(Gear); |
7483 end; |
7490 end; |
7484 |
7491 |
7485 if ((GameTicks and $1F) = 0) and (Gear^.Tag = sentry_Aiming) then |
7492 if ((GameTicks and $1F) = 0) and (Gear^.Tag = sentry_Aiming) then |
7486 AimSentry(Gear); |
7493 AimSentry(Gear); |
7487 |
7494 |