summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c88
-rw-r--r--src/game/g_active.c2
-rw-r--r--src/game/g_client.c47
-rw-r--r--src/game/g_cmds.c6
-rw-r--r--src/game/tremulous.h12
5 files changed, 99 insertions, 56 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index ad5727ca..7512c19c 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -1220,7 +1220,7 @@ classAttributes_t bg_classList[ ] =
{ 15, 15, 20 }, //vec3_t crouchmaxs;
{ -15, -15, -4 }, //vec3_t deadmins;
{ 15, 15, 4 }, //vec3_t deadmaxs;
- 12, 12, //int viewheight, crouchviewheight;
+ 20, 20, //int viewheight, crouchviewheight;
ABUILDER_HEALTH, //int health;
ABUILDER_REGEN, //int regenRate;
SCA_TAKESFALLDAMAGE|SCA_FOVWARPS|
@@ -1250,7 +1250,7 @@ classAttributes_t bg_classList[ ] =
{ 20, 20, 20 }, //vec3_t crouchmaxs;
{ -20, -20, -4 }, //vec3_t deadmins;
{ 20, 20, 4 }, //vec3_t deadmaxs;
- 0, 0, //int viewheight, crouchviewheight;
+ 20, 20, //int viewheight, crouchviewheight;
ABUILDER_UPG_HEALTH, //int health;
ABUILDER_UPG_REGEN, //int regenRate;
SCA_CANJUMP|SCA_FOVWARPS|SCA_WALLCLIMBER|
@@ -1310,14 +1310,14 @@ classAttributes_t bg_classList[ ] =
{ 24, 24, 9 }, //vec3_t crouchmaxs;
{ -24, -24, -4 }, //vec3_t deadmins;
{ 24, 24, 4 }, //vec3_t deadmaxs;
- 6, 6, //int viewheight, crouchviewheight;
+ 18, 18, //int viewheight, crouchviewheight;
DRAGOON_HEALTH, //int health;
DRAGOON_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
WP_POUNCE, //weapon_t startWeapon
0.0f, //float buildDist;
- 120, //int fov;
+ 110, //int fov;
0.0005f, //float bob;
25, //int steptime;
DRAGOON_SPEED, //float speed;
@@ -1340,14 +1340,14 @@ classAttributes_t bg_classList[ ] =
{ 24, 24, 11 }, //vec3_t crouchmaxs;
{ -24, -24, -4 }, //vec3_t deadmins;
{ 24, 24, 4 }, //vec3_t deadmaxs;
- 6, 6, //int viewheight, crouchviewheight;
+ 20, 20, //int viewheight, crouchviewheight;
DRAGOON_UPG_HEALTH, //int health;
DRAGOON_UPG_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
WP_POUNCE_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
- 120, //int fov;
+ 110, //int fov;
0.0005f, //float bob;
25, //int steptime;
DRAGOON_UPG_SPEED, //float speed;
@@ -1361,16 +1361,16 @@ classAttributes_t bg_classList[ ] =
"hydra", //char *classname;
"Hydra", //char *humanname;
"spitter", //char *modelname;
- 0.4f, //float modelScale;
+ 0.6f, //float modelScale;
"default", //char *skinname;
"alien_hud", //char *hudname;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -24, -24, -12 }, //vec3_t mins;
- { 24, 24, 12 }, //vec3_t maxs;
- { 24, 24, 12 }, //vec3_t crouchmaxs;
- { -24, -24, -4 }, //vec3_t deadmins;
- { 24, 24, 4 }, //vec3_t deadmaxs;
- 6, 6, //int viewheight, crouchviewheight;
+ { -18, -18, -18 }, //vec3_t mins;
+ { 18, 18, 18 }, //vec3_t maxs;
+ { 18, 18, 18 }, //vec3_t crouchmaxs;
+ { -18, -18, -4 }, //vec3_t deadmins;
+ { 18, 18, 4 }, //vec3_t deadmaxs;
+ 18, 18, //int viewheight, crouchviewheight;
HYDRA_HEALTH, //int health;
HYDRA_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
@@ -1378,7 +1378,7 @@ classAttributes_t bg_classList[ ] =
SCA_NOFOOTSTEPS, //int abilities;
WP_GRAB_CLAW, //weapon_t startWeapon
0.0f, //float buildDist;
- 120, //int fov;
+ 100, //int fov;
0.001f, //float bob;
25, //int steptime;
HYDRA_SPEED, //float speed;
@@ -1392,16 +1392,16 @@ classAttributes_t bg_classList[ ] =
"hydraupg", //char *classname;
"Hydra Upgrade", //char *humanname;
"spitter", //char *modelname;
- 0.5f, //float modelScale;
+ 0.7f, //float modelScale;
"blue", //char *skinname;
"alien_hud", //char *hudname;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -24, -24, -14 }, //vec3_t mins;
- { 24, 24, 14 }, //vec3_t maxs;
- { 24, 24, 14 }, //vec3_t crouchmaxs;
- { -24, -24, -4 }, //vec3_t deadmins;
- { 24, 24, 4 }, //vec3_t deadmaxs;
- 6, 6, //int viewheight, crouchviewheight;
+ { -20, -20, -20 }, //vec3_t mins;
+ { 20, 20, 20 }, //vec3_t maxs;
+ { 20, 20, 20 }, //vec3_t crouchmaxs;
+ { -20, -20, -4 }, //vec3_t deadmins;
+ { 20, 20, 4 }, //vec3_t deadmaxs;
+ 20, 20, //int viewheight, crouchviewheight;
HYDRA_UPG_HEALTH, //int health;
HYDRA_UPG_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|SCA_FOVWARPS|
@@ -1409,7 +1409,7 @@ classAttributes_t bg_classList[ ] =
SCA_NOFOOTSTEPS, //int abilities;
WP_GRAB_CLAW_UPG, //weapon_t startWeapon
0.0f, //float buildDist;
- 120, //int fov;
+ 100, //int fov;
0.001f, //float bob;
25, //int steptime;
HYDRA_UPG_SPEED, //float speed;
@@ -1423,23 +1423,23 @@ classAttributes_t bg_classList[ ] =
"chimera", //char *classname;
"Chimera", //char *humanname;
"tarantula", //char *modelname;
- 0.5f, //float modelScale;
+ 0.75f, //float modelScale;
"default", //char *skinname;
"alien_hud", //char *hudname;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -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;
+ { -22, -22, -22 }, //vec3_t mins;
+ { 22, 22, 22 }, //vec3_t maxs;
+ { 22, 22, 22 }, //vec3_t crouchmaxs;
+ { -22, -22, -4 }, //vec3_t deadmins;
+ { 22, 22, 4 }, //vec3_t deadmaxs;
+ 30, 30, //int viewheight, crouchviewheight;
CHIMERA_HEALTH, //int health;
CHIMERA_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
WP_AREA_ZAP, //weapon_t startWeapon
0.0f, //float buildDist;
- 130, //int fov;
+ 90, //int fov;
0.0f, //float bob;
60, //int steptime;
CHIMERA_SPEED, //float speed;
@@ -1453,23 +1453,23 @@ classAttributes_t bg_classList[ ] =
"chimeraupg", //char *classname;
"Chimera Upgrade", //char *humanname;
"tarantula", //char *modelname;
- 0.6f, //float modelScale;
+ 0.9f, //float modelScale;
"red", //char *skinname;
"alien_hud", //char *hudname;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -15, -15, -16 }, //vec3_t mins;
- { 15, 15, 16 }, //vec3_t maxs;
- { 15, 15, 16 }, //vec3_t crouchmaxs;
- { -15, -15, -4 }, //vec3_t deadmins;
- { 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
+ { -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;
+ 32, 32, //int viewheight, crouchviewheight;
CHIMERA_UPG_HEALTH, //int health;
CHIMERA_UPG_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
WP_DIRECT_ZAP, //weapon_t startWeapon
0.0f, //float buildDist;
- 130, //int fov;
+ 90, //int fov;
0.0f, //float bob;
60, //int steptime;
CHIMERA_UPG_SPEED, //float speed;
@@ -1483,23 +1483,23 @@ classAttributes_t bg_classList[ ] =
"bigmofo", //char *classname;
"Big Mofo", //char *humanname;
"bug", //char *modelname;
- 1.5f, //float modelScale;
+ 1.2f, //float modelScale;
"default", //char *skinname;
"alien_hud", //char *hudname;
( 1 << S1 )|( 1 << S2 )|( 1 << S3 ), //int stages
- { -30, -30, -36 }, //vec3_t mins;
- { 30, 30, 36 }, //vec3_t maxs;
- { 30, 30, 36 }, //vec3_t crouchmaxs;
+ { -30, -30, -29 }, //vec3_t mins;
+ { 30, 30, 29 }, //vec3_t maxs;
+ { 30, 30, 29 }, //vec3_t crouchmaxs;
{ -15, -15, -4 }, //vec3_t deadmins;
{ 15, 15, 4 }, //vec3_t deadmaxs;
- 4, 4, //int viewheight, crouchviewheight;
+ 50, 50, //int viewheight, crouchviewheight;
BMOFO_HEALTH, //int health;
BMOFO_REGEN, //int regenRate;
SCA_CANJUMP|SCA_NOWEAPONDRIFT|
SCA_FOVWARPS|SCA_ALIENSENSE|SCA_NOFOOTSTEPS, //int abilities;
WP_GROUND_POUND, //weapon_t startWeapon
0.0f, //float buildDist;
- 130, //int fov;
+ 90, //int fov;
0.0f, //float bob;
60, //int steptime;
BMOFO_SPEED, //float speed;
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 7c643014..bb0211b6 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -1153,7 +1153,7 @@ void ClientThink_real( gentity_t *ent )
}
// check for respawning
- if( client->ps.stats[STAT_HEALTH] <= 0 )
+ if( client->ps.stats[ STAT_HEALTH ] <= 0 )
{
// wait for the attack button to be pressed
if( level.time > client->respawnTime )
diff --git a/src/game/g_client.c b/src/game/g_client.c
index b6bb58f8..c943faa8 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1231,10 +1231,12 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn )
int teamLocal;
int eventSequence;
char userinfo[MAX_INFO_STRING];
- vec3_t bodyMaxs, classMins, up = { 0, 0, 1 };
+ vec3_t classMins, classMaxs, up = { 0, 0, 1 };
int ammo, clips, maxClips;
weapon_t weapon;
float hModifier;
+ trace_t tr;
+ vec3_t avgNormal, nudgeOrigin;
index = ent - g_entities;
@@ -1275,10 +1277,47 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn )
VectorCopy( spawn->s.pos.trBase, spawn_origin );
VectorCopy( spawn->s.angles, spawn_angles );
- BG_FindBBoxForClass( spawn->s.clientNum, NULL, NULL, NULL, NULL, bodyMaxs );
- BG_FindBBoxForClass( ent->client->pers.pclass, classMins, NULL, NULL, NULL, NULL );
+ BG_FindBBoxForClass( ent->client->pers.pclass, classMins, classMaxs, NULL, NULL, NULL );
- spawn_origin[ 2 ] += bodyMaxs[ 2 ] + fabs( classMins[ 2 ] ) + 1;
+ spawn_origin[ 2 ] += fabs( classMins[ 2 ] ) + 1;
+
+ trap_Trace( &tr, spawn_origin, classMins, classMaxs, spawn_origin, ent->s.number, MASK_SHOT );
+
+#define MAX_NUDGES 20
+#define NUDGE_SIZE 10.f
+
+ VectorClear( avgNormal );
+ VectorCopy( spawn_origin, nudgeOrigin );
+
+ //if the spawn is blocked nudge it away from whatever is blocking it
+ for( i = 0; i < MAX_NUDGES && tr.fraction < 1.0f; i++ )
+ {
+ VectorMA( nudgeOrigin, NUDGE_SIZE, tr.plane.normal, nudgeOrigin );
+ VectorAdd( avgNormal, tr.plane.normal, avgNormal );
+
+ trap_Trace( &tr, nudgeOrigin, classMins, classMaxs, nudgeOrigin, ent->s.number, MASK_SHOT );
+ }
+
+ if( i = MAX_NUDGES )
+ {
+ VectorNormalize( avgNormal );
+ VectorCopy( spawn_origin, nudgeOrigin );
+
+ for( i = 0; i < MAX_NUDGES && tr.fraction < 1.0f; i++ )
+ {
+ VectorMA( nudgeOrigin, NUDGE_SIZE, avgNormal, nudgeOrigin );
+
+ trap_Trace( &tr, nudgeOrigin, classMins, classMaxs, nudgeOrigin, ent->s.number, MASK_SHOT );
+ }
+
+ if( i != MAX_NUDGES )
+ VectorCopy( nudgeOrigin, spawn_origin );
+ //else
+ //use original position and hope PM sorts it out
+ }
+ else
+ VectorCopy( nudgeOrigin, spawn_origin );
+
G_AddEvent( spawn, EV_GIB_ALIEN, DirToByte( up ) );
spawn->freeAfterEvent = qtrue;
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 32c3c6ee..ed269e34 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1031,7 +1031,11 @@ void Cmd_Class_f( gentity_t *ent )
ent->client->infestBody = victim;
VectorCopy( victim->s.pos.trBase, infestOrigin );
- infestOrigin[ 2 ] += 128;
+ infestOrigin[ 2 ] += 128.0f;
+ trap_Trace( &tr, victim->s.pos.trBase, ent->r.mins, ent->r.maxs,
+ infestOrigin, ent->s.number, MASK_SHOT );
+ VectorCopy( tr.endpos, infestOrigin );
+ infestOrigin[ 2 ] -= 16.0f;
VectorCopy( victim->s.angles, infestAngles );
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index e4dece74..1c554f07 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -27,7 +27,7 @@
#define ABUILDER_BUILD_REPEAT 500
#define ABUILDER_CLAW_DMG ADM(25)
-#define ABUILDER_CLAW_RANGE 32.0f
+#define ABUILDER_CLAW_RANGE 48.0f
#define ABUILDER_CLAW_REPEAT 1000
#define ABUILDER_BASE_DELAY 9000
#define ABUILDER_ADV_DELAY 4000
@@ -37,7 +37,7 @@
#define SOLDIER_BITE_REPEAT 500
#define DRAGOON_CLAW_DMG ADM(75)
-#define DRAGOON_CLAW_RANGE 32.0f
+#define DRAGOON_CLAW_RANGE 48.0f
#define DRAGOON_CLAW_REPEAT 750
#define DRAGOON_CLAW_U_REPEAT 750
#define DRAGOON_POUNCE_DMG ADM(100)
@@ -52,10 +52,10 @@
#define DRAGOON_SLOWBLOB_TIME 5000
#define HYDRA_CLAW_DMG ADM(50)
-#define HYDRA_CLAW_RANGE 32.0f
+#define HYDRA_CLAW_RANGE 96.0f
#define HYDRA_CLAW_REPEAT 500
#define HYDRA_CLAW_U_REPEAT 500
-#define HYDRA_GRAB_RANGE 32.0f
+#define HYDRA_GRAB_RANGE 64.0f
#define HYDRA_GRAB_TIME 1000
#define HYDRA_PCLOUD_DMG ADM(5)
#define HYDRA_PCLOUD_RANGE 200.0f
@@ -63,7 +63,7 @@
#define HYDRA_PCLOUD_TIME 10000
#define CHIMERA_CLAW_DMG ADM(75)
-#define CHIMERA_CLAW_RANGE 32.0f
+#define CHIMERA_CLAW_RANGE 96.0f
#define CHIMERA_CLAW_REPEAT 400
#define CHIMERA_CLAW_U_REPEAT 300
#define CHIMERA_AREAZAP_DMG ADM(125)
@@ -74,7 +74,7 @@
#define CHIMERA_DIRECTZAP_REPEAT 1500
#define BMOFO_CLAW_DMG ADM(150)
-#define BMOFO_CLAW_RANGE 64.0f
+#define BMOFO_CLAW_RANGE 128.0f
#define BMOFO_CLAW_REPEAT 750
#define BMOFO_KNOCK_RANGE 200.0f
#define BMOFO_KNOCK_REPEAT 15000