133 end; |
134 end; |
134 amSkip: TurnTimeLeft:= 0; |
135 amSkip: TurnTimeLeft:= 0; |
135 amPickHammer: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y) + cHHHalfHeight, gtPickHammer, 0); |
136 amPickHammer: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y) + cHHHalfHeight, gtPickHammer, 0); |
136 amRope: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y), gtRope, 0, xx, yy); |
137 amRope: CurAmmoGear:= AddGear(round(Gear.X), round(Gear.Y), gtRope, 0, xx, yy); |
137 amMine: AddGear(round(X) + Sign(dX) * 7, round(Y), gtMine, 0, Sign(dX) * 0.01, 0, 3000); |
138 amMine: AddGear(round(X) + Sign(dX) * 7, round(Y), gtMine, 0, Sign(dX) * 0.01, 0, 3000); |
|
139 amDynamite: AddGear(round(X) + Sign(dX) * 7, round(Y), gtDynamite, 0, Sign(dX) * 0.01, 0, 5000); |
138 end; |
140 end; |
139 Power:= 0; |
141 Power:= 0; |
140 if CurAmmoGear <> nil then |
142 if CurAmmoGear <> nil then |
141 begin |
143 begin |
|
144 Gear.Message:= Gear.Message or gm_Attack; |
142 CurAmmoGear.Message:= Gear.Message; |
145 CurAmmoGear.Message:= Gear.Message; |
143 exit |
146 exit |
144 end else |
147 end else |
145 begin |
148 begin |
146 Message:= Message and not gm_Attack; |
149 Message:= Message and not gm_Attack; |
174 //////////////////////////////////////////////////////////////////////////////// |
177 //////////////////////////////////////////////////////////////////////////////// |
175 procedure doStepHedgehogDriven(Gear: PGear); |
178 procedure doStepHedgehogDriven(Gear: PGear); |
176 const StepTicks: LongWord = 0; |
179 const StepTicks: LongWord = 0; |
177 var t: PGear; |
180 var t: PGear; |
178 begin |
181 begin |
179 if isinMultiShoot and (Gear.Damage = 0) then exit; |
182 if isinMultiShoot and (Gear.Damage = 0) then |
|
183 begin |
|
184 if Gear.CollIndex = High(Longword) then AddIntersectorsCR(Gear); |
|
185 exit |
|
186 end; |
180 AllInactive:= false; |
187 AllInactive:= false; |
181 if (TurnTimeLeft = 0) or (Gear.Damage > 0) then |
188 if (TurnTimeLeft = 0) or (Gear.Damage > 0) then |
182 begin |
189 begin |
183 if ((Gear.State and (gstMoving or gstFalling)) = 0) |
190 if ((Gear.State and (gstMoving or gstFalling)) = 0) |
184 and (CurAmmoGear = nil) then Gear.dX:= 0.0000001 * Sign(Gear.dX); |
191 and (CurAmmoGear = nil) then Gear.dX:= 0.0000001 * Sign(Gear.dX); |
249 begin |
256 begin |
250 CheckHHDamage(Gear); |
257 CheckHHDamage(Gear); |
251 if ((abs(Gear.dX) + abs(Gear.dY)) < 0.55) |
258 if ((abs(Gear.dX) + abs(Gear.dY)) < 0.55) |
252 and ((Gear.State and gstHHJumping) <> 0) then Gear.dX:= 0.0000001 * Sign(Gear.dX); |
259 and ((Gear.State and gstHHJumping) <> 0) then Gear.dX:= 0.0000001 * Sign(Gear.dX); |
253 Gear.State:= Gear.State and not (gstFalling or gstHHJumping); |
260 Gear.State:= Gear.State and not (gstFalling or gstHHJumping); |
254 StepTicks:= 300; writelntoconsole(inttostr(gameticks)+'ooo'); |
261 StepTicks:= 300; |
255 Gear.dY:= 0 |
262 Gear.dY:= 0 |
256 end; |
263 end; |
257 CheckGearDrowning(Gear); |
264 CheckGearDrowning(Gear); |
258 exit |
265 exit |
259 end else if Gear.CollIndex = High(Longword) then AddIntersectorsCR(Gear); |
266 end else if Gear.CollIndex = High(Longword) then AddIntersectorsCR(Gear); |