equal
deleted
inserted
replaced
4394 else |
4394 else |
4395 if not ((Gear^.dX*ox + Gear^.dY*oy).isNegative) then |
4395 if not ((Gear^.dX*ox + Gear^.dY*oy).isNegative) then |
4396 continue; |
4396 continue; |
4397 |
4397 |
4398 if iterator^.Kind = gtDuck then |
4398 if iterator^.Kind = gtDuck then |
|
4399 // Make duck go into “falling” mode again |
4399 iterator^.Pos:= 0; |
4400 iterator^.Pos:= 0; |
4400 |
4401 |
4401 isbullet:= (iterator^.Kind in [gtShotgunShot, gtDEagleShot, gtSniperRifleShot, gtSineGunShot]); |
4402 isbullet:= (iterator^.Kind in [gtShotgunShot, gtDEagleShot, gtSniperRifleShot, gtSineGunShot]); |
4402 |
4403 |
4403 r:= int2hwFloat(iterator^.Radius); |
4404 r:= int2hwFloat(iterator^.Radius); |
6386 begin |
6387 begin |
6387 Gear^.X:= Gear^.X + Gear^.dX; |
6388 Gear^.X:= Gear^.X + Gear^.dX; |
6388 Gear^.Y:= Gear^.Y + Gear^.dY; |
6389 Gear^.Y:= Gear^.Y + Gear^.dY; |
6389 end; |
6390 end; |
6390 |
6391 |
6391 // Mirrored duck |
6392 // Handle speed |
6392 // Pos 1 or 2: Duck is on water (not Sea world edge) |
|
6393 if Gear^.Pos = 1 then |
6393 if Gear^.Pos = 1 then |
6394 Gear^.dX:= cWindSpeed * Gear^.Damage |
6394 Gear^.dX:= cWindSpeed * Gear^.Damage |
6395 else if Gear^.Pos = 2 then |
6395 else if Gear^.Pos = 2 then |
|
6396 // Mirrored duck (after bounce edge bounce) |
6396 Gear^.dX:= -cWindSpeed * Gear^.Damage |
6397 Gear^.dX:= -cWindSpeed * Gear^.Damage |
6397 else if Gear^.Pos = 3 then |
6398 else if Gear^.Pos = 3 then |
6398 Gear^.dY:= cWindSpeed * Gear^.Damage |
6399 Gear^.dY:= cWindSpeed * Gear^.Damage |
6399 else if Gear^.Pos = 4 then |
6400 else if Gear^.Pos = 4 then |
6400 Gear^.dY:= -cWindSpeed * Gear^.Damage; |
6401 Gear^.dY:= -cWindSpeed * Gear^.Damage; |
6429 end; |
6430 end; |
6430 |
6431 |
6431 if Gear^.Pos <> 0 then |
6432 if Gear^.Pos <> 0 then |
6432 // Manual collision check required because we don't use onStepFallingGear in this case |
6433 // Manual collision check required because we don't use onStepFallingGear in this case |
6433 CheckCollision(Gear); |
6434 CheckCollision(Gear); |
6434 // Explode duck |
|
6435 if (Gear^.Timer = 0) or ((Gear^.State and gstCollision) <> 0) then |
6435 if (Gear^.Timer = 0) or ((Gear^.State and gstCollision) <> 0) then |
|
6436 // Explode duck |
6436 begin |
6437 begin |
6437 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Boom, Gear^.Hedgehog, EXPLAutoSound); |
6438 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), Gear^.Boom, Gear^.Hedgehog, EXPLAutoSound); |
6438 PlaySound(sndDuckDie); |
6439 PlaySound(sndDuckDie); |
6439 DeleteGear(Gear); |
6440 DeleteGear(Gear); |
6440 exit; |
6441 exit; |