// punkbuster.c #define _GNU_SOURCE #include "eth.h" #include #include #include #include void eth_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) { unsigned int caller = (unsigned int)__builtin_return_address(0); if (((caller < seth.textSectionStart) || (caller > seth.textSectionEnd)) && eth.sv_punkbusterState) { eth.pbss++; } else { orig_glReadPixels(x, y, width, height, format, type, pixels); } }