hedgewars/HHHandlers.inc
changeset 3391 77161719ec3c
parent 3388 ab9352a4ddcc
child 3396 e5b3e5f2818e
equal deleted inserted replaced
3390:1d4926d10a9e 3391:77161719ec3c
   160 Ok. Here's where I plan to go with this.
   160 Ok. Here's where I plan to go with this.
   161 1) Restrict portal gun to X shots.
   161 1) Restrict portal gun to X shots.
   162 2) If on first shot, delete all existing gtPortal
   162 2) If on first shot, delete all existing gtPortal
   163 3) On any other shot, delete any existing portals of type X%2, and spawn a new portal of type X%2 oriented at angle 180° from the portal gun.  It might possibly be worth linking portals with a Gear reference, to save time on scanning through the Gear list every time we need a portal.
   163 3) On any other shot, delete any existing portals of type X%2, and spawn a new portal of type X%2 oriented at angle 180° from the portal gun.  It might possibly be worth linking portals with a Gear reference, to save time on scanning through the Gear list every time we need a portal.
   164 *)
   164 *)
   165                     amPortalGun: CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtPortal, 0, xx * _0_3, yy * _0_3, 0);
   165                     amPortalGun: begin
       
   166         //if (Ammo^[CurSlot, CurAmmo].NumPerTurn >= MultiShootAttacks) then
       
   167                                 
       
   168 
       
   169 //CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, 0);
       
   170 AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, 0);
       
   171 
       
   172 
       
   173 
       
   174                                  end;
       
   175 
       
   176 
       
   177 
       
   178 
   166                   amSniperRifle: begin
   179                   amSniperRifle: begin
   167                                  PlaySound(sndSniperReload);
   180                                  PlaySound(sndSniperReload);
   168                                  CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
   181                                  CurAmmoGear:= AddGear(hwRound(X + xx * cHHRadius), hwRound(Y + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0);
   169                                  end;
   182                                  end;
   170                      amDynamite: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);
   183                      amDynamite: AddGear(hwRound(X) + hwSign(dX) * 7, hwRound(Y), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000);