summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c469
-rw-r--r--src/game/bg_public.h32
-rw-r--r--src/game/g_buildable.c155
-rw-r--r--src/game/g_client.c46
-rw-r--r--src/game/g_utils.c1
5 files changed, 255 insertions, 448 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 408be48c..83d7042e 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -834,7 +834,7 @@ TA: droid spawn item
"" //sounds
},
-/*QUAKED team_droid_def1 (0 0 1) (-16 -16 -16) (16 16 16)
+/*QUAKED team_droid_barricade (0 0 1) (-16 -16 -16) (16 16 16)
TA: droid defense item
*/
{
@@ -842,26 +842,26 @@ TA: droid defense item
"sound/items/holdable.wav",
{ "models/buildables/defense1/defense1.md3", 0, 0, 0 },
"icons/teleporter", //icon
- "Droid Defense", //pickup
+ "Barricade", //pickup
0,
IT_BUILDABLE,
- BA_D_DEF1,
+ BA_D_BARRICADE,
"", //precache
"" //sounds
},
-/*QUAKED team_droid_def2 (0 0 1) (-16 -16 -16) (16 16 16)
+/*QUAKED team_droid_acid_tube (0 0 1) (-16 -16 -16) (16 16 16)
TA: droid defense item
*/
{
- "team_droid_def2",
+ "team_droid_acid_tube",
"sound/items/holdable.wav",
- { "models/buildables/sawbladel/sawbladel.md3", 0, 0, 0 },
+ { "models/buildables/acid_tube/acid_tube.md3", 0, 0, 0 },
"icons/teleporter", //icon
- "Droid Sawblade Launcher", //pickup
+ "Acid Tube", //pickup
0,
IT_BUILDABLE,
- BA_D_DEF2,
+ BA_D_ACIDTUBE,
"", //precache
"" //sounds
},
@@ -952,7 +952,7 @@ TA: human defense item
{
"team_human_mcu",
"sound/items/holdable.wav",
- { "models/powerups/ammo/plasmaam.md3", 0, 0, 0 },
+ { "models/buildables/mcu/mcu.md3", 0, 0, 0 },
"icons/teleporter", //icon
"Human MCU", //pickup
0,
@@ -968,7 +968,7 @@ TA: human power item
{
"team_human_reactor",
"sound/items/holdable.wav",
- { "models/powerups/ammo/bfgam.md3", 0, 0, 0 },
+ { "models/buildables/reactor/reactor.md3", 0, 0, 0 },
"icons/teleporter", //icon
"Human Reactor", //pickup
0,
@@ -984,7 +984,7 @@ TA: human power item
{
"team_human_repeater",
"sound/items/holdable.wav",
- { "models/powerups/ammo/railgunam.md3", 0, 0, 0 },
+ { "models/buildables/repeater/repeater.md3", 0, 0, 0 },
"icons/teleporter", //icon
"Human Repeater", //pickup
0,
@@ -1171,9 +1171,9 @@ buildableAttributes_t bg_buildableList[ ] =
qfalse //qboolean reactorTest;
},
{
- BA_D_DEF1, //int buildNum;
- "defense1", //char *buildName;
- "team_droid_def1", //char *entityName;
+ BA_D_BARRICADE, //int buildNum;
+ "barricade", //char *buildName;
+ "team_droid_barricade",//char *entityName;
{ -15, -15, -15 }, //vec3_t mins;
{ 15, 15, 15 }, //vec3_t maxs;
TR_GRAVITY, //trType_t traj;
@@ -1197,9 +1197,9 @@ buildableAttributes_t bg_buildableList[ ] =
qfalse //qboolean reactorTest;
},
{
- BA_D_DEF2, //int buildNum;
- "sawbladel", //char *buildName;
- "team_droid_def2", //char *entityName;
+ BA_D_ACIDTUBE, //int buildNum;
+ "acid_tube", //char *buildName;
+ "team_droid_acid_tube",//char *entityName;
{ -15, -15, -15 }, //vec3_t mins;
{ 15, 15, 15 }, //vec3_t maxs;
TR_GRAVITY, //trType_t traj;
@@ -1208,17 +1208,17 @@ buildableAttributes_t bg_buildableList[ ] =
1000, //int health;
50, //int damage;
20, //int splashDamage;
- 50, //int splashRadius;
+ 400, //int splashRadius;
MOD_DSPAWN, //int meansOfDeath;
BIT_DROIDS, //int team;
( 1 << WP_DBUILD )|( 1 << WP_DBUILD2 ), //weapon_t buildWeapon;
BANIM_IDLE1, //int constructAnim;
- 100, //int nextthink;
- 1500, //int turretFireSpeed;
- 500, //int turretRange;
- WP_SAWBLADE_LAUNCHER, //weapon_t turretProjType;
+ 500, //int nextthink;
+ 0, //int turretFireSpeed;
+ 0, //int turretRange;
+ WP_NONE, //weapon_t turretProjType;
0.707f, //float minNormal;
- qfalse, //qboolean invertNormal;
+ qtrue, //qboolean invertNormal;
qtrue, //qboolean creepTest;
qfalse //qboolean reactorTest;
},
@@ -1979,7 +1979,7 @@ classAttributes_t bg_classList[ ] =
PCL_D_B_LEV1, //int classnum;
"BuilderLevel1", //char *classname;
"lucy", //char *modelname;
- "default", //char *skinname;
+ "angel", //char *skinname;
{ -15, -15, -20 }, //vec3_t mins;
{ 15, 15, 20 }, //vec3_t maxs;
{ 15, 15, 20 }, //vec3_t crouchmaxs;
@@ -1996,81 +1996,6 @@ classAttributes_t bg_classList[ ] =
200, //int steptime;
1.0f, //float speed;
1.0f, //float sticky;
- { PCL_D_B_LEV21, PCL_D_B_LEV22, PCL_D_B_LEV23 },//int children[ 3 ];
- 2000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_B_LEV21, //int classnum;
- "BuilderLevel2-1", //char *classname;
- "lucy", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -20 }, //vec3_t mins;
- { 15, 15, 20 }, //vec3_t maxs;
- { 15, 15, 20 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 12, 12, //int viewheight, crouchviewheight;
- 100, //int health;
- 40, //int armor;
- SCA_TAKESFALLDAMAGE|SCA_FOVWARPS, //int abilities;
- 50.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 90, //int fov;
- 0.015f, //float bob;
- 350, //int steptime;
- 1.2f, //float speed;
- 1.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
- 2000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_B_LEV22, //int classnum;
- "BuilderLevel2-2", //char *classname;
- "lucy", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -20 }, //vec3_t mins;
- { 15, 15, 20 }, //vec3_t maxs;
- { 15, 15, 20 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 12, 12, //int viewheight, crouchviewheight;
- 120, //int health;
- 40, //int armor;
- SCA_CANJUMP|SCA_FOVWARPS, //int abilities;
- 50.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 120, //int fov;
- 0.002f, //float bob;
- 350, //int steptime;
- 1.5f, //float speed;
- 1.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
- 2000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_B_LEV23, //int classnum;
- "BuilderLevel2-3", //char *classname;
- "lucy", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -20 }, //vec3_t mins;
- { 15, 15, 20 }, //vec3_t maxs;
- { 15, 15, 20 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 12, 12, //int viewheight, crouchviewheight;
- 100, //int health;
- 40, //int armor;
- SCA_CANJUMP|SCA_FOVWARPS, //int abilities;
- 50.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 100, //int fov;
- 0.015f, //float bob;
- 350, //int steptime;
- 1.7f, //float speed;
- 1.0f, //float sticky;
{ PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
2000, //int timetoevolve;
100 //int value;
@@ -2096,14 +2021,14 @@ classAttributes_t bg_classList[ ] =
25, //int steptime;
1.8f, //float speed;
5.0f, //float sticky;
- { PCL_D_O_LEV11, PCL_D_O_LEV12, PCL_NONE }, //int children[ 3 ];
+ { PCL_D_O_LEV1, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV11, //int classnum;
- "OffensiveLevel1-1", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV1, //int classnum;
+ "OffensiveLevel1", //char *classname;
+ "anarki", //char *modelname;
"default", //char *skinname;
{ -24, -24, -24 }, //vec3_t mins;
{ 24, 24, 24 }, //vec3_t maxs;
@@ -2121,14 +2046,14 @@ classAttributes_t bg_classList[ ] =
25, //int steptime;
1.6f, //float speed;
4.0f, //float sticky;
- { PCL_D_O_LEV21, PCL_D_O_LEV22, PCL_NONE }, //int children[ 3 ];
+ { PCL_D_O_LEV2, PCL_D_O_LEV1_UPG, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV12, //int classnum;
- "OffensiveLevel1-2", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV1_UPG, //int classnum;
+ "OffensiveLevel1-Upgrade", //char *classname;
+ "anarki", //char *modelname;
"default", //char *skinname;
{ -24, -24, -24 }, //vec3_t mins;
{ 24, 24, 24 }, //vec3_t maxs;
@@ -2137,73 +2062,73 @@ classAttributes_t bg_classList[ ] =
{ 24, 24, 4 }, //vec3_t deadmaxs;
6, 6, //int viewheight, crouchviewheight;
50, //int health;
- 10, //int armor;
+ 5, //int armor;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
0.0f, //float buildDist;
0.0f, //float launchSpeed;
120, //int fov;
- 0.0005f, //float bob;
+ 0.001f, //float bob;
25, //int steptime;
- 1.5f, //float speed;
- 3.0f, //float sticky;
- { PCL_D_O_LEV21, PCL_D_O_LEV22, PCL_NONE }, //int children[ 3 ];
+ 1.6f, //float speed;
+ 4.0f, //float sticky;
+ { PCL_D_O_LEV2, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV21, //int classnum;
- "OffensiveLevel2-1", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV2, //int classnum;
+ "OffensiveLevel2", //char *classname;
+ "bones", //char *modelname;
"default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15, 15 }, //vec3_t maxs;
- { 15, 15, 15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 100, //int health;
- 20, //int armor;
+ { -24, -24, -24 }, //vec3_t mins;
+ { 24, 24, 24 }, //vec3_t maxs;
+ { 24, 24, 24 }, //vec3_t crouchmaxs;
+ { -24, -24, -4 }, //vec3_t deadmins;
+ { 24, 24, 4 }, //vec3_t deadmaxs;
+ 6, 6, //int viewheight, crouchviewheight;
+ 50, //int health;
+ 10, //int armor;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
0.0f, //float buildDist;
0.0f, //float launchSpeed;
- 130, //int fov;
- 0.0f, //float bob;
- 60, //int steptime;
- 1.3f, //float speed;
- 5.0f, //float sticky;
- { PCL_D_O_LEV31, PCL_D_O_LEV32, PCL_NONE }, //int children[ 3 ];
+ 120, //int fov;
+ 0.0005f, //float bob;
+ 25, //int steptime;
+ 1.5f, //float speed;
+ 3.0f, //float sticky;
+ { PCL_D_O_LEV3, PCL_D_O_LEV2_UPG, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV22, //int classnum;
- "OffensiveLevel2-2", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV2_UPG, //int classnum;
+ "OffensiveLevel2-Upgrade", //char *classname;
+ "bones", //char *modelname;
"default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15, 15 }, //vec3_t maxs;
- { 15, 15, 15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 100, //int health;
- 30, //int armor;
+ { -24, -24, -24 }, //vec3_t mins;
+ { 24, 24, 24 }, //vec3_t maxs;
+ { 24, 24, 24 }, //vec3_t crouchmaxs;
+ { -24, -24, -4 }, //vec3_t deadmins;
+ { 24, 24, 4 }, //vec3_t deadmaxs;
+ 6, 6, //int viewheight, crouchviewheight;
+ 50, //int health;
+ 10, //int armor;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
0.0f, //float buildDist;
0.0f, //float launchSpeed;
- 130, //int fov;
- 0.0f, //float bob;
- 60, //int steptime;
- 1.3f, //float speed;
- 5.0f, //float sticky;
- { PCL_D_O_LEV32, PCL_D_O_LEV33, PCL_NONE }, //int children[ 3 ];
+ 120, //int fov;
+ 0.0005f, //float bob;
+ 25, //int steptime;
+ 1.5f, //float speed;
+ 3.0f, //float sticky;
+ { PCL_D_O_LEV3, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV31, //int classnum;
- "OffensiveLevel3-1", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV3, //int classnum;
+ "OffensiveLevel3", //char *classname;
+ "orbb", //char *modelname;
"default", //char *skinname;
{ -15, -15, -15 }, //vec3_t mins;
{ 15, 15, 15 }, //vec3_t maxs;
@@ -2211,24 +2136,24 @@ classAttributes_t bg_classList[ ] =
{ -15, -15, -4 }, //vec3_t deadmins;
{ 15, 15, 4 }, //vec3_t deadmaxs;
4, 4, //int viewheight, crouchviewheight;
- 200, //int health;
- 40, //int armor;
+ 100, //int health;
+ 20, //int armor;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
0.0f, //float buildDist;
0.0f, //float launchSpeed;
- 120, //int fov;
+ 130, //int fov;
0.0f, //float bob;
- 200, //int steptime;
- 1.0f, //float speed;
+ 60, //int steptime;
+ 1.3f, //float speed;
5.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
+ { PCL_D_O_LEV4, PCL_D_O_LEV3_UPG, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV32, //int classnum;
- "OffensiveLevel3-2", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV3_UPG, //int classnum;
+ "OffensiveLevel3-Upgrade", //char *classname;
+ "orbb", //char *modelname;
"default", //char *skinname;
{ -15, -15, -15 }, //vec3_t mins;
{ 15, 15, 15 }, //vec3_t maxs;
@@ -2236,24 +2161,24 @@ classAttributes_t bg_classList[ ] =
{ -15, -15, -4 }, //vec3_t deadmins;
{ 15, 15, 4 }, //vec3_t deadmaxs;
4, 4, //int viewheight, crouchviewheight;
- 200, //int health;
- 50, //int armor;
+ 100, //int health;
+ 20, //int armor;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
0.0f, //float buildDist;
0.0f, //float launchSpeed;
- 120, //int fov;
+ 130, //int fov;
0.0f, //float bob;
- 200, //int steptime;
- 1.0f, //float speed;
+ 60, //int steptime;
+ 1.3f, //float speed;
5.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
+ { PCL_D_O_LEV4, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_O_LEV33, //int classnum;
- "OffensiveLevel3-3", //char *classname;
- "klesk", //char *modelname;
+ PCL_D_O_LEV4, //int classnum;
+ "OffensiveLevel4", //char *classname;
+ "xaero", //char *modelname;
"default", //char *skinname;
{ -15, -15, -15 }, //vec3_t mins;
{ 15, 15, 15 }, //vec3_t maxs;
@@ -2261,221 +2186,21 @@ classAttributes_t bg_classList[ ] =
{ -15, -15, -4 }, //vec3_t deadmins;
{ 15, 15, 4 }, //vec3_t deadmaxs;
4, 4, //int viewheight, crouchviewheight;
- 200, //int health;
- 60, //int armor;
+ 100, //int health;
+ 30, //int armor;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
0.0f, //float buildDist;
0.0f, //float launchSpeed;
- 120, //int fov;
+ 130, //int fov;
0.0f, //float bob;
- 200, //int steptime;
- 1.0f, //float speed;
+ 60, //int steptime;
+ 1.3f, //float speed;
5.0f, //float sticky;
{ PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
3000, //int timetoevolve;
100 //int value;
},
{
- PCL_D_D_BASE, //int classnum;
- "Defensive", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 50, //int health;
- 0, //int armor;
- SCA_WALLCLIMBER|SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 90, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.5f, //float speed;
- 3.0f, //float sticky;
- { PCL_D_D_LEV11, PCL_D_D_LEV12, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV11, //int classnum;
- "DefensiveLevel1-1", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 50, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 100, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.4f, //float speed;
- 3.0f, //float sticky;
- { PCL_D_D_LEV21, PCL_D_D_LEV22, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV12, //int classnum;
- "DefensiveLevel1-2", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 50, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 100, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.4f, //float speed;
- 3.0f, //float sticky;
- { PCL_D_D_LEV21, PCL_D_D_LEV22, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV21, //int classnum;
- "DefensiveLevel2-1", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 150, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 110, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.3f, //float speed;
- 3.0f, //float sticky;
- { PCL_D_D_LEV31, PCL_D_D_LEV32, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV22, //int classnum;
- "DefensiveLevel2-2", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 150, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 110, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.3f, //float speed;
- 3.0f, //float sticky;
- { PCL_D_D_LEV32, PCL_D_D_LEV33, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV31, //int classnum;
- "DefensiveLevel3-1", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 250, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 130, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.2f, //float speed;
- 3.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV32, //int classnum;
- "DefensiveLevel3-2", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 250, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 130, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.2f, //float speed;
- 3.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
- PCL_D_D_LEV33, //int classnum;
- "DefensiveLevel3-3", //char *classname;
- "orbb", //char *modelname;
- "default", //char *skinname;
- { -15, -15, -15 }, //vec3_t mins;
- { 15, 15 ,15 }, //vec3_t maxs;
- { 15, 15 ,15 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
- 250, //int health;
- 50, //int armor;
- SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS, //int abilities;
- 0.0f, //float buildDist;
- 0.0f, //float launchSpeed;
- 130, //int fov;
- 0.0f, //float bob;
- 25, //int steptime;
- 1.2f, //float speed;
- 3.0f, //float sticky;
- { PCL_NONE, PCL_NONE, PCL_NONE }, //int children[ 3 ];
- 1000, //int timetoevolve;
- 100 //int value;
- },
- {
PCL_H_BASE, //int classnum;
"Human", //char *classname;
"sarge", //char *modelname;
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 1a78753a..b6e1e6fa 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -391,8 +391,8 @@ typedef enum {
BA_NONE,
BA_D_SPAWN,
- BA_D_DEF1,
- BA_D_DEF2,
+ BA_D_BARRICADE,
+ BA_D_ACIDTUBE,
BA_D_HIVEMIND,
BA_H_SPAWN,
@@ -652,6 +652,7 @@ typedef enum
BANIM_DESTROY1,
BANIM_DESTROY2,
+ BANIM_DESTROYED,
MAX_BUILDABLE_ANIMATIONS
} buildableAnimNumber_t;
@@ -696,29 +697,16 @@ typedef enum {
//builder classes
PCL_D_B_BASE,
PCL_D_B_LEV1,
- PCL_D_B_LEV21,
- PCL_D_B_LEV22,
- PCL_D_B_LEV23,
//offensive classes
PCL_D_O_BASE,
- PCL_D_O_LEV11,
- PCL_D_O_LEV12,
- PCL_D_O_LEV21,
- PCL_D_O_LEV22,
- PCL_D_O_LEV31,
- PCL_D_O_LEV32,
- PCL_D_O_LEV33,
-
- //defensive classes
- PCL_D_D_BASE,
- PCL_D_D_LEV11,
- PCL_D_D_LEV12,
- PCL_D_D_LEV21,
- PCL_D_D_LEV22,
- PCL_D_D_LEV31,
- PCL_D_D_LEV32,
- PCL_D_D_LEV33,
+ PCL_D_O_LEV1,
+ PCL_D_O_LEV1_UPG,
+ PCL_D_O_LEV2,
+ PCL_D_O_LEV2_UPG,
+ PCL_D_O_LEV3,
+ PCL_D_O_LEV3_UPG,
+ PCL_D_O_LEV4,
//human class
PCL_H_BASE,
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 67dd8abe..586d4765 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -209,8 +209,11 @@ Called when an droid spawn dies
void D_CreepRecede( gentity_t *self )
{
//if the creep just died begin the recession
- if( ( self->timestamp + 100 ) == level.time )
+ if( !( self->s.eFlags & EF_DEAD ) )
+ {
+ self->s.eFlags |= EF_DEAD;
G_AddEvent( self, EV_BUILD_DESTROY, 0 );
+ }
//creep is still receeding
if( ( self->timestamp + 10000 ) > level.time )
@@ -244,8 +247,11 @@ void DSpawn_Melt( gentity_t *self )
self->splashRadius, self, MOD_SHOTGUN, PTE_DROIDS );
//start creep recession
- if( ( self->timestamp + 500 ) == level.time )
+ if( !( self->s.eFlags & EF_DEAD ) )
+ {
+ self->s.eFlags |= EF_DEAD;
G_AddEvent( self, EV_BUILD_DESTROY, 0 );
+ }
//not dead yet
if( ( self->timestamp + 10000 ) > level.time )
@@ -319,12 +325,12 @@ void DSpawn_Pain( gentity_t *self, gentity_t *attacker, int damage )
/*
================
-DDef1_Die
+DBarricade_Die
Called when an droid spawn dies
================
*/
-void DDef1_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
+void DBarricade_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
{
vec3_t dir;
@@ -350,12 +356,12 @@ void DDef1_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
/*
================
-DDef1_Think
+DBarricade_Think
-think function for Droid Spawn
+think function for Droid Barricade
================
*/
-void DDef1_Think( gentity_t *self )
+void DBarricade_Think( gentity_t *self )
{
//if there is no creep nearby die
if( !findCreep( self ) )
@@ -364,6 +370,42 @@ void DDef1_Think( gentity_t *self )
return;
}
+ self->nextthink = level.time + BG_FindNextThinkForBuildable( self->s.clientNum );
+}
+
+
+
+
+//==================================================================================
+
+
+
+
+void DAcidTube_Think( gentity_t *self );
+
+/*
+================
+DAcidTube_Damage
+
+damage function for Droid Acid Tube
+================
+*/
+void DAcidTube_Damage( gentity_t *self )
+{
+ if( !( self->s.eFlags & EF_FIRING ) )
+ {
+ self->s.eFlags |= EF_FIRING;
+ G_AddEvent( self, EV_GIB_DROID, DirToByte( self->s.origin2 ) );
+ }
+
+ if( ( self->timestamp + 10000 ) > level.time )
+ self->think = DAcidTube_Damage;
+ else
+ {
+ self->think = DAcidTube_Think;
+ self->s.eFlags &= ~EF_FIRING;
+ }
+
//do some damage
G_SelectiveRadiusDamage( self->s.pos.trBase, self->parent, self->splashDamage,
self->splashRadius, self, self->splashMethodOfDeath, PTE_DROIDS );
@@ -371,6 +413,49 @@ void DDef1_Think( gentity_t *self )
self->nextthink = level.time + BG_FindNextThinkForBuildable( self->s.clientNum );
}
+/*
+================
+DAcidTube_Think
+
+think function for Droid Acid Tube
+================
+*/
+void DAcidTube_Think( gentity_t *self )
+{
+ int entityList[ MAX_GENTITIES ];
+ vec3_t range = { 200, 200, 200 };
+ vec3_t mins, maxs;
+ int i, num;
+ gentity_t *enemy;
+
+ VectorAdd( self->s.origin, range, maxs );
+ VectorSubtract( self->s.origin, range, mins );
+
+ //if there is no creep nearby die
+ if( !findCreep( self ) )
+ {
+ G_Damage( self, NULL, NULL, NULL, NULL, 10000, 0, MOD_SUICIDE );
+ return;
+ }
+
+ //do some damage
+ num = trap_EntitiesInBox( mins, maxs, entityList, MAX_GENTITIES );
+ for( i = 0; i < num; i++ )
+ {
+ enemy = &g_entities[ entityList[ i ] ];
+
+ if( enemy->client && enemy->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ {
+ self->timestamp = level.time;
+ self->think = DAcidTube_Damage;
+ self->nextthink = level.time + 100;
+ G_setBuildableAnim( self, BANIM_ATTACK1 );
+ }
+ }
+
+ self->nextthink = level.time + BG_FindNextThinkForBuildable( self->s.clientNum );
+}
+
@@ -496,17 +581,8 @@ void DDef2_Think( gentity_t *self )
return;
//if we are pointing at our target and we can fire shoot it
- switch( self->s.clientNum )
- {
- case BA_D_DEF2:
- if( self->count < level.time )
- ddef_fireonenemy( self, firespeed );
- break;
-
- default:
- Com_Printf( S_COLOR_YELLOW "WARNING: Unknown turret type in think\n" );
- break;
- }
+ if( self->count < level.time )
+ ddef_fireonenemy( self, firespeed );
}
@@ -1051,11 +1127,23 @@ think function
*/
void HSpawn_Blast( gentity_t *self )
{
+ vec3_t dir;
+
+ // we don't have a valid direction, so just point straight up
+ dir[0] = dir[1] = 0;
+ dir[2] = 1;
+
+ self->s.modelindex = 0; //don't draw the model once its destroyed
+ G_AddEvent( self, EV_ITEM_EXPLOSION, DirToByte( dir ) );
+ self->r.contents = CONTENTS_TRIGGER;
+ self->timestamp = level.time;
+
//do some radius damage
G_RadiusDamage( self->s.pos.trBase, self->parent, self->splashDamage,
self->splashRadius, self, self->splashMethodOfDeath );
- G_FreeEntity( self );
+ self->think = freeBuildable;
+ self->nextthink = level.time + 100;
}
@@ -1068,17 +1156,10 @@ Called when a human spawn dies
*/
void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod )
{
- vec3_t dir;
-
- // we don't have a valid direction, so just point straight up
- dir[0] = dir[1] = 0;
- dir[2] = 1;
-
//pretty events and cleanup
- self->s.modelindex = 0; //don't draw the model once its destroyed
- G_AddEvent( self, EV_ITEM_EXPLOSION, DirToByte( dir ) );
- self->r.contents = CONTENTS_TRIGGER;
- self->timestamp = level.time;
+ G_setBuildableAnim( self, BANIM_DESTROY1 );
+ G_setIdleBuildableAnim( self, BANIM_DESTROYED );
+
self->die = nullDieFunction;
self->think = HSpawn_Blast;
self->nextthink = level.time + 1500; //wait 1.5 seconds before damaging others
@@ -1336,19 +1417,25 @@ gentity_t *G_buildItem( gentity_t *ent, buildable_t buildable, int distance, flo
built->pain = DSpawn_Pain;
break;
- case BA_D_DEF1:
- built->die = DDef1_Die;
- built->think = DDef1_Think;
+ case BA_D_BARRICADE:
+ built->die = DBarricade_Die;
+ built->think = DBarricade_Think;
built->pain = DSpawn_Pain;
break;
- case BA_D_DEF2:
+ case BA_D_ACIDTUBE:
+ built->die = DBarricade_Die;
+ built->think = DAcidTube_Think;
+ built->pain = DSpawn_Pain;
+ break;
+
+/* case BA_D_DEF2:
built->die = DDef1_Die;
built->think = DDef2_Think;
built->pain = DSpawn_Pain;
built->enemy = NULL;
built->s.weapon = BG_FindProjTypeForBuildable( buildable );
- break;
+ break;*/
case BA_D_HIVEMIND:
built->die = DSpawn_Die;
diff --git a/src/game/g_client.c b/src/game/g_client.c
index d9928cc4..739529ec 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1277,7 +1277,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) {
else
{
//this is an infest spawn
- if( spawn != NULL )
+ if( spawn )
{
//spawn as new droid
VectorCopy( spawn->s.pos.trBase, spawn_origin );
@@ -1390,41 +1390,46 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) {
break;
case PCL_D_B_LEV1:
- case PCL_D_B_LEV21:
- case PCL_D_B_LEV22:
- case PCL_D_B_LEV23:
BG_packWeapon( WP_DBUILD2, client->ps.stats );
BG_packAmmoArray( WP_DBUILD2, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
break;
case PCL_D_O_BASE:
- case PCL_D_O_LEV21:
- case PCL_D_O_LEV22:
- case PCL_D_O_LEV31:
- case PCL_D_O_LEV32:
- case PCL_D_O_LEV33:
BG_packWeapon( WP_VENOM, client->ps.stats );
BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
break;
- case PCL_D_O_LEV11:
+ case PCL_D_O_LEV1:
BG_packWeapon( WP_GRABANDCSAW, client->ps.stats );
BG_packAmmoArray( WP_GRABANDCSAW, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
break;
- case PCL_D_O_LEV12:
+ case PCL_D_O_LEV1_UPG:
+ BG_packWeapon( WP_GRABANDCSAW, client->ps.stats );
+ BG_packAmmoArray( WP_GRABANDCSAW, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
+ break;
+
+ case PCL_D_O_LEV2:
+ BG_packWeapon( WP_POUNCE, client->ps.stats );
+ BG_packAmmoArray( WP_POUNCE, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
+ break;
+
+ case PCL_D_O_LEV2_UPG:
BG_packWeapon( WP_POUNCE, client->ps.stats );
BG_packAmmoArray( WP_POUNCE, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
break;
- case PCL_D_D_BASE:
- case PCL_D_D_LEV11:
- case PCL_D_D_LEV12:
- case PCL_D_D_LEV21:
- case PCL_D_D_LEV22:
- case PCL_D_D_LEV31:
- case PCL_D_D_LEV32:
- case PCL_D_D_LEV33:
+ case PCL_D_O_LEV3:
+ BG_packWeapon( WP_VENOM, client->ps.stats );
+ BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
+ break;
+
+ case PCL_D_O_LEV3_UPG:
+ BG_packWeapon( WP_VENOM, client->ps.stats );
+ BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
+ break;
+
+ case PCL_D_O_LEV4:
BG_packWeapon( WP_VENOM, client->ps.stats );
BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
break;
@@ -1498,7 +1503,8 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn ) {
MoveClientToIntermission( ent );
} else {
// fire the targets of the spawn point
- G_UseTargets( spawnPoint, ent );
+ if( !spawn )
+ G_UseTargets( spawnPoint, ent );
// select the highest weapon number available, after any
// spawn given items have fired
diff --git a/src/game/g_utils.c b/src/game/g_utils.c
index d13b9356..8105af8b 100644
--- a/src/game/g_utils.c
+++ b/src/game/g_utils.c
@@ -640,6 +640,7 @@ void G_SetOrigin( gentity_t *ent, vec3_t origin ) {
VectorClear( ent->s.pos.trDelta );
VectorCopy( origin, ent->r.currentOrigin );
+ VectorCopy( origin, ent->s.origin ); //TA: it shit breaks - blame this line
}
//TA: from quakestyle.telefragged.com