5087 resgear^.Health := graves[i]^.Health; |
5087 resgear^.Health := graves[i]^.Health; |
5088 PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear; |
5088 PHedgehog(graves[i]^.Hedgehog)^.Gear := resgear; |
5089 DeleteGear(graves[i]); |
5089 DeleteGear(graves[i]); |
5090 RenderHealth(resgear^.Hedgehog^); |
5090 RenderHealth(resgear^.Hedgehog^); |
5091 RecountTeamHealth(resgear^.Hedgehog^.Team); |
5091 RecountTeamHealth(resgear^.Hedgehog^.Team); |
5092 resgear^.Hedgehog^.Effects[heResurrected]:= true; |
5092 resgear^.Hedgehog^.Effects[heResurrected]:= 1; |
5093 // only make hat-less hedgehogs look like zombies, preserve existing hats |
5093 // only make hat-less hedgehogs look like zombies, preserve existing hats |
5094 |
5094 |
5095 if resgear^.Hedgehog^.Hat = 'NoHat' then |
5095 if resgear^.Hedgehog^.Hat = 'NoHat' then |
5096 LoadHedgehogHat(resgear, 'Reserved/Zombie'); |
5096 LoadHedgehogHat(resgear, 'Reserved/Zombie'); |
5097 end; |
5097 end; |
5418 |
5418 |
5419 //////////////////////////////////////////////////////////////////////////////// |
5419 //////////////////////////////////////////////////////////////////////////////// |
5420 |
5420 |
5421 (* |
5421 (* |
5422 WIP. The ice gun will have the following effects. It has been proposed by sheepluva that it take the appearance of a large freezer |
5422 WIP. The ice gun will have the following effects. It has been proposed by sheepluva that it take the appearance of a large freezer |
5423 spewing ice cubes. The cubes will probably be visual gears only, although if they were gear particles, it could allow for impacting targets in a spray. |
5423 spewing ice cubes. The cubes will be visual gears only. The scatter from them and the impact snow dust should help hide imprecisions in things like the GearsNear effect. |
5424 For now we assume a "ray" like a deagle projected out from the gun. |
5424 For now we assume a "ray" like a deagle projected out from the gun. |
5425 All these effects assume the ray's angle is not changed and that the target type was unchanged over a number of ticks. This is a simplifying assumption for "gun was applying freezing effect to the same target". |
5425 All these effects assume the ray's angle is not changed and that the target type was unchanged over a number of ticks. This is a simplifying assumption for "gun was applying freezing effect to the same target". |
5426 * When fired at water a layer of ice textured land is added above the water. |
5426 * When fired at water a layer of ice textured land is added above the water. |
5427 * When fired at non-ice land (land and $FF00 and not lfIce) the land is overlaid with a thin layer of ice textured land near that point. For attractiveness, a slope would probably be needed. |
5427 * When fired at non-ice land (land and $FF00 and not lfIce) the land is overlaid with a thin layer of ice textured land around that point (say, 1 or 2px into land, 1px above). For attractiveness, a slope would probably be needed. |
5428 * When fired at a hog (land and $00FF <> 0), while the hog is targetted, the hog's state is set to frozen. As long as the gun is on the hog, a frozen hog sprite creeps up from the feet to the head. If the effect is interrupted before reaching the top, the freezing state is cleared. |
5428 * When fired at a hog (land and $00FF <> 0), while the hog is targetted, the hog's state is set to frozen. As long as the gun is on the hog, a frozen hog sprite creeps up from the feet to the head. If the effect is interrupted before reaching the top, the freezing state is cleared. |
5429 A frozen hog will animate differently. To be decided, but possibly in a similar fashion to a grave when it comes to explosions. The hog might (possibly) not be damaged by explosions. This might make freezing potentially useful for friendlies in a bad position. It might be better to allow damage though. |
5429 A frozen hog will animate differently. To be decided, but possibly in a similar fashion to a grave when it comes to explosions. The hog might (possibly) not be damaged by explosions. This might make freezing potentially useful for friendlies in a bad position. It might be better to allow damage though. |
5430 A frozen hog stays frozen for a certain number of turns. Each turn the frozen overlay becomes fainter, until it fades and the hog animates normally again. |
5430 A frozen hog stays frozen for a certain number of turns. Each turn the frozen overlay becomes fainter, until it fades and the hog animates normally again. |
5431 *) |
5431 *) |
5432 procedure doStepIceGun(Gear: PGear); |
5432 procedure doStepIceGun(Gear: PGear); |
5433 begin |
5433 var |
5434 end; |
5434 HHGear, iter: PGear; |
|
5435 ndX, ndY: hwFloat; |
|
5436 gX, gY: LongInt; |
|
5437 begin |
|
5438 with Gear^ do |
|
5439 begin |
|
5440 HHGear := Hedgehog^.Gear; |
|
5441 HedgehogChAngle(HHGear); |
|
5442 ndX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX); |
|
5443 ndY:= -AngleCos(HHGear^.Angle); |
|
5444 if (ndX <> dX) or (ndY <> dY) then |
|
5445 begin |
|
5446 Pos:= 0; |
|
5447 Target.X:= NoPointX; |
|
5448 LastDamage:= nil; |
|
5449 X:= HHGear^.X; |
|
5450 Y:= HHGear^.Y; |
|
5451 // unfreeze all semifrozen hogs |
|
5452 iter := GearsList; |
|
5453 while iter <> nil do |
|
5454 begin |
|
5455 if (iter^.Kind = gtHedgehog) and |
|
5456 (iter^.Hedgehog^.Effects[heFrozen] < 0) then |
|
5457 iter^.Hedgehog^.Effects[heFrozen]:= 0; |
|
5458 iter:= iter^.NextGear; |
|
5459 end; |
|
5460 end |
|
5461 else |
|
5462 begin |
|
5463 gX:= hwRound(X); |
|
5464 gY:= hwRound(Y); |
|
5465 X:= X + dX; |
|
5466 Y:= Y + dY; |
|
5467 if Target.X <> NoPointX then |
|
5468 inc(Pos) |
|
5469 else if (gY > cWaterLine) or |
|
5470 (((gX and LAND_WIDTH_MASK = 0) and (gY and LAND_HEIGHT_MASK = 0)) |
|
5471 and ((Land[gY, gX] and $FF00 and not lfIce <> 0) or |
|
5472 (Land[gY, gX] and $00FF <> 0))) then |
|
5473 begin |
|
5474 Target.X:= gX; |
|
5475 Target.Y:= gY; |
|
5476 if Land[gY, gX] and $00FF <> 0 then // locate and tag hogs |
|
5477 begin |
|
5478 //GearsNear(X, Y, gtHedgehog, Radius); |
|
5479 end; |
|
5480 end |
|
5481 end |
|
5482 end; |
|
5483 end; |