From 18b7c71707099e3e0fd9062ce1a5a825a163ae2a Mon Sep 17 00:00:00 2001 From: Spencer Brown Date: Fri, 6 Dec 2024 16:09:47 +1000 Subject: [PATCH] Fix saving the PHYSCOLLIDE BSP lump. --- docs/source/changelog.rst | 1 + src/srctools/bsp.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index e44709f5..b9693134 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -18,6 +18,7 @@ Version (dev) * Fix silent buttons trying to pack invalid `Buttons.snd0` soundscripts. * Handle entities being added/removed during iteration of :py:meth:`VMF.search() `. * Share common strings in the engine database to save some space. +* Fix saving the `PHYSCOLLIDE` BSP lump. ------------- Version 2.4.1 diff --git a/src/srctools/bsp.py b/src/srctools/bsp.py index 8d00ec3c..fcb08a12 100644 --- a/src/srctools/bsp.py +++ b/src/srctools/bsp.py @@ -2667,7 +2667,7 @@ def _lmp_write_bmodels(self, bmodels: 'WeakKeyDictionary[Entity, BModel]') -> It add_faces(model.faces), len(model.faces), ) if model.phys_keyvalues is not None: - kvs = '\n'.join(model.phys_keyvalues.serialise()).encode('ascii') + b'\x00' + kvs = model.phys_keyvalues.serialise().encode('ascii') + b'\x00' else: kvs = b'\x00' if not model._phys_solids: