206 end; |
207 end; |
207 gtDEagleShot: begin |
208 gtDEagleShot: begin |
208 Result.HalfWidth:= 1; |
209 Result.HalfWidth:= 1; |
209 Result.HalfHeight:= 1; |
210 Result.HalfHeight:= 1; |
210 Result.Health:= 50 |
211 Result.Health:= 50 |
|
212 end; |
|
213 gtDynamite: begin |
|
214 Result.HalfWidth:= 3; |
|
215 Result.HalfHeight:= 3; |
|
216 Result.Elasticity:= 0.03; |
|
217 Result.Friction:= 0.03; |
|
218 Result.Timer:= 5000; |
211 end; |
219 end; |
212 end; |
220 end; |
213 if GearsList = nil then GearsList:= Result |
221 if GearsList = nil then GearsList:= Result |
214 else begin |
222 else begin |
215 GearsList.PrevGear:= Result; |
223 GearsList.PrevGear:= Result; |
482 end; |
490 end; |
483 gtExplosion: DrawSprite(sprExplosion50, Round(Gear.X) + WorldDx, Round(Gear.Y) + WorldDy, Gear.State, Surface); |
491 gtExplosion: DrawSprite(sprExplosion50, Round(Gear.X) + WorldDx, Round(Gear.Y) + WorldDy, Gear.State, Surface); |
484 gtMine: if ((Gear.State and gstAttacking) = 0)or((Gear.Timer and $3FF) < 420) |
492 gtMine: if ((Gear.State and gstAttacking) = 0)or((Gear.Timer and $3FF) < 420) |
485 then DrawSprite(sprMineOff , Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface) |
493 then DrawSprite(sprMineOff , Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface) |
486 else DrawSprite(sprMineOn , Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface); |
494 else DrawSprite(sprMineOn , Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface); |
|
495 //!!! ACHTUNG!!!! |
|
496 gtDynamite: if ((Gear.State and gstAttacking) = 0)or((Gear.Timer and $3FF) < 420) |
|
497 then DrawSprite(sprMineOff , Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface) |
|
498 else DrawSprite(sprMineOn , Round(Gear.X) - 8 + WorldDx, Round(Gear.Y) - 8 + WorldDy, trunc(Gear.DirAngle), Surface); |
|
499 //!!! ACHTUNG!!!! |
487 gtCase: DrawSprite(sprCase, Round(Gear.X) - 16 + WorldDx, Round(Gear.Y) - 16 + WorldDy, 0, Surface); |
500 gtCase: DrawSprite(sprCase, Round(Gear.X) - 16 + WorldDx, Round(Gear.Y) - 16 + WorldDy, 0, Surface); |
488 end; |
501 end; |
489 Gear:= Gear.NextGear |
502 Gear:= Gear.NextGear |
490 end; |
503 end; |
491 end; |
504 end; |
525 TargetPoint.X:= NoPointX; |
538 TargetPoint.X:= NoPointX; |
526 {$IFDEF DEBUGFILE}if Radius > 3 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF} |
539 {$IFDEF DEBUGFILE}if Radius > 3 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')');{$ENDIF} |
527 DrawExplosion(X, Y, Radius); |
540 DrawExplosion(X, Y, Radius); |
528 if Radius = 50 then AddGear(X, Y, gtExplosion, 0); |
541 if Radius = 50 then AddGear(X, Y, gtExplosion, 0); |
529 if (Mask and EXPLAutoSound)<>0 then PlaySound(sndExplosion); |
542 if (Mask and EXPLAutoSound)<>0 then PlaySound(sndExplosion); |
530 if (Mask and EXPLNoDamage)<>0 then exit; |
|
531 if (Mask and EXPLAllDamageInRadius)=0 then Radius:= Radius shl 1; |
543 if (Mask and EXPLAllDamageInRadius)=0 then Radius:= Radius shl 1; |
532 Gear:= GearsList; |
544 Gear:= GearsList; |
533 while Gear <> nil do |
545 while Gear <> nil do |
534 begin |
546 begin |
535 dmg:= Radius - Round(sqrt(sqr(Gear.X - X) + sqr(Gear.Y - Y))); |
547 dmg:= Radius - Round(sqrt(sqr(Gear.X - X) + sqr(Gear.Y - Y))); |