summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-11 01:04:56 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-11 01:04:56 +0200
commitc8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33 (patch)
tree24985c610beec3d1e4ac1804851467b40d8ccb02 /src/core
parentRecord (diff)
parentfixing r* visioned leak (diff)
downloadre3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar
re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.gz
re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.bz2
re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.lz
re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.xz
re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.zst
re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/RwTexRead.cpp10
-rw-r--r--src/core/main.cpp7
-rw-r--r--src/core/re3.cpp3
3 files changed, 14 insertions, 6 deletions
diff --git a/src/core/RwTexRead.cpp b/src/core/RwTexRead.cpp
index ef1ac197..49b245dd 100644
--- a/src/core/RwTexRead.cpp
+++ b/src/core/RwTexRead.cpp
@@ -260,11 +260,13 @@ CreateTxdImageForVideoCard()
RwStream *img = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMWRITE, "models\\txd.img");
if (img == nil) {
- if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP) {
+ // original code does otherwise and it leaks
+ delete []buf;
+ delete pDir;
+
+ if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP)
DealWithTxdWriteError(0, TXDSTORESIZE, "CVT_CRT");
- delete []buf;
- delete pDir;
- }
+
return false;
}
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 93e4c71c..f09c2e0a 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1,8 +1,7 @@
#include "common.h"
#include "rpmatfx.h"
-#include "rpskin.h"
#include "rphanim.h"
-#include "rtbmp.h"
+#include "rpskin.h"
#include "patcher.h"
#include "main.h"
#include "CdStream.h"
@@ -54,6 +53,7 @@
#include "Frontend.h"
#include "AnimViewer.h"
#include "Script.h"
+#include "PathFind.h"
#include "Debug.h"
#include "Console.h"
#include "timebars.h"
@@ -788,8 +788,11 @@ void
RenderDebugShit(void)
{
CTheScripts::RenderTheScriptDebugLines();
+#ifndef FINAL
if(gbShowCollisionLines)
CRenderer::RenderCollisionLines();
+ ThePaths.DisplayPathData();
+#endif
}
void
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 6eae8685..11b1584a 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -350,6 +350,9 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Debug", "Catalina Fly Away", CHeli::MakeCatalinaHeliFlyAway);
DebugMenuAddVarBool8("Debug", "Script Heli On", (int8*)0x95CD43, nil);
+ DebugMenuAddVarBool8("Debug", "Show Ped Paths", (int8*)&gbShowPedPaths, nil);
+ DebugMenuAddVarBool8("Debug", "Show Car Paths", (int8*)&gbShowCarPaths, nil);
+ DebugMenuAddVarBool8("Debug", "Show Car Path Links", (int8*)&gbShowCarPathsLinks, nil);
DebugMenuAddVarBool8("Debug", "Show Ped Road Groups", (int8*)&gbShowPedRoadGroups, nil);
DebugMenuAddVarBool8("Debug", "Show Car Road Groups", (int8*)&gbShowCarRoadGroups, nil);
DebugMenuAddVarBool8("Debug", "Show Collision Lines", (int8*)&gbShowCollisionLines, nil);