hedgewars/uGears.pas
changeset 5319 51d8e4747876
parent 5316 191cd6c06203
child 5343 ff7ecf483759
child 5348 0bc81de36e08
equal deleted inserted replaced
5316:191cd6c06203 5319:51d8e4747876
   600                 gear^.Health:= 200;
   600                 gear^.Health:= 200;
   601                 gear^.Tag:= 3;
   601                 gear^.Tag:= 3;
   602                 end;
   602                 end;
   603     end;
   603     end;
   604 
   604 
   605 if ((Ammoz[gear^.AmmoType].Ammo.Propz and ammoprop_SetBounce) <> 0) and (CurrentHedgehog <> nil) then 
       
   606     if CurrentHedgehog^.Bounce < _1 then 
       
   607         begin
       
   608         gear^.Elasticity:= gear^.Elasticity * CurrentHedgehog^.Bounce;
       
   609         gear^.Friction:= gear^.Friction * CurrentHedgehog^.Bounce
       
   610         end
       
   611     else 
       
   612         begin
       
   613         gear^.Elasticity:= _1 - ((_1-gear^.Elasticity) / CurrentHedgehog^.Bounce);
       
   614         gear^.Friction:= _1 - ((_1-gear^.Friction) / CurrentHedgehog^.Bounce);
       
   615         end;
       
   616 
       
   617 InsertGearToList(gear);
   605 InsertGearToList(gear);
   618 AddGear:= gear;
   606 AddGear:= gear;
   619 
   607 
   620 ScriptCall('onGearAdd', gear^.uid);
   608 ScriptCall('onGearAdd', gear^.uid);
   621 end;
   609 end;