Skip to content

Commit c9ee2b1

Browse files
committed
Fixes that make things (temporarily?) worse but whatever
1 parent 221741a commit c9ee2b1

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Data/Base.rte/AI/NativeCrabAI.lua

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,26 +297,32 @@ function NativeCrabAI:Update(Owner)
297297
self.AirTimer:Reset();
298298

299299
local Origin = {};
300-
if Owner.FGFoot then
301-
table.insert(Origin, Vector(Owner.FGFoot.Pos.X, Owner.FGFoot.Pos.Y) + Vector(0, 4));
300+
if Owner.LeftFGLeg then
301+
table.insert(Origin, Vector(Owner.LeftFGLeg.Pos.X, Owner.LeftFGLeg.Pos.Y) + Vector(0, 4));
302302
end
303-
if Owner.BGFoot then
304-
table.insert(Origin, Vector(Owner.BGFoot.Pos.X, Owner.BGFoot.Pos.Y) + Vector(0, 4));
303+
if Owner.RightFGLeg then
304+
table.insert(Origin, Vector(Owner.RightFGLeg.Pos.X, Owner.RightFGLeg.Pos.Y) + Vector(0, 4));
305+
end
306+
if Owner.LeftBGLeg then
307+
table.insert(Origin, Vector(Owner.LeftBGLeg.Pos.X, Owner.LeftBGLeg.Pos.Y) + Vector(0, 4));
308+
end
309+
if Owner.RightBGLeg then
310+
table.insert(Origin, Vector(Owner.RightBGLeg.Pos.X, Owner.RightBGLeg.Pos.Y) + Vector(0, 4));
305311
end
306312
if #Origin == 0 then
307313
table.insert(Origin, Vector(Owner.Pos.X, Owner.Pos.Y) + Vector(0, 4 + ToMOSprite(Owner):GetSpriteHeight() + Owner.SpriteOffset.Y));
308314
end
309315
for i = 1, #Origin do
310316
if SceneMan:GetTerrMatter(Origin[i].X, Origin[i].Y) ~= rte.airID then
311-
self.groundContact = 3;
317+
self.groundContact = 5;
312318
break;
313319
else
314320
self.groundContact = self.groundContact - 1;
315321
end
316322
end
317323

318324
local newFlying = false;
319-
if not (Owner.FGLeg and Owner.BGLeg) then
325+
if not (Owner.LeftFGLeg and Owner.RightFGLeg and Owner.LeftBGLeg and Owner.RightBGLeg) then
320326
newFlying = true;
321327
end
322328

0 commit comments

Comments
 (0)