Originally Posted by
0x28
If it crashes on injection then I know the issue and I can fix it in next build.
Also if someone wants to show me how to find the entity list and loop through them, that would be great
Well, 30 minutes for this is fine for a beginner, you can actually achieve this without hooking, I remember just patching a couple of bytes in MW2. What do you want the entity list for? If you tell me what you're trying to accomplish I can help you better. Also note that you already get a cpose_t* passed into R_AddDObjToScene, which is interchangeable with a centity_s* because it's the first member in the struct. For reference look at the signature:
Code:
void __cdecl R_AddDObjToScene(DObj *obj, cpose_t *pose, unsigned int entnum, unsigned int renderFxFlags, float *lightingOrigin, float materialTime, float materialTime2, float burnFraction, float wetness, int altXModel, int textureOverrideIndex, ShaderConstantSet *dobjConstantSet, ShaderConstantSet *dobjConstantSetExtraCam, float lightingOriginToleranceSq, float scale)
If you actually want (or even need?) my help you should send me the most recent bo1 exe so that I can actually reverse stuff.
PS: Hope you don't mind if I give you some feedback on your code. You can call GetModuleHandle with nullptr, NULL or 0 as parameter instead of "BlackOpsMP.exe", it has the same effect but is easier. Also I don't think that pattern scanning is necessary, the game probably won't get updated so why not make your life a bit easier and just use addresses. One last thing, you should build your project in release mode, "Seb" :P
-- Xen0