# HG changeset patch # User nemo # Date 1350353257 14400 # Node ID a225cc45513e91a5b3c0adeb93a37d03f370b46c # Parent c20e6c80e249c6f76be8238891474a482cd9667a Remove slot overcrowding, disable angle detection which isn't doing what I want. diff -r c20e6c80e249 -r a225cc45513e hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Tue Oct 16 00:05:58 2012 +0400 +++ b/hedgewars/GSHandlers.inc Mon Oct 15 22:07:37 2012 -0400 @@ -5259,22 +5259,27 @@ else if Gear^.CollisionIndex = -1 then begin ox:= 0; oy:= 0; - if TestCollisionYwithGear(Gear, -1) <> 0 then oy:= -1 - else if TestCollisionXwithGear(Gear, 1) then ox:= 1 - else if TestCollisionXwithGear(Gear, -1) then ox:= -1 - else if TestCollisionYwithGear(Gear, 1) <> 0 then oy:= 1; + if TestCollisionYwithGear(Gear, -1) <> 0 then oy:= -1; + if TestCollisionXwithGear(Gear, 1) then ox:= 1; + if TestCollisionXwithGear(Gear, -1) then ox:= -1; + if TestCollisionYwithGear(Gear, 1) <> 0 then oy:= 1; if Gear^.Health > 0 then PlaySound(sndRopeAttach); - la:= _0; +(* + la:= _10000; if (ox <> 0) or (oy <> 0) then la:= CalcSlopeNearGear(Gear, ox, oy); - if la = _0 then + if la = _10000 then begin // debug for when we couldn't get an angle //AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeWhite); - Gear^.DirAngle:= DxDy2Angle(Gear^.dX, Gear^.dY)*hwSign(Gear^.dX) + (random(20)-10) - end - else Gear^.DirAngle:= hwFloat2Float(la)*90; // sheepluva's comment claims 45deg = 0.5 - yet orientation doesn't seem consistent? +*) + Gear^.DirAngle:= DxDy2Angle(Gear^.dX, Gear^.dY) + (random(20)-10); + if (Gear^.dX.isNegative and Gear^.dY.isNegative) or + ((not Gear^.dX.isNegative) and (not Gear^.dY.isNegative)) then Gear^.DirAngle:= Gear^.DirAngle-90; + // end + // else Gear^.DirAngle:= hwFloat2Float(la)*90; // sheepluva's comment claims 45deg = 0.5 - yet orientation doesn't seem consistent? + // AddFileLog('la: '+floattostr(la)+' DirAngle: '+inttostr(round(Gear^.DirAngle))); Gear^.dX:= _0; Gear^.dY:= _0; Gear^.State:= Gear^.State and (not gstMoving) or gstCollision; diff -r c20e6c80e249 -r a225cc45513e hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Tue Oct 16 00:05:58 2012 +0400 +++ b/hedgewars/uVariables.pas Mon Oct 15 22:07:37 2012 -0400 @@ -2322,7 +2322,7 @@ AmmoType: amIceGun; AttackVoice: sndNone; Bounciness: 1000); - Slot: 6; + Slot: 9; TimeAfterTurn: 0; minAngle: 0; maxAngle: 0; diff -r c20e6c80e249 -r a225cc45513e share/hedgewars/Data/Graphics/cleaver.svg --- a/share/hedgewars/Data/Graphics/cleaver.svg Tue Oct 16 00:05:58 2012 +0400 +++ b/share/hedgewars/Data/Graphics/cleaver.svg Mon Oct 15 22:07:37 2012 -0400 @@ -12,7 +12,7 @@ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" version="1.1" - inkscape:version="0.48.3.1 r9886" + inkscape:version="0.48.1 " width="450" height="470" sodipodi:docname="cleaver.svg"> @@ -24,7 +24,7 @@ image/svg+xml - + @@ -74,9 +74,9 @@ inkscape:window-height="868" id="namedview4" showgrid="false" - inkscape:zoom="1.0042553" - inkscape:cx="205.71997" - inkscape:cy="192.5461" + inkscape:zoom="2.0085106" + inkscape:cx="209.47607" + inkscape:cy="261.39935" inkscape:window-x="0" inkscape:window-y="25" inkscape:window-maximized="0" @@ -91,14 +91,6 @@ inkscape:export-xdpi="21.549999" inkscape:export-ydpi="21.549999" /> - + + + +