Google
Resident Elite
 Inregistrat: acum 12 ani
Postari: 433
|
|
Credits: SDK
After looking around the SDK i found flNextPrimaryAttack and i started searching inside Olly... this is the proper way, how the engine calculates if the weapon can shoot or not... have fun!
Code:
int iUnknown0 = 0;
while ( flNextPrimaryAttack <= g_pGlobals->curtime + flRate )
{
flNextPrimaryAttack = ( flNextPrimaryAttack + flRate );
iUnknown0++;
}
if ( iUnknown0 > iClip )
{
iUnknown0 = iClip;
iClip -= iUnknown0;
}
if ( iUnknown0 <= g_pGlobals->interval_per_tick )
{
bCanPistol = true;
} |
|
|