@@ -189,9 +189,9 @@ void CLuaVehicleDefs::AddClass ( lua_State* luaVM )
189
189
lua_classfunction ( luaVM, " getSirenParams" , " getVehicleSirenParams" );
190
190
lua_classfunction ( luaVM, " getSirens" , " getVehicleSirens" );
191
191
lua_classfunction ( luaVM, " getSirensOn" , " getVehicleSirensOn" );
192
- lua_classfunction ( luaVM, " getComponentPosition" , OOP_GetVehicleComponentPosition );
192
+ lua_classfunction ( luaVM, " getComponentPosition" , " getVehicleComponentPosition " );
193
193
lua_classfunction ( luaVM, " getComponentVisible" , " getVehicleComponentVisible" );
194
- lua_classfunction ( luaVM, " getComponentRotation" , OOP_GetVehicleComponentRotation );
194
+ lua_classfunction ( luaVM, " getComponentRotation" , " getVehicleComponentRotation " );
195
195
lua_classfunction ( luaVM, " getUpgrades" , " getVehicleUpgrades" );
196
196
lua_classfunction ( luaVM, " getUpgradeSlotName" , " getVehicleUpgradeSlotName" );
197
197
lua_classfunction ( luaVM, " getCompatibleUpgrades" , " getVehicleCompatibleUpgrades" );
@@ -3040,6 +3040,7 @@ int CLuaVehicleDefs::SetVehicleComponentPosition ( lua_State* luaVM )
3040
3040
return 1 ;
3041
3041
}
3042
3042
3043
+
3043
3044
int CLuaVehicleDefs::GetVehicleComponentPosition ( lua_State* luaVM )
3044
3045
{
3045
3046
// float, float, float getVehicleComponentPosition ( vehicle theVehicle, string theComponent [, string base = "root"] )
@@ -3070,34 +3071,6 @@ int CLuaVehicleDefs::GetVehicleComponentPosition ( lua_State* luaVM )
3070
3071
return 1 ;
3071
3072
}
3072
3073
3073
- int CLuaVehicleDefs::OOP_GetVehicleComponentPosition ( lua_State* luaVM )
3074
- {
3075
- // float, float, float getVehicleComponentPosition ( vehicle theVehicle, string theComponent [, string base = "root"] )
3076
- SString strComponent;
3077
- CClientVehicle * pVehicle = NULL ;
3078
- EComponentBaseType outputBase;
3079
-
3080
- CScriptArgReader argStream ( luaVM );
3081
- argStream.ReadUserData ( pVehicle );
3082
- argStream.ReadString ( strComponent );
3083
- argStream.ReadEnumString ( outputBase, EComponentBase::ROOT );
3084
-
3085
- if ( !argStream.HasErrors () )
3086
- {
3087
- CVector vecPosition;
3088
- if ( pVehicle->GetComponentPosition ( strComponent, vecPosition, outputBase ) )
3089
- {
3090
- lua_pushvector ( luaVM, vecPosition );
3091
- return 1 ;
3092
- }
3093
- }
3094
- else
3095
- m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
3096
-
3097
- lua_pushboolean ( luaVM, false );
3098
- return 1 ;
3099
- }
3100
-
3101
3074
int CLuaVehicleDefs::SetVehicleComponentRotation ( lua_State* luaVM )
3102
3075
{
3103
3076
// bool setVehicleComponentRotation ( vehicle theVehicle, string theComponent, float rotX, float rotY, float rotZ [, string base = "parent"] )
@@ -3159,36 +3132,6 @@ int CLuaVehicleDefs::GetVehicleComponentRotation ( lua_State* luaVM )
3159
3132
return 1 ;
3160
3133
}
3161
3134
3162
- int CLuaVehicleDefs::OOP_GetVehicleComponentRotation ( lua_State* luaVM )
3163
- {
3164
- // float, float, float getVehicleComponentRotation ( vehicle theVehicle, string theComponent [, string base = "parent"] )
3165
- SString strComponent;
3166
- CClientVehicle * pVehicle = NULL ;
3167
- EComponentBaseType outputBase;
3168
-
3169
- CScriptArgReader argStream ( luaVM );
3170
- argStream.ReadUserData ( pVehicle );
3171
- argStream.ReadString ( strComponent );
3172
- argStream.ReadEnumString ( outputBase, EComponentBase::PARENT );
3173
-
3174
- if ( !argStream.HasErrors () )
3175
- {
3176
- CVector vecRotation;
3177
- if ( pVehicle->GetComponentRotation ( strComponent, vecRotation, outputBase ) )
3178
- {
3179
- // Script uses degrees
3180
- ConvertRadiansToDegrees ( vecRotation );
3181
- lua_pushvector ( luaVM, vecRotation );
3182
- return 1 ;
3183
- }
3184
- }
3185
- else
3186
- m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
3187
-
3188
- lua_pushboolean ( luaVM, false );
3189
- return 1 ;
3190
- }
3191
-
3192
3135
int CLuaVehicleDefs::ResetVehicleComponentPosition ( lua_State* luaVM )
3193
3136
{
3194
3137
CScriptArgReader argStream ( luaVM );
0 commit comments