From 291aad1a982d62f8fbea00a1029cdfe5d97e3de4 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 29 Dec 2017 18:03:56 -0500 Subject: [PATCH] Fix swim detector physics flags for PotS --- korman/properties/modifiers/water.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/korman/properties/modifiers/water.py b/korman/properties/modifiers/water.py index 78e250d..5271d7c 100644 --- a/korman/properties/modifiers/water.py +++ b/korman/properties/modifiers/water.py @@ -120,6 +120,8 @@ class PlasmaSwimRegion(idprops.IDPropObjectMixin, PlasmaModifierProperties, bpy. except ExportAssertionError: raise ExportError("Swimming Surface '{}' must be flat".format(bo.name)) physical.LOSDBs |= plSimDefs.kLOSDBSwimRegion + if exporter.mgr.getVer() != pvMoul: + physical.memberGroup = plSimDefs.kGroupLOSOnly # Detector region bounds if self.region is not None: @@ -129,8 +131,11 @@ class PlasmaSwimRegion(idprops.IDPropObjectMixin, PlasmaModifierProperties, bpy. det_name = "{}_SwimDetector".format(self.region.name) bounds = self.region.plasma_modifiers.collision.bounds simIface, physical = exporter.physics.generate_physical(self.region, region_so, bounds, det_name) - physical.memberGroup = plSimDefs.kGroupDetector - physical.reportGroup |= 1 << plSimDefs.kGroupAvatar + if exporter.mgr.getVer() == pvMoul: + physical.memberGroup = plSimDefs.kGroupDetector + physical.reportGroup |= 1 << plSimDefs.kGroupAvatar + else: + physical.memberGroup = plSimDefs.kGroupLOSOnly # I am a little concerned if we already have a plSwimDetector... I am not certain how # well Plasma would tolerate having a plSwimMsg with multiple regions referenced.