scenario_object*_block spawning

Post Reply
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

scenario_object*_block spawning

Post by JacksonCougar »

Alright so while staring at the layout of these tags after they are converted from h2v I noticed all the values align properly except for a single integer32 value that appears directly after the object_datum_struct field in the parent block. A cursory inspection seems to show that it is a counter or index for the block elements. It goes up by one for each subsequent element.

Just throwing this out that it might be part of the issue as to why the scenario placement chunk-cloning sometimes results in freezes.

The value in question appears here:
  • public ShortBlockIndex1 type;
    public ShortBlockIndex1 name;
    public PlacementFlags placementFlags;
    public Vector3 position;
    public Vector3 rotation;
    public float scale;
    public TransformFlags transformFlags;
    public BlockFlags16 manualBSPFlags;
    public ScenarioObjectIdStruct objectID;
    public BSPPolicy bSPPolicy;
    private byte padding;
    public ShortBlockIndex1 editorFolder;
    public int COUNTER_VALUE
Which is usually at offset 52 (it's marked as unused in my plugins for entity)
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: scenario_object*_block spawning

Post by CaptainPoopface »

Neodos found an integer that uniquely identifies spawned objects for system link. Duplicating a mach or bloc would result in either the original or duped object spawning off host, whereas setting the integer to any unique value would fix it. An auto-increment int would have the desired behavior for that purpose. That's my best guess, straight out of my butt, like most of my ideas.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: scenario_object*_block spawning

Post by XZodia »

I believe the value cpf is refering to is the objectid, cant say about the unused fairly sure its always 0
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: scenario_object*_block spawning

Post by JacksonCougar »

On the Xbox it goes up from 0 to chunkcount - 1
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: scenario_object*_block spawning

Post by troymac1ure »

For me they are all 0 on Zanzibar, except in Light Volumes where they are all -1 (FF FF FF FF).
I did notice that "Scenery" has an "unused" value at offset 88 that changes (almost counts with some out of order).
Post Reply