mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-27 05:37:25 +00:00
fix for implicit references
This commit is contained in:
parent
8afdf0f46b
commit
984b586bb1
@ -16,6 +16,8 @@ namespace MWScript
|
||||
{
|
||||
struct ExplicitRef
|
||||
{
|
||||
static const bool implicit = false;
|
||||
|
||||
MWWorld::Ptr operator() (Interpreter::Runtime& runtime, bool required=true,
|
||||
bool activeOnly = false) const
|
||||
{
|
||||
@ -31,6 +33,8 @@ namespace MWScript
|
||||
|
||||
struct ImplicitRef
|
||||
{
|
||||
static const bool implicit = true;
|
||||
|
||||
MWWorld::Ptr operator() (Interpreter::Runtime& runtime, bool required=true,
|
||||
bool activeOnly = false) const
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ namespace MWScript
|
||||
|
||||
virtual void execute (Interpreter::Runtime& runtime)
|
||||
{
|
||||
int peek = runtime[0].mInteger;
|
||||
int peek = R::implicit ? 0 : runtime[0].mInteger;
|
||||
|
||||
MWWorld::Ptr ptr = R()(runtime);
|
||||
|
||||
@ -225,7 +225,8 @@ namespace MWScript
|
||||
runtime.pop();
|
||||
|
||||
// workaround broken endgame scripts that kill dagoth ur
|
||||
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getRefId(), "dagoth_ur_1"))
|
||||
if (!R::implicit &&
|
||||
Misc::StringUtils::ciEqual(ptr.getCellRef().getRefId(), "dagoth_ur_1"))
|
||||
{
|
||||
runtime.push (peek);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user