Unlock code for sniper ghost warrior

broken image

The function that should've been executed is called DrawStringImmediate, declared in IRenderAuxGeom.h file.

broken image

Next after this call, another is executed, and the offset to the member-function points to a RETN (thus nothing gets executed, as opposed to the behavior seen while debugging the SDK demo game). The reason no text is displayed in the console (although it's there) is GetIRenderAuxGeom member-function in IRenderer class doesn't return the appropriate pointer. However, with proper enabling, the console accepts input from the keyboard (you just won't see the text being typed on screen or the query's response - e.g.: querying CVars for their status/value). In time, I've figured out that most games have a working console in release build, but there's a catch: the console is disabled via a BOOL and the rendering text is not processed as some auxiliary rendering functions are not compiled (they're available only in the debug build). So much, that I got to study it quite a bit, making use of the available free SDK and various online sources. Ever since SGW3 went out, soon followed by Prey, I became interested in CryEngine.

broken image