Hi guys,
I am working on a hack for Assaultcube. Currently I have:
- Aimbot (With or without player's prediction on next frame render)
- Switch pistol for Akimbo
- Full whois (if not admin of server)
- Linehack
- Invincibility
- Triggerbot
- Disable recoil
- Multiplayer editmode
- Removal of reload waiting
- infinite ammo
- all guns available at any time
- knife hack - knife someone across the rool
- grenade on spawn
- remove shotgun spread - deal 500 pts damage
- Perfect accuracy
However the line hack listed above - I am having issues getting it to actually work.
Everything is fine up until I draw the line. It detects the enemy players, then draws a line.
To draw a line, it passes the enemy player's vector as a parameter and the current player's vector as a parameter (may remove current players vector depending what I find here).
Now I need to change the enemy's vector into a screen position. This is where I am having the issues.
First of all I tried drawing the line straight from the vectors - this basically gave me another minimap.
Then I tried using getyawpitch - that majorly screwed things up.
Now I realise that maybe there is an algorithm to work out screen position to vector. I scour the code vigorously to find this algorithm. No luck.
I google 'Assaultcube vectors'. No luck there. Then I find something in the code - it leads me to what I now believe is that the Assaultcube code is not necessarily what handles the vectors, but GL is. So that leaves me with the following code and linking error:
Code:
#include <GL/GLU.h>
void drawLine(const vec &from, const vec &to)
{
GLdouble *scr_x, *scr_y, *scr_z;
GLdouble model_view[16];
glGetDoublev(GL_MODELVIEW_MATRIX, model_view);
GLdouble projection[16];
glGetDoublev(GL_PROJECTION_MATRIX, projection);
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
gluProject(to.x, to.y, to.z, model_view, projection, viewport, scr_x, scr_y, scr_z);
glBegin(GL_LINES);
glVertex2d((screen->w/2), screen->h);
glVertex2d(*scr_x, *scr_y);
glEnd();
}
Code:
error LNK2001: unresolved external symbol _gluProject@48
I am a complete n00b with GL functions.
I am using VC++ 2010 Express.
Thanks in advance.