Page 1 of 1
offset swapping?
Posted: Fri Jan 09, 2004 8:02 am
by seagoat
when you swap a reference (ex: changing the reference to the rocket in the warthog weapon meta) you change what that particular object is refering to without effecting other objects that refer to the same thing (ex: the warthog and the rocket launcher both have references to the rocket projectile) when you offset swap, such as swapping meta in hmt3, what is this changing? does the reference in the warthog weapon meta and the rocket launcher point to an area that references the rocket?
Posted: Fri Jan 09, 2004 6:22 pm
by Iron_Forge
The map file is made up of both an index of objects, and the objects themselves (the meta)...
In the index, for each object, there is an offset which states "my meta is here", the meta being the block of descriptive data which defines everything about that object...
When you do an offset swap, you basically change this offset address, so if you were to modify the warthog bullet index, and offset swap it with the rocket projectile, your basically saying "I'm still a warthog bullet, and this is where my description is", except now its description is of the rocket, thus, making it a rocket (uses rocket model, sounds, damage, etc)...
Also in the index, is the identifier, which is unique for every object...When you modify the projectile reference in the warthog weapon meta, your simply telling it to use something else...So instead of saying "I want to shoot warthog bullets", your telling it "you should shoot rockets"...