mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 04:40:26 +00:00
Allow the CS to handle the repeat flag for all types
This commit is contained in:
parent
3c57ffd81f
commit
52f9634624
2 changed files with 15 additions and 3 deletions
|
@ -255,7 +255,7 @@ namespace CSMWorld
|
||||||
{ ColumnId_AiWanderDist, "Wander Dist" },
|
{ ColumnId_AiWanderDist, "Wander Dist" },
|
||||||
{ ColumnId_AiDuration, "Ai Duration" },
|
{ ColumnId_AiDuration, "Ai Duration" },
|
||||||
{ ColumnId_AiWanderToD, "Wander ToD" },
|
{ ColumnId_AiWanderToD, "Wander ToD" },
|
||||||
{ ColumnId_AiWanderRepeat, "Wander Repeat" },
|
{ ColumnId_AiWanderRepeat, "Ai Repeat" },
|
||||||
{ ColumnId_AiActivateName, "Activate" },
|
{ ColumnId_AiActivateName, "Activate" },
|
||||||
{ ColumnId_AiTargetId, "Target ID" },
|
{ ColumnId_AiTargetId, "Target ID" },
|
||||||
{ ColumnId_AiTargetCell, "Target Cell" },
|
{ ColumnId_AiTargetCell, "Target Cell" },
|
||||||
|
|
|
@ -1678,7 +1678,7 @@ namespace CSMWorld
|
||||||
newRow.mWander.mTimeOfDay = 0;
|
newRow.mWander.mTimeOfDay = 0;
|
||||||
for (int i = 0; i < 8; ++i)
|
for (int i = 0; i < 8; ++i)
|
||||||
newRow.mWander.mIdle[i] = 0;
|
newRow.mWander.mIdle[i] = 0;
|
||||||
newRow.mWander.mShouldRepeat = 0;
|
newRow.mWander.mShouldRepeat = 1;
|
||||||
newRow.mCellName = "";
|
newRow.mCellName = "";
|
||||||
|
|
||||||
if (position >= (int)list.size())
|
if (position >= (int)list.size())
|
||||||
|
@ -1784,9 +1784,15 @@ namespace CSMWorld
|
||||||
return static_cast<int>(content.mWander.mIdle[subColIndex-4]);
|
return static_cast<int>(content.mWander.mIdle[subColIndex-4]);
|
||||||
else
|
else
|
||||||
return QVariant();
|
return QVariant();
|
||||||
case 12: // wander repeat
|
case 12: // repeat
|
||||||
if (content.mType == ESM::AI_Wander)
|
if (content.mType == ESM::AI_Wander)
|
||||||
return content.mWander.mShouldRepeat != 0;
|
return content.mWander.mShouldRepeat != 0;
|
||||||
|
else if (content.mType == ESM::AI_Travel)
|
||||||
|
return content.mTravel.mShouldRepeat != 0;
|
||||||
|
else if (content.mType == ESM::AI_Follow || content.mType == ESM::AI_Escort)
|
||||||
|
return content.mTarget.mShouldRepeat != 0;
|
||||||
|
else if (content.mType == ESM::AI_Activate)
|
||||||
|
return content.mActivate.mShouldRepeat != 0;
|
||||||
else
|
else
|
||||||
return QVariant();
|
return QVariant();
|
||||||
case 13: // activate name
|
case 13: // activate name
|
||||||
|
@ -1895,6 +1901,12 @@ namespace CSMWorld
|
||||||
case 12:
|
case 12:
|
||||||
if (content.mType == ESM::AI_Wander)
|
if (content.mType == ESM::AI_Wander)
|
||||||
content.mWander.mShouldRepeat = static_cast<unsigned char>(value.toInt());
|
content.mWander.mShouldRepeat = static_cast<unsigned char>(value.toInt());
|
||||||
|
else if (content.mType == ESM::AI_Travel)
|
||||||
|
content.mTravel.mShouldRepeat = static_cast<unsigned char>(value.toInt());
|
||||||
|
else if (content.mType == ESM::AI_Follow || content.mType == ESM::AI_Escort)
|
||||||
|
content.mTarget.mShouldRepeat = static_cast<unsigned char>(value.toInt());
|
||||||
|
else if (content.mType == ESM::AI_Activate)
|
||||||
|
content.mActivate.mShouldRepeat = static_cast<unsigned char>(value.toInt());
|
||||||
else
|
else
|
||||||
return; // return without saving
|
return; // return without saving
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue