summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.h1
-rw-r--r--src/core/ControllerConfig.h2
-rw-r--r--src/core/World.cpp5
3 files changed, 5 insertions, 3 deletions
diff --git a/src/core/Camera.h b/src/core/Camera.h
index 3e67903f..6b631ee2 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -515,6 +515,7 @@ int m_iModeObbeCamIsInForCar;
void dtor(void) { this->CCamera::~CCamera(); }
};
+static_assert(offsetof(CCamera, DistanceToWater) == 0xe4, "CCamera: error");
static_assert(offsetof(CCamera, m_WideScreenOn) == 0x70, "CCamera: error");
static_assert(offsetof(CCamera, WorldViewerBeingUsed) == 0x75, "CCamera: error");
static_assert(offsetof(CCamera, m_uiNumberOfTrainCamNodes) == 0x84, "CCamera: error");
diff --git a/src/core/ControllerConfig.h b/src/core/ControllerConfig.h
index e04f9583..458e457c 100644
--- a/src/core/ControllerConfig.h
+++ b/src/core/ControllerConfig.h
@@ -116,6 +116,8 @@ public:
#ifdef __DINPUT_INCLUDED__
DIJOYSTATE2 m_OldState;
DIJOYSTATE2 m_NewState;
+#else
+ uint8 ___padd[0x110 * 2];
#endif
wchar m_aActionNames[MAX_CONTROLLERACTIONS][ACTIONNAME_LENGTH];
bool m_aButtonStates[MAX_BUTTONS];
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 0b389e42..c914b647 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -864,10 +864,9 @@ CVehicle*
FindPlayerVehicle(void)
{
CPlayerPed *ped = FindPlayerPed();
- if(ped->InVehicle())
+ if(ped && ped->InVehicle())
return ped->m_pMyVehicle;
- else
- return nil;
+ return nil;
}
CVehicle*