LuaAPI: fix some landflag issues
authorWuzzy
Tue, 17 Apr 2018 01:13:43 +0100
changeset 1302 3083c0d7e422
parent 1301 d4d6bc1dc1de
child 1303 3a0bedfe5c75
LuaAPI: fix some landflag issues
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 @@
 <code language="lua">SetGearCollisionMask(gear, 0xFFFF)
 -- Collide with everything</code>
 
-<code language="lua">SetGearCollisionMask(gear, bor(bor(lfHHMask, lfCurrentHog), lfAllObjMask))
+<code language="lua">SetGearCollisionMask(gear, lfAllObjMask)
 -- Collide with hedgehogs and objects</code>
 
 <code language="lua">SetGearCollisionMask(gear, 0x0000)