Game Development Community

Invalid packet (mounted images)

by Eric den Boer · in Torque Game Engine Advanced · 03/22/2009 (1:17 pm) · 4 replies

Hi,

That's the message we're getting when we try to connect. We figured out how that it has to do with the network masks, however after some puzzeling we couldn't make anything out of it.

This is what we're trying to accomplish:
--- shapeBase.h @ 557 ---
MaxSoundThreads =  4,            ///< Should be a power of 2
MaxScriptThreads = 4,            ///< Should be a power of 2
MaxMountedImages = 8,            ///< Should be a power of 2

We increased the MaxMountedImages so we could add more than 4 objects to our airplane, in our case 8 images.

Now... we're getting the error invalid packet (mounted images).

So we looked at the code of the bit masks.. but we can't quite make anything out of it. How is this used? I realize that we're probably exceeding the 32-bit limit of the mask.. but what does it do exactly and how does the MaxMountedImages affect the bitmask?

enum ShapeBaseMasks {
      NameMask        = Parent::NextFreeMask,
      DamageMask      = Parent::NextFreeMask << 1,
      NoWarpMask      = Parent::NextFreeMask << 2,
      MountedMask     = Parent::NextFreeMask << 3,
      CloakMask       = Parent::NextFreeMask << 4,
      ShieldMask      = Parent::NextFreeMask << 5,
      InvincibleMask  = Parent::NextFreeMask << 6,
      SkinMask        = Parent::NextFreeMask << 7,
      SoundMaskN      = Parent::NextFreeMask << 8,       ///< Extends + MaxSoundThreads bits
      ThreadMaskN     = SoundMaskN  << MaxSoundThreads,  ///< Extends + MaxScriptThreads bits
      ImageMaskN      = ThreadMaskN << MaxScriptThreads, ///< Extends + MaxMountedImage bits
      NextFreeMask    = ImageMaskN  << MaxMountedImages
   };

   enum BaseMaskConstants {
      SoundMask      = (SoundMaskN << MaxSoundThreads) - SoundMaskN,
      ThreadMask     = (ThreadMaskN << MaxScriptThreads) - ThreadMaskN,
      ImageMask      = (ImageMaskN << MaxMountedImages) - ImageMaskN
   };

If anyone could help us out, please. This is really annoying. We tried doing things like ImageMaskN << MaxMountedImages - 4, but thats not working either.

#1
03/23/2009 (3:25 am)
We found out it was this image (and probably others too) that was causing the invalid packet message. What is going on? This should be correct, shouldn't it?

datablock ShapeBaseImageData(dbMissileImageGun_0)
{
   category             = "MissileImages";
   className            = MissileImage;
   canSaveDynamicFields = true;
   
   emap                 = true;
   dynamicReflection    = true;
   
   shadowEnable         = true;
   shadowCanMove        = true;
   shadowCanAnimate     = true;
   shadowSize           = $caeShadowRes;
   shadowMaxVisibleDistance = 32;
   shadowProjectionDistance = 32;
   
   computeCRC           = true;
   
   Enabled              = true;

   shapeFile            = "~/data/shapes/projectiles/aim9.dts";
   MountPoint           = 0;
};
#3
03/23/2009 (7:09 am)
Thank you for these resources :) It helped out!
#4
03/23/2009 (9:07 am)
Comment #17 is especially useful due to changes between TGE and TGEA. You might want to look at the LOD/ projectile fixes for your other problem.