@@ -205,6 +205,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
205
205
lua_classfunction (luaVM, " getUpgradeSlotName" , " getVehicleUpgradeSlotName" );
206
206
lua_classfunction (luaVM, " getCompatibleUpgrades" , " getVehicleCompatibleUpgrades" );
207
207
lua_classfunction (luaVM, " getUpgradeOnSlot" , " getVehicleUpgradeOnSlot" );
208
+ lua_classfunction (luaVM, " getModelExhaustFumesPosition" , OOP_GetVehicleModelExhaustFumesPosition);
208
209
209
210
lua_classfunction (luaVM, " setComponentVisible" , " setVehicleComponentVisible" );
210
211
lua_classfunction (luaVM, " setSirensOn" , " setVehicleSirensOn" );
@@ -245,6 +246,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM)
245
246
lua_classfunction (luaVM, " setColor" , " setVehicleColor" );
246
247
lua_classfunction (luaVM, " setPlateText" , " setVehiclePlateText" );
247
248
lua_classfunction (luaVM, " setGravity" , " setVehicleGravity" );
249
+ lua_classfunction (luaVM, " setModelExhaustFumesPosition" , " setVehicleModelExhaustFumesPosition" );
248
250
249
251
lua_classfunction (luaVM, " resetComponentPosition" , " resetVehicleComponentPosition" );
250
252
lua_classfunction (luaVM, " resetComponentRotation" , " resetVehicleComponentRotation" );
@@ -3800,3 +3802,28 @@ int CLuaVehicleDefs::GetVehicleModelExhaustFumesPosition(lua_State* luaVM)
3800
3802
lua_pushboolean (luaVM, false );
3801
3803
return 1 ;
3802
3804
}
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