Results 1 to 10 of 376

Thread: OpenSauce SDK for Halo CE 1.08

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    TCTF Cult ****** bobbysoon's Avatar
    Join Date
    Nov 2007
    Location
    Mormon-occupied Caprica
    Posts
    239

    Re: Seven ate Nein...

    Code:
            datum_index GetParentObject(datum_index obj)
            {
                object_header_datum* object_header_datums = Objects::ObjectHeader()->datums;
                object_data* current_obj = (object_data*)object_header_datums[obj.index].address;
    
                 while( current_obj->GetParentObjectIndex()->index != NONE )
                {
                     obj = *current_obj->GetParentObjectIndex();
                    current_obj = (object_data*)object_header_datums[obj.index].address;
                 }
     
                return obj;
            }
    Wouldn't it be a GetRootObject function, since it's while loops up the hierarchy?

    looks like coding is the easy part
    Code:
            bool ToggleMultiTeamVehicles()
            {
                FUNC_PTR(UNIT_CAN_ENTER_SEAT_MOD, 0x56A261, 0x56A3B1, 0x518D41);
    
                // mov bl, 1
                // jmp
                static byte enable_code[] = {0xB3, 0x01, 0xEB};
                // test al, al
                // jz
                static byte disable_code[] = {0x84, 0xC0, 0x74};
    
                static bool enabled = false;
    
                Memory::WriteMemory(GET_FUNC_VPTR(UNIT_CAN_ENTER_SEAT_MOD), (enabled ? disable_code : enable_code), sizeof(enable_code));
                return enabled = !enabled;
            }

    finding the CONSTANTS, on the other hand...
    Last edited by bobbysoon; November 18th, 2008 at 06:33 PM. Reason: cause I'm symanticidal
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •