equal
deleted
inserted
replaced
1122 end; |
1122 end; |
1123 TargetPoint.X:= NoPointX |
1123 TargetPoint.X:= NoPointX |
1124 end; |
1124 end; |
1125 |
1125 |
1126 //////////////////////////////////////////////////////////////////////////////// |
1126 //////////////////////////////////////////////////////////////////////////////// |
|
1127 procedure doStepTeleportAfter(Gear: PGear); |
|
1128 var HHGear: PGear; |
|
1129 begin |
|
1130 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
|
1131 HHGear^.Y:= HHGear^.Y + HHGear^.dY; |
|
1132 HHGear^.dY:= HHGear^.dY + cGravity; |
|
1133 if TestCollisionYwithGear(HHGear, 1) then |
|
1134 begin |
|
1135 DeleteGear(Gear); |
|
1136 AfterAttack |
|
1137 end |
|
1138 end; |
1127 |
1139 |
1128 procedure doStepTeleport(Gear: PGear); |
1140 procedure doStepTeleport(Gear: PGear); |
1129 var HHGear: PGear; |
1141 var HHGear: PGear; |
1130 begin |
1142 begin |
1131 AllInactive:= false; |
1143 AllInactive:= false; |
1141 DeleteGear(Gear); |
1153 DeleteGear(Gear); |
1142 isCursorVisible:= true |
1154 isCursorVisible:= true |
1143 end |
1155 end |
1144 else begin |
1156 else begin |
1145 DeleteCI(HHGear); |
1157 DeleteCI(HHGear); |
|
1158 Gear^.doStep:= @doStepTeleportAfter; |
1146 HHGear^.X:= int2hwFloat(TargetPoint.X); |
1159 HHGear^.X:= int2hwFloat(TargetPoint.X); |
1147 HHGear^.Y:= int2hwFloat(TargetPoint.Y); |
1160 HHGear^.Y:= int2hwFloat(TargetPoint.Y); |
1148 DeleteGear(Gear); |
1161 HHGear^.State:= HHGear^.State or gstFalling |
1149 AfterAttack |
|
1150 end; |
1162 end; |
1151 TargetPoint.X:= NoPointX |
1163 TargetPoint.X:= NoPointX |
1152 end; |
1164 end; |