2011-01-27 08:29:55 +00:00
|
|
|
|
|
|
|
#include "doingphysics.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
int DoingPhysics::sCounter = 0;
|
2011-01-29 13:33:44 +00:00
|
|
|
int DoingPhysics::sSuppress = 0;
|
2011-01-27 08:29:55 +00:00
|
|
|
|
|
|
|
DoingPhysics::DoingPhysics()
|
|
|
|
{
|
|
|
|
++sCounter;
|
|
|
|
}
|
|
|
|
|
|
|
|
DoingPhysics::~DoingPhysics()
|
|
|
|
{
|
|
|
|
--sCounter;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DoingPhysics::isDoingPhysics()
|
|
|
|
{
|
2011-03-22 12:48:31 +00:00
|
|
|
return sCounter>0 && sSuppress==0;
|
2011-01-29 13:33:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SuppressDoingPhysics::SuppressDoingPhysics()
|
|
|
|
{
|
|
|
|
++DoingPhysics::sSuppress;
|
|
|
|
}
|
|
|
|
|
|
|
|
SuppressDoingPhysics::~SuppressDoingPhysics()
|
|
|
|
{
|
|
|
|
--DoingPhysics::sSuppress;
|
2011-01-27 08:29:55 +00:00
|
|
|
}
|
|
|
|
}
|