summaryrefslogtreecommitdiffstats
path: root/src/core/Streaming.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-08 13:51:50 +0100
committeraap <aap@papnet.eu>2021-01-08 13:51:50 +0100
commit223b49e3be40afa963a31e43f348d2e859c2e543 (patch)
tree73eeb0739a2a7b3c0401f5032cf055432e6fe8a2 /src/core/Streaming.cpp
parentunused var (diff)
downloadre3-223b49e3be40afa963a31e43f348d2e859c2e543.tar
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.gz
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.bz2
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.lz
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.xz
re3-223b49e3be40afa963a31e43f348d2e859c2e543.tar.zst
re3-223b49e3be40afa963a31e43f348d2e859c2e543.zip
Diffstat (limited to 'src/core/Streaming.cpp')
-rw-r--r--src/core/Streaming.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index 03b49fd6..dae7fadb 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -509,10 +509,18 @@ CStreaming::ConvertBufferToObject(int8 *buf, int32 streamId)
mi = CModelInfo::GetModelInfo(streamId);
// Txd has to be loaded
+#ifdef FIX_BUGS
+ if(!HasTxdLoaded(mi->GetTxdSlot())){
+#else
+ // texDict will exist even if only first part has loaded
if(CTxdStore::GetSlot(mi->GetTxdSlot())->texDict == nil){
+#endif
debug("failed to load %s because TXD %s is not in memory\n", mi->GetName(), CTxdStore::GetTxdName(mi->GetTxdSlot()));
RemoveModel(streamId);
+#ifndef FIX_BUGS
+ // if we're just waiting for it to load, don't remove this
RemoveTxd(mi->GetTxdSlot());
+#endif
ReRequestModel(streamId);
RwStreamClose(stream, &mem);
return false;