equal
deleted
inserted
replaced
205 |
205 |
206 New(gear); |
206 New(gear); |
207 FillChar(gear^, sizeof(TGear), 0); |
207 FillChar(gear^, sizeof(TGear), 0); |
208 gear^.X:= int2hwFloat(X); |
208 gear^.X:= int2hwFloat(X); |
209 gear^.Y:= int2hwFloat(Y); |
209 gear^.Y:= int2hwFloat(Y); |
|
210 gear^.TargetX:= NoPointX; |
210 gear^.Kind := Kind; |
211 gear^.Kind := Kind; |
211 gear^.State:= State; |
212 gear^.State:= State; |
212 gear^.Active:= true; |
213 gear^.Active:= true; |
213 gear^.dX:= dX; |
214 gear^.dX:= dX; |
214 gear^.dY:= dY; |
215 gear^.dY:= dY; |
913 else |
914 else |
914 begin |
915 begin |
915 dec(delay2); |
916 dec(delay2); |
916 |
917 |
917 if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then |
918 if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then |
|
919 begin |
|
920 if (CurrentHedgehog^.Gear^.State and gstAttacked <> 0) and (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0) then |
|
921 begin |
|
922 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State or gstHHChooseTarget; |
|
923 isCursorVisible := true |
|
924 end; |
918 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; |
925 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; |
|
926 end; |
919 if delay2 = 0 then |
927 if delay2 = 0 then |
920 begin |
928 begin |
921 if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty; |
929 if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty; |
922 CheckNoDamage; |
930 CheckNoDamage; |
923 AliveCount:= 0; // shorter version of check for win to allow typical step activity to proceed |
931 AliveCount:= 0; // shorter version of check for win to allow typical step activity to proceed |
1212 dmg, dmgRadius, dmgBase: LongInt; |
1220 dmg, dmgRadius, dmgBase: LongInt; |
1213 fX, fY: hwFloat; |
1221 fX, fY: hwFloat; |
1214 vg: PVisualGear; |
1222 vg: PVisualGear; |
1215 i, cnt: LongInt; |
1223 i, cnt: LongInt; |
1216 begin |
1224 begin |
1217 TargetPoint.X:= NoPointX; |
|
1218 if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')'); |
1225 if Radius > 4 then AddFileLog('Explosion: at (' + inttostr(x) + ',' + inttostr(y) + ')'); |
1219 if Radius > 25 then KickFlakes(Radius, X, Y); |
1226 if Radius > 25 then KickFlakes(Radius, X, Y); |
1220 |
1227 |
1221 if ((Mask and EXPLNoGfx) = 0) then |
1228 if ((Mask and EXPLNoGfx) = 0) then |
1222 begin |
1229 begin |