Browse Source

More adjustments

Remove unneeded "safety" measures and set dynamic_blocker default value to True instead of False
pull/321/head
Patrick Dulebohn 3 years ago
parent
commit
5b49049194
  1. 7
      korman/exporter/physics.py
  2. 2
      korman/properties/modifiers/physics.py
  3. 1
      korman/ui/modifiers/physics.py

7
korman/exporter/physics.py

@ -165,7 +165,6 @@ class PhysicsConverter:
physical.friction = mod.friction
physical.restitution = mod.restitution
if not mod.dynamic_blocker:
if mod.dynamic:
if ver <= pvPots:
physical.collideGroup = (1 << plSimDefs.kGroupDynamic) | \
@ -174,7 +173,9 @@ class PhysicsConverter:
physical.mass = mod.mass
_set_phys_prop(plSimulationInterface.kStartInactive, simIface, physical,
value=mod.start_asleep)
elif not mod.avatar_blocker:
elif mod.dynamic_blocker and not mod.avatar_blocker:
physical.memberGroup = plSimDefs.kDynamicBlocker
elif not mod.avatar_blocker and not mod.dynamic_blocker:
physical.memberGroup = plSimDefs.kGroupLOSOnly
else:
physical.memberGroup = plSimDefs.kGroupStatic
@ -185,8 +186,6 @@ class PhysicsConverter:
_set_phys_prop(plSimulationInterface.kCameraAvoidObject, simIface, physical)
if mod.terrain:
physical.LOSDBs |= plSimDefs.kLOSDBAvatarWalkable
else:
physical.memberGroup = plSimDefs.kDynamicBlocker
# Hacky? We'd like to share the simple surface descriptors(TM) as much as possible...
# This could result in a few orphaned PhysicalSndGroups, but I think that's preferable

2
korman/properties/modifiers/physics.py

@ -82,7 +82,7 @@ class PlasmaCollider(PlasmaModifierProperties):
default=True)
dynamic_blocker = BoolProperty(name="Blocks Dynamics",
description="Object blocks dynamic objects (kickables)",
default=False)
default=True)
friction = FloatProperty(name="Friction",
min=0.0,

1
korman/ui/modifiers/physics.py

@ -21,7 +21,6 @@ def collision(modifier, layout, context):
split = layout.split()
col = split.column()
col.prop(modifier, "dynamic_blocker")
col.active != modifier.dynamic_blocker)
col.prop(modifier, "avatar_blocker")
col.prop(modifier, "camera_blocker")
col.prop(modifier, "terrain")

Loading…
Cancel
Save