Download page
the download is version 1.0.2, you'll need to apply the 1.0.4 patch which can be found on the same page.
Download the sourcecode
Some information about assaultcube:
40mb in size
OpenGL
Opensource
No anticheats
No dev enforced builds(epic fail )
Since this game doesnt enforce dev builds, you can just recompile the source, replace the games exe and you're good to go
Other pieces of code:
Shooting through walls
No spread and Recoil(this page)
Aimbot
Teleport the flag to you
Open up headers/weapons.h
The first struct you see when you open that up is the weapons struct.
Have a look at its content.
Ooh what is that?! :O guninfo?!?!
Code:
const struct guninfo &info;
Right click on guninfo and press go to definition, you should now end up in entity.h on the following line:
Code:
struct guninfo { string modelname; short sound, reload, reloadtime, attackdelay, damage, projspeed, part, spread, recoil, magsize, mdl_kick_rot, mdl_kick_back, recoilincrease, recoilbase, maxrecoil, recoilbackfade, pushfactor; bool isauto; };
By counting the items starting at modelname(which is 0) you'd see spread is the 9th item and recoil the 10th item, looking even further towards the end you see recoilincrease etc.
now take a look at the stuff below that line, which is the actual gun info.
Code:
static guninfo guns[NUMGUNS] =
{
{ "knife", S_KNIFE, S_NULL, 0, 500, 50, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, false },
{ "pistol", S_PISTOL, S_RPISTOL, 1400, 170, 19, 0, 0, 80, 10, 8, 6, 5, 1, 40, 75, 150, 1, false },
{ "shotgun", S_SHOTGUN, S_RSHOTGUN, 2400, 1000, 5, 0, 0, 1, 35, 7, 9, 9, 10, 60, 60, 100, 1, false },
{ "subgun", S_SUBGUN, S_RSUBGUN, 1650, 80, 16, 0, 0, 70, 15, 30, 1, 2, 5, 15, 55, 250, 1, true },
{ "sniper", S_SNIPER, S_RSNIPER, 1950, 1500, 85, 0, 0, 60, 50, 5, 4, 4, 10, 70, 70, 100, 1, false },
{ "assault", S_ASSAULT, S_RASSAULT, 2000, 130, 24, 0, 0, 20, 40, 15, 0, 2, 2, 25, 60, 150, 1, true },
{ "grenade", S_NULL, S_NULL, 1000, 650, 200, 20, 6, 1, 1, 1, 3, 1, 0, 0, 0, 0, 3, false },
{ "pistol", S_PISTOL, S_RAKIMBO, 1400, 80, 19, 0, 0, 80, 10, 16, 6, 5, 6, 15, 30, 100, 1, true },
};
lets edit all recoil and spread related items:
Code:
static guninfo guns[NUMGUNS] =
{
{ "knife", S_KNIFE, S_NULL, 0, 500, 50, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, false },
{ "pistol", S_PISTOL, S_RPISTOL, 1400, 170, 19, 0, 0, 0, 0, 8, 6, 5, 0, 0, 0, 0, 0, false },
{ "shotgun", S_SHOTGUN, S_RSHOTGUN, 2400, 1000, 5, 0, 0, 0, 0, 7, 9, 9, 0, 0, 0, 0, 0, false },
{ "subgun", S_SUBGUN, S_RSUBGUN, 1650, 80, 16, 0, 0, 0, 0, 30, 1, 2, 0, 0, 0, 0, 0, true },
{ "sniper", S_SNIPER, S_RSNIPER, 1950, 1500, 85, 0, 0, 0, 0, 5, 4, 4, 0, 0, 0, 0, 0, false },
{ "assault", S_ASSAULT, S_RASSAULT, 2000, 130, 24, 0, 0, 0, 0, 15, 0, 2, 0, 0, 0, 0, 0, true },
{ "grenade", S_NULL, S_NULL, 1000, 650, 200, 20, 6, 0, 0, 1, 3, 1, 0, 0, 0, 0, 0, false },
{ "pistol", S_PISTOL, S_RAKIMBO, 1400, 80, 19, 0, 0, 0, 0, 16, 6, 5, 0, 0, 0, 0, 0, true },
};
woot, no more pushback, no recoil, no spread, no visual recoil and spread