Open Sauce can already do Multi Team Vehicles so this is nothing new and not that exciting.
In response to that: Abyll had attempted to use the code in Open Sauce. It worked successfully for the dedicated 1.08 exe, but it caused exceptions when he tried to patch the client. I'm assuming that the address for the 3-byte change on the client (1.08) was off by a bit.
As far as choosing an executable instead of a DLL...I was originally planning on using a DLL that would be loaded using another project of ours (haven't released yet), but just because I was lazy at the time and I thought it may be more convenient for people who already have edited libraries and for those who do not want those libraries changed, I decided to use an executable.
Code:
static MTV()
{
if (MemoryHandler.Version == MemoryHandler.HaloVersion.CLIENT)
{
MTV.INSTRUCTION_ADDRESS = 0x0056A3B1; //client address
}
else
{
MTV.INSTRUCTION_ADDRESS = 0x00518D41; //dedicated address
}
}
/* Addition: I think I could simplify this:
MTV.INSTRUCTION_ADDRESS = (MemoryHandler.Version == MemoryHandler.HaloVersion.CLIENT) ? 0x0056A3B1 : 0x00518D41;
*/
I'm not sure if those tags would work, but that's the constructor I used for a static class that enables/disables the ability. It sets the addresses if the intended target is client or dedicated.
Edit: Looked at Open Sauce's code (did not feel like making a new post to the one just after this):
Code:
FUNC_PTR(UNIT_CAN_ENTER_SEAT_MOD, 0x56A261, 0x56A3B1, 0x518D41);
#define FUNC_PTR(name, ce_offset, ce_107_offset, cededi_offset) enum FUNC_PTR_##name { PTR_##name = cededi_offset }; COMPILE_ASSERT( PTR_##name != NULL );
At the moment, the ce_107_offset matches the offset I have for client 1.08, and so I think that is what caused Abyll errors for the client patch.
Bookmarks