equal
deleted
inserted
replaced
199 @doStepEggWork, |
199 @doStepEggWork, |
200 @doStepPortalShot, |
200 @doStepPortalShot, |
201 @doStepPiano, |
201 @doStepPiano, |
202 @doStepBomb, |
202 @doStepBomb, |
203 @doStepSineGunShot, |
203 @doStepSineGunShot, |
204 @doStepFlamethrower |
204 @doStepFlamethrower, |
|
205 @doStepSMine |
205 ); |
206 ); |
206 |
207 |
207 procedure InsertGearToList(Gear: PGear); |
208 procedure InsertGearToList(Gear: PGear); |
208 var tmp, ptmp: PGear; |
209 var tmp, ptmp: PGear; |
209 begin |
210 begin |
351 gear^.Friction:= _0_995; |
352 gear^.Friction:= _0_995; |
352 if cMinesTime < 0 then |
353 if cMinesTime < 0 then |
353 gear^.Timer:= getrandom(4)*1000 |
354 gear^.Timer:= getrandom(4)*1000 |
354 else |
355 else |
355 gear^.Timer:= cMinesTime*1; |
356 gear^.Timer:= cMinesTime*1; |
|
357 end; |
|
358 gtSMine: begin |
|
359 gear^.Health:= 10; |
|
360 gear^.State:= gear^.State or gstMoving; |
|
361 gear^.Radius:= 2; |
|
362 gear^.Elasticity:= _0_55; |
|
363 gear^.Friction:= _0_995; |
|
364 gear^.Timer:= 500; |
356 end; |
365 end; |
357 gtCase: begin |
366 gtCase: begin |
358 gear^.ImpactSound:= sndGraveImpact; |
367 gear^.ImpactSound:= sndGraveImpact; |
359 gear^.nImpactSounds:= 1; |
368 gear^.nImpactSounds:= 1; |
360 gear^.Radius:= 16; |
369 gear^.Radius:= 16; |
1209 if (Gear^.State and gstNoDamage) = 0 then |
1218 if (Gear^.State and gstNoDamage) = 0 then |
1210 begin |
1219 begin |
1211 case Gear^.Kind of |
1220 case Gear^.Kind of |
1212 gtHedgehog, |
1221 gtHedgehog, |
1213 gtMine, |
1222 gtMine, |
|
1223 gtSMine, |
1214 gtCase, |
1224 gtCase, |
1215 gtTarget, |
1225 gtTarget, |
1216 gtFlame, |
1226 gtFlame, |
1217 gtExplosives: begin |
1227 gtExplosives: begin |
1218 // Run the calcs only once we know we have a type that will need damage |
1228 // Run the calcs only once we know we have a type that will need damage |
1284 dmg:= ModifyDamage(min(Gear^.Radius + t^.Radius - hwRound(Distance(Gear^.X - t^.X, Gear^.Y - t^.Y)), 25), t); |
1294 dmg:= ModifyDamage(min(Gear^.Radius + t^.Radius - hwRound(Distance(Gear^.X - t^.X, Gear^.Y - t^.Y)), 25), t); |
1285 if dmg > 0 then |
1295 if dmg > 0 then |
1286 case t^.Kind of |
1296 case t^.Kind of |
1287 gtHedgehog, |
1297 gtHedgehog, |
1288 gtMine, |
1298 gtMine, |
|
1299 gtSMine, |
1289 gtCase, |
1300 gtCase, |
1290 gtTarget, |
1301 gtTarget, |
1291 gtExplosives: begin |
1302 gtExplosives: begin |
1292 if (not t^.Invulnerable) then |
1303 if (not t^.Invulnerable) then |
1293 ApplyDamage(t, dmg, dsBullet) |
1304 ApplyDamage(t, dmg, dsBullet) |
1338 if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1; |
1349 if (Gear^.Kind = gtHedgehog) and (Ammo^.State and gsttmpFlag <> 0) and (Ammo^.Kind = gtShover) then Gear^.FlightTime:= 1; |
1339 |
1350 |
1340 case Gear^.Kind of |
1351 case Gear^.Kind of |
1341 gtHedgehog, |
1352 gtHedgehog, |
1342 gtMine, |
1353 gtMine, |
|
1354 gtSMine, |
1343 gtTarget, |
1355 gtTarget, |
1344 gtCase, |
1356 gtCase, |
1345 gtExplosives: begin |
1357 gtExplosives: begin |
1346 if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end; |
1358 if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end; |
1347 if (not Gear^.Invulnerable) then |
1359 if (not Gear^.Invulnerable) then |