171 tdX, tdY: hwFloat; |
171 tdX, tdY: hwFloat; |
172 collV, collH: LongInt; |
172 collV, collH: LongInt; |
173 land: word; |
173 land: word; |
174 begin |
174 begin |
175 // clip velocity at 2 - over 1 per pixel, but really shouldn't cause many actual problems. |
175 // clip velocity at 2 - over 1 per pixel, but really shouldn't cause many actual problems. |
176 {$IFNDEF WEB} |
176 {$IFNDEF WEBGL} |
177 if Gear^.dX.Round > 2 then |
177 if Gear^.dX.Round > 2 then |
178 Gear^.dX.QWordValue:= 8589934592; |
178 Gear^.dX.QWordValue:= 8589934592; |
179 if Gear^.dY.Round > 2 then |
179 if Gear^.dY.Round > 2 then |
180 Gear^.dY.QWordValue:= 8589934592; |
180 Gear^.dY.QWordValue:= 8589934592; |
181 {$ELSE} |
181 {$ELSE} |
2739 |
2740 |
2740 //////////////////////////////////////////////////////////////////////////////// |
2741 //////////////////////////////////////////////////////////////////////////////// |
2741 procedure doStepSeductionWork(Gear: PGear); |
2742 procedure doStepSeductionWork(Gear: PGear); |
2742 var i: LongInt; |
2743 var i: LongInt; |
2743 hogs: PGearArrayS; |
2744 hogs: PGearArrayS; |
|
2745 len: Integer; |
2744 begin |
2746 begin |
2745 AllInactive := false; |
2747 AllInactive := false; |
2746 hogs := GearsNear(Gear^.X, Gear^.Y, gtHedgehog, Gear^.Radius); |
2748 hogs := GearsNear(Gear^.X, Gear^.Y, gtHedgehog, Gear^.Radius); |
2747 if hogs.size > 0 then |
2749 if hogs.size > 0 then |
2748 begin |
2750 begin |
3511 var |
3513 var |
3512 vg: PVisualGear; |
3514 vg: PVisualGear; |
3513 i: LongInt; |
3515 i: LongInt; |
3514 begin |
3516 begin |
3515 AllInactive := false; |
3517 AllInactive := false; |
|
3518 {$IFNDEF PAS2C} |
3516 Gear^.dX := Gear^.dX; |
3519 Gear^.dX := Gear^.dX; |
|
3520 {$ENDIF} |
3517 doStepFallingGear(Gear); |
3521 doStepFallingGear(Gear); |
3518 // CheckGearDrowning(Gear); // already checked for in doStepFallingGear |
3522 // CheckGearDrowning(Gear); // already checked for in doStepFallingGear |
3519 CalcRotationDirAngle(Gear); |
3523 CalcRotationDirAngle(Gear); |
3520 |
3524 |
3521 if (Gear^.State and gstCollision) <> 0 then |
3525 if (Gear^.State and gstCollision) <> 0 then |
4703 |
4708 |
4704 procedure doStepResurrector(Gear: PGear); |
4709 procedure doStepResurrector(Gear: PGear); |
4705 var |
4710 var |
4706 graves: PGearArrayS; |
4711 graves: PGearArrayS; |
4707 i: LongInt; |
4712 i: LongInt; |
|
4713 len: Integer; |
4708 begin |
4714 begin |
4709 AllInactive := false; |
4715 AllInactive := false; |
4710 graves := GearsNear(Gear^.X, Gear^.Y, gtGrave, Gear^.Radius); |
4716 graves := GearsNear(Gear^.X, Gear^.Y, gtGrave, Gear^.Radius); |
4711 |
4717 |
4712 if graves.size > 0 then |
4718 if graves.size > 0 then |
5026 * 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. |
5032 * 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. |
5027 * 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. |
5033 * 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. |
5028 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. |
5034 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. |
5029 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. |
5035 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. |
5030 *) |
5036 *) |
|
5037 |
5031 procedure doStepIceGun(Gear: PGear); |
5038 procedure doStepIceGun(Gear: PGear); |
5032 var |
5039 var |
5033 HHGear: PGear; |
5040 HHGear: PGear; |
5034 ndX, ndY: hwFloat; |
5041 ndX, ndY: hwFloat; |
5035 i, t, gX, gY: LongInt; |
5042 i, t, gX, gY: LongInt; |
5036 hogs: PGearArrayS; |
5043 hogs: PGearArrayS; |
|
5044 len: Integer; |
5037 begin |
5045 begin |
5038 HHGear := Gear^.Hedgehog^.Gear; |
5046 HHGear := Gear^.Hedgehog^.Gear; |
5039 if (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) then |
5047 if (Gear^.Health = 0) or (HHGear = nil) or (HHGear^.Damage <> 0) then |
5040 begin |
5048 begin |
5041 DeleteGear(Gear); |
5049 DeleteGear(Gear); |