From 46918d54b899871f02fc1ee952585c19f0100fa2 Mon Sep 17 00:00:00 2001 From: nokizorque Date: Wed, 9 Dec 2015 22:25:25 +1000 Subject: [PATCH] Added missing OOP definitions --- MTA10/mods/shared_logic/lua/CLuaMain.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MTA10/mods/shared_logic/lua/CLuaMain.cpp b/MTA10/mods/shared_logic/lua/CLuaMain.cpp index dcf01fdcad..99aef802f7 100644 --- a/MTA10/mods/shared_logic/lua/CLuaMain.cpp +++ b/MTA10/mods/shared_logic/lua/CLuaMain.cpp @@ -281,6 +281,8 @@ void CLuaMain::AddVehicleClass ( lua_State* luaVM ) lua_classfunction ( luaVM, "getTrack", "getTrainTrack" ); lua_classfunction ( luaVM, "getTrainPosition", "getTrainPosition" ); lua_classfunction ( luaVM, "getName", "getVehicleName" ); + lua_classfunction ( luaVM, "getModelFromName", "getVehicleModelFromName" ); + lua_classfunction ( luaVM, "getNameFromModel", "getVehicleNameFromModel" ); lua_classfunction ( luaVM, "getVehicleType", "getVehicleType" ); lua_classfunction ( luaVM, "getMaxPassengers", "getVehicleMaxPassengers" ); lua_classfunction ( luaVM, "getGear", "getVehicleCurrentGear" ); @@ -2012,8 +2014,8 @@ bool CLuaMain::LoadScriptFromBuffer ( const char* cpInBuffer, unsigned int uiInS g_pClientGame->TellServerSomethingImportant( 1003, SStringX( "CLIENT SCRIPT ERROR: " ) + strMessage, false ); return false; } - - bool bUTF8 = CLuaShared::CheckUTF8BOMAndUpdate ( &cpBuffer, &uiSize ); + + bool bUTF8 = CLuaShared::CheckUTF8BOMAndUpdate ( &cpBuffer, &uiSize ); // If compiled script, make sure correct chunkname is embedded CLuaShared::EmbedChunkName( strNiceFilename, &cpBuffer, &uiSize );