changeset 2852 | c6dff591f564 |
parent 2844 | cea15ef417ea |
child 2860 | 13a53315ae18 |
2851:a9a5ce1d9f23 | 2852:c6dff591f564 |
---|---|
845 var i, t: LongInt; |
845 var i, t: LongInt; |
846 amt: TAmmoType; |
846 amt: TAmmoType; |
847 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
847 hx, hy, cx, cy, tx, ty, sx, sy, m: LongInt; // hedgehog, crosshair, temp, sprite, direction |
848 lx, ly, dx, dy, ax, ay, aAngle, dAngle, hAngle: real; // laser, change |
848 lx, ly, dx, dy, ax, ay, aAngle, dAngle, hAngle: real; // laser, change |
849 defaultPos, HatVisible: boolean; |
849 defaultPos, HatVisible: boolean; |
850 VertexBuffer: array [0..1] of TVertex2f; |
850 VertexBuffer: array [0..1] of TVertex2f; |
851 begin |
851 stepSounds: boolean; |
852 begin |
|
853 |
|
852 if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit; |
854 if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit; |
853 m:= 1; |
855 m:= 1; |
854 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
856 if ((Gear^.State and gstHHHJump) <> 0) and not cArtillery then m:= -1; |
855 if (Gear^.State and gstHHDeath) <> 0 then |
857 if (Gear^.State and gstHHDeath) <> 0 then |
856 begin |
858 begin |
858 exit |
860 exit |
859 end; |
861 end; |
860 |
862 |
861 defaultPos:= true; |
863 defaultPos:= true; |
862 HatVisible:= false; |
864 HatVisible:= false; |
865 stepSounds:= false; |
|
863 |
866 |
864 sx:= hwRound(Gear^.X) + 1 + WorldDx; |
867 sx:= hwRound(Gear^.X) + 1 + WorldDx; |
865 sy:= hwRound(Gear^.Y) - 3 + WorldDy; |
868 sy:= hwRound(Gear^.Y) - 3 + WorldDy; |
866 if ((Gear^.State and gstWinner) <> 0) and |
869 if ((Gear^.State and gstWinner) <> 0) and |
867 ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then |
870 ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtPickHammer)) then |
1023 DrawHedgehog(sx, sy, |
1026 DrawHedgehog(sx, sy, |
1024 hwSign(Gear^.dX), |
1027 hwSign(Gear^.dX), |
1025 3, |
1028 3, |
1026 PHedgehog(Gear^.Hedgehog)^.visStepPos div 2, |
1029 PHedgehog(Gear^.Hedgehog)^.visStepPos div 2, |
1027 0); |
1030 0); |
1031 stepSounds:= true; |
|
1028 defaultPos:= false |
1032 defaultPos:= false |
1029 end; |
1033 end; |
1030 gtShover: DrawRotated(sprHandBaseball, hx, hy, hwSign(Gear^.dX), aangle + 180); |
1034 gtShover: DrawRotated(sprHandBaseball, hx, hy, hwSign(Gear^.dX), aangle + 180); |
1031 gtFirePunch: begin |
1035 gtFirePunch: begin |
1032 DrawHedgehog(sx, sy, |
1036 DrawHedgehog(sx, sy, |
1119 DrawHedgehog(sx, sy, |
1123 DrawHedgehog(sx, sy, |
1120 hwSign(Gear^.dX), |
1124 hwSign(Gear^.dX), |
1121 0, |
1125 0, |
1122 PHedgehog(Gear^.Hedgehog)^.visStepPos div 2, |
1126 PHedgehog(Gear^.Hedgehog)^.visStepPos div 2, |
1123 0); |
1127 0); |
1128 stepSounds:= true; |
|
1124 defaultPos:= false; |
1129 defaultPos:= false; |
1125 HatVisible:= true |
1130 HatVisible:= true |
1126 end |
1131 end |
1127 else |
1132 else |
1128 |
1133 |
1361 begin |
1366 begin |
1362 glColor4f(1, 1, 1, 0.25 + abs(1 - (RealTicks mod 1500) / 750)); |
1367 glColor4f(1, 1, 1, 0.25 + abs(1 - (RealTicks mod 1500) / 750)); |
1363 DrawSprite(sprVampiric, sx - 24, sy - 24, 0); |
1368 DrawSprite(sprVampiric, sx - 24, sy - 24, 0); |
1364 glColor4f(1, 1, 1, 1); |
1369 glColor4f(1, 1, 1, 1); |
1365 end; |
1370 end; |
1371 |
|
1372 if stepSounds and (Gear^.SoundChannel < 0) then |
|
1373 Gear^.SoundChannel:= LoopSound(sndSteps) |
|
1374 else if not stepSounds and (Gear^.SoundChannel > -1) then |
|
1375 begin |
|
1376 StopSound(Gear^.SoundChannel); |
|
1377 Gear^.SoundChannel:= -1; |
|
1378 end; |
|
1366 end; |
1379 end; |
1367 |
1380 |
1368 procedure DrawRopeLinesRQ(Gear: PGear); |
1381 procedure DrawRopeLinesRQ(Gear: PGear); |
1369 begin |
1382 begin |
1370 with RopePoints do |
1383 with RopePoints do |