Skip to content

Dev Tips

Qais Patankar edited this page Aug 19, 2019 · 14 revisions

Let's document things. Even tiny ones. Don't ask, don't think too much about formatting. Just put any important knowledge about the project here in any readable form.

Project Modules

Raw memory access

botder Today at 5:51 PM
You might not like it, but changing memory directly in deathmatch.dll is not ok
Raw memory address + memcpy in mods/deathmatch/logic/CClientGame.cpp
botder Today at 5:52 PM
multiplayer are hooks and some other weird stuff
game_sa is the "game interface layer"
so if you want to modify the game, do it through the game layer
if you make code for deathmath.dll you are not forced to understand how the game is in memory(edited)
Cazomino05 Today at 6:02 PM
multiplayer sa is hooks and memory modifications e.g. disabling code paths or any other memory overwrites you can think of

Assembler

Getting return address (credits: Saml1er)

Declare DWORD dwReturnAddress = 0; outside function, then in _asm block add this code

push eax // save eax
mov eax, [esp + 4] // get return address
mov dwReturnAddress, eax
pop eax  // restore eax value

Now you can check from where gta function was called.

Clone this wiki locally