//////// aimbot.c // Self Prediction if (seth.value[VAR_SELFPREDICT]) { vec3_t pVieworg; if (seth.value[VAR_SELFPREDICT] == SELFPREDICT_AUTO) { VectorMA(eth.cg_refdef.vieworg, (float)(eth.cg_frametime) / 1000.0f, eth.cg_entities[eth.cg_clientNum].currentState->pos.trDelta, pVieworg); } else if (seth.value[VAR_SELFPREDICT] == SELFPREDICT_MANUAL) { VectorMA(eth.cg_refdef.vieworg, seth.value[VAR_SELFPREDICT_VALUE] / 100.0f, eth.cg_entities[eth.cg_clientNum].currentState->pos.trDelta, pVieworg); } else { ethLog("error: invalid aim prediction type: %i", seth.value[VAR_SELFPREDICT]); VectorCopy(eth.cg_refdef.vieworg, pVieworg); } VectorSubtract(target, pVieworg, org); } else { VectorSubtract(target, eth.cg_refdef.vieworg, org); } vectoangles(org, ang); ang[PITCH] -= eth.cg_refdefViewAngles[PITCH]; ang[YAW] -= eth.cg_refdefViewAngles[YAW]; // Frametime prediction based if (seth.value[VAR_AIMPREDICT] == AIMPREDICT_AUTO) { VectorMA (entity->head, eth.cg_snap->ping / 800, eth.cg_entities[player].currentState->pos.trDelta, entity->head); VectorMA (entity->head, eth.cg_snap->ping / 800, eth.cg_entities[player].currentState->pos.trDelta, entity->head); } else if (seth.value[VAR_AIMPREDICT] == AIMPREDICT_AUTOB) { vec3_t velocity; VectorScale(eth.cg_entities[player].currentState->pos.trDelta,700.0f / ((float)(eth.cg_frametime) - eth.cg_entities[player].currentState->pos.trTime) , velocity); VectorMA(entity->origin, seth.value[VAR_AIMPREDICT_VALUE] / 100.0f, velocity, entity->origin); VectorMA(entity->head, seth.value[VAR_AIMPREDICT_VALUE] / 100.0f, velocity, entity->head); } else if (seth.value[VAR_AIMPREDICT] == AIMPREDICT_AUTOC) { vec3_t velocity; VectorScale(eth.cg_entities[player].currentState->pos.trDelta,1000.0f / ((float)(eth.cg_frametime) - eth.cg_entities[player].currentState->pos.trTime) , velocity); VectorMA(entity->origin, (float)(eth.cg_frametime) / 1000.0f, velocity, entity->origin); VectorMA(entity->head, (float)(eth.cg_frametime) / 1000.0f, velocity, entity->head); } else if (seth.value[VAR_AIMPREDICT] == AIMPREDICT_MANUAL) { VectorMA(entity->head, seth.value[VAR_AIMPREDICT_VALUE] / 100, eth.cg_entities[player].currentState->pos.trDelta, entity->head); VectorMA(entity->head, seth.value[VAR_AIMPREDICT_VALUE] / 100, eth.cg_entities[player].currentState->pos.trDelta, entity->head); } else ethLog("error: invalid aim prediction type: %i", seth.value[VAR_AIMPREDICT]); } ///////////// menu.c seth.vars[VAR_AIMPREDICT] = (ethVars_t) { "Enemy prediction type", qfalse, "epredict", CAT_AIMBOT, qfalse, { { "Off", AIMPREDICT_OFF }, { "Auto", AIMPREDICT_AUTO }, { "Manual", AIMPREDICT_MANUAL } , { "AUTO B", AIMPREDICT_AUTOB }, { "AUTO C", AIMPREDICT_AUTOC } } }; seth.vars[VAR_AIMPREDICT_VALUE] = (ethVars_t) { "Enemy predict value", 0.0f, "epredict_value", CAT_AIMBOT, qfalse, {} }; seth.vars[VAR_SELFPREDICT] = (ethVars_t) { "Self prediction type", qfalse, "spredict", CAT_AIMBOT, qfalse, { { "Off", SELFPREDICT_OFF }, { "Auto", SELFPREDICT_AUTO }, { "Manual", SELFPREDICT_MANUAL } } }; seth.vars[VAR_SELFPREDICT_VALUE] = (ethVars_t) { "Self predict value", 0.0f, "spredict_value", CAT_AIMBOT, qfalse, {} }; ///////////// menu.h VAR_AIMPREDICT, VAR_AIMPREDICT_VALUE, VAR_SELFPREDICT, VAR_SELFPREDICT_VALUE, typedef enum { AIMPREDICT_OFF, AIMPREDICT_AUTO, AIMPREDICT_AUTOB, AIMPREDICT_AUTOC, AIMPREDICT_MANUAL } aimPredict_t; typedef enum { SELFPREDICT_OFF, SELFPREDICT_AUTO, SELFPREDICT_MANUAL } selfPredict_t;