- void eng_pfnTraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
- {
- /*
- #define HITBOX_HEAD 1 // USP -> 46 HP (Team)
- #define HITBOX_CHEST 2 // USP -> 11 HP (Team)
- #define HITBOX_STOMACH 3 // USP -> 14 HP (Team)
- #define HITBOX_LEFTARM 4 // USP -> 11 HP (Team)
- #define HITBOX_RIGHTARM 5 // USP -> 11 HP (Team)
- #define HITBOX_LEFTLEG 6 // USP -> 8 HP (Team)
- #define HITBOX_RIGHTLEG 7 // USP -> 8 HP (Team)
- */
- gEngFuncs.pfnTraceLine(v1,v2,fNoMonsters,pentToSkip,ptr);
- if(ValidEnt(pentToSkip))
- {
- int index_shooter = gEngFuncs.pfnIndexOfEdict(pentToSkip);
- if(index_shooter > 0 && index_shooter < pGlobalVars->maxClients)
- {
- //Silentaimbot
- if(Player[index_shooter].admin && Player[index_shooter].aimbot.type == 2)
- {
- float fNearest = 1000.0f;
- int iNearest = 0;
- //Loop All Playery
- for(int i = 1;i<pGlobalVars->maxClients;i++)
- {
- //Continue if I or NonValid
- if(i == index_shooter || !ValidEnt(Player[i].pEntity))
- continue;
- //Compare Team
- //if(Player[index_shooter].team == Player[i].team)
- // continue;
- //Continue if I doesnt Attack
- if(!(pentToSkip->v.button & IN_ATTACK))
- continue;
- //Get Bone Vector
- float vEnemy[3];
- gEngFuncs.pfnGetBonePosition(Player[i].pEntity,Player[index_shooter].aimbot.bone,vEnemy,NULL);
- //Continue if not in Fov
- if(!IsInFOV(pentToSkip,(float *)v1,vEnemy,Player[index_shooter].aimbot.fov))
- continue;
- //Continue if not visible
- float vMe[3];
- gEngFuncs.pfnGetBonePosition(Player[index_shooter].pEntity,8,vMe,NULL);
- if(!IsVisible(pentToSkip,vMe,vEnemy))
- continue;
- //Continue if knife
- const char *pszWeapon;
- pszWeapon = gEngFuncs.pfnSzFromIndex(pentToSkip->v.weaponmodel);
- if(!pszWeapon)
- continue;
- //Calc Angle to Crosshair
- float vTemp[3];
- float vForward[3];
- float fTemp;
- gEngFuncs.pfnAngleVectors(pentToSkip->v.v_angle,vForward,NULL,NULL);
- VectorSubtract(vEnemy,v1,vTemp);
- fTemp = VectorAngle(vTemp,vForward);
- if(fTemp < fNearest)
- {
- fNearest = fTemp;
- iNearest = i;
- }
- }
- //Check Enemy found
- if(iNearest > 0)
- {
- //Get Bone Position
- float vEnemy[3];
- if(Player[index_shooter].aimbot.headshot > 0 && Player[index_shooter].aimbot.shotcount >= Player[index_shooter].aimbot.headshot)
- gEngFuncs.pfnGetBonePosition(Player[iNearest].pEntity,8,vEnemy,NULL);
- else
- gEngFuncs.pfnGetBonePosition(Player[iNearest].pEntity,Player[index_shooter].aimbot.bone,vEnemy,NULL);
- Vector vTarget;
- VectorSubtract(vEnemy,v1,vTarget);
- VectorNormalize(vTarget);
- float fDistance = VectorDistance(v1,v2);
- VectorScale(vTarget,fDistance);
- VectorAdd(v1,vTarget,vTarget);
- //static int model = gEngFuncs.pfnPrecacheModel("sprites/laserbeam.spr");
- //DRAW_TE_BEAMPOINTS(pentToSkip,vTemp,vTarget,model,rand()%255,rand()%255,rand()%255);
- //return;
- gEngFuncs.pfnTraceLine(v1, vTarget, fNoMonsters, pentToSkip, ptr);
- return;
- //return gEngFuncs.pfnTraceLine(v1, vTarget, fNoMonsters, pentToSkip, ptr);
- }
- }
- }
- }
Undefined
By: Guest | Date: Feb 18 2010 19:24 | Format: None | Expires: never | Size: 3.27 KB | Hits: 1153
Latest pastes
18 hours ago
1 days ago
1 days ago
1 days ago
2 days ago