diff --git a/Engine/source/afx/forces/afxForceSet.cpp b/Engine/source/afx/forces/afxForceSet.cpp index 49658022f..0d650e3b4 100644 --- a/Engine/source/afx/forces/afxForceSet.cpp +++ b/Engine/source/afx/forces/afxForceSet.cpp @@ -32,21 +32,21 @@ afxForceSet::afxForceSet(const char* name) { - this->name = (name) ? StringTable->insert(name) : ST_NULLSTRING; - update_dt = 10.0f; // seems like an ok maximum, force-xmods will probably lower it. - elapsed_dt = 0.0f; - elapsed_ms = 0; - num_updates = 0; - last_num_updates = 0; + mName = (name) ? StringTable->insert(name) : ST_NULLSTRING; + mUpdate_dt = 10.0f; // seems like an ok maximum, force-xmods will probably lower it. + mElapsed_dt = 0.0f; + mElapsed_ms = 0; + mNum_updates = 0; + mLast_num_updates = 0; } void afxForceSet::remove(afxForce* force) { - for (S32 i = 0; i < force_v.size(); i++) + for (S32 i = 0; i < mForce_v.size(); i++) { - if (force_v[i] == force) + if (mForce_v[i] == force) { - force_v.erase(i); + mForce_v.erase(i); return; } } @@ -56,23 +56,23 @@ S32 afxForceSet::updateDT(F32 dt) { U32 now = Platform::getVirtualMilliseconds(); - if (elapsed_ms == now) - return last_num_updates; + if (mElapsed_ms == now) + return mLast_num_updates; - elapsed_ms = now; - elapsed_dt += dt; + mElapsed_ms = now; + mElapsed_dt += dt; - if (elapsed_dt < update_dt) + if (mElapsed_dt < mUpdate_dt) { - last_num_updates = 0; + mLast_num_updates = 0; return 0; } - num_updates = mFloor(elapsed_dt/update_dt); - elapsed_dt -= update_dt*num_updates; - last_num_updates = num_updates; + mNum_updates = mFloor(mElapsed_dt/mUpdate_dt); + mElapsed_dt -= mUpdate_dt*mNum_updates; + mLast_num_updates = mNum_updates; - return num_updates; + return mNum_updates; } //~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Engine/source/afx/forces/afxForceSet.h b/Engine/source/afx/forces/afxForceSet.h index 8c42a2dd3..7c0cabc54 100644 --- a/Engine/source/afx/forces/afxForceSet.h +++ b/Engine/source/afx/forces/afxForceSet.h @@ -32,28 +32,28 @@ class afxForce; class afxForceSet { - Vector force_v; - StringTableEntry name; + Vector mForce_v; + StringTableEntry mName; // tick-based updating - F32 update_dt; // constant update interval, in seconds - F32 elapsed_dt; // runtime elapsed delta, in seconds - U32 elapsed_ms; - S32 num_updates; - S32 last_num_updates; + F32 mUpdate_dt; // constant update interval, in seconds + F32 mElapsed_dt; // runtime elapsed delta, in seconds + U32 mElapsed_ms; + S32 mNum_updates; + S32 mLast_num_updates; public: /*C*/ afxForceSet(const char* name=0); - void add(afxForce* force) { force_v.push_back(force); } + void add(afxForce* force) { mForce_v.push_back(force); } void remove(afxForce* force); - S32 count() { return force_v.size(); } - afxForce* getForce(S32 idx) { return force_v[idx]; } - const char* getName() const { return name; } + S32 count() { return mForce_v.size(); } + afxForce* getForce(S32 idx) { return mForce_v[idx]; } + const char* getName() const { return mName; } - void setUpdateDT(F32 update_dt) { this->update_dt = update_dt; } - F32 getUpdateDT() { return update_dt; } + void setUpdateDT(F32 update_dt) { mUpdate_dt = update_dt; } + F32 getUpdateDT() { return mUpdate_dt; } S32 updateDT(F32 dt); };