mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-27 08:41:40 +00:00
Do not skip weather transitions from SetPos script command (bug #3603)
This commit is contained in:
parent
e9ecaf712b
commit
ba46473038
1 changed files with 2 additions and 5 deletions
|
@ -202,11 +202,6 @@ namespace MWScript
|
||||||
if (!ptr.isInCell())
|
if (!ptr.isInCell())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ptr == MWMechanics::getPlayer())
|
|
||||||
{
|
|
||||||
MWBase::Environment::get().getWorld()->getPlayer().setTeleported(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string axis = runtime.getStringLiteral (runtime[0].mInteger);
|
std::string axis = runtime.getStringLiteral (runtime[0].mInteger);
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
Interpreter::Type_Float pos = runtime[0].mFloat;
|
Interpreter::Type_Float pos = runtime[0].mFloat;
|
||||||
|
@ -216,6 +211,8 @@ namespace MWScript
|
||||||
float ay = ptr.getRefData().getPosition().pos[1];
|
float ay = ptr.getRefData().getPosition().pos[1];
|
||||||
float az = ptr.getRefData().getPosition().pos[2];
|
float az = ptr.getRefData().getPosition().pos[2];
|
||||||
|
|
||||||
|
// Note: SetPos does not skip weather transitions in vanilla engine, so we do not call setTeleported(true) here.
|
||||||
|
|
||||||
MWWorld::Ptr updated = ptr;
|
MWWorld::Ptr updated = ptr;
|
||||||
if(axis == "x")
|
if(axis == "x")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue