diff --git a/saco/game/scripting.h b/saco/game/scripting.h index 94dddc7..5148d67 100644 --- a/saco/game/scripting.h +++ b/saco/game/scripting.h @@ -87,6 +87,7 @@ const SCRIPT_COMMAND text_clear_all = { 0x00be, "" }; const SCRIPT_COMMAND create_pickup_with_ammo = { 0x032b, "iiifffv" }; +const SCRIPT_COMMAND link_vehicle_to_interior = { 0x0840, "ii" }; const SCRIPT_COMMAND create_radar_marker_icon = { 0x0570, "fffiv" }; const SCRIPT_COMMAND remove_panel = { 0x08DA, "i" }; diff --git a/saco/game/vehicle.cpp b/saco/game/vehicle.cpp index 7bc5ae3..388ab0a 100644 --- a/saco/game/vehicle.cpp +++ b/saco/game/vehicle.cpp @@ -1,5 +1,6 @@ #include "../main.h" +#include "util.h" //----------------------------------------------------------- // CONSTRUCTOR @@ -8,8 +9,16 @@ CVehicle::CVehicle(int iType, float fPosX, float fPosY, float fPosZ, float fRotation, BOOL bKeepModelLoaded, int a8) { - // TODO: CVehicle::CVehicle + // TODO: CVehicle::CVehicle .text:100B88F0 } //----------------------------------------------------------- +void CVehicle::LinkToInterior(int iInterior) +{ + if(GamePool_Vehicle_GetAt(m_dwGTAId)) { + ScriptCommand(&link_vehicle_to_interior, m_dwGTAId, iInterior); + } +} + +//----------------------------------------------------------- diff --git a/saco/game/vehicle.h b/saco/game/vehicle.h index d589b5e..0242c43 100644 --- a/saco/game/vehicle.h +++ b/saco/game/vehicle.h @@ -10,8 +10,12 @@ class CVehicle : public CEntity { public: + char _gap48[112]; + CVehicle( int iType, float fPosX, float fPosY, float fPosZ, float fRotation = 0.0f, BOOL bKeepModelLoaded = FALSE, int a8 = 0); + void LinkToInterior(int iInterior); + }; //-----------------------------------------------------------