|
|
@ -317,7 +317,6 @@ namespace MWWorld
|
|
|
|
state.mCasterHandle = actor;
|
|
|
|
state.mCasterHandle = actor;
|
|
|
|
state.mAttackStrength = attackStrength;
|
|
|
|
state.mAttackStrength = attackStrength;
|
|
|
|
state.mThrown = projectile.get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanThrown;
|
|
|
|
state.mThrown = projectile.get<ESM::Weapon>()->mBase->mData.mType == ESM::Weapon::MarksmanThrown;
|
|
|
|
state.mTime = 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), projectile.getCellRef().getRefId());
|
|
|
|
MWWorld::ManualRef ref(MWBase::Environment::get().getWorld()->getStore(), projectile.getCellRef().getRefId());
|
|
|
|
MWWorld::Ptr ptr = ref.getPtr();
|
|
|
|
MWWorld::Ptr ptr = ref.getPtr();
|
|
|
@ -455,7 +454,6 @@ namespace MWWorld
|
|
|
|
// gravity constant - must be way lower than the gravity affecting actors, since we're not
|
|
|
|
// gravity constant - must be way lower than the gravity affecting actors, since we're not
|
|
|
|
// simulating aerodynamics at all
|
|
|
|
// simulating aerodynamics at all
|
|
|
|
it->mVelocity -= osg::Vec3f(0, 0, 627.2f * 0.1f) * duration;
|
|
|
|
it->mVelocity -= osg::Vec3f(0, 0, 627.2f * 0.1f) * duration;
|
|
|
|
it->mTime += duration;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
osg::Vec3f pos(it->mNode->getPosition());
|
|
|
|
osg::Vec3f pos(it->mNode->getPosition());
|
|
|
|
osg::Vec3f newPos = pos + it->mVelocity * duration;
|
|
|
|
osg::Vec3f newPos = pos + it->mVelocity * duration;
|
|
|
@ -463,7 +461,7 @@ namespace MWWorld
|
|
|
|
osg::Quat orient;
|
|
|
|
osg::Quat orient;
|
|
|
|
|
|
|
|
|
|
|
|
orient.set(
|
|
|
|
orient.set(
|
|
|
|
osg::Matrixd::rotate(it->mThrown ? -1 * it->mTime : 0.0,osg::Vec3f(0,0,1)) *
|
|
|
|
osg::Matrixd::rotate(it->mThrown ? -1 * it->mEffectAnimationTime->getTime() * 10.0 : 0.0,osg::Vec3f(0,0,1)) *
|
|
|
|
osg::Matrixd::rotate(osg::PI / 2.0,osg::Vec3f(0,1,0)) *
|
|
|
|
osg::Matrixd::rotate(osg::PI / 2.0,osg::Vec3f(0,1,0)) *
|
|
|
|
osg::Matrixd::rotate(-1 * osg::PI / 2.0,osg::Vec3f(1,0,0)) *
|
|
|
|
osg::Matrixd::rotate(-1 * osg::PI / 2.0,osg::Vec3f(1,0,0)) *
|
|
|
|
osg::Matrixd::inverse(
|
|
|
|
osg::Matrixd::inverse(
|
|
|
@ -568,7 +566,6 @@ namespace MWWorld
|
|
|
|
state.mAttackStrength = it->mAttackStrength;
|
|
|
|
state.mAttackStrength = it->mAttackStrength;
|
|
|
|
|
|
|
|
|
|
|
|
state.mThrown = it->mThrown;
|
|
|
|
state.mThrown = it->mThrown;
|
|
|
|
state.mTime = it->mTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
state.save(writer);
|
|
|
|
state.save(writer);
|
|
|
|
|
|
|
|
|
|
|
@ -608,7 +605,6 @@ namespace MWWorld
|
|
|
|
state.mIdArrow = esm.mId;
|
|
|
|
state.mIdArrow = esm.mId;
|
|
|
|
state.mAttackStrength = esm.mAttackStrength;
|
|
|
|
state.mAttackStrength = esm.mAttackStrength;
|
|
|
|
state.mThrown = esm.mThrown;
|
|
|
|
state.mThrown = esm.mThrown;
|
|
|
|
state.mTime = esm.mTime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::string model;
|
|
|
|
std::string model;
|
|
|
|
try
|
|
|
|
try
|
|
|
|