summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-10-03 11:45:01 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:18 +0000
commita60e24850d73f8d807bab40f256a3e017219f17e (patch)
tree98e8e4b8090889954bca023a0834d53b77ff808d /src
parentf7e1f6ab256e2efa67d4e01dd15d45c1bcf6ce8f (diff)
* (bug 3595) /sell upgrades doesn't change player model for battlesuit
(Ben Millwood) * (bug 3599) adminLevel can be wrong * Reorder *Attributes_t arrays to match corresponding enums * Simplify BG_Buildable, BG_Class, BG_Weapon, and BG_Upgrade * Remove a couple unnecessary config string hacks * !unmute was saying !mute in some messages
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_misc.c1020
-rw-r--r--src/game/g_admin.c46
-rw-r--r--src/game/g_client.c16
-rw-r--r--src/game/g_cmds.c2
-rw-r--r--src/game/g_local.h2
-rw-r--r--src/game/g_main.c2
6 files changed, 529 insertions, 559 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 06b85773..9f8ce9e4 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -70,6 +70,41 @@ static const buildableAttributes_t bg_buildableList[ ] =
ASPAWN_VALUE, //int value;
},
{
+ BA_A_OVERMIND, //int buildNum;
+ "overmind", //char *buildName;
+ "Overmind", //char *humanName;
+ "A collective consciousness that controls all the alien structures "
+ "in its vicinity. It must be protected at all costs, since its "
+ "death will render alien structures defenseless.",
+ "team_alien_overmind", //char *entityName;
+ TR_GRAVITY, //trType_t traj;
+ 0.0, //float bounce;
+ OVERMIND_BP, //int buildPoints;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ OVERMIND_HEALTH, //int health;
+ OVERMIND_REGEN, //int regenRate;
+ OVERMIND_SPLASHDAMAGE, //int splashDamage;
+ OVERMIND_SPLASHRADIUS, //int splashRadius;
+ MOD_ASPAWN, //int meansOfDeath;
+ TEAM_ALIENS, //int team;
+ ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
+ BANIM_IDLE1, //int idleAnim;
+ OVERMIND_ATTACK_REPEAT,//int nextthink;
+ OVERMIND_BT, //int buildTime;
+ qfalse, //qboolean usable;
+ 0, //int turretRange;
+ 0, //int turretFireSpeed;
+ WP_NONE, //weapon_t turretProjType;
+ 0.95f, //float minNormal;
+ qfalse, //qboolean invertNormal;
+ qfalse, //qboolean creepTest;
+ OVERMIND_CREEPSIZE, //int creepSize;
+ qfalse, //qboolean dccTest;
+ qfalse, //qboolean transparentTest;
+ qtrue, //qboolean uniqueTest;
+ OVERMIND_VALUE, //int value;
+ },
+ {
BA_A_BARRICADE, //int buildNum;
"barricade", //char *buildName;
"Barricade", //char *humanName;
@@ -105,42 +140,6 @@ static const buildableAttributes_t bg_buildableList[ ] =
BARRICADE_VALUE, //int value;
},
{
- BA_A_BOOSTER, //int buildNum;
- "booster", //char *buildName;
- "Booster", //char *humanName;
- "Laces the attacks of any alien that touches it with a poison "
- "that will gradually deal damage to any humans exposed to it. "
- "The booster also increases the rate of health regeneration for "
- "any nearby aliens.",
- "team_alien_booster", //char *entityName;
- TR_GRAVITY, //trType_t traj;
- 0.0, //float bounce;
- BOOSTER_BP, //int buildPoints;
- ( 1 << S2 )|( 1 << S3 ), //int stages
- BOOSTER_HEALTH, //int health;
- BOOSTER_REGEN, //int regenRate;
- BOOSTER_SPLASHDAMAGE, //int splashDamage;
- BOOSTER_SPLASHRADIUS, //int splashRadius;
- MOD_ASPAWN, //int meansOfDeath;
- TEAM_ALIENS, //int team;
- ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
- BANIM_IDLE1, //int idleAnim;
- 100, //int nextthink;
- BOOSTER_BT, //int buildTime;
- qfalse, //qboolean usable;
- 0, //int turretRange;
- 0, //int turretFireSpeed;
- WP_NONE, //weapon_t turretProjType;
- 0.707f, //float minNormal;
- qfalse, //qboolean invertNormal;
- qtrue, //qboolean creepTest;
- BOOSTER_CREEPSIZE, //int creepSize;
- qfalse, //qboolean dccTest;
- qtrue, //qboolean transparentTest;
- qfalse, //qboolean uniqueTest;
- BOOSTER_VALUE, //int value;
- },
- {
BA_A_ACIDTUBE, //int buildNum;
"acid_tube", //char *buildName;
"Acid Tube", //char *humanName;
@@ -176,40 +175,6 @@ static const buildableAttributes_t bg_buildableList[ ] =
ACIDTUBE_VALUE, //int value;
},
{
- BA_A_HIVE, //int buildNum;
- "hive", //char *buildName;
- "Hive", //char *humanName;
- "Houses millions of tiny insectoid aliens. When a human "
- "approaches this structure, the insectoids attack.",
- "team_alien_hive", //char *entityName;
- TR_GRAVITY, //trType_t traj;
- 0.0, //float bounce;
- HIVE_BP, //int buildPoints;
- ( 1 << S3 ), //int stages
- HIVE_HEALTH, //int health;
- HIVE_REGEN, //int regenRate;
- HIVE_SPLASHDAMAGE, //int splashDamage;
- HIVE_SPLASHRADIUS, //int splashRadius;
- MOD_ASPAWN, //int meansOfDeath;
- TEAM_ALIENS, //int team;
- ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
- BANIM_IDLE1, //int idleAnim;
- 500, //int nextthink;
- HIVE_BT, //int buildTime;
- qfalse, //qboolean usable;
- 0, //int turretRange;
- 0, //int turretFireSpeed;
- WP_HIVE, //weapon_t turretProjType;
- 0.0f, //float minNormal;
- qtrue, //qboolean invertNormal;
- qtrue, //qboolean creepTest;
- HIVE_CREEPSIZE, //int creepSize;
- qfalse, //qboolean dccTest;
- qfalse, //qboolean transparentTest;
- qfalse, //qboolean uniqueTest;
- HIVE_VALUE, //int value;
- },
- {
BA_A_TRAPPER, //int buildNum;
"trapper", //char *buildName;
"Trapper", //char *humanName;
@@ -245,39 +210,74 @@ static const buildableAttributes_t bg_buildableList[ ] =
TRAPPER_VALUE, //int value;
},
{
- BA_A_OVERMIND, //int buildNum;
- "overmind", //char *buildName;
- "Overmind", //char *humanName;
- "A collective consciousness that controls all the alien structures "
- "in its vicinity. It must be protected at all costs, since its "
- "death will render alien structures defenseless.",
- "team_alien_overmind", //char *entityName;
+ BA_A_BOOSTER, //int buildNum;
+ "booster", //char *buildName;
+ "Booster", //char *humanName;
+ "Laces the attacks of any alien that touches it with a poison "
+ "that will gradually deal damage to any humans exposed to it. "
+ "The booster also increases the rate of health regeneration for "
+ "any nearby aliens.",
+ "team_alien_booster", //char *entityName;
TR_GRAVITY, //trType_t traj;
0.0, //float bounce;
- OVERMIND_BP, //int buildPoints;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- OVERMIND_HEALTH, //int health;
- OVERMIND_REGEN, //int regenRate;
- OVERMIND_SPLASHDAMAGE, //int splashDamage;
- OVERMIND_SPLASHRADIUS, //int splashRadius;
+ BOOSTER_BP, //int buildPoints;
+ ( 1 << S2 )|( 1 << S3 ), //int stages
+ BOOSTER_HEALTH, //int health;
+ BOOSTER_REGEN, //int regenRate;
+ BOOSTER_SPLASHDAMAGE, //int splashDamage;
+ BOOSTER_SPLASHRADIUS, //int splashRadius;
MOD_ASPAWN, //int meansOfDeath;
- TEAM_ALIENS, //int team;
- ( 1 << WP_ABUILD )|( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
+ TEAM_ALIENS, //int team;
+ ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
BANIM_IDLE1, //int idleAnim;
- OVERMIND_ATTACK_REPEAT,//int nextthink;
- OVERMIND_BT, //int buildTime;
+ 100, //int nextthink;
+ BOOSTER_BT, //int buildTime;
qfalse, //qboolean usable;
0, //int turretRange;
0, //int turretFireSpeed;
WP_NONE, //weapon_t turretProjType;
- 0.95f, //float minNormal;
+ 0.707f, //float minNormal;
qfalse, //qboolean invertNormal;
- qfalse, //qboolean creepTest;
- OVERMIND_CREEPSIZE, //int creepSize;
+ qtrue, //qboolean creepTest;
+ BOOSTER_CREEPSIZE, //int creepSize;
+ qfalse, //qboolean dccTest;
+ qtrue, //qboolean transparentTest;
+ qfalse, //qboolean uniqueTest;
+ BOOSTER_VALUE, //int value;
+ },
+ {
+ BA_A_HIVE, //int buildNum;
+ "hive", //char *buildName;
+ "Hive", //char *humanName;
+ "Houses millions of tiny insectoid aliens. When a human "
+ "approaches this structure, the insectoids attack.",
+ "team_alien_hive", //char *entityName;
+ TR_GRAVITY, //trType_t traj;
+ 0.0, //float bounce;
+ HIVE_BP, //int buildPoints;
+ ( 1 << S3 ), //int stages
+ HIVE_HEALTH, //int health;
+ HIVE_REGEN, //int regenRate;
+ HIVE_SPLASHDAMAGE, //int splashDamage;
+ HIVE_SPLASHRADIUS, //int splashRadius;
+ MOD_ASPAWN, //int meansOfDeath;
+ TEAM_ALIENS, //int team;
+ ( 1 << WP_ABUILD2 ), //weapon_t buildWeapon;
+ BANIM_IDLE1, //int idleAnim;
+ 500, //int nextthink;
+ HIVE_BT, //int buildTime;
+ qfalse, //qboolean usable;
+ 0, //int turretRange;
+ 0, //int turretFireSpeed;
+ WP_HIVE, //weapon_t turretProjType;
+ 0.0f, //float minNormal;
+ qtrue, //qboolean invertNormal;
+ qtrue, //qboolean creepTest;
+ HIVE_CREEPSIZE, //int creepSize;
qfalse, //qboolean dccTest;
qfalse, //qboolean transparentTest;
- qtrue, //qboolean uniqueTest;
- OVERMIND_VALUE, //int value;
+ qfalse, //qboolean uniqueTest;
+ HIVE_VALUE, //int value;
},
{
BA_A_HOVEL, //int buildNum;
@@ -350,42 +350,6 @@ static const buildableAttributes_t bg_buildableList[ ] =
HSPAWN_VALUE, //int value;
},
{
- BA_H_MEDISTAT, //int buildNum;
- "medistat", //char *buildName;
- "Medistation", //char *humanName;
- "A structure that automatically restores "
- "the health and stamina of any human that stands on it. "
- "It may only be used by one person at a time. This structure "
- "also issues medkits.",
- "team_human_medistat", //char *entityName;
- TR_GRAVITY, //trType_t traj;
- 0.0, //float bounce;
- MEDISTAT_BP, //int buildPoints;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- MEDISTAT_HEALTH, //int health;
- 0, //int regenRate;
- MEDISTAT_SPLASHDAMAGE, //int splashDamage;
- MEDISTAT_SPLASHRADIUS, //int splashRadius;
- MOD_HSPAWN, //int meansOfDeath;
- TEAM_HUMANS, //int team;
- ( 1 << WP_HBUILD ), //weapon_t buildWeapon;
- BANIM_IDLE1, //int idleAnim;
- 100, //int nextthink;
- MEDISTAT_BT, //int buildTime;
- qfalse, //qboolean usable;
- 0, //int turretRange;
- 0, //int turretFireSpeed;
- WP_NONE, //weapon_t turretProjType;
- 0.95f, //float minNormal;
- qfalse, //qboolean invertNormal;
- qfalse, //qboolean creepTest;
- 0, //int creepSize;
- qfalse, //qboolean dccTest;
- qtrue, //qboolean transparentTest;
- qfalse, //qboolean uniqueTest;
- MEDISTAT_VALUE, //int value;
- },
- {
BA_H_MGTURRET, //int buildNum;
"mgturret", //char *buildName;
"Machinegun Turret", //char *humanName;
@@ -456,6 +420,41 @@ static const buildableAttributes_t bg_buildableList[ ] =
TESLAGEN_VALUE, //int value;
},
{
+ BA_H_ARMOURY, //int buildNum;
+ "arm", //char *buildName;
+ "Armoury", //char *humanName;
+ "An essential part of the human base, providing a means "
+ "to upgrade the basic human equipment. A range of upgrades "
+ "and weapons are available for sale from the armoury.",
+ "team_human_armoury", //char *entityName;
+ TR_GRAVITY, //trType_t traj;
+ 0.0, //float bounce;
+ ARMOURY_BP, //int buildPoints;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ ARMOURY_HEALTH, //int health;
+ 0, //int regenRate;
+ ARMOURY_SPLASHDAMAGE, //int splashDamage;
+ ARMOURY_SPLASHRADIUS, //int splashRadius;
+ MOD_HSPAWN, //int meansOfDeath;
+ TEAM_HUMANS, //int team;
+ ( 1 << WP_HBUILD ), //weapon_t buildWeapon;
+ BANIM_IDLE1, //int idleAnim;
+ 100, //int nextthink;
+ ARMOURY_BT, //int buildTime;
+ qtrue, //qboolean usable;
+ 0, //int turretRange;
+ 0, //int turretFireSpeed;
+ WP_NONE, //weapon_t turretProjType;
+ 0.95f, //float minNormal;
+ qfalse, //qboolean invertNormal;
+ qfalse, //qboolean creepTest;
+ 0, //int creepSize;
+ qfalse, //qboolean dccTest;
+ qfalse, //qboolean transparentTest;
+ qfalse, //qboolean uniqueTest;
+ ARMOURY_VALUE, //int value;
+ },
+ {
BA_H_DCC, //int buildNum;
"dcc", //char *buildName;
"Defence Computer", //char *humanName;
@@ -491,28 +490,29 @@ static const buildableAttributes_t bg_buildableList[ ] =
DC_VALUE, //int value;
},
{
- BA_H_ARMOURY, //int buildNum;
- "arm", //char *buildName;
- "Armoury", //char *humanName;
- "An essential part of the human base, providing a means "
- "to upgrade the basic human equipment. A range of upgrades "
- "and weapons are available for sale from the armoury.",
- "team_human_armoury", //char *entityName;
+ BA_H_MEDISTAT, //int buildNum;
+ "medistat", //char *buildName;
+ "Medistation", //char *humanName;
+ "A structure that automatically restores "
+ "the health and stamina of any human that stands on it. "
+ "It may only be used by one person at a time. This structure "
+ "also issues medkits.",
+ "team_human_medistat", //char *entityName;
TR_GRAVITY, //trType_t traj;
0.0, //float bounce;
- ARMOURY_BP, //int buildPoints;
+ MEDISTAT_BP, //int buildPoints;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- ARMOURY_HEALTH, //int health;
+ MEDISTAT_HEALTH, //int health;
0, //int regenRate;
- ARMOURY_SPLASHDAMAGE, //int splashDamage;
- ARMOURY_SPLASHRADIUS, //int splashRadius;
+ MEDISTAT_SPLASHDAMAGE, //int splashDamage;
+ MEDISTAT_SPLASHRADIUS, //int splashRadius;
MOD_HSPAWN, //int meansOfDeath;
TEAM_HUMANS, //int team;
( 1 << WP_HBUILD ), //weapon_t buildWeapon;
BANIM_IDLE1, //int idleAnim;
100, //int nextthink;
- ARMOURY_BT, //int buildTime;
- qtrue, //qboolean usable;
+ MEDISTAT_BT, //int buildTime;
+ qfalse, //qboolean usable;
0, //int turretRange;
0, //int turretFireSpeed;
WP_NONE, //weapon_t turretProjType;
@@ -521,9 +521,9 @@ static const buildableAttributes_t bg_buildableList[ ] =
qfalse, //qboolean creepTest;
0, //int creepSize;
qfalse, //qboolean dccTest;
- qfalse, //qboolean transparentTest;
+ qtrue, //qboolean transparentTest;
qfalse, //qboolean uniqueTest;
- ARMOURY_VALUE, //int value;
+ MEDISTAT_VALUE, //int value;
},
{
BA_H_REACTOR, //int buildNum;
@@ -644,15 +644,8 @@ BG_Buildable
*/
const buildableAttributes_t *BG_Buildable( buildable_t buildable )
{
- int i;
-
- for( i = 0; i < bg_numBuildables; i++ )
- {
- if( bg_buildableList[ i ].number == buildable )
- return &bg_buildableList[ i ];
- }
-
- return &nullBuildable;
+ return ( buildable > BA_NONE && buildable < BA_NUM_BUILDABLES ) ?
+ &bg_buildableList[ buildable - 1 ] : &nullBuildable;
}
/*
@@ -1248,7 +1241,7 @@ static const classAttributes_t bg_classList[ ] =
{ PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
0, //int cost;
ALIEN_CREDITS_PER_FRAG //int value;
- },
+ }
};
int bg_numClasses = sizeof( bg_classList ) / sizeof( bg_classList[ 0 ] );
@@ -1280,15 +1273,8 @@ BG_Class
*/
const classAttributes_t *BG_Class( class_t class )
{
- int i;
-
- for( i = 0; i < bg_numClasses; i++ )
- {
- if( bg_classList[ i ].number == class )
- return &bg_classList[ i ];
- }
-
- return &nullClass;
+ return ( class >= PCL_NONE && class < PCL_NUM_CLASSES ) ?
+ &bg_classList[ class ] : &nullClass;
}
/*
@@ -1731,235 +1717,248 @@ void BG_InitClassConfigs( void )
static const weaponAttributes_t bg_weapons[ ] =
{
{
- WP_BLASTER, //int weaponNum;
+ WP_ALEVEL0, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- 0, //int slots;
- "blaster", //char *weaponName;
- "Blaster", //char *humanName;
+ SLOT_WEAPON, //int slots;
+ "level0", //char *weaponName;
+ "Bite", //char *humanName;
"",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- BLASTER_REPEAT, //int repeatRate1;
+ LEVEL0_BITE_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- BLASTER_K_SCALE, //float knockbackScale;
+ LEVEL0_BITE_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
- qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
},
{
- WP_MACHINEGUN, //int weaponNum;
- RIFLE_PRICE, //int price;
+ WP_ALEVEL1, //int weaponNum;
+ 0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "rifle", //char *weaponName;
- "Rifle", //char *humanName;
- "Basic weapon. Cased projectile weapon, with a slow clip based "
- "reload system.",
- RIFLE_CLIPSIZE, //int maxAmmo;
- RIFLE_MAXCLIPS, //int maxClips;
- qfalse, //int infiniteAmmo;
+ "level1", //char *weaponName;
+ "Claws", //char *humanName;
+ "",
+ 0, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- RIFLE_REPEAT, //int repeatRate1;
+ LEVEL1_CLAW_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
- RIFLE_RELOAD, //int reloadTime;
- RIFLE_K_SCALE, //float knockbackScale;
+ 0, //int reloadTime;
+ LEVEL1_CLAW_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
- qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
},
{
- WP_SHOTGUN, //int weaponNum;
- SHOTGUN_PRICE, //int price;
+ WP_ALEVEL1_UPG, //int weaponNum;
+ 0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "shotgun", //char *weaponName;
- "Shotgun", //char *humanName;
- "Close range weapon that is useful against larger foes. "
- "It has a slow repeat rate, but can be devastatingly "
- "effective.",
- SHOTGUN_SHELLS, //int maxAmmo;
- SHOTGUN_MAXCLIPS, //int maxClips;
- qfalse, //int infiniteAmmo;
+ "level1upg", //char *weaponName;
+ "Claws Upgrade", //char *humanName;
+ "",
+ 0, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- SHOTGUN_REPEAT, //int repeatRate1;
- 0, //int repeatRate2;
+ LEVEL1_CLAW_U_REPEAT, //int repeatRate1;
+ LEVEL1_PCLOUD_REPEAT, //int repeatRate2;
0, //int repeatRate3;
- SHOTGUN_RELOAD, //int reloadTime;
- SHOTGUN_K_SCALE, //float knockbackScale;
- qfalse, //qboolean hasAltMode;
+ 0, //int reloadTime;
+ LEVEL1_CLAW_U_K_SCALE,//float knockbackScale;
+ qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
+ qfalse, //qboolean purchasable;
qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ TEAM_ALIENS //team_t team;
},
{
- WP_FLAMER, //int weaponNum;
- FLAMER_PRICE, //int price;
- ( 1 << S2 )|( 1 << S3 ), //int stages
+ WP_ALEVEL2, //int weaponNum;
+ 0, //int price;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "flamer", //char *weaponName;
- "Flame Thrower", //char *humanName;
- "Sprays fire at its target. It is powered by compressed "
- "gas. The relatively low rate of fire means this weapon is most "
- "effective against static targets.",
- FLAMER_GAS, //int maxAmmo;
+ "level2", //char *weaponName;
+ "Bite", //char *humanName;
+ "",
+ 0, //int maxAmmo;
0, //int maxClips;
- qfalse, //int infiniteAmmo;
+ qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- FLAMER_REPEAT, //int repeatRate1;
+ LEVEL2_CLAW_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- FLAMER_K_SCALE, //float knockbackScale;
+ LEVEL2_CLAW_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
- qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
},
{
- WP_CHAINGUN, //int weaponNum;
- CHAINGUN_PRICE, //int price;
+ WP_ALEVEL2_UPG, //int weaponNum;
+ 0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "chaingun", //char *weaponName;
- "Chaingun", //char *humanName;
- "Belt drive, cased projectile weapon. It has a high repeat "
- "rate but a wide firing angle and is therefore relatively "
- "inaccurate.",
- CHAINGUN_BULLETS, //int maxAmmo;
+ "level2upg", //char *weaponName;
+ "Zap", //char *humanName;
+ "",
+ 0, //int maxAmmo;
0, //int maxClips;
- qfalse, //int infiniteAmmo;
+ qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- CHAINGUN_REPEAT, //int repeatRate1;
- 0, //int repeatRate2;
+ LEVEL2_CLAW_U_REPEAT, //int repeatRate1;
+ LEVEL2_AREAZAP_REPEAT,//int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- CHAINGUN_K_SCALE, //float knockbackScale;
- qfalse, //qboolean hasAltMode;
+ LEVEL2_CLAW_U_K_SCALE,//float knockbackScale;
+ qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
- qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
},
{
- WP_MASS_DRIVER, //int weaponNum;
- MDRIVER_PRICE, //int price;
+ WP_ALEVEL3, //int weaponNum;
+ 0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "mdriver", //char *weaponName;
- "Mass Driver", //char *humanName;
- "A portable magnetic accelerator capable of launching "
- "metallic slugs at extremely high velocity. Damage is dealt to "
- "all targets in the line of fire until the slug comes to a halt "
- "within a wall.",
- MDRIVER_CLIPSIZE, //int maxAmmo;
- MDRIVER_MAXCLIPS, //int maxClips;
- qfalse, //int infiniteAmmo;
- qtrue, //int usesEnergy;
- MDRIVER_REPEAT, //int repeatRate1;
+ "level3", //char *weaponName;
+ "Pounce", //char *humanName;
+ "",
+ 0, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ LEVEL3_CLAW_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
- MDRIVER_RELOAD, //int reloadTime;
- MDRIVER_K_SCALE, //float knockbackScale;
+ 0, //int reloadTime;
+ LEVEL3_CLAW_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
- qtrue, //qboolean canZoom;
- 20.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
+ },
+ {
+ WP_ALEVEL3_UPG, //int weaponNum;
+ 0, //int price;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ SLOT_WEAPON, //int slots;
+ "level3upg", //char *weaponName;
+ "Pounce (upgrade)", //char *humanName;
+ "",
+ 3, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ LEVEL3_CLAW_U_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
+ LEVEL3_BOUNCEBALL_REPEAT,//int repeatRate3;
+ 0, //int reloadTime;
+ LEVEL3_CLAW_U_K_SCALE,//float knockbackScale;
+ qfalse, //qboolean hasAltMode;
+ qtrue, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
+ qfalse, //qboolean purchasable;
qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ TEAM_ALIENS //team_t team;
},
{
- WP_PULSE_RIFLE, //int weaponNum;
- PRIFLE_PRICE, //int price;
- ( 1 << S2 )|( 1 << S3 ), //int stages
+ WP_ALEVEL4, //int weaponNum;
+ 0, //int price;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "prifle", //char *weaponName;
- "Pulse Rifle", //char *humanName;
- "An energy weapon that fires rapid pulses of concentrated energy.",
- PRIFLE_CLIPS, //int maxAmmo;
- PRIFLE_MAXCLIPS, //int maxClips;
- qfalse, //int infiniteAmmo;
- qtrue, //int usesEnergy;
- PRIFLE_REPEAT, //int repeatRate1;
+ "level4", //char *weaponName;
+ "Charge", //char *humanName;
+ "",
+ 0, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ LEVEL4_CLAW_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
- PRIFLE_RELOAD, //int reloadTime;
- PRIFLE_K_SCALE, //float knockbackScale;
+ 0, //int reloadTime;
+ LEVEL4_CLAW_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
- qtrue, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
},
{
- WP_LUCIFER_CANNON, //int weaponNum;
- LCANNON_PRICE, //int price;
- ( 1 << S3 ), //int stages
- SLOT_WEAPON, //int slots;
- "lcannon", //char *weaponName;
- "Lucifer Cannon", //char *humanName;
- "Blaster technology scaled up to deliver devastating power. "
- "Primary fire must be charged before firing. It has a quick "
- "secondary attack that does not require charging.",
- LCANNON_AMMO, //int maxAmmo;
+ WP_BLASTER, //int weaponNum;
+ 0, //int price;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ 0, //int slots;
+ "blaster", //char *weaponName;
+ "Blaster", //char *humanName;
+ "",
+ 0, //int maxAmmo;
0, //int maxClips;
- qfalse, //int infiniteAmmo;
- qtrue, //int usesEnergy;
- LCANNON_REPEAT, //int repeatRate1;
- LCANNON_SECONDARY_REPEAT, //int repeatRate2;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ BLASTER_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
0, //int repeatRate3;
- LCANNON_RELOAD, //int reloadTime;
- LCANNON_K_SCALE, //float knockbackScale;
- qtrue, //qboolean hasAltMode;
+ 0, //int reloadTime;
+ BLASTER_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qtrue, //qboolean purchasable;
+ qfalse, //qboolean purchasable;
qtrue, //qboolean longRanged;
TEAM_HUMANS //team_t team;
},
{
- WP_LAS_GUN, //int weaponNum;
- LASGUN_PRICE, //int price;
+ WP_MACHINEGUN, //int weaponNum;
+ RIFLE_PRICE, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "lgun", //char *weaponName;
- "Las Gun", //char *humanName;
- "Slightly more powerful than the basic rifle, rapidly fires "
- "small packets of energy.",
- LASGUN_AMMO, //int maxAmmo;
- 0, //int maxClips;
+ "rifle", //char *weaponName;
+ "Rifle", //char *humanName;
+ "Basic weapon. Cased projectile weapon, with a slow clip based "
+ "reload system.",
+ RIFLE_CLIPSIZE, //int maxAmmo;
+ RIFLE_MAXCLIPS, //int maxClips;
qfalse, //int infiniteAmmo;
- qtrue, //int usesEnergy;
- LASGUN_REPEAT, //int repeatRate1;
+ qfalse, //int usesEnergy;
+ RIFLE_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
- LASGUN_RELOAD, //int reloadTime;
- LASGUN_K_SCALE, //float knockbackScale;
+ RIFLE_RELOAD, //int reloadTime;
+ RIFLE_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
@@ -1996,225 +1995,235 @@ static const weaponAttributes_t bg_weapons[ ] =
TEAM_HUMANS //team_t team;
},
{
- WP_GRENADE, //int weaponNum;
- GRENADE_PRICE, //int price;
- ( 1 << S2 )|( 1 << S3 ), //int stages
- SLOT_NONE, //int slots;
- "grenade", //char *weaponName;
- "Grenade", //char *humanName;
- "",
- 1, //int maxAmmo;
- 0, //int maxClips;
+ WP_SHOTGUN, //int weaponNum;
+ SHOTGUN_PRICE, //int price;
+ ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ SLOT_WEAPON, //int slots;
+ "shotgun", //char *weaponName;
+ "Shotgun", //char *humanName;
+ "Close range weapon that is useful against larger foes. "
+ "It has a slow repeat rate, but can be devastatingly "
+ "effective.",
+ SHOTGUN_SHELLS, //int maxAmmo;
+ SHOTGUN_MAXCLIPS, //int maxClips;
qfalse, //int infiniteAmmo;
qfalse, //int usesEnergy;
- GRENADE_REPEAT, //int repeatRate1;
+ SHOTGUN_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
- 0, //int reloadTime;
- GRENADE_K_SCALE, //float knockbackScale;
+ SHOTGUN_RELOAD, //int reloadTime;
+ SHOTGUN_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
- qfalse, //qboolean longRanged;
+ qtrue, //qboolean purchasable;
+ qtrue, //qboolean longRanged;
TEAM_HUMANS //team_t team;
},
{
- WP_HBUILD, //int weaponNum;
- HBUILD_PRICE, //int price;
+ WP_LAS_GUN, //int weaponNum;
+ LASGUN_PRICE, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "ckit", //char *weaponName;
- "Construction Kit", //char *humanName;
- "Used for building structures. This includes "
- "spawns, power and basic defense. More structures become "
- "available with new stages.",
- 0, //int maxAmmo;
+ "lgun", //char *weaponName;
+ "Las Gun", //char *humanName;
+ "Slightly more powerful than the basic rifle, rapidly fires "
+ "small packets of energy.",
+ LASGUN_AMMO, //int maxAmmo;
0, //int maxClips;
- qtrue, //int infiniteAmmo;
- qfalse, //int usesEnergy;
- HBUILD_REPEAT, //int repeatRate1;
- HBUILD_REPEAT, //int repeatRate2;
+ qfalse, //int infiniteAmmo;
+ qtrue, //int usesEnergy;
+ LASGUN_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
0, //int repeatRate3;
- 0, //int reloadTime;
- 0.0f, //float knockbackScale;
- qtrue, //qboolean hasAltMode;
+ LASGUN_RELOAD, //int reloadTime;
+ LASGUN_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
- qfalse, //qboolean longRanged;
+ qtrue, //qboolean longRanged;
TEAM_HUMANS //team_t team;
},
{
- WP_ABUILD, //int weaponNum;
- 0, //int price;
+ WP_MASS_DRIVER, //int weaponNum;
+ MDRIVER_PRICE, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "abuild", //char *weaponName;
- "Alien build weapon", //char *humanName;
- "",
- 0, //int maxAmmo;
- 0, //int maxClips;
- qtrue, //int infiniteAmmo;
- qfalse, //int usesEnergy;
- ABUILDER_BUILD_REPEAT,//int repeatRate1;
- ABUILDER_CLAW_REPEAT, //int repeatRate2;
+ "mdriver", //char *weaponName;
+ "Mass Driver", //char *humanName;
+ "A portable magnetic accelerator capable of launching "
+ "metallic slugs at extremely high velocity. Damage is dealt to "
+ "all targets in the line of fire until the slug comes to a halt "
+ "within a wall.",
+ MDRIVER_CLIPSIZE, //int maxAmmo;
+ MDRIVER_MAXCLIPS, //int maxClips;
+ qfalse, //int infiniteAmmo;
+ qtrue, //int usesEnergy;
+ MDRIVER_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
0, //int repeatRate3;
- 0, //int reloadTime;
- ABUILDER_CLAW_K_SCALE,//float knockbackScale;
- qtrue, //qboolean hasAltMode;
+ MDRIVER_RELOAD, //int reloadTime;
+ MDRIVER_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
- qfalse, //qboolean canZoom;
- 90.0f, //float zoomFov;
+ qtrue, //qboolean canZoom;
+ 20.0f, //float zoomFov;
qtrue, //qboolean purchasable;
- qfalse, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ qtrue, //qboolean longRanged;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ABUILD2, //int weaponNum;
- 0, //int price;
+ WP_CHAINGUN, //int weaponNum;
+ CHAINGUN_PRICE, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "abuildupg", //char *weaponName;
- "Alien build weapon2",//char *humanName;
- "",
- 0, //int maxAmmo;
+ "chaingun", //char *weaponName;
+ "Chaingun", //char *humanName;
+ "Belt drive, cased projectile weapon. It has a high repeat "
+ "rate but a wide firing angle and is therefore relatively "
+ "inaccurate.",
+ CHAINGUN_BULLETS, //int maxAmmo;
0, //int maxClips;
- qtrue, //int infiniteAmmo;
+ qfalse, //int infiniteAmmo;
qfalse, //int usesEnergy;
- ABUILDER_BUILD_REPEAT,//int repeatRate1;
- ABUILDER_CLAW_REPEAT, //int repeatRate2;
- ABUILDER_BLOB_REPEAT, //int repeatRate3;
+ CHAINGUN_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
+ 0, //int repeatRate3;
0, //int reloadTime;
- ABUILDER_CLAW_K_SCALE,//float knockbackScale;
- qtrue, //qboolean hasAltMode;
- qtrue, //qboolean hasThirdMode;
+ CHAINGUN_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
+ qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
qtrue, //qboolean purchasable;
- qfalse, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ qtrue, //qboolean longRanged;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ALEVEL0, //int weaponNum;
- 0, //int price;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ WP_PULSE_RIFLE, //int weaponNum;
+ PRIFLE_PRICE, //int price;
+ ( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level0", //char *weaponName;
- "Bite", //char *humanName;
- "",
- 0, //int maxAmmo;
- 0, //int maxClips;
- qtrue, //int infiniteAmmo;
- qfalse, //int usesEnergy;
- LEVEL0_BITE_REPEAT, //int repeatRate1;
+ "prifle", //char *weaponName;
+ "Pulse Rifle", //char *humanName;
+ "An energy weapon that fires rapid pulses of concentrated energy.",
+ PRIFLE_CLIPS, //int maxAmmo;
+ PRIFLE_MAXCLIPS, //int maxClips;
+ qfalse, //int infiniteAmmo;
+ qtrue, //int usesEnergy;
+ PRIFLE_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
- 0, //int reloadTime;
- LEVEL0_BITE_K_SCALE, //float knockbackScale;
+ PRIFLE_RELOAD, //int reloadTime;
+ PRIFLE_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
- qfalse, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ qtrue, //qboolean purchasable;
+ qtrue, //qboolean longRanged;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ALEVEL1, //int weaponNum;
- 0, //int price;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ WP_FLAMER, //int weaponNum;
+ FLAMER_PRICE, //int price;
+ ( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level1", //char *weaponName;
- "Claws", //char *humanName;
- "",
- 0, //int maxAmmo;
+ "flamer", //char *weaponName;
+ "Flame Thrower", //char *humanName;
+ "Sprays fire at its target. It is powered by compressed "
+ "gas. The relatively low rate of fire means this weapon is most "
+ "effective against static targets.",
+ FLAMER_GAS, //int maxAmmo;
0, //int maxClips;
- qtrue, //int infiniteAmmo;
+ qfalse, //int infiniteAmmo;
qfalse, //int usesEnergy;
- LEVEL1_CLAW_REPEAT, //int repeatRate1;
+ FLAMER_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- LEVEL1_CLAW_K_SCALE, //float knockbackScale;
+ FLAMER_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
- qfalse, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ qtrue, //qboolean purchasable;
+ qtrue, //qboolean longRanged;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ALEVEL1_UPG, //int weaponNum;
- 0, //int price;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
+ WP_LUCIFER_CANNON, //int weaponNum;
+ LCANNON_PRICE, //int price;
+ ( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level1upg", //char *weaponName;
- "Claws Upgrade", //char *humanName;
- "",
- 0, //int maxAmmo;
+ "lcannon", //char *weaponName;
+ "Lucifer Cannon", //char *humanName;
+ "Blaster technology scaled up to deliver devastating power. "
+ "Primary fire must be charged before firing. It has a quick "
+ "secondary attack that does not require charging.",
+ LCANNON_AMMO, //int maxAmmo;
0, //int maxClips;
- qtrue, //int infiniteAmmo;
- qfalse, //int usesEnergy;
- LEVEL1_CLAW_U_REPEAT, //int repeatRate1;
- LEVEL1_PCLOUD_REPEAT, //int repeatRate2;
+ qfalse, //int infiniteAmmo;
+ qtrue, //int usesEnergy;
+ LCANNON_REPEAT, //int repeatRate1;
+ LCANNON_SECONDARY_REPEAT, //int repeatRate2;
0, //int repeatRate3;
- 0, //int reloadTime;
- LEVEL1_CLAW_U_K_SCALE,//float knockbackScale;
+ LCANNON_RELOAD, //int reloadTime;
+ LCANNON_K_SCALE, //float knockbackScale;
qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
+ qtrue, //qboolean purchasable;
qtrue, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ALEVEL2, //int weaponNum;
- 0, //int price;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- SLOT_WEAPON, //int slots;
- "level2", //char *weaponName;
- "Bite", //char *humanName;
+ WP_GRENADE, //int weaponNum;
+ GRENADE_PRICE, //int price;
+ ( 1 << S2 )|( 1 << S3 ), //int stages
+ SLOT_NONE, //int slots;
+ "grenade", //char *weaponName;
+ "Grenade", //char *humanName;
"",
- 0, //int maxAmmo;
+ 1, //int maxAmmo;
0, //int maxClips;
- qtrue, //int infiniteAmmo;
+ qfalse, //int infiniteAmmo;
qfalse, //int usesEnergy;
- LEVEL2_CLAW_REPEAT, //int repeatRate1;
+ GRENADE_REPEAT, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- LEVEL2_CLAW_K_SCALE, //float knockbackScale;
+ GRENADE_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
qfalse, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ALEVEL2_UPG, //int weaponNum;
+ WP_LOCKBLOB_LAUNCHER, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level2upg", //char *weaponName;
- "Zap", //char *humanName;
+ "lockblob", //char *weaponName;
+ "Lock Blob", //char *humanName;
"",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- LEVEL2_CLAW_U_REPEAT, //int repeatRate1;
- LEVEL2_AREAZAP_REPEAT,//int repeatRate2;
- 0, //int repeatRate3;
+ 500, //int repeatRate1;
+ 500, //int repeatRate2;
+ 500, //int repeatRate3;
0, //int reloadTime;
- LEVEL2_CLAW_U_K_SCALE,//float knockbackScale;
- qtrue, //qboolean hasAltMode;
+ LOCKBLOB_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
@@ -2223,22 +2232,22 @@ static const weaponAttributes_t bg_weapons[ ] =
TEAM_ALIENS //team_t team;
},
{
- WP_ALEVEL3, //int weaponNum;
+ WP_HIVE, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level3", //char *weaponName;
- "Pounce", //char *humanName;
+ "hive", //char *weaponName;
+ "Hive", //char *humanName;
"",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- LEVEL3_CLAW_REPEAT, //int repeatRate1;
- 0, //int repeatRate2;
- 0, //int repeatRate3;
+ 500, //int repeatRate1;
+ 500, //int repeatRate2;
+ 500, //int repeatRate3;
0, //int reloadTime;
- LEVEL3_CLAW_K_SCALE, //float knockbackScale;
+ HIVE_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
@@ -2248,152 +2257,129 @@ static const weaponAttributes_t bg_weapons[ ] =
TEAM_ALIENS //team_t team;
},
{
- WP_ALEVEL3_UPG, //int weaponNum;
+ WP_TESLAGEN, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level3upg", //char *weaponName;
- "Pounce (upgrade)", //char *humanName;
+ "teslagen", //char *weaponName;
+ "Tesla Generator", //char *humanName;
"",
- 3, //int maxAmmo;
+ 0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
- qfalse, //int usesEnergy;
- LEVEL3_CLAW_U_REPEAT, //int repeatRate1;
- 0, //int repeatRate2;
- LEVEL3_BOUNCEBALL_REPEAT,//int repeatRate3;
+ qtrue, //int usesEnergy;
+ 500, //int repeatRate1;
+ 500, //int repeatRate2;
+ 500, //int repeatRate3;
0, //int reloadTime;
- LEVEL3_CLAW_U_K_SCALE,//float knockbackScale;
+ TESLAGEN_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
- qtrue, //qboolean hasThirdMode;
+ qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
- qtrue, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ qfalse, //qboolean longRanged;
+ TEAM_HUMANS //team_t team;
},
{
- WP_ALEVEL4, //int weaponNum;
+ WP_MGTURRET, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "level4", //char *weaponName;
- "Charge", //char *humanName;
+ "mgturret", //char *weaponName;
+ "Machinegun Turret", //char *humanName;
"",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- LEVEL4_CLAW_REPEAT, //int repeatRate1;
+ 0, //int repeatRate1;
0, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- LEVEL4_CLAW_K_SCALE, //float knockbackScale;
+ MGTURRET_K_SCALE, //float knockbackScale;
qfalse, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
qfalse, //qboolean purchasable;
qfalse, //qboolean longRanged;
- TEAM_ALIENS //team_t team;
+ TEAM_HUMANS //team_t team;
},
{
- WP_LOCKBLOB_LAUNCHER, //int weaponNum;
+ WP_ABUILD, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "lockblob", //char *weaponName;
- "Lock Blob", //char *humanName;
+ "abuild", //char *weaponName;
+ "Alien build weapon", //char *humanName;
"",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- 500, //int repeatRate1;
- 500, //int repeatRate2;
- 500, //int repeatRate3;
+ ABUILDER_BUILD_REPEAT,//int repeatRate1;
+ ABUILDER_CLAW_REPEAT, //int repeatRate2;
+ 0, //int repeatRate3;
0, //int reloadTime;
- LOCKBLOB_K_SCALE, //float knockbackScale;
- qfalse, //qboolean hasAltMode;
+ ABUILDER_CLAW_K_SCALE,//float knockbackScale;
+ qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
+ qtrue, //qboolean purchasable;
qfalse, //qboolean longRanged;
TEAM_ALIENS //team_t team;
},
{
- WP_HIVE, //int weaponNum;
+ WP_ABUILD2, //int weaponNum;
0, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "hive", //char *weaponName;
- "Hive", //char *humanName;
+ "abuildupg", //char *weaponName;
+ "Alien build weapon2",//char *humanName;
"",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- 500, //int repeatRate1;
- 500, //int repeatRate2;
- 500, //int repeatRate3;
+ ABUILDER_BUILD_REPEAT,//int repeatRate1;
+ ABUILDER_CLAW_REPEAT, //int repeatRate2;
+ ABUILDER_BLOB_REPEAT, //int repeatRate3;
0, //int reloadTime;
- HIVE_K_SCALE, //float knockbackScale;
- qfalse, //qboolean hasAltMode;
- qfalse, //qboolean hasThirdMode;
+ ABUILDER_CLAW_K_SCALE,//float knockbackScale;
+ qtrue, //qboolean hasAltMode;
+ qtrue, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
+ qtrue, //qboolean purchasable;
qfalse, //qboolean longRanged;
TEAM_ALIENS //team_t team;
},
{
- WP_MGTURRET, //int weaponNum;
- 0, //int price;
+ WP_HBUILD, //int weaponNum;
+ HBUILD_PRICE, //int price;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
SLOT_WEAPON, //int slots;
- "mgturret", //char *weaponName;
- "Machinegun Turret", //char *humanName;
- "",
+ "ckit", //char *weaponName;
+ "Construction Kit", //char *humanName;
+ "Used for building structures. This includes "
+ "spawns, power and basic defense. More structures become "
+ "available with new stages.",
0, //int maxAmmo;
0, //int maxClips;
qtrue, //int infiniteAmmo;
qfalse, //int usesEnergy;
- 0, //int repeatRate1;
- 0, //int repeatRate2;
+ HBUILD_REPEAT, //int repeatRate1;
+ HBUILD_REPEAT, //int repeatRate2;
0, //int repeatRate3;
0, //int reloadTime;
- MGTURRET_K_SCALE, //float knockbackScale;
- qfalse, //qboolean hasAltMode;
- qfalse, //qboolean hasThirdMode;
- qfalse, //qboolean canZoom;
- 90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
- qfalse, //qboolean longRanged;
- TEAM_HUMANS //team_t team;
- },
- {
- WP_TESLAGEN, //int weaponNum;
- 0, //int price;
- ( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- SLOT_WEAPON, //int slots;
- "teslagen", //char *weaponName;
- "Tesla Generator", //char *humanName;
- "",
- 0, //int maxAmmo;
- 0, //int maxClips;
- qtrue, //int infiniteAmmo;
- qtrue, //int usesEnergy;
- 500, //int repeatRate1;
- 500, //int repeatRate2;
- 500, //int repeatRate3;
- 0, //int reloadTime;
- TESLAGEN_K_SCALE, //float knockbackScale;
- qfalse, //qboolean hasAltMode;
+ 0.0f, //float knockbackScale;
+ qtrue, //qboolean hasAltMode;
qfalse, //qboolean hasThirdMode;
qfalse, //qboolean canZoom;
90.0f, //float zoomFov;
- qfalse, //qboolean purchasable;
+ qtrue, //qboolean purchasable;
qfalse, //qboolean longRanged;
TEAM_HUMANS //team_t team;
}
@@ -2430,17 +2416,8 @@ BG_Weapon
*/
const weaponAttributes_t *BG_Weapon( weapon_t weapon )
{
- int i;
-
- for( i = 0; i < bg_numWeapons; i++ )
- {
- if( bg_weapons[ i ].number == weapon )
- {
- return &bg_weapons[ i ];
- }
- }
-
- return &nullWeapon;
+ return ( weapon > WP_NONE && weapon < WP_NUM_WEAPONS ) ?
+ &bg_weapons[ weapon - 1 ] : &nullWeapon;
}
/*
@@ -2605,17 +2582,8 @@ BG_Upgrade
*/
const upgradeAttributes_t *BG_Upgrade( upgrade_t upgrade )
{
- int i;
-
- for( i = 0; i < bg_numUpgrades; i++ )
- {
- if( bg_upgrades[ i ].number == upgrade )
- {
- return &bg_upgrades[ i ];
- }
- }
-
- return &nullUpgrade;
+ return ( upgrade > UP_NONE && upgrade < UP_NUM_UPGRADES ) ?
+ &bg_upgrades[ upgrade - 1 ] : &nullUpgrade;
}
/*
@@ -3880,8 +3848,10 @@ weapon_t BG_PrimaryWeapon( int stats[ ] )
if( BG_InventoryContainsWeapon( i, stats ) )
return i;
}
+
if( BG_InventoryContainsWeapon( WP_BLASTER, stats ) )
return WP_BLASTER;
+
return WP_NONE;
}
diff --git a/src/game/g_admin.c b/src/game/g_admin.c
index bf0bba33..97fc2ea6 100644
--- a/src/game/g_admin.c
+++ b/src/game/g_admin.c
@@ -1069,6 +1069,7 @@ qboolean G_admin_readconfig( gentity_t *ent, int skiparg )
char *t;
qboolean level_open, admin_open, ban_open, command_open;
char levels[ MAX_STRING_CHARS ] = {""};
+ int i;
G_admin_cleanup();
@@ -1309,7 +1310,6 @@ qboolean G_admin_readconfig( gentity_t *ent, int skiparg )
else
{
char n[ MAX_NAME_LENGTH ] = {""};
- int i = 0;
// max printable name length for formatting
for( i = 0; i < MAX_ADMIN_LEVELS && g_admin_levels[ i ]; i++ )
@@ -1319,6 +1319,14 @@ qboolean G_admin_readconfig( gentity_t *ent, int skiparg )
admin_level_maxname = strlen( n );
}
}
+
+ // reset adminLevel
+ for( i = 0; i < level.maxclients; i++ )
+ {
+ if( level.clients[ i ].pers.connected != CON_DISCONNECTED )
+ level.clients[ i ].pers.adminLevel = G_admin_level( &g_entities[ i ] );
+ }
+
return qtrue;
}
@@ -1418,17 +1426,19 @@ qboolean G_admin_setlevel( gentity_t *ent, int skiparg )
{
for( i = 0; i < level.maxclients && matches < 2; i++ )
{
- vic = &g_entities[ i ];
- if( !vic->client || vic->client->pers.connected != CON_CONNECTED )
+ if( level.clients[ i ].pers.connected != CON_CONNECTED )
continue;
- G_SanitiseName( vic->client->pers.netname, testname );
+
+ G_SanitiseName( level.clients[ i ].pers.netname, testname );
if( strstr( testname, name ) )
{
+ vic = &g_entities[ i ];
matches++;
Q_strncpyz( adminname, vic->client->pers.netname, sizeof( adminname ) );
Q_strncpyz( guid, vic->client->pers.guid, sizeof( guid ) );
}
}
+
for( i = 0; i < MAX_ADMIN_ADMINS && g_admin_admins[ i ] && matches < 2; i++)
{
G_SanitiseName( g_admin_admins[ i ]->name, testname );
@@ -1439,19 +1449,21 @@ qboolean G_admin_setlevel( gentity_t *ent, int skiparg )
// verify we don't have the same guid/name pair in connected players
for( j = 0; j < level.maxclients; j++ )
{
- vic = &g_entities[ j ];
- if( !vic->client || vic->client->pers.connected != CON_CONNECTED )
+ if( level.clients[ j ].pers.connected != CON_CONNECTED )
continue;
- G_SanitiseName( vic->client->pers.netname, testname2 );
- if( !Q_stricmp( vic->client->pers.guid, g_admin_admins[ i ]->guid ) &&
- strstr( testname2, name ) )
+
+ G_SanitiseName( level.clients[ j ].pers.netname, testname2 );
+ if( !Q_stricmp( level.clients[ j ].pers.guid,
+ g_admin_admins[ i ]->guid ) && strstr( testname2, name ) )
{
dup = qtrue;
break;
}
}
+
if( dup )
continue;
+
Q_strncpyz( adminname, g_admin_admins[ i ]->name, sizeof( adminname ) );
Q_strncpyz( guid, g_admin_admins[ i ]->guid, sizeof( guid ) );
matches++;
@@ -1979,26 +1991,26 @@ qboolean G_admin_mute( gentity_t *ent, int skiparg )
char command[ MAX_ADMIN_CMD_LEN ], *cmd;
gentity_t *vic;
- if( G_SayArgc() < 2 + skiparg )
- {
- ADMP( "^3!mute: ^7usage: !mute [name|slot#]\n" );
- return qfalse;
- }
G_SayArgv( skiparg, command, sizeof( command ) );
cmd = command;
if( cmd && *cmd == '!' )
cmd++;
+ if( G_SayArgc() < 2 + skiparg )
+ {
+ ADMP( va( "^3!%s: ^7usage: !%s [name|slot#]\n", cmd, cmd ) );
+ return qfalse;
+ }
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
if( ( found = G_ClientNumbersFromString( name, pids, MAX_CLIENTS ) ) != 1 )
{
G_MatchOnePlayer( pids, found, err, sizeof( err ) );
- ADMP( va( "^3!mute: ^7%s\n", err ) );
+ ADMP( va( "^3!%s: ^7%s\n", cmd, err ) );
return qfalse;
}
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
{
- ADMP( "^3!mute: ^7sorry, but your intended victim has a higher admin"
- " level than you\n" );
+ ADMP( va( "^3!%s: ^7sorry, but your intended victim has a higher admin"
+ " level than you\n", cmd ) );
return qfalse;
}
vic = &g_entities[ pids[ 0 ] ];
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 7274494a..0e8051b8 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1014,17 +1014,7 @@ void ClientUserinfoChanged( int clientNum )
if( client->pers.maxHealth < 1 || client->pers.maxHealth > 100 )
client->pers.maxHealth = 100;
- //hack to force a client update if the config string does not change between spawning
if( client->pers.classSelection == PCL_NONE )
- client->pers.maxHealth = 0;
-
- // set model
- if( client->ps.stats[ STAT_CLASS ] == PCL_HUMAN_BSUIT )
- {
- Com_sprintf( buffer, MAX_QPATH, "%s/%s", BG_ClassConfig( PCL_HUMAN_BSUIT )->modelName,
- BG_ClassConfig( PCL_HUMAN_BSUIT )->skinName );
- }
- else if( client->pers.classSelection == PCL_NONE )
{
//This looks hacky and frankly it is. The clientInfo string needs to hold different
//model details to that of the spawning class or the info change will not be
@@ -1037,12 +1027,7 @@ void ClientUserinfoChanged( int clientNum )
{
Com_sprintf( buffer, MAX_QPATH, "%s/%s", BG_ClassConfig( client->pers.classSelection )->modelName,
BG_ClassConfig( client->pers.classSelection )->skinName );
- }
- Q_strncpyz( model, buffer, sizeof( model ) );
- //don't bother setting model type if spectating
- if( client->pers.classSelection != PCL_NONE )
- {
//model segmentation
Com_sprintf( filename, sizeof( filename ), "models/players/%s/animation.cfg",
BG_ClassConfig( client->pers.classSelection )->modelName );
@@ -1052,6 +1037,7 @@ void ClientUserinfoChanged( int clientNum )
else
client->ps.persistant[ PERS_STATE ] &= ~PS_NONSEGMODEL;
}
+ Q_strncpyz( model, buffer, sizeof( model ) );
// wallwalk follow
s = Info_ValueForKey( userinfo, "cg_wwFollow" );
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 13205415..566b533a 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -2376,6 +2376,8 @@ void Cmd_Sell_f( gentity_t *ent )
}
VectorCopy( newOrigin, ent->s.pos.trBase );
ent->client->ps.stats[ STAT_CLASS ] = PCL_HUMAN;
+ ent->client->pers.classSelection = PCL_HUMAN;
+ ent->client->ps.eFlags ^= EF_TELEPORT_BIT;
}
BG_RemoveUpgradeFromInventory( i, ent->client->ps.stats );
diff --git a/src/game/g_local.h b/src/game/g_local.h
index cc15d89b..db15d208 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -923,7 +923,7 @@ void QDECL G_Error( const char *fmt, ... );
void G_Vote( gentity_t *ent, qboolean voting );
void G_TeamVote( gentity_t *ent, qboolean voting );
void CheckVote( void );
-void CheckTeamVote( int teamnum );
+void CheckTeamVote( team_t teamnum );
void LogExit( const char *string );
int G_TimeTilSuddenDeath( void );
diff --git a/src/game/g_main.c b/src/game/g_main.c
index eda9a91a..34793cb2 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -2120,7 +2120,7 @@ void CheckVote( void )
CheckTeamVote
==================
*/
-void CheckTeamVote( int team )
+void CheckTeamVote( team_t team )
{
int cs_offset;