@@ -205,6 +205,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
205205 lua_classfunction (luaVM, " getUpgradeSlotName" , " getVehicleUpgradeSlotName" );
206206 lua_classfunction (luaVM, " getCompatibleUpgrades" , " getVehicleCompatibleUpgrades" );
207207 lua_classfunction (luaVM, " getUpgradeOnSlot" , " getVehicleUpgradeOnSlot" );
208+ lua_classfunction (luaVM, " getModelExhaustFumesPosition" , OOP_GetVehicleModelExhaustFumesPosition);
208209
209210 lua_classfunction (luaVM, " setComponentVisible" , " setVehicleComponentVisible" );
210211 lua_classfunction (luaVM, " setSirensOn" , " setVehicleSirensOn" );
@@ -245,6 +246,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
245246 lua_classfunction (luaVM, " setColor" , " setVehicleColor" );
246247 lua_classfunction (luaVM, " setPlateText" , " setVehiclePlateText" );
247248 lua_classfunction (luaVM, " setGravity" , " setVehicleGravity" );
249+ lua_classfunction (luaVM, " setModelExhaustFumesPosition" , " setVehicleModelExhaustFumesPosition" );
248250
249251 lua_classfunction (luaVM, " resetComponentPosition" , " resetVehicleComponentPosition" );
250252 lua_classfunction (luaVM, " resetComponentRotation" , " resetVehicleComponentRotation" );
@@ -3800,3 +3802,28 @@ int CLuaVehicleDefs::GetVehicleModelExhaustFumesPosition(lua_State* luaVM)
38003802 lua_pushboolean (luaVM, false );
38013803 return 1 ;
38023804}
3805+
3806+ int CLuaVehicleDefs::OOP_GetVehicleModelExhaustFumesPosition (lua_State* luaVM)
3807+ {
3808+ // float, float, float getVehicleModelExhaustPosition ( int modelID )
3809+ unsigned short usModel;
3810+
3811+ CScriptArgReader argStream (luaVM);
3812+ argStream.ReadNumber (usModel);
3813+
3814+ if (!argStream.HasErrors ())
3815+ {
3816+ CVector vecPosition;
3817+
3818+ if (CStaticFunctionDefinitions::GetModelExhaustFumesPosition (usModel, vecPosition))
3819+ {
3820+ lua_pushvector (luaVM, vecPosition);
3821+ return 1 ;
3822+ }
3823+ }
3824+ else
3825+ m_pScriptDebugging->LogCustom (luaVM, argStream.GetFullErrorMessage ());
3826+
3827+ lua_pushboolean (luaVM, false );
3828+ return 1 ;
3829+ }
0 commit comments