@@ -41,8 +41,12 @@ void CLuaObjectDefs::LoadFunctions()
4141 {" setObjectProperty" , SetObjectProperty},
4242
4343 // Object util functions
44- {" getObjectLowLODOfModel" , ArgumentParser<GetObjectLowLODOfModel>},
45- {" getObjectHighLODOfModel" , ArgumentParser<GetObjectHighLODOfModel>},
44+ {" getObjectLowLODModel" , ArgumentParser<GetObjectLowLODModel>},
45+ {" getObjectHighLODModel" , ArgumentParser<GetObjectHighLODModel>},
46+ {" setObjectCustomLowLODModel" , ArgumentParser<SetObjectCustomLowLODModel>},
47+ {" getObjectCustomLowLODModel" , ArgumentParser<GetObjectCustomLowLODModel>},
48+ {" resetObjectCustomLowLODModel" , ArgumentParser<ResetObjectCustomLowLODModel>},
49+ {" resetAllObjectCustomLowLODModels" , ArgumentParser<ResetAllObjectCustomLowLODModels>},
4650 };
4751
4852 // Add functions
@@ -727,18 +731,41 @@ bool CLuaObjectDefs::IsObjectRespawnable(CClientEntity* const pEntity) noexcept
727731 return pObject->IsRespawnEnabled ();
728732}
729733
730- std::variant<bool , std::uint32_t > CLuaObjectDefs::GetObjectLowLODOfModel (std::uint32_t objectModel ) noexcept
734+ std::variant<bool , std::uint32_t > CLuaObjectDefs::GetObjectLowLODModel (std::uint32_t hLODModel ) noexcept
731735{
732- std::uint32_t lodModel = CLodModels::GetObjectLowLODOfModel (objectModel );
736+ std::uint32_t lodModel = CLodModels::GetObjectLowLODModel (hLODModel );
733737 if (lodModel == 0 ) // LLOD Model not found for HLOD Model provided
734738 return false ;
735739 return lodModel;
736740}
737741
738- std::variant<bool , std::uint32_t > CLuaObjectDefs::GetObjectHighLODOfModel (std::uint32_t objectModel ) noexcept
742+ std::variant<bool , std::uint32_t > CLuaObjectDefs::GetObjectHighLODModel (std::uint32_t lLODModel ) noexcept
739743{
740- std::uint32_t objModel = CLodModels::GetObjectHighLODOfModel (objectModel );
744+ std::uint32_t objModel = CLodModels::GetObjectHighLODModel (lLODModel );
741745 if (objModel == 0 ) // HLOD Model not found for LLOD Model provided
742746 return false ;
743747 return objModel;
744748}
749+
750+ void CLuaObjectDefs::SetObjectCustomLowLODModel (std::uint32_t hLODModel, std::uint32_t lLODModel) noexcept
751+ {
752+ CLodModels::SetObjectCustomLowLODModel (hLODModel, lLODModel);
753+ }
754+
755+ std::variant<bool , std::uint32_t > CLuaObjectDefs::GetObjectCustomLowLODModel (std::uint32_t hLODModel) noexcept
756+ {
757+ std::uint32_t lLODModel = CLodModels::GetObjectCustomLowLODModel (hLODModel);
758+ if (lLODModel == 0 ) // Custom LLOD Model not found for HLOD Model provided
759+ return false ;
760+ return lLODModel;
761+ }
762+
763+ void CLuaObjectDefs::ResetObjectCustomLowLODModel (std::uint32_t hLODModel) noexcept
764+ {
765+ CLodModels::ResetObjectCustomLowLODModel (hLODModel);
766+ }
767+
768+ void CLuaObjectDefs::ResetAllObjectCustomLowLODModels () noexcept
769+ {
770+ CLodModels::ResetAllObjectCustomLowLODModels ();
771+ }
0 commit comments