mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-02 03:45:34 +00:00
Rename a couple methods to match their scripting counterparts
This commit is contained in:
parent
66860825cf
commit
2db80a1504
3 changed files with 9 additions and 11 deletions
|
@ -122,15 +122,13 @@ void Actors::removeCell(MWWorld::Ptr::CellStore* store){
|
|||
|
||||
void Actors::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number){
|
||||
if(mAllActors.find(ptr) != mAllActors.end())
|
||||
mAllActors[ptr]->startScript(groupName, mode, number);
|
||||
mAllActors[ptr]->playGroup(groupName, mode, number);
|
||||
}
|
||||
void Actors::skipAnimation (const MWWorld::Ptr& ptr){
|
||||
if(mAllActors.find(ptr) != mAllActors.end())
|
||||
mAllActors[ptr]->stopScript();
|
||||
mAllActors[ptr]->skipAnim();
|
||||
}
|
||||
void Actors::update (float duration){
|
||||
for(std::map<MWWorld::Ptr, Animation*>::iterator iter = mAllActors.begin(); iter != mAllActors.end(); iter++)
|
||||
{
|
||||
(iter->second)->runAnimation(duration);
|
||||
}
|
||||
iter->second->runAnimation(duration);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ Animation::~Animation()
|
|||
mEntityList.mEntities.clear();
|
||||
}
|
||||
|
||||
void Animation::startScript(std::string groupname, int mode, int loops)
|
||||
void Animation::playGroup(std::string groupname, int mode, int loops)
|
||||
{
|
||||
if(groupname == "all")
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ void Animation::startScript(std::string groupname, int mode, int loops)
|
|||
}
|
||||
|
||||
|
||||
void Animation::stopScript()
|
||||
void Animation::skipAnim()
|
||||
{
|
||||
mAnimate = 0;
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@ protected:
|
|||
|
||||
public:
|
||||
Animation(OEngine::Render::OgreRenderer& _rend);
|
||||
virtual void runAnimation(float timepassed) = 0;
|
||||
void startScript(std::string groupname, int mode, int loops);
|
||||
void stopScript();
|
||||
|
||||
virtual ~Animation();
|
||||
|
||||
void playGroup(std::string groupname, int mode, int loops);
|
||||
void skipAnim();
|
||||
virtual void runAnimation(float timepassed) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue