afx staticshape membervar cleanups

This commit is contained in:
Azaezel 2018-03-30 02:49:35 -05:00
parent 6876801e61
commit dbdcbb034a
2 changed files with 27 additions and 27 deletions

View file

@ -122,11 +122,11 @@ ConsoleDocClass( afxStaticShape,
afxStaticShape::afxStaticShape() afxStaticShape::afxStaticShape()
{ {
afx_data = 0; mAFX_data = 0;
is_visible = true; mIs_visible = true;
chor_id = 0; mChor_id = 0;
hookup_with_chor = false; mHookup_with_chor = false;
ghost_cons_name = ST_NULLSTRING; mGhost_cons_name = ST_NULLSTRING;
} }
afxStaticShape::~afxStaticShape() afxStaticShape::~afxStaticShape()
@ -135,8 +135,8 @@ afxStaticShape::~afxStaticShape()
void afxStaticShape::init(U32 chor_id, StringTableEntry cons_name) void afxStaticShape::init(U32 chor_id, StringTableEntry cons_name)
{ {
this->chor_id = chor_id; mChor_id = chor_id;
ghost_cons_name = cons_name; mGhost_cons_name = cons_name;
} }
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~// //~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//
@ -147,7 +147,7 @@ bool afxStaticShape::onNewDataBlock(GameBaseData* dptr, bool reload)
if (!mDataBlock || !Parent::onNewDataBlock(dptr, reload)) if (!mDataBlock || !Parent::onNewDataBlock(dptr, reload))
return false; return false;
afx_data = dynamic_cast<afxStaticShapeData*>(mDataBlock); mAFX_data = dynamic_cast<afxStaticShapeData*>(mDataBlock);
if (!mShapeInstance) if (!mShapeInstance)
return true; return true;
@ -156,10 +156,10 @@ bool afxStaticShape::onNewDataBlock(GameBaseData* dptr, bool reload)
// if datablock is afxStaticShapeData we get the sequence setting // if datablock is afxStaticShapeData we get the sequence setting
// directly from the datablock on the client-side only // directly from the datablock on the client-side only
if (afx_data) if (mAFX_data)
{ {
if (isClientObject()) if (isClientObject())
seq_name = afx_data->sequence; seq_name = mAFX_data->sequence;
} }
// otherwise datablock is stock StaticShapeData and we look for // otherwise datablock is stock StaticShapeData and we look for
// a sequence name on a dynamic field on the server. // a sequence name on a dynamic field on the server.
@ -188,13 +188,13 @@ void afxStaticShape::advanceTime(F32 dt)
{ {
Parent::advanceTime(dt); Parent::advanceTime(dt);
if (hookup_with_chor) if (mHookup_with_chor)
{ {
afxChoreographer* chor = arcaneFX::findClientChoreographer(chor_id); afxChoreographer* chor = arcaneFX::findClientChoreographer(mChor_id);
if (chor) if (chor)
{ {
chor->setGhostConstraintObject(this, ghost_cons_name); chor->setGhostConstraintObject(this, mGhost_cons_name);
hookup_with_chor = false; mHookup_with_chor = false;
} }
} }
} }
@ -206,8 +206,8 @@ U32 afxStaticShape::packUpdate(NetConnection* conn, U32 mask, BitStream* stream)
// InitialUpdate // InitialUpdate
if (stream->writeFlag(mask & InitialUpdateMask)) if (stream->writeFlag(mask & InitialUpdateMask))
{ {
stream->write(chor_id); stream->write(mChor_id);
stream->writeString(ghost_cons_name); stream->writeString(mGhost_cons_name);
} }
return retMask; return retMask;
@ -222,11 +222,11 @@ void afxStaticShape::unpackUpdate(NetConnection * conn, BitStream * stream)
// InitialUpdate // InitialUpdate
if (stream->readFlag()) if (stream->readFlag())
{ {
stream->read(&chor_id); stream->read(&mChor_id);
ghost_cons_name = stream->readSTString(); mGhost_cons_name = stream->readSTString();
if (chor_id != 0 && ghost_cons_name != ST_NULLSTRING) if (mChor_id != 0 && mGhost_cons_name != ST_NULLSTRING)
hookup_with_chor = true; mHookup_with_chor = true;
} }
} }
@ -234,7 +234,7 @@ void afxStaticShape::unpackUpdate(NetConnection * conn, BitStream * stream)
void afxStaticShape::prepRenderImage(SceneRenderState* state) void afxStaticShape::prepRenderImage(SceneRenderState* state)
{ {
if (is_visible) if (mIs_visible)
Parent::prepRenderImage(state); Parent::prepRenderImage(state);
} }

View file

@ -66,11 +66,11 @@ class afxStaticShape : public StaticShape
private: private:
StaticShapeData* mDataBlock; StaticShapeData* mDataBlock;
afxStaticShapeData* afx_data; afxStaticShapeData* mAFX_data;
bool is_visible; bool mIs_visible;
U32 chor_id; U32 mChor_id;
bool hookup_with_chor; bool mHookup_with_chor;
StringTableEntry ghost_cons_name; StringTableEntry mGhost_cons_name;
protected: protected:
virtual void prepRenderImage(SceneRenderState*); virtual void prepRenderImage(SceneRenderState*);
@ -87,7 +87,7 @@ public:
virtual void unpackUpdate(NetConnection*, BitStream*); virtual void unpackUpdate(NetConnection*, BitStream*);
const char* getShapeFileName() const { return mDataBlock->shapeName; } const char* getShapeFileName() const { return mDataBlock->shapeName; }
void setVisibility(bool flag) { is_visible = flag; } void setVisibility(bool flag) { mIs_visible = flag; }
DECLARE_CONOBJECT(afxStaticShape); DECLARE_CONOBJECT(afxStaticShape);
DECLARE_CATEGORY("AFX"); DECLARE_CATEGORY("AFX");