Game Development Community

T3D 1.1 Beta 2 - HiFi Networking compiling error - CONFIRMED

by Alfio Saitta · in Torque 3D Professional · 08/06/2010 (1:24 am) · 3 replies

After activating the hi-fi networking system in the configuration file for the generation of the project, build the project contains errors. The problem was a wrong method name on six occasions.

I believe that the method SimObject::getType() now been renamed to SimObject::getTypeMask().

void HifiClientProcessList::ageTickCache(S32 numToAge, S32 len)
{
   for (ProcessObject * pobj = mHead.mProcessLink.next; pobj != &mHead; pobj = pobj->mProcessLink.next)
   {
      GameBase *obj = getGameBase(pobj);
      if ( obj && [b]obj->getType()[/b] & GameBaseHiFiObjectType )
         obj->getTickCache().ageCache(numToAge,len);
   }
}

my patch:
diff U3B C:/Torque/Torque 3D 2009 Pro 1.1 Beta 2 Original/Engine/source/T3D/gameBase/hifi/hifiGameProcess.cpp C:/Torque/Torque 3D 2009 Pro 1.1 Beta 2/Engine/source/T3D/gameBase/hifi/hifiGameProcess.cpp
--- C:/Torque/Torque 3D 2009 Pro 1.1 Beta 2 Original/Engine/source/T3D/gameBase/hifi/hifiGameProcess.cpp	Wed Aug 04 02:04:38 2010
+++ C:/Torque/Torque 3D 2009 Pro 1.1 Beta 2/Engine/source/T3D/gameBase/hifi/hifiGameProcess.cpp	Fri Aug 06 02:54:27 2010
@@ -243,7 +243,7 @@
    else if ( pobj->isTicking() )
       pobj->processTick( 0 );
    
-   if ( obj && ( obj->getType() & GameBaseHiFiObjectType ) )
+   if ( obj && ( obj->getTypeMask() & GameBaseHiFiObjectType ) )
    {
       GameConnection * serverConnection = GameConnection::getConnectionToServer();
       TickCacheEntry * tce = obj->getTickCache().addCacheEntry();
@@ -289,7 +289,7 @@
    for (ProcessObject * pobj = mHead.mProcessLink.next; pobj != &mHead; pobj = pobj->mProcessLink.next)
    {
       GameBase *obj = getGameBase(pobj);
-      if ( obj && obj->getType() & GameBaseHiFiObjectType )
+      if ( obj && obj->getTypeMask() & GameBaseHiFiObjectType )
          obj->getTickCache().ageCache(numToAge,len);
    }
 }
@@ -335,7 +335,7 @@
          // [objects nearby the nearby objects also get added to the nearby list]
          for (S32 i=-1; obj; obj = ++i<nearby.mList.size() ? (GameBase*)nearby.mList[i] : NULL)
          {
-            if (obj->isGhostUpdated() && (obj->getType() & GameBaseHiFiObjectType) && !obj->isNetNearbyAdded())
+            if (obj->isGhostUpdated() && (obj->getTypeMask() & GameBaseHiFiObjectType) && !obj->isNetNearbyAdded())
             {
                Point3F start = obj->getWorldSphere().center;
                Point3F end = start + 1.1f * dt * obj->getVelocity();
@@ -415,7 +415,7 @@
       if ( !obj )
          continue;
 
-      if (obj->isGhostUpdated() && (obj->getType() & GameBaseHiFiObjectType))
+      if (obj->isGhostUpdated() && (obj->getTypeMask() & GameBaseHiFiObjectType))
       {
          // construct process object and add it to the list
          // hold pointer to our object in mAfterObject
@@ -427,7 +427,7 @@
          obj->getTickCache().beginCacheList();
          obj->getTickCache().incCacheList();
       }
-      else if (mForceHifiReset && (obj->getType() & GameBaseHiFiObjectType))
+      else if (mForceHifiReset && (obj->getTypeMask() & GameBaseHiFiObjectType))
       {
          // add all hifi objects
          obj->getTickCache().beginCacheList();
@@ -482,7 +482,7 @@
          // it's possible for a non-hifi object to get in here, but
          // only if it is a control object...make sure we don't do any
          // of the tick cache stuff if we are not hifi.
-         bool hifi = obj->getType() & GameBaseHiFiObjectType;
+         bool hifi = obj->getTypeMask() & GameBaseHiFiObjectType;
          TickCacheEntry * tce = hifi ? obj->getTickCache().incCacheList() : NULL;
 
          // tick object

#1
08/10/2010 (3:52 pm)
Alfio Saitta, I would recommend logging into the account that has a Pro license before posting anything relating to the source code. If you cannot remember you professional login information, please contact me and I will try to help you.
#2
08/12/2010 (7:31 pm)
Logged as TQA-804 for the QA team to verify.
#3
08/13/2010 (5:57 pm)
Bug confirmed.