forked from mirror/openmw-tes3mp
Clean up, remove unnecessary code changes
This commit is contained in:
parent
53ceefa46a
commit
7a0f9a7989
2 changed files with 7 additions and 7 deletions
|
@ -1014,7 +1014,7 @@ namespace MWWorld
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->isGuiMode() &&
|
if (MWBase::Environment::get().getWindowManager()->isGuiMode() &&
|
||||||
MWBase::Environment::get().getWindowManager()->isConsoleMode())
|
MWBase::Environment::get().getWindowManager()->isConsoleMode())
|
||||||
facedObject = getFacedObject(getMaxActivationDistance() * 50, mDistanceToFacedObject, false);
|
facedObject = getFacedObject(getMaxActivationDistance() * 50, false);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float telekinesisRangeBonus =
|
float telekinesisRangeBonus =
|
||||||
|
@ -1024,7 +1024,7 @@ namespace MWWorld
|
||||||
|
|
||||||
float activationDistance = getMaxActivationDistance() + telekinesisRangeBonus;
|
float activationDistance = getMaxActivationDistance() + telekinesisRangeBonus;
|
||||||
|
|
||||||
facedObject = getFacedObject(activationDistance, mDistanceToFacedObject, true);
|
facedObject = getFacedObject(activationDistance, true);
|
||||||
|
|
||||||
if (!facedObject.isEmpty() && !facedObject.getClass().allowTelekinesis(facedObject)
|
if (!facedObject.isEmpty() && !facedObject.getClass().allowTelekinesis(facedObject)
|
||||||
&& mDistanceToFacedObject > getMaxActivationDistance())
|
&& mDistanceToFacedObject > getMaxActivationDistance())
|
||||||
|
@ -1717,7 +1717,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr World::getFacedObject(float maxDistance, float& distance, bool ignorePlayer)
|
MWWorld::Ptr World::getFacedObject(float maxDistance, bool ignorePlayer)
|
||||||
{
|
{
|
||||||
maxDistance += mRendering->getCameraDistance();
|
maxDistance += mRendering->getCameraDistance();
|
||||||
MWWorld::Ptr facedObject;
|
MWWorld::Ptr facedObject;
|
||||||
|
@ -1733,10 +1733,10 @@ namespace MWWorld
|
||||||
rayToObject = mRendering->castCameraToViewportRay(0.5f, 0.5f, maxDistance, ignorePlayer);
|
rayToObject = mRendering->castCameraToViewportRay(0.5f, 0.5f, maxDistance, ignorePlayer);
|
||||||
|
|
||||||
facedObject = rayToObject.mHitObject;
|
facedObject = rayToObject.mHitObject;
|
||||||
if (!facedObject.isEmpty())
|
if (rayToObject.mHit)
|
||||||
distance = rayToObject.mRatio * maxDistance;
|
mDistanceToFacedObject = rayToObject.mRatio * maxDistance;
|
||||||
else
|
else
|
||||||
distance = -1;
|
mDistanceToFacedObject = -1;
|
||||||
return facedObject;
|
return facedObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@ namespace MWWorld
|
||||||
void updateWindowManager ();
|
void updateWindowManager ();
|
||||||
void updatePlayer(bool paused);
|
void updatePlayer(bool paused);
|
||||||
|
|
||||||
MWWorld::Ptr getFacedObject(float maxDistance, float& distanceToObject, bool ignorePlayer=true);
|
MWWorld::Ptr getFacedObject(float maxDistance, bool ignorePlayer=true);
|
||||||
|
|
||||||
public: // FIXME
|
public: // FIXME
|
||||||
void removeContainerScripts(const Ptr& reference);
|
void removeContainerScripts(const Ptr& reference);
|
||||||
|
|
Loading…
Reference in a new issue