CMapChunk memory structure menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    Master674's Avatar Elite User
    Reputation
    487
    Join Date
    May 2008
    Posts
    578
    Thanks G/R
    2/23
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CMapChunk memory structure

    <something used to be here... its gone now>
    Last edited by Master674; 10-15-2012 at 12:49 PM.

    CMapChunk memory structure
  2. #2
    DrakeFish's Avatar Lazy Leecher

    Reputation
    634
    Join Date
    Nov 2008
    Posts
    569
    Thanks G/R
    0/14
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Master674 View Post
    Hey, I messed around with those today, basically this way lets you get the current chunk and height of terrain by just providing game coords:

    Code:
    CMap::LinkStaticEntityGetChunk - 0x7342A0, not rebased
    Btw: HexRays is failing there, this function is a __thiscall and you need to call it like this:

    Code:
    float fUnknown = 100000.0f; // always 100000...
    DWORD_PTR dwChunk = 0; // out chunk offset
    DWORD_PTR dwMapBasePtr = *reinterpret_cast<DWORD_PTR*>( 0xE71E90 );
    DWORD_PTR dwChunkPtr = reinterpret_cast<DWORD_PTR (__thiscall*)( DWORD_PTR, CVec3* )>( 0x731540 )( dwMapBasePtr, &loc );
    
    // Get the terrain height and current chunk base!
    float fTerrainHeight = reinterpret_cast<float (__thiscall*)( DWORD_PTR, CVec3*, float*, DWORD_PTR* )>( 0x7342A0 )( dwChunkPtr, &loc, &fUnknown, &dwChunk );
    
    // Set the chunk height to += 5
    *reinterpret_cast<float*>( dwChunk + 0xB4 ) += 5;
    The code here get the chunk for the provided game location (C3Vector) and sets the base chunk height to += 5. Note that you will probably need a /console GxRestart unless you call the terrain update function / patch some gxrestart variables.

    If you look into that function you will see that it calls CMap::GetHeightTerrain which indexes the triangles of the current chunk to get the exact terrain height.
    Now I wonder if anyone messed with those structures, seems quite hard to reverse this :c

    EDIT: Screenie

    I think JJAA worked on modifying the environment in real-time. I remember him posting a video in the screenshots thread a few months (years?) ago.
    Last edited by DrakeFish; 08-20-2012 at 09:02 AM.

  3. #3
    Master674's Avatar Elite User
    Reputation
    487
    Join Date
    May 2008
    Posts
    578
    Thanks G/R
    2/23
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <something used to be here... its gone now>
    Last edited by Master674; 10-15-2012 at 12:48 PM.

Similar Threads

  1. what is different between Win 7 and XP about memory structure?
    By crazylzd in forum WoW Memory Editing
    Replies: 2
    Last Post: 02-26-2012, 05:34 PM
  2. WoW 3.1.0's New Memory Model Structure
    By UnknOwned in forum WoW Memory Editing
    Replies: 1
    Last Post: 04-19-2009, 06:33 AM
  3. Current Memory Structure
    By capullo in forum Age of Conan Exploits|Hacks
    Replies: 4
    Last Post: 08-07-2008, 08:48 AM
  4. Tsearch / whatever other memory hacker
    By Beastslayer in forum World of Warcraft Guides
    Replies: 5
    Last Post: 04-09-2007, 07:39 PM
  5. How do you find memory offsets in the game?
    By koalaz2004 in forum World of Warcraft General
    Replies: 0
    Last Post: 08-18-2006, 09:40 PM
All times are GMT -5. The time now is 01:53 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search