1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 08:45:33 +00:00

Refactor NiMultiTargetTransformController

This commit is contained in:
Alexei Kotov 2023-09-13 23:43:24 +03:00
parent 208bfa9e21
commit 735a948452

View file

@ -305,17 +305,16 @@ namespace Nif
void NiMultiTargetTransformController::read(NIFStream* nif)
{
NiInterpController::read(nif);
size_t numTargets = nif->getUShort();
std::vector<NiAVObjectPtr> targets;
targets.resize(numTargets);
for (size_t i = 0; i < targets.size(); i++)
targets[i].read(nif);
mExtraTargets = targets;
mExtraTargets.resize(nif->get<uint16_t>());
for (NiAVObjectPtr& extraTarget : mExtraTargets)
extraTarget.read(nif);
}
void NiMultiTargetTransformController::post(Reader& nif)
{
NiInterpController::post(nif);
postRecordList(nif, mExtraTargets);
}