CowNowK/AimStar

Current map name

tewshi0 opened this issue · 4 comments

How do you get current map name?
I tried getting it using globalvars::GetCurrentMapName() but it crashes the program

The commented out code at

//CGlobalVarsBase Global_Vars;
//if (!ProcessMgr.ReadMemory<CGlobalVarsBase>(gGame.GetGlobalVarsAddress(), Global_Vars))
//return;
//std::string MapName;
//if (!ProcessMgr.ReadMemory<std::string>(Global_Vars.m_uCurrentMapName, MapName))
//return;
//MenuConfig::CurMap = MapName;
seems to be based on https://www.unknowncheats.me/forum/4166432-post2.html which also crashes the program.

i have not figured out what's wrong, so i have no idea how to fetch current mapname.that's why estim bomb damage isnot always correct.

globalvars from a2x returns pointer of globalvars, instead of globalvars itself.
anyway, current struct can fetch proper tickcount,currenttime etc. but address of current map still looks not right