equal
deleted
inserted
replaced
992 //////////////////////////////////////////////////////////////////////////////// |
992 //////////////////////////////////////////////////////////////////////////////// |
993 procedure doStepBeeWork(Gear: PGear); |
993 procedure doStepBeeWork(Gear: PGear); |
994 var |
994 var |
995 t: hwFloat; |
995 t: hwFloat; |
996 gX,gY,i: LongInt; |
996 gX,gY,i: LongInt; |
997 uw, nuw: boolean; |
997 uw, nuw, wrapped: boolean; |
998 flower: PVisualGear; |
998 flower: PVisualGear; |
999 |
999 |
1000 begin |
1000 begin |
1001 WorldWrap(Gear); |
1001 wrapped:= WorldWrap(Gear); |
|
1002 if wrapped then |
|
1003 HomingWrap(Gear); |
|
1004 |
1002 AllInactive := false; |
1005 AllInactive := false; |
1003 gX := hwRound(Gear^.X); |
1006 gX := hwRound(Gear^.X); |
1004 gY := hwRound(Gear^.Y); |
1007 gY := hwRound(Gear^.Y); |
1005 uw := (Gear^.Tag <> 0); // was bee underwater last tick? |
1008 uw := (Gear^.Tag <> 0); // was bee underwater last tick? |
1006 nuw := CheckCoordInWater(gx, gy + Gear^.Radius); // is bee underwater now? |
1009 nuw := CheckCoordInWater(gx, gy + Gear^.Radius); // is bee underwater now? |
1114 Gear^.Hedgehog^.Gear^.State:= Gear^.Hedgehog^.Gear^.State and (not gstAttacking); |
1117 Gear^.Hedgehog^.Gear^.State:= Gear^.Hedgehog^.Gear^.State and (not gstAttacking); |
1115 AttackBar:= 0; |
1118 AttackBar:= 0; |
1116 |
1119 |
1117 Gear^.SoundChannel := LoopSound(sndBee); |
1120 Gear^.SoundChannel := LoopSound(sndBee); |
1118 Gear^.Timer := 5000; |
1121 Gear^.Timer := 5000; |
|
1122 |
|
1123 HomingWrap(Gear); |
|
1124 |
1119 // save initial speed in otherwise unused Friction variable |
1125 // save initial speed in otherwise unused Friction variable |
1120 Gear^.Friction := Distance(Gear^.dX, Gear^.dY); |
1126 Gear^.Friction := Distance(Gear^.dX, Gear^.dY); |
1121 Gear^.doStep := @doStepBeeWork |
1127 Gear^.doStep := @doStepBeeWork |
1122 end; |
1128 end; |
1123 end; |
1129 end; |