mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 03:39:14 +00:00
AiWander: Make sure we have 8 idle values (Fixes #1583)
The AiWander instruction may specify more (or less) than 8.
This commit is contained in:
parent
523c2715e3
commit
92f5898b32
@ -26,6 +26,7 @@ namespace MWMechanics
|
||||
AiWander::AiWander(int distance, int duration, int timeOfDay, const std::vector<unsigned char>& idle, bool repeat):
|
||||
mDistance(distance), mDuration(duration), mTimeOfDay(timeOfDay), mIdle(idle), mRepeat(repeat)
|
||||
{
|
||||
mIdle.resize(8, 0);
|
||||
init();
|
||||
}
|
||||
|
||||
@ -652,7 +653,7 @@ namespace MWMechanics
|
||||
wander->mData.mDuration = mDuration;
|
||||
wander->mData.mTimeOfDay = mTimeOfDay;
|
||||
wander->mStartTime = mStartTime.toEsm();
|
||||
assert (mIdle.size() >= 8);
|
||||
assert (mIdle.size() == 8);
|
||||
for (int i=0; i<8; ++i)
|
||||
wander->mData.mIdle[i] = mIdle[i];
|
||||
wander->mData.mShouldRepeat = mRepeat;
|
||||
|
Loading…
Reference in New Issue
Block a user