mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 10:22:52 +01:00
Fix root frame index bug
This commit is contained in:
parent
55742a4e11
commit
e060b6d0b1
@ -26,14 +26,14 @@ Model* LoaderDFF::loadFromMemory(char *data, GameData *gameData)
|
||||
model->frames.reserve(list.numframes);
|
||||
|
||||
for(size_t f = 0; f < list.numframes; ++f) {
|
||||
RW::BSFrameListFrame& rawframe = sec.readSubStructure<RW::BSFrameListFrame>(fdataI);
|
||||
RW::BSFrameListFrame& rawframe = sec.readSubStructure<RW::BSFrameListFrame>(fdataI);
|
||||
fdataI += sizeof(RW::BSFrameListFrame);
|
||||
ModelFrame* parent = nullptr;
|
||||
if(rawframe.index != -1) {
|
||||
parent = model->frames[rawframe.index];
|
||||
}
|
||||
else {
|
||||
model->rootFrameIdx = 0;
|
||||
model->rootFrameIdx = f;
|
||||
}
|
||||
model->frames.push_back(
|
||||
new ModelFrame(parent, rawframe.rotation, rawframe.position)
|
||||
|
Loading…
Reference in New Issue
Block a user