From d15b4ad7ef5c0bd199bdcc0fd4a2a43e3421705b Mon Sep 17 00:00:00 2001 From: Gargaj Date: Wed, 24 Aug 2022 21:24:09 +0200 Subject: [PATCH] add missing light data to assbin import/export --- code/AssetLib/Assbin/AssbinFileWriter.cpp | 4 ++++ code/AssetLib/Assbin/AssbinLoader.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/code/AssetLib/Assbin/AssbinFileWriter.cpp b/code/AssetLib/Assbin/AssbinFileWriter.cpp index d1388cde6..97be634de 100644 --- a/code/AssetLib/Assbin/AssbinFileWriter.cpp +++ b/code/AssetLib/Assbin/AssbinFileWriter.cpp @@ -642,6 +642,10 @@ protected: Write(&chunk, l->mName); Write(&chunk, l->mType); + Write(&chunk, l->mPosition); + Write(&chunk, l->mDirection); + Write(&chunk, l->mUp); + if (l->mType != aiLightSource_DIRECTIONAL) { Write(&chunk, l->mAttenuationConstant); Write(&chunk, l->mAttenuationLinear); diff --git a/code/AssetLib/Assbin/AssbinLoader.cpp b/code/AssetLib/Assbin/AssbinLoader.cpp index 060ce4377..f7b35636c 100644 --- a/code/AssetLib/Assbin/AssbinLoader.cpp +++ b/code/AssetLib/Assbin/AssbinLoader.cpp @@ -556,6 +556,10 @@ void AssbinImporter::ReadBinaryLight(IOStream *stream, aiLight *l) { l->mName = Read(stream); l->mType = (aiLightSourceType)Read(stream); + l->mPosition = Read(stream); + l->mDirection = Read(stream); + l->mUp = Read(stream); + if (l->mType != aiLightSource_DIRECTIONAL) { l->mAttenuationConstant = Read(stream); l->mAttenuationLinear = Read(stream);