equal
deleted
inserted
replaced
980 Gear^.dX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX); |
980 Gear^.dX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX); |
981 Gear^.dY:= -AngleCos(HHGear^.Angle); |
981 Gear^.dY:= -AngleCos(HHGear^.Angle); |
982 Gear^.Friction:= _450; |
982 Gear^.Friction:= _450; |
983 Gear^.Elasticity:= _0; |
983 Gear^.Elasticity:= _0; |
984 Gear^.State:= Gear^.State and not gsttmpflag; |
984 Gear^.State:= Gear^.State and not gsttmpflag; |
985 Gear^.doStep:= @doStepRope |
985 Gear^.doStep:= @doStepRope; |
986 end |
986 end |
987 end; |
987 end; |
988 |
988 |
989 procedure doStepRopeWork(Gear: PGear); |
989 procedure doStepRopeWork(Gear: PGear); |
990 var HHGear: PGear; |
990 var HHGear: PGear; |
1019 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
1019 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
1020 |
1020 |
1021 if ((HHGear^.State and gstHHDriven) = 0) |
1021 if ((HHGear^.State and gstHHDriven) = 0) |
1022 or (CheckGearDrowning(HHGear)) then |
1022 or (CheckGearDrowning(HHGear)) then |
1023 begin |
1023 begin |
|
1024 PlaySound(sndRopeRelease); |
1024 DeleteMe; |
1025 DeleteMe; |
1025 exit |
1026 exit |
1026 end; |
1027 end; |
1027 |
1028 |
1028 if (Gear^.Message and gm_Left <> 0) then HHGear^.dX:= HHGear^.dX - _0_0002 else |
1029 if (Gear^.Message and gm_Left <> 0) then HHGear^.dX:= HHGear^.dX - _0_0002 else |
1157 end; |
1158 end; |
1158 |
1159 |
1159 if (Gear^.Message and gm_Attack) <> 0 then |
1160 if (Gear^.Message and gm_Attack) <> 0 then |
1160 if (Gear^.State and gsttmpFlag) <> 0 then |
1161 if (Gear^.State and gsttmpFlag) <> 0 then |
1161 with PHedgehog(Gear^.Hedgehog)^ do |
1162 with PHedgehog(Gear^.Hedgehog)^ do |
|
1163 begin |
|
1164 PlaySound(sndRopeRelease); |
1162 if Ammo^[CurSlot, CurAmmo].AmmoType <> amParachute then |
1165 if Ammo^[CurSlot, CurAmmo].AmmoType <> amParachute then |
1163 WaitCollision |
1166 WaitCollision |
1164 else |
1167 else |
1165 DeleteMe |
1168 DeleteMe |
|
1169 end |
1166 else |
1170 else |
1167 else |
1171 else |
1168 if (Gear^.State and gsttmpFlag) = 0 then |
1172 if (Gear^.State and gsttmpFlag) = 0 then |
1169 Gear^.State:= Gear^.State or gsttmpFlag; |
1173 Gear^.State:= Gear^.State or gsttmpFlag; |
1170 end; |
1174 end; |
1221 begin |
1225 begin |
1222 Gear^.X:= Gear^.X + tx; |
1226 Gear^.X:= Gear^.X + tx; |
1223 Gear^.Y:= Gear^.Y + ty; |
1227 Gear^.Y:= Gear^.Y + ty; |
1224 Gear^.Elasticity:= tt; |
1228 Gear^.Elasticity:= tt; |
1225 Gear^.doStep:= @doStepRopeWork; |
1229 Gear^.doStep:= @doStepRopeWork; |
|
1230 PlaySound(sndRopeAttach); |
1226 with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump); |
1231 with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump); |
1227 |
1232 |
1228 RemoveFromAmmo; |
1233 RemoveFromAmmo; |
1229 |
1234 |
1230 tt:= _0; |
1235 tt:= _0; |
1242 if Gear^.Elasticity < _10 then |
1247 if Gear^.Elasticity < _10 then |
1243 Gear^.Elasticity:= _10000 |
1248 Gear^.Elasticity:= _10000 |
1244 else |
1249 else |
1245 begin |
1250 begin |
1246 Gear^.doStep:= @doStepRopeWork; |
1251 Gear^.doStep:= @doStepRopeWork; |
|
1252 PlaySound(sndRopeAttach); |
1247 with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump); |
1253 with HHGear^ do State:= State and not (gstAttacking or gstHHJumping or gstHHHJump); |
1248 |
1254 |
1249 RemoveFromAmmo; |
1255 RemoveFromAmmo; |
1250 |
1256 |
1251 exit |
1257 exit |
1267 |
1273 |
1268 procedure doStepRope(Gear: PGear); |
1274 procedure doStepRope(Gear: PGear); |
1269 begin |
1275 begin |
1270 Gear^.dX:= - Gear^.dX; |
1276 Gear^.dX:= - Gear^.dX; |
1271 Gear^.dY:= - Gear^.dY; |
1277 Gear^.dY:= - Gear^.dY; |
1272 Gear^.doStep:= @doStepRopeAttach |
1278 Gear^.doStep:= @doStepRopeAttach; |
|
1279 PlaySound(sndRopeShot) |
1273 end; |
1280 end; |
1274 |
1281 |
1275 //////////////////////////////////////////////////////////////////////////////// |
1282 //////////////////////////////////////////////////////////////////////////////// |
1276 procedure doStepSmokeTrace(Gear: PGear); |
1283 procedure doStepSmokeTrace(Gear: PGear); |
1277 begin |
1284 begin |