1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Merge branch 'ref_id_strings' into 'master'

Use RefId high level functions instead of accessing internal data

See merge request OpenMW/openmw!2840
This commit is contained in:
psi29a 2023-03-18 15:30:53 +00:00
commit 5db11d81fe
2 changed files with 3 additions and 6 deletions

View File

@ -894,8 +894,7 @@ namespace MWMechanics
return true;
// TODO: implement a better check to check if target is owned bed
if (target.getClass().isActivator()
&& target.getClass().getScript(target).getRefIdString().starts_with("Bed") != 0)
if (target.getClass().isActivator() && target.getClass().getScript(target).startsWith("Bed") != 0)
return true;
if (target.getClass().isNpc())

View File

@ -355,8 +355,7 @@ namespace MWScript
MWMechanics::AiFollow followPackage(actorID, duration, x, y, z, repeat);
ptr.getClass().getCreatureStats(ptr).getAiSequence().stack(followPackage, ptr);
Log(Debug::Info) << "AiFollow: " << actorID.getRefIdString() << ", " << x << ", " << y << ", " << z
<< ", " << duration;
Log(Debug::Info) << "AiFollow: " << actorID << ", " << x << ", " << y << ", " << z << ", " << duration;
}
};
@ -396,8 +395,7 @@ namespace MWScript
MWMechanics::AiFollow followPackage(actorID, cellID, duration, x, y, z, repeat);
ptr.getClass().getCreatureStats(ptr).getAiSequence().stack(followPackage, ptr);
Log(Debug::Info) << "AiFollow: " << actorID.getRefIdString() << ", " << x << ", " << y << ", " << z
<< ", " << duration;
Log(Debug::Info) << "AiFollow: " << actorID << ", " << x << ", " << y << ", " << z << ", " << duration;
}
};