1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fixes #1887: Equipped items do not emit sounds

Corrected wrong return type of Class::getSound() method.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
Lukasz Gromanowski 2014-10-12 13:38:41 +02:00
parent e1663de7cf
commit a6a3eca930
4 changed files with 4 additions and 4 deletions

View file

@ -298,7 +298,7 @@ namespace MWClass
state2.mTime = dynamic_cast<LightCustomData&> (*ptr.getRefData().getCustomData()).mTime;
}
const std::string& Light::getSound(const MWWorld::Ptr& ptr) const
std::string Light::getSound(const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Light>()->mBase->mSound;
}

View file

@ -83,7 +83,7 @@ namespace MWClass
const;
///< Write additional state from \a ptr into \a state.
virtual const std::string& getSound(const MWWorld::Ptr& ptr) const;
virtual std::string getSound(const MWWorld::Ptr& ptr) const;
};
}

View file

@ -421,7 +421,7 @@ namespace MWWorld
throw std::runtime_error("this is not a door");
}
const std::string& Class::getSound(const MWWorld::Ptr&) const
std::string Class::getSound(const MWWorld::Ptr&) const
{
return std::string();
}

View file

@ -338,7 +338,7 @@ namespace MWWorld
virtual void restock (const MWWorld::Ptr& ptr) const {}
/// Returns sound id
virtual const std::string& getSound(const MWWorld::Ptr& ptr) const;
virtual std::string getSound(const MWWorld::Ptr& ptr) const;
};
}