# HG changeset patch
# User Wuzzy
# Date 1523924023 -3600
# Node ID 3083c0d7e4221dd8c663e36da400229fcd6fd309
# Parent d4d6bc1dc1dea75ed995583f09d0aeede2a1623b
LuaAPI: fix some landflag issues
diff -r d4d6bc1dc1de -r 3083c0d7e422 LuaAPI.wiki
--- a/LuaAPI.wiki Tue Apr 17 00:59:52 2018 +0100
+++ b/LuaAPI.wiki Tue Apr 17 01:13:43 2018 +0100
@@ -776,14 +776,14 @@
Set the collision mask of the given gear with `gearUid`.
The collision mask defines with which gears and terrain types the gear can collide.
-`mask` is a number between `0x0000` and `0xFFFF` and used as a bitfield, which means you can combine these flags with `bor`. These are the available flags (excerpt):
+`mask` is a number between `0x0000` and `0xFFFF` and used as a bitfield, which means you can combine these flags with `bor`. These are the available flags:
-|| *Idntifier* || *Collision with …* ||
-|| `lfLandMask` || Terrain ||
-|| `lfCurrentHog` || Current hedgehog and crates ||
-|| `lfHHMask` || Hedgehogs except current hedgehog ||
-|| `lfNotHHObjMask` || `not lfNotHHObjMask` ||
-|| `lfAllObjMask` || Mines and explosives ||
+|| *Identifier* || *Value* || *Collision with …* ||
+|| `lfLandMask` || || Terrain ||
+|| `lfCurrentHog` || || Current hedgehog and crates ||
+|| `lfHHMask` || || Any hedgehogs ||
+|| `lfNotHHObjMask` || || Objects, not hogs (e.g. mines, explosives) ||
+|| `lfAllObjMask` || || Hedgehogs and objects ||
Beware, the collision mask is often set by the engine as well.
@@ -794,7 +794,7 @@
SetGearCollisionMask(gear, 0xFFFF)
-- Collide with everything
-SetGearCollisionMask(gear, bor(bor(lfHHMask, lfCurrentHog), lfAllObjMask))
+SetGearCollisionMask(gear, lfAllObjMask)
-- Collide with hedgehogs and objects
SetGearCollisionMask(gear, 0x0000)