Merge remote-tracking branch 'origin/master' into 3rdPersonDeathCam

# Conflicts:
#	include/Engine/Core/EPlayerHealthPickup.h
This commit is contained in:
verysecrethero
2016-02-08 10:21:30 +01:00
24 changed files with 213 additions and 76 deletions
+5 -5
View File
@@ -7,11 +7,11 @@
namespace Events
{
struct PlayerHealthPickup : Event
{
EntityWrapper Player;
double HealthAmount;
};
struct PlayerHealthPickup : Event
{
EntityWrapper Player;
double HealthAmount;
};
}
+10 -7
View File
@@ -200,13 +200,16 @@ static T* ResourceManager::Load(const std::string& resourceName, Resource* paren
}
//If resource has already been cached and completely loaded.
it = m_ResourceCache.find(cacheKey);
if (it != m_ResourceCache.end()) {
if (it->second != nullptr) {
return static_cast<T*>(it->second);
} else {
//Don't return null on failure, exception instead.
throw Resource::FailedLoadingException();
{
boost::lock_guard<decltype(m_Mutex)> guard(m_Mutex);
it = m_ResourceCache.find(cacheKey);
if (it != m_ResourceCache.end()) {
if (it->second != nullptr) {
return static_cast<T*>(it->second);
} else {
//Don't return null on failure, exception instead.
throw Resource::FailedLoadingException();
}
}
}