hedgewars/GSHandlers.inc
changeset 1279 33cae6d1635c
parent 1273 8dcb04b143e1
child 1284 21916b5de218
equal deleted inserted replaced
1278:b3ddf84912b7 1279:33cae6d1635c
   158 	end;
   158 	end;
   159 
   159 
   160 CalcRotationDirAngle(Gear);
   160 CalcRotationDirAngle(Gear);
   161 
   161 
   162 if Gear^.Kind = gtHellishBomb then
   162 if Gear^.Kind = gtHellishBomb then
       
   163 	begin
       
   164 	if Gear^.Timer = 3000 then PlaySound(sndHellish, false);
       
   165 
   163 	if (GameTicks and $3F) = 0 then
   166 	if (GameTicks and $3F) = 0 then
   164 		if (Gear^.State and gstCollision) = 0 then
   167 		if (Gear^.State and gstCollision) = 0 then
   165 			AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtEvilTrace, 0, _0, _0, 0);
   168 			AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtEvilTrace, 0, _0, _0, 0);
       
   169 	end;
   166 
   170 
   167 if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then
   171 if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then
   168 	if (hwAbs(Gear^.dX) > _0_1) or
   172 	if (hwAbs(Gear^.dX) > _0_1) or
   169 	   (hwAbs(Gear^.dY) > _0_1) then
   173 	   (hwAbs(Gear^.dY) > _0_1) then
   170 		PlaySound(sndGrenadeImpact, false)
   174 		PlaySound(sndGrenadeImpact, false)
       
   175 end;
       
   176 
       
   177 procedure doStepWatermelon(Gear: PGear);
       
   178 begin
       
   179 AllInactive:= false;
       
   180 PlaySound(sndMelon, false);
       
   181 Gear^.doStep:= @doStepBomb
   171 end;
   182 end;
   172 
   183 
   173 procedure doStepCluster(Gear: PGear);
   184 procedure doStepCluster(Gear: PGear);
   174 begin
   185 begin
   175 AllInactive:= false;
   186 AllInactive:= false;
  1147 Gear^.X:= HHGear^.X;
  1158 Gear^.X:= HHGear^.X;
  1148 Gear^.dX:= SignAs(_0_45, Gear^.dX);
  1159 Gear^.dX:= SignAs(_0_45, Gear^.dX);
  1149 Gear^.dY:= - _0_9;
  1160 Gear^.dY:= - _0_9;
  1150 Gear^.doStep:= @doStepFirePunchWork;
  1161 Gear^.doStep:= @doStepFirePunchWork;
  1151 DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y + _1, _0_5, _0, cHHRadius * 4, 5);
  1162 DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y + _1, _0_5, _0, cHHRadius * 4, 5);
       
  1163 
       
  1164 PlaySound(TSound(ord(sndFirePunch1) + GetRandom(6)), false)
  1152 end;
  1165 end;
  1153 
  1166 
  1154 ////////////////////////////////////////////////////////////////////////////////
  1167 ////////////////////////////////////////////////////////////////////////////////
  1155 
  1168 
  1156 procedure doStepParachuteWork(Gear: PGear);
  1169 procedure doStepParachuteWork(Gear: PGear);