mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
Animation is working segfault on unload
This commit is contained in:
@@ -10,7 +10,8 @@
|
||||
RAY::Cache<::ModelAnimation> RAY::ModelAnimations::_animationsCache(LoadModelAnimations, UnloadModelAnimations);
|
||||
|
||||
RAY::ModelAnimations::ModelAnimations(const std::string &filePath):
|
||||
_animationsPtr(_animationsCache.fetch(filePath, &this->_animationCount))
|
||||
_animationsPtr(_animationsCache.fetch(filePath, &this->_animationCount)),
|
||||
_filePath(filePath)
|
||||
{
|
||||
::ModelAnimation *ptr = this->_animationsPtr.get();
|
||||
|
||||
@@ -20,7 +21,7 @@ RAY::ModelAnimations::ModelAnimations(const std::string &filePath):
|
||||
|
||||
RAY::ModelAnimation &RAY::ModelAnimations::operator[](int index)
|
||||
{
|
||||
return this->_animations[index];
|
||||
return this->_animations.at(index);
|
||||
}
|
||||
|
||||
size_t RAY::ModelAnimations::getAnimationsCount() const
|
||||
@@ -28,3 +29,13 @@ size_t RAY::ModelAnimations::getAnimationsCount() const
|
||||
return this->_animationCount;
|
||||
}
|
||||
|
||||
std::string RAY::ModelAnimations::getFilePath() const
|
||||
{
|
||||
return this->_filePath;
|
||||
}
|
||||
|
||||
const RAY::ModelAnimation &RAY::ModelAnimations::at(int index) const
|
||||
{
|
||||
return this->_animations.at(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user