Testing the carbine (an old project from the devs), thanks to makkE for the advice (and the work, of course)!

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4852 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-05-14 16:39:21 +00:00
parent a00c5cf5b3
commit 1a458c0078
5 changed files with 20 additions and 4 deletions
+1
View File
@@ -305,6 +305,7 @@ bool selectnextprimary(int num)
{
switch(num)
{
case GUN_RIFLE:
case GUN_SHOTGUN:
case GUN_SUBGUN:
case GUN_SNIPER:
+1 -1
View File
@@ -41,7 +41,7 @@ struct entity : persistent_entity
}
};
enum { GUN_KNIFE = 0, GUN_PISTOL, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIPER, GUN_ASSAULT, GUN_GRENADE, GUN_AKIMBO, NUMGUNS };
enum { GUN_KNIFE = 0, GUN_PISTOL, GUN_RIFLE, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIPER, GUN_ASSAULT, GUN_GRENADE, GUN_AKIMBO, NUMGUNS };
#define reloadable_gun(g) (g != GUN_KNIFE && g != GUN_GRENADE)
#define SGRAYS 21
+5 -3
View File
@@ -376,12 +376,13 @@ itemstat ammostats[NUMGUNS] =
{
{1, 1, 1, S_ITEMAMMO}, //knife dummy
{16, 32, 72, S_ITEMAMMO}, //pistol
{15, 30, 20, S_ITEMAMMO}, //rifle (temporary values)
{14, 28, 21, S_ITEMAMMO}, //shotgun
{60, 90, 90, S_ITEMAMMO}, //subgun
{10, 20, 15, S_ITEMAMMO}, //sniper
{30, 60, 60, S_ITEMAMMO}, //assault
{2, 0, 2, S_ITEMAMMO}, //grenade
{72, 0, 72, S_ITEMAKIMBO} //akimbo
{72, 0, 72, S_ITEMAKIMBO} //akimbo
};
itemstat powerupstats[I_ARMOUR-I_HEALTH+1] =
@@ -394,10 +395,11 @@ 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 },
{ "rifle", S_ASSAULT, S_RASSAULT, 1950, 600, 45, 0, 0, 60, 50, 10, 4, 4, 2, 100, 60, 150, 1, false }, // temporary values
{ "shotgun", S_SHOTGUN, S_RSHOTGUN, 2400, 1000, 5, 0, 0, 1, 35, 7, 9, 9, 1, 130, 500, 150, 1, false },
{ "subgun", S_SUBGUN, S_RSUBGUN, 1650, 80, 16, 0, 0, 70, 15, 30, 1, 2, 7, 15, 30, 250, 1, true },
{ "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, 1, 100, 500, 100, 1, false },
{ "assault", S_ASSAULT, S_RASSAULT, 2000, 130, 24, 0, 0, 20, 40, 15, 0, 2, 2, 25, 60, 150, 1, true },
{ "assault", S_ASSAULT, S_RASSAULT, 2000, 130, 24, 0, 0, 20, 40, 20, 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, 4, 30, 75, 150, 1, true },
};
+7
View File
@@ -695,6 +695,7 @@ void weapon::equipplayer(playerent *pl)
pl->weapons[GUN_GRENADE] = new grenades(pl);
pl->weapons[GUN_KNIFE] = new knife(pl);
pl->weapons[GUN_PISTOL] = new pistol(pl);
pl->weapons[GUN_RIFLE] = new rifle(pl);
pl->weapons[GUN_SHOTGUN] = new shotgun(pl);
pl->weapons[GUN_SNIPER] = new sniperrifle(pl);
pl->weapons[GUN_SUBGUN] = new subgun(pl);
@@ -1106,6 +1107,12 @@ void sniperrifle::setscope(bool enable)
}
}
// rifle
rifle::rifle(playerent *owner) : gun(owner, GUN_RIFLE) {}
bool rifle::selectable() { return weapon::selectable() && !m_noprimary && this == owner->primweap; }
// assaultrifle
+6
View File
@@ -118,6 +118,12 @@ struct sniperrifle : gun
};
struct rifle : gun
{
rifle(playerent *owner);
bool selectable();
};
struct shotgun : gun
{
shotgun(playerent *owner);