summaryrefslogtreecommitdiffstats
path: root/src/render/WaterLevel.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-24 20:00:08 +0200
committerGitHub <noreply@github.com>2019-07-24 20:00:08 +0200
commit81ee1c509a8d05189901dd59c268bf47a6188eb8 (patch)
treed836f70678f2ce7b5d86a6745f34b45232ff71d0 /src/render/WaterLevel.cpp
parentupdate (diff)
parentMerge branch 'master' into master (diff)
downloadre3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.gz
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.bz2
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.lz
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.xz
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.zst
re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.zip
Diffstat (limited to 'src/render/WaterLevel.cpp')
-rw-r--r--src/render/WaterLevel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp
index 07c88d3e..247b9f3d 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/render/WaterLevel.cpp
@@ -1,4 +1,5 @@
#include "common.h"
+#include "main.h"
#include "FileMgr.h"
#include "TxdStore.h"
#include "Timer.h"
@@ -172,9 +173,8 @@ CWaterLevel::CreateWavyAtomic()
{
wavyMorphTarget = RpGeometryGetMorphTarget(wavyGeometry, 0);
- wavyVert = RpMorphTargetGetVertices(wavyMorphTarget);
-
ASSERT(wavyMorphTarget != NULL);
+ wavyVert = RpMorphTargetGetVertices(wavyMorphTarget);
ASSERT(wavyVert != NULL);
for ( int32 i = 0; i < 9; i++ )
@@ -1148,10 +1148,10 @@ CWaterLevel::AllocateBoatWakeArray()
ASSERT(ms_pWavyAtomic != NULL );
RpGeometry *wavyGeometry = RpAtomicGetGeometry(ms_pWavyAtomic);
+ ASSERT(wavyGeometry != NULL );
RpMorphTarget *wavyMorphTarget = RpGeometryGetMorphTarget(wavyGeometry, 0);
RpMaterial *wavyMaterial = RpGeometryGetMaterial(wavyGeometry, 0);
- ASSERT(wavyGeometry != NULL );
ASSERT(wavyMorphTarget != NULL );
ASSERT(wavyMaterial != NULL );
@@ -1240,7 +1240,7 @@ STARTPATCHES
InjectHook(0x554FE0, &CWaterLevel::Shutdown, PATCH_JUMP);
InjectHook(0x555010, &CWaterLevel::CreateWavyAtomic, PATCH_JUMP);
InjectHook(0x5552A0, &CWaterLevel::DestroyWavyAtomic, PATCH_JUMP);
- InjectHook(0x5552C0, &CWaterLevel::GetWaterLevel, PATCH_JUMP);
+ InjectHook(0x5552C0, (bool (*)(float,float,float,float*,bool))&CWaterLevel::GetWaterLevel, PATCH_JUMP);
InjectHook(0x555440, &CWaterLevel::GetWaterLevelNoWaves, PATCH_JUMP);
InjectHook(0x5554E0, &CWaterLevel::RenderWater, PATCH_JUMP);
InjectHook(0x556C30, &CWaterLevel::RenderOneFlatSmallWaterPoly, PATCH_JUMP);