In DIS 7, Detonation PDU with ExpendableDescriptor doesn't work.
It misses 64 bits of padding in the message.
Need to create a specific class (see attached) and remove #typedef from Descriptor.h
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2019-03-07
Funny. I ran into this yesterday and wasn't smart enough to come looking for a bug report before developing the same solution. I used a single "m_ui64Padding" instead of four sequential "m_padding#"; and in the "==" operator, I did not require that the padding match, but otherwise came to exactly the same solution. Essentially, I copied the ExplosionDescriptor class and replaced the extra parameters with padding.
In addition to creating the new ExpendableDescriptor class as you described, (and adding some comments indicating that the Descriptor "base" class is really only half of the 128 bit record, with the other half being appended by the child type (Munition, Expendable, or Explosion),) and removing the following from Descriptor.h,
I'd just post the whole thing, but mine is significantly different from having replaced reference counters (KRef_PTR<type>) with plain-old pointers a long time ago -- it would just muddy the water.</type>
--Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Funny. I ran into this yesterday and wasn't smart enough to come looking for a bug report before developing the same solution. I used a single "m_ui64Padding" instead of four sequential "m_padding#"; and in the "==" operator, I did not require that the padding match, but otherwise came to exactly the same solution. Essentially, I copied the ExplosionDescriptor class and replaced the extra parameters with padding.
In addition to creating the new ExpendableDescriptor class as you described, (and adding some comments indicating that the Descriptor "base" class is really only half of the 128 bit record, with the other half being appended by the child type (Munition, Expendable, or Explosion),) and removing the following from Descriptor.h,
I also removed the following from Detonation_PDU.cpp (don't worry, I'll get it back in the next step):
And I added the following to Detonation_PDU.h:
Likewise, a similar fix is needed in Fire_PDU.h. I just added:
under the MunitionDescriptor.h include.
I'd just post the whole thing, but mine is significantly different from having replaced reference counters (KRef_PTR<type>) with plain-old pointers a long time ago -- it would just muddy the water.</type>
--Jim
Thanks ill take a look