Phase 2: #ifdef for Zodiacs and particles

This commit is contained in:
Marc Chapman 2018-01-23 22:03:18 +00:00
parent 0c65f9ee8e
commit b8f722e2f9
7 changed files with 38 additions and 13 deletions

View file

@ -194,12 +194,14 @@ bool GameConnection::client_cache_on = false;
//----------------------------------------------------------------------------
GameConnection::GameConnection()
{
#ifdef TORQUE_AFX_ENABLED
mRolloverObj = NULL;
mPreSelectedObj = NULL;
mSelectedObj = NULL;
mChangedSelectedObj = false;
mPreSelectTimestamp = 0;
zoned_in = false;
#endif
#ifdef AFX_CAP_DATABLOCK_CACHE
client_db_stream = new InfiniteBitStream;
@ -1177,6 +1179,7 @@ void GameConnection::readPacket(BitStream *bstream)
{
mMoveList->clientReadMovePacket(bstream);
#ifdef TORQUE_AFX_ENABLED
// selected object - do we have a change in status?
if (bstream->readFlag())
{
@ -1188,6 +1191,8 @@ void GameConnection::readPacket(BitStream *bstream)
else
setSelectedObj(NULL);
}
#endif
bool hadFlash = mDamageFlash > 0 || mWhiteOut > 0;
mDamageFlash = 0;
mWhiteOut = 0;
@ -1431,6 +1436,7 @@ void GameConnection::writePacket(BitStream *bstream, PacketNotify *note)
// all the damage flash & white out
S32 gIndex = -1;
#ifdef TORQUE_AFX_ENABLED
if (mChangedSelectedObj)
{
S32 gidx;
@ -1459,6 +1465,7 @@ void GameConnection::writePacket(BitStream *bstream, PacketNotify *note)
}
else
bstream->writeFlag(false);
#endif
if (!mControlObject.isNull())
{

View file

@ -385,7 +385,8 @@ protected:
DECLARE_CALLBACK( void, setLagIcon, (bool state) );
DECLARE_CALLBACK( void, onDataBlocksDone, (U32 sequence) );
DECLARE_CALLBACK( void, onFlash, (bool state) );
#ifdef TORQUE_AFX_ENABLED
// GameConnection is modified to keep track of object selections which are used in
// spell targeting. This code stores the current object selection as well as the
// current rollover object beneath the cursor. The rollover object is treated as a
@ -415,7 +416,7 @@ private:
public:
bool isZonedIn() const { return zoned_in; }
void setZonedIn() { zoned_in = true; }
#endif
#ifdef AFX_CAP_DATABLOCK_CACHE
private:
static StringTableEntry server_cache_filename;