mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
053f744566
@ -399,6 +399,13 @@ namespace MWScript
|
|||||||
Interpreter::Type_Integer amount = runtime[0].mInteger;
|
Interpreter::Type_Integer amount = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
|
if (amount<0)
|
||||||
|
throw std::runtime_error ("amount must be non-negative");
|
||||||
|
|
||||||
|
// no-op
|
||||||
|
if (amount == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
MWWorld::ContainerStore& store = MWWorld::Class::get (ptr).getContainerStore (ptr);
|
MWWorld::ContainerStore& store = MWWorld::Class::get (ptr).getContainerStore (ptr);
|
||||||
|
|
||||||
|
|
||||||
|
@ -460,6 +460,13 @@ namespace MWScript
|
|||||||
Interpreter::Type_Integer direction = runtime[0].mInteger;
|
Interpreter::Type_Integer direction = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
|
if (count<0)
|
||||||
|
throw std::runtime_error ("count must be non-negative");
|
||||||
|
|
||||||
|
// no-op
|
||||||
|
if (count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
ESM::Position ipos = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getRefData().getPosition();
|
ESM::Position ipos = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getRefData().getPosition();
|
||||||
Ogre::Vector3 pos(ipos.pos[0],ipos.pos[1],ipos.pos[2]);
|
Ogre::Vector3 pos(ipos.pos[0],ipos.pos[1],ipos.pos[2]);
|
||||||
Ogre::Quaternion rot(Ogre::Radian(-ipos.rot[2]), Ogre::Vector3::UNIT_Z);
|
Ogre::Quaternion rot(Ogre::Radian(-ipos.rot[2]), Ogre::Vector3::UNIT_Z);
|
||||||
@ -503,6 +510,13 @@ namespace MWScript
|
|||||||
Interpreter::Type_Integer direction = runtime[0].mInteger;
|
Interpreter::Type_Integer direction = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
|
if (count<0)
|
||||||
|
throw std::runtime_error ("count must be non-negative");
|
||||||
|
|
||||||
|
// no-op
|
||||||
|
if (count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
ESM::Position ipos = me.getRefData().getPosition();
|
ESM::Position ipos = me.getRefData().getPosition();
|
||||||
Ogre::Vector3 pos(ipos.pos[0],ipos.pos[1],ipos.pos[2]);
|
Ogre::Vector3 pos(ipos.pos[0],ipos.pos[1],ipos.pos[2]);
|
||||||
Ogre::Quaternion rot(Ogre::Radian(-ipos.rot[2]), Ogre::Vector3::UNIT_Z);
|
Ogre::Quaternion rot(Ogre::Radian(-ipos.rot[2]), Ogre::Vector3::UNIT_Z);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user