Results 1 to 11 of 11

Thread: (ET) Coding advices

  1. #1
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default (ET) Coding advices

    Hi, could anyone direct me to an tutorial for finding cg_t,cgs_t,cg_entities memory offsets with OllyDbg please ?
    (It's for RTCW - ET ~ Yes i know its old. Few years ago I had an post from someone supplying these strucs, but cant find it nomore and lost my hook)
    So Im trying to build it again, my hookbase is ready, but my wallhack dont do anything, so I think the offsets are wrong.

  2. #2
    Join Date
    Jan 2010
    Location
    America
    Posts
    244
    Thanks
    510
    Thanked 172 Times in 120 Posts

    Default

    there are many open src's you can use to find the offsets.
    [SIGPIC][/SIGPIC]

  3. #3
    Join Date
    Jun 2000
    Posts
    603
    Thanks
    241
    Thanked 995 Times in 330 Posts

    Default

    post the cgame .dll and i'll show you
    Site: king-orgy.netcoders.cc 76561198053491311

  4. #4
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    never mind i dropped the clienthooking, however I found out to get the offsets from vmMain, where the first 5 calls are cgs_t, cg_t etc. Ecept for Etpro.
    with sum help from Stealth I made an opengl hook
    Did I mention its for Enemy Territory ? xD
    Last edited by dennisblah; 7th March 2013 at 08:21.

  5. #5
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sum help with ESP / Draw at players

    As so there are sum coders active here, I would like to ask an question.
    I'm doing a model rec in glDrawElements.
    Now when I try to put an text or line or quadric to the place, it seems to be scaling (in inverted way, the further I stand in distance, the bigger it gets)

    Can someone push me in the right direction for making an nice hitbox or just sum textdrawing on place ?

  6. #6
    Join Date
    Aug 2010
    Posts
    25
    Thanks
    18
    Thanked 21 Times in 10 Posts

    Default

    Quote Originally Posted by King-OrgY View Post
    post the cgame .dll and i'll show you
    Maybe one day, I will accept this offer as I really need to wrap my head around this... It's the only thing which I am failing horrible.

  7. #7
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Opengl shader visibility

    Dear coders, as in previous threads I already explained Im working on an opengl hack for Enemy Territory.
    Now it works fine but I'm 'fine-tuning' my hack, for example I need to find out of an player is visible.
    Or actually is NOT behind an wall.

    I found some examples using gluProject like in sum sourcecodes I found, but it doesnt seem to work quite well..
    Anyone can tell me how this exactly works ?

    cheers

  8. #8
    Join Date
    May 2009
    Posts
    3,079
    Thanks
    2,172
    Thanked 1,357 Times in 802 Posts

    Default

    /merged threads, stick to one thread please.
    ~ ~

  9. #9
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by lolzoruslockus View Post
    /merged threads, stick to one thread please.
    Ok, I'm sorry, please close thread

  10. #10
    Join Date
    Apr 2011
    Posts
    25
    Thanks
    0
    Thanked 27 Times in 15 Posts

    Default

    You're giving up way too fast on the engine part. Find out what's wrong with gluProject instead of putting it aside and looking for an alternative. This is what I have in mind:

    Code:
    bool IsVisible( GLfloat* pos ) {
    	GLdouble winX, winY, winZ;
    	
    	// http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml
    	GLfloat pixels;
    	glReadPixels( winX, winY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &pixels );
    
    	// http://www.opengl.org/sdk/docs/man2/xhtml/gluProject.xml
    	if ( gluProject( pos[0], pos[1], pos[2], modelView, projection, viewPort, &winX, &winY, &winZ ) )
    		return ( ( pixels < 0 ) ? pixels * -1 : pixels > winZ );
    
    	return false;
    }
    GL_DEPTH_COMPONENT does the trick, I bet.
    Quote Originally Posted by OpenGL SDK Docs
    Depth values are read from the depth buffer. Each component is converted to floating point such that the minimum depth value maps to 0 and the maximum value maps to 1. Each component is then multiplied by GL_DEPTH_SCALE, added to GL_DEPTH_BIAS, and finally clamped to the range 0 1 .
    All gluProject does is projecting object coordinates to screen (window) coordinates; you can't really do anything wrong with it when you read the documentation of OpenGL.

    To answer your first question related to several structures (cgs, cg, cg_entities, ...). The game is open source, reversing won't be a time consuming job then.

    Check CG_Init in cgame:
    Code:
    memset( &cgs, 0, sizeof( cgs ) );
    memset( &cg, 0, sizeof( cg ) );
    memset( cg_entities, 0, sizeof(cg_entities) );
    You may note several strings, lets pick "white". Do a string search, scroll up to the beginning of the function and you'll see the calls to memset. The instructions after point to the size, 0 and the pointer to the structures. If you still struggle with it, hit hexrays or study assembly.
    Last edited by mOwl; 8th March 2013 at 12:55.

  11. The Following 3 Users Say Thank You to mOwl For This Useful Post:

    lolzoruslockus (8th March 2013), Murder4higher (9th March 2013), Resurrected (17th March 2013)

  12. #11
    Join Date
    Mar 2013
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @m0wl, I know how to get the offsets, read sum earlier reply's of me. THanks tho
    About the gluProject, Im doing this. I actually found out there is nothing wrong, but must be something with the modelrec.

    I do this:
    Code:
    bool IsVisible(GLfloat x, GLfloat y, GLfloat z) {
    	bool result = false;
    	GLdouble wX, wY, wZ, m[16], p[16];
    	GLfloat px;
    	GLint vp[4];
    
    	glGetIntegerv(GL_VIEWPORT, vp);
    	glGetDoublev(GL_MODELVIEW_MATRIX, mvmx);
    	glGetDoublev(GL_PROJECTION_MATRIX, pmx);
    	
    	if (gluProject(x, y, z, mvmx, pmx, vp, &winX, &winY, &winZ) == GL_TRUE) {
    		glReadPixels((int)wX, (int)wY, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT,&pixs);
    		if (abs(pixs) > winZ) {
    			result = true;
    		}
    	}
    	return result;
    }
    Actually the same, except for the check for negative value i just make it absolute just in case..
    But it is working, but it seems like my modelrec (actually ETH's modelrec) aint quite perfect
    When I scan for player head like this
    Code:
    strstr(shader,"players/hud") && strstr(shader,"axis") {
    objecttowindow(Window)
    if(isVisible(Window[0],Window[1],Window[2]))
     AddToArray(Window[0],Window[1],Window[2])
    But then, it only aims when Im looking or from above on top, or from the sides of the head
    And so the aimpoint is switching from enemy continously..
    I tried to scan for the helmet in drawelements, and return without drawelements() so it wont get drawn, cus maybe the helmet is blocking the 'head' model, but this didnt seem to help any..

    Therefor I still dont know the problem. And I'd like to think of a way to lock on the target until its dead
    Like.. only the current target's coords needs to be refreshed not the others, but I think its too much for an pure gl hook
    Last edited by dennisblah; 15th March 2013 at 15:20. Reason: sum typo's

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •