Game Development Community

Minor Fix just cause I hate unnecessary console spam - LOGGED (THREED-3148)

by John "Mythic" Henry · in Torque 3D Professional · 12/06/2011 (1:29 pm) · 2 replies

Reference:
Game -> activatePackages
*** Mission loaded
Set::getObject - index out of range.
Connect request from: 
Connection established 1053276

Fix:
I'm not gonna say sloppy, just what can happen with the way Script coding goes..

// Synd the clocks in a round robin style to cut down on network traffic per tick.
function GameCore::syncClocks()
{
   //Mythic DEBUG added check for Any Clients yet
   if( ClientGroup.getCount() > 0 )
   {      
      commandToClient(ClientGroup.getObject($Game::ClockSyncClient), 'SyncClock', $Sim::Time - $Game::StartTime, $Game::ServerClock.getTime()); 
      $Game::ClockSyncClient++;
   }
   
   //If all clients have updated, then 
   if ($Game::ClockSyncClient >= $Server::PlayerCount)
   {

This one needs more work as you can have Clients Connecting and disconnecting WHILE it is syncing them up.
But it clears up the spam

#1
12/09/2011 (7:21 pm)
Thanks! One less error to hunt down
#2
01/11/2012 (10:32 am)
Thanks John. I've gone ahead and logged this issue under ticket number THREED-3148 for review.