Skip to content

Commit

Permalink
hub: fix beach barrier collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
aduermael authored and gdevillele committed Jan 12, 2024
1 parent 54390e8 commit 9b3efd4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/modules/cubzh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,15 @@ Client.OnWorldObjectLoad = function(obj)
hierarchyactions:applyToDescendants(obj, { includeRoot = true }, function(o)
o.Physics = PhysicsMode.Static
end)
elseif string.find(obj.fullname, "beach_barrier") then
hierarchyactions:applyToDescendants(obj, { includeRoot = true }, function(o)
o.Physics = PhysicsMode.Static
end)
-- fix beach barries alignments (for better collisions)
obj.CollisionBox.Max = Number3(obj.CollisionBox.Max.X, 14, obj.CollisionBox.Max.Z)
obj.Position.X = math.floor(obj.Position.X * 10) / 10
obj.Position.Y = math.floor(obj.Position.Y + 0.5)
obj.Position.Z = math.floor(obj.Position.Z * 10) / 10
end
end
end
Expand Down

0 comments on commit 9b3efd4

Please sign in to comment.