From 90da4bf704ecf3d25e432c1c5005f182534931b0 Mon Sep 17 00:00:00 2001 From: tmj-fstate Date: Thu, 14 Nov 2019 15:54:08 +0100 Subject: [PATCH] cablight parameter support --- DynObj.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/DynObj.cpp b/DynObj.cpp index 24f9ed26..3dcc55b3 100644 --- a/DynObj.cpp +++ b/DynObj.cpp @@ -5697,6 +5697,17 @@ void TDynamicObject::LoadMMediaFile( std::string const &TypeName, std::string co parser >> JointCabs; } + else if( token == "cablight:" ) { + parser.getTokens( 3, false ); // low power light, ignore + parser.getTokens( 3, false ); // base light + parser + >> InteriorLight.r + >> InteriorLight.g + >> InteriorLight.b; + InteriorLight = glm::clamp( InteriorLight / 255.f, glm::vec3( 0.f ), glm::vec3( 1.f ) ); + parser.getTokens( 3, false ); // dimmed light, ignore + } + else if( token == "pydestinationsign:" ) { DestinationSign.deserialize( parser ); // supply vehicle folder as script path if none is provided