summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-09 01:51:40 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-09 01:51:40 +0200
commitd686f587ccf69e533bf95b8fa4e18db82d710890 (patch)
tree48b4429d0e167a0ff75cce8b63f5024b396408bb /src/core
parentFix corona scaling (diff)
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-d686f587ccf69e533bf95b8fa4e18db82d710890.tar
re3-d686f587ccf69e533bf95b8fa4e18db82d710890.tar.gz
re3-d686f587ccf69e533bf95b8fa4e18db82d710890.tar.bz2
re3-d686f587ccf69e533bf95b8fa4e18db82d710890.tar.lz
re3-d686f587ccf69e533bf95b8fa4e18db82d710890.tar.xz
re3-d686f587ccf69e533bf95b8fa4e18db82d710890.tar.zst
re3-d686f587ccf69e533bf95b8fa4e18db82d710890.zip
Diffstat (limited to '')
-rw-r--r--src/core/Streaming.cpp23
-rw-r--r--src/core/config.h3
2 files changed, 18 insertions, 8 deletions
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index 5aa419b1..f24192ef 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -1493,12 +1493,14 @@ CStreaming::GetCdImageOffset(int32 lastPosn)
}
inline bool
-TxdAvailable(int32 txdId)
+ModelNotLoaded(int32 modelId)
{
- CStreamingInfo *si = &CStreaming::ms_aInfoForModel[txdId + STREAM_OFFSET_TXD];
- return si->m_loadState == STREAMSTATE_LOADED || si->m_loadState == STREAMSTATE_READING;
+ CStreamingInfo *si = &CStreaming::ms_aInfoForModel[modelId];
+ return si->m_loadState != STREAMSTATE_LOADED && si->m_loadState != STREAMSTATE_READING;
}
+inline bool TxdNotLoaded(int32 txdId) { return ModelNotLoaded(txdId + STREAM_OFFSET_TXD); }
+
// Find stream id of next requested file in cdimage
int32
CStreaming::GetNextFileOnCd(int32 lastPosn, bool priority)
@@ -1523,10 +1525,15 @@ CStreaming::GetNextFileOnCd(int32 lastPosn, bool priority)
continue;
// request Txd if necessary
- if(streamId < STREAM_OFFSET_TXD &&
- !TxdAvailable(CModelInfo::GetModelInfo(streamId)->GetTxdSlot())){
- ReRequestTxd(CModelInfo::GetModelInfo(streamId)->GetTxdSlot());
- }else if(ms_aInfoForModel[streamId].GetCdPosnAndSize(posn, size)){
+ if(streamId < STREAM_OFFSET_TXD){
+ int txdId = CModelInfo::GetModelInfo(streamId)->GetTxdSlot();
+ if(TxdNotLoaded(txdId)){
+ ReRequestTxd(txdId);
+ continue;
+ }
+ }
+
+ if(ms_aInfoForModel[streamId].GetCdPosnAndSize(posn, size)){
if(posn < posnFirst){
// find first requested file in image
streamIdFirst = streamId;
@@ -1624,7 +1631,7 @@ CStreaming::RequestModelStream(int32 ch)
if(streamId < STREAM_OFFSET_TXD){
if (havePed && CModelInfo::GetModelInfo(streamId)->GetModelType() == MITYPE_PED ||
haveBigFile && CModelInfo::GetModelInfo(streamId)->GetModelType() == MITYPE_VEHICLE ||
- !TxdAvailable(CModelInfo::GetModelInfo(streamId)->GetTxdSlot()))
+ TxdNotLoaded(CModelInfo::GetModelInfo(streamId)->GetTxdSlot()))
break;
}else{
if(haveBigFile && size > 200)
diff --git a/src/core/config.h b/src/core/config.h
index 7c1fab5b..79d9ab86 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -38,6 +38,9 @@ enum Config {
NUMAUDIOSCRIPTOBJECTS = 256,
NUMCUTSCENEOBJECTS = 50,
+ NUMANIMBLOCKS = 2,
+ NUMANIMATIONS = 250,
+
NUMTEMPOBJECTS = 30,
// Path data