141 Result.Active:= true; |
143 Result.Active:= true; |
142 Result.dX:= dX; |
144 Result.dX:= dX; |
143 Result.dY:= dY; |
145 Result.dY:= dY; |
144 Result.doStep:= doStepHandlers[Kind]; |
146 Result.doStep:= doStepHandlers[Kind]; |
145 Result.CollIndex:= High(Longword); |
147 Result.CollIndex:= High(Longword); |
|
148 Result.Timer:= Timer; |
146 if CurrentTeam <> nil then |
149 if CurrentTeam <> nil then |
147 Result.Hedgehog:= @CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog]; |
150 Result.Hedgehog:= @CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog]; |
148 case Kind of |
151 case Kind of |
149 gtAmmo_Bomb: begin |
152 gtAmmo_Bomb: begin |
150 Result.Radius:= 4; |
153 Result.Radius:= 4; |
151 Result.Elasticity:= 0.6; |
154 Result.Elasticity:= 0.6; |
152 Result.Friction:= 0.995; |
155 Result.Friction:= 0.995; |
153 Result.Timer:= Timer |
|
154 end; |
156 end; |
155 gtHedgehog: begin |
157 gtHedgehog: begin |
156 Result.Radius:= cHHRadius; |
158 Result.Radius:= cHHRadius; |
157 Result.Elasticity:= 0.002; |
159 Result.Elasticity:= 0.002; |
158 Result.Friction:= 0.999; |
160 Result.Friction:= 0.999; |
292 RecountTeamHealth(PHedgehog(Gear.Hedgehog)^.Team); |
290 RecountTeamHealth(PHedgehog(Gear.Hedgehog)^.Team); |
293 |
291 |
294 Gear.Damage:= 0 |
292 Gear.Damage:= 0 |
295 end; |
293 end; |
296 Gear:= Gear.NextGear |
294 Gear:= Gear.NextGear |
297 end |
295 end; |
|
296 CheckForWin |
298 end; |
297 end; |
299 |
298 |
300 procedure ProcessGears; |
299 procedure ProcessGears; |
301 const delay: integer = cInactDelay; |
300 const delay: integer = cInactDelay; |
302 step: (stDelay, stChDmg, stSpawn, stNTurn) = stDelay; |
301 step: (stDelay, stChDmg, stSpawn, stNTurn) = stDelay; |
411 var i, x, y: integer; |
410 var i, x, y: integer; |
412 t, k, ladd: real; |
411 t, k, ladd: real; |
413 begin |
412 begin |
414 if (X1 = X2) and (Y1 = Y2) then |
413 if (X1 = X2) and (Y1 = Y2) then |
415 begin |
414 begin |
416 {$IFDEF DEBUGFILE}AddFileLog('zero length rope line!!!!!');{$ENDIF} |
415 OutError('WARNING: zero length rope line!'); |
417 exit |
416 exit |
418 end; |
417 end; |
419 if abs(X1 - X2) > abs(Y1 - Y2) then |
418 if abs(X1 - X2) > abs(Y1 - Y2) then |
420 begin |
419 begin |
421 if X1 > X2 then |
420 if X1 > X2 then |
549 var i: integer; |
548 var i: integer; |
550 begin |
549 begin |
551 for i:= 0 to cCloudsNumber do |
550 for i:= 0 to cCloudsNumber do |
552 AddGear( - cScreenWidth + i * ((cScreenWidth * 2 + 2304) div cCloudsNumber), -140, gtCloud, random(4), |
551 AddGear( - cScreenWidth + i * ((cScreenWidth * 2 + 2304) div cCloudsNumber), -140, gtCloud, random(4), |
553 (0.5-random)*0.02, ((i mod 2) * 2 - 1) * (0.005 + 0.015*random)); |
552 (0.5-random)*0.02, ((i mod 2) * 2 - 1) * (0.005 + 0.015*random)); |
554 AddGear(0, 0, gtActionTimer, gtsStartGame, 0, 0, 2000).Health:= 3; |
553 AddGear(0, 0, gtATStartGame, 0, 0, 0, 2000); |
555 if (GameFlags and gfForts) = 0 then |
554 if (GameFlags and gfForts) = 0 then |
556 for i:= 0 to 3 do |
555 for i:= 0 to 3 do |
557 FindPlace(AddGear(0, 0, gtMine, 0), false, 0, 2048); |
556 FindPlace(AddGear(0, 0, gtMine, 0), false, 0, 2048); |
558 end; |
557 end; |
559 |
558 |