mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 19:10:21 +00:00
Fix GetPcInJail to work as in the original engine
This commit is contained in:
parent
190bf15887
commit
4f8f166f69
4 changed files with 13 additions and 1 deletions
|
@ -545,6 +545,8 @@ namespace MWBase
|
||||||
virtual float getHitDistance(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target) = 0;
|
virtual float getHitDistance(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target) = 0;
|
||||||
|
|
||||||
virtual void removeContainerScripts(const MWWorld::Ptr& reference) = 0;
|
virtual void removeContainerScripts(const MWWorld::Ptr& reference) = 0;
|
||||||
|
|
||||||
|
virtual bool isPlayerInJail() const = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1014,7 +1014,7 @@ namespace MWScript
|
||||||
|
|
||||||
virtual void execute (Interpreter::Runtime &runtime)
|
virtual void execute (Interpreter::Runtime &runtime)
|
||||||
{
|
{
|
||||||
runtime.push (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Jail));
|
runtime.push (MWBase::Environment::get().getWorld()->isPlayerInJail());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2996,6 +2996,14 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool World::isPlayerInJail() const
|
||||||
|
{
|
||||||
|
if (mGoToJail)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Jail);
|
||||||
|
}
|
||||||
|
|
||||||
void World::spawnRandomCreature(const std::string &creatureList)
|
void World::spawnRandomCreature(const std::string &creatureList)
|
||||||
{
|
{
|
||||||
const ESM::CreatureLevList* list = getStore().get<ESM::CreatureLevList>().find(creatureList);
|
const ESM::CreatureLevList* list = getStore().get<ESM::CreatureLevList>().find(creatureList);
|
||||||
|
|
|
@ -645,6 +645,8 @@ namespace MWWorld
|
||||||
|
|
||||||
/// Return the distance between actor's weapon and target's collision box.
|
/// Return the distance between actor's weapon and target's collision box.
|
||||||
virtual float getHitDistance(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target);
|
virtual float getHitDistance(const MWWorld::ConstPtr& actor, const MWWorld::ConstPtr& target);
|
||||||
|
|
||||||
|
virtual bool isPlayerInJail() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue