summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2001-01-30 23:41:31 +0000
committerTim Angus <tim@ngus.net>2001-01-30 23:41:31 +0000
commit8de2b273db9da3a4a2db285614141e4e31849846 (patch)
tree16e2a4142eb626294fca29a7ec3929f63884a838
parent24b1876922ed0edaa912f2d7c26560a0cbe200bf (diff)
I can't remember
-rw-r--r--src/cgame/cg_draw.c5
-rw-r--r--src/cgame/cg_ents.c94
-rw-r--r--src/cgame/cg_local.h9
-rw-r--r--src/cgame/cg_main.c18
-rw-r--r--src/game/bg_pmove.c14
-rw-r--r--src/game/bg_public.h13
-rw-r--r--src/game/g_active.c9
-rw-r--r--src/game/g_buildable.c19
-rw-r--r--src/game/g_client.c31
-rw-r--r--src/game/g_cmds.c20
-rw-r--r--src/game/g_combat.c139
-rw-r--r--src/game/g_main.c4
-rw-r--r--src/game/g_misc.c45
-rw-r--r--src/game/g_missile.c4
-rw-r--r--src/game/g_weapon.c10
15 files changed, 150 insertions, 284 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index e92e8652..cc087856 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -354,8 +354,9 @@ static void CG_DrawLighting( void )
switch( cg.snap->ps.stats[ STAT_PCLASS ] )
{
- case PCL_D_BASE:
- case PCL_D_BUILDER:
+ case PCL_D_B_BASE:
+ case PCL_D_O_BASE:
+ case PCL_D_D_BASE:
if( lum < 10 )
CG_DrawPic( -4, -4, 648, 488, cgs.media.droidNav9 );
else if( lum >= 10 && lum < 16 )
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index d78f3d64..9b8c10e5 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -709,59 +709,42 @@ CG_TorchLight
*/
static void CG_TorchLight( centity_t *cent )
{
- float r, g, b;
- int i, j, k;
- byte lum;
+ int i, j, lum, numFragments;
polyVert_t verts[ 4 ];
- vec3_t square[ 4 ];
- vec2_t tex[ 4 ];
- float size;
+ float size, texCoordScale, veclength;
trace_t tr;
+ vec2_t tex[ 4 ];
vec3_t temp, origin, normal, projection, angles;
+ vec3_t to, from, forward, length;
+ vec3_t markPoints[ MAX_MARK_POINTS ];
+ vec3_t square[ 4 ];
vec4_t axis[ 3 ], color;
markFragment_t markFragments[ MAX_MARK_FRAGMENTS ], *mf;
- vec3_t markPoints[ MAX_MARK_POINTS ];
- int numFragments;
- float texCoordScale;
-
- if( cent->currentState.frame == cg.predictedPlayerState.clientNum )
+ if( cent->currentState.clientNum == cg.predictedPlayerState.clientNum )
{
- vec3_t to, from, forward, length;
- float veclength;
-
VectorCopy( cg.predictedPlayerState.origin, from );
VectorCopy( cg.predictedPlayerState.viewangles, angles );
-
- from[2] += cg.predictedPlayerState.viewheight;
-
- AngleVectors( angles, forward, NULL, NULL );
- VectorMA( from, 4096, forward, to );
-
- CG_Trace( &tr, from, NULL, NULL, to, cg.predictedPlayerState.clientNum, MASK_SOLID );
-
- VectorSubtract( tr.endpos, from, length );
- veclength = VectorLength( length );
-
- VectorMA( tr.endpos, -(veclength / 5), forward, origin );
-
- //VectorCopy( cent->lerpOrigin, origin );
- size = veclength / 2.0f;
- if( size > 255 ) size = 255;
- if( size < 0 ) size = 0;
}
else
{
- VectorCopy( cent->lerpOrigin, origin );
+ VectorCopy( cent->lerpOrigin, from );
VectorCopy( cent->lerpAngles, angles );
-
- size = ( cent->currentState.constantLight >> 24 ) & 0xFF; //CREEP_BASESIZE / 2;
}
- AngleVectors( angles, temp, NULL, NULL );
- VectorMA( origin, 4096, temp, temp );
+ from[2] += cg.predictedPlayerState.viewheight;
+
+ AngleVectors( angles, forward, NULL, NULL );
+ VectorMA( from, 4096, forward, to );
- CG_Trace( &tr, origin, NULL, NULL, temp, cent->currentState.number, MASK_SOLID );
+ CG_Trace( &tr, from, NULL, NULL, to, -1, MASK_SOLID );
+
+ VectorSubtract( tr.endpos, from, length );
+ veclength = VectorLength( length );
+
+ size = veclength / 2.0f;
+ if( size > 255 ) size = 255;
+ if( size < 0 ) size = 0;
VectorCopy( tr.endpos, origin );
VectorCopy( tr.plane.normal, normal );
@@ -789,16 +772,21 @@ static void CG_TorchLight( centity_t *cent )
Vector2Set( tex[ 2 ], 1, 1 );
Vector2Set( tex[ 3 ], 1, 0 );
- VectorScale( normal, -20, projection );
+ VectorScale( normal, -32, projection );
numFragments = trap_CM_MarkFragments( 4, (void *)square,
projection, MAX_MARK_POINTS, markPoints[0],
MAX_MARK_FRAGMENTS, markFragments );
color[ 0 ] = color[ 1 ] = color[ 2 ] = color[ 3 ] = 255;
- r = g = b = 1;
+ VectorCopy( origin, temp );
+ VectorMA( temp, 48, normal, temp );
+ lum = CG_AmbientLight( temp );
+
+ lum += (int)( ( size / 255.0f ) * 24 );
- lum = CG_AmbientLight( origin );
+ if( lum > 255 )
+ lum = 255;
for ( i = 0, mf = markFragments ; i < numFragments ; i++, mf++ )
{
@@ -823,13 +811,27 @@ static void CG_TorchLight( centity_t *cent )
v->st[1] = 0.5 + DotProduct( delta, axis[2] ) * texCoordScale;
*(int *)v->modulate = *(int *)color;
}
-
- trap_R_AddPolyToScene( cgs.media.humanTorch, mf->numPoints, verts );
-
+
+ if( lum < 64 )
+ {
+ if( lum < 10 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch8, mf->numPoints, verts );
+ else if( lum >= 10 && lum < 16 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch7, mf->numPoints, verts );
+ else if( lum >= 16 && lum < 22 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch6, mf->numPoints, verts );
+ else if( lum >= 22 && lum < 28 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch5, mf->numPoints, verts );
+ else if( lum >= 28 && lum < 34 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch4, mf->numPoints, verts );
+ else if( lum >= 34 && lum < 40 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch3, mf->numPoints, verts );
+ else if( lum >= 40 && lum < 46 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch2, mf->numPoints, verts );
+ else if( lum >= 46 )
+ trap_R_AddPolyToScene( cgs.media.humanTorch1, mf->numPoints, verts );
+ }
}
-
-
- trap_R_AddLightToScene( origin, (int)size, r, g, b );
}
/*
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 3417ddfc..d1703528 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -737,7 +737,14 @@ typedef struct {
qhandle_t explosionTrailShader;
qhandle_t humanNV;
- qhandle_t humanTorch;
+ qhandle_t humanTorch8;
+ qhandle_t humanTorch7;
+ qhandle_t humanTorch6;
+ qhandle_t humanTorch5;
+ qhandle_t humanTorch4;
+ qhandle_t humanTorch3;
+ qhandle_t humanTorch2;
+ qhandle_t humanTorch1;
qhandle_t droidNav9;
qhandle_t droidNav8;
qhandle_t droidNav7;
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index f1a2af5d..01ae9552 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -795,7 +795,14 @@ static void CG_RegisterGraphics( void ) {
//TA: screenfades
cgs.media.humanNV = trap_R_RegisterShader( "humanNV" );
- cgs.media.humanTorch = trap_R_RegisterShader( "humanTorch" );
+ cgs.media.humanTorch8 = trap_R_RegisterShader( "humanTorch8" );
+ cgs.media.humanTorch7 = trap_R_RegisterShader( "humanTorch7" );
+ cgs.media.humanTorch6 = trap_R_RegisterShader( "humanTorch6" );
+ cgs.media.humanTorch5 = trap_R_RegisterShader( "humanTorch5" );
+ cgs.media.humanTorch4 = trap_R_RegisterShader( "humanTorch4" );
+ cgs.media.humanTorch3 = trap_R_RegisterShader( "humanTorch3" );
+ cgs.media.humanTorch2 = trap_R_RegisterShader( "humanTorch2" );
+ cgs.media.humanTorch1 = trap_R_RegisterShader( "humanTorch1" );
cgs.media.droidNav9 = trap_R_RegisterShader( "droidNav9" );
cgs.media.droidNav8 = trap_R_RegisterShader( "droidNav8" );
cgs.media.droidNav7 = trap_R_RegisterShader( "droidNav7" );
@@ -927,8 +934,8 @@ CG_RegisterClients
static void CG_RegisterClients( void ) {
int i;
- CG_LoadingClient(cg.clientNum);
- CG_NewClientInfo(cg.clientNum);
+ //CG_LoadingClient(cg.clientNum);
+ //CG_NewClientInfo(cg.clientNum);
for (i=0 ; i<MAX_CLIENTS+MAX_PRECACHES; i++) {
const char *clientInfo;
@@ -941,14 +948,15 @@ static void CG_RegisterClients( void ) {
if ( !clientInfo[0] ) {
continue;
}
- CG_LoadingClient( i );
if( i < MAX_CLIENTS )
{
- CG_NewClientInfo( i );
+ //CG_LoadingClient( i );
+ //CG_NewClientInfo( i );
}
else
{
+ CG_LoadingClient( i );
CG_PrecacheClientInfo( i );
}
}
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 9081b4ca..f36cd3e3 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -300,7 +300,7 @@ static void PM_Friction( void ) {
// if getting knocked back, no friction
if ( ! (pm->ps->pm_flags & PMF_TIME_KNOCKBACK) ) {
if( ( pm->ps->stats[ STAT_PTEAM ] == PTE_DROIDS ) &&
- ( pm->ps->stats[ STAT_PCLASS ] == PCL_D_BASE ) )
+ ( pm->ps->stats[ STAT_PCLASS ] == PCL_D_O_BASE ) )
{
control = speed < pm_stopspeed*5 ? pm_stopspeed*5 : speed;
}
@@ -1875,7 +1875,7 @@ static void PM_CheckDuck (void)
switch( pm->ps->stats[ STAT_PCLASS ] )
{
- case PCL_D_BUILDER:
+ case PCL_D_B_BASE:
VectorSet( PCmins, -15, -15, -20 );
VectorSet( PCmaxs, 15, 15, 20 );
VectorSet( PCcmaxs, 15, 15, 20 );
@@ -1883,7 +1883,7 @@ static void PM_CheckDuck (void)
PCcvh = 12;
break;
- case PCL_D_BASE:
+ case PCL_D_O_BASE:
VectorSet( PCmins, -15, -15, -15 );
VectorSet( PCmaxs, 15, 15, 15 );
VectorSet( PCcmaxs, 15, 15, 15 );
@@ -1891,6 +1891,14 @@ static void PM_CheckDuck (void)
PCcvh = 4;
break;
+ case PCL_D_D_BASE:
+ VectorSet( PCmins, -15, -15, -15 );
+ VectorSet( PCmaxs, 15, 15, 15 );
+ VectorSet( PCcmaxs, 15, 15, 15 );
+ PCvh = 4;
+ PCcvh = 4;
+ break;
+
case PCL_H_BASE:
VectorSet( PCmins, -15, -15, -24 );
VectorSet( PCmaxs, 15, 15, 32 );
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 0f53ef30..e096b33d 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -603,16 +603,9 @@ typedef enum {
//FIXME: switch to enums at some point
//TA: player classes
-#define PCL_D_BUILDER 1
-#define PCL_D_BASE 2
-#define PCL_D_OFF1 3
-#define PCL_D_OFF2 4
-#define PCL_D_OFF3 5
-#define PCL_D_OFF4 6
-#define PCL_D_OFF5 7
-#define PCL_D_OFF6 8
-#define PCL_D_OFF7 9
-#define PCL_D_OFF8 10
+#define PCL_D_B_BASE 1
+#define PCL_D_O_BASE 2
+#define PCL_D_D_BASE 3
#define PCL_H_BASE 11
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 6b0c7218..3c48cbc7 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -737,13 +737,14 @@ void ClientThink_real( gentity_t *ent ) {
client->ps.speed = g_speed.value * client->classSpeed;
//TA: slow player if standing in creep
- /*for ( i = 1, creepNode = g_entities + i; i < level.num_entities; i++, creepNode++ )
+ for ( i = 1, creepNode = g_entities + i; i < level.num_entities; i++, creepNode++ )
{
- if( !Q_stricmp( creepNode->classname, "team_droid_creep" ) )
+ if( ( !Q_stricmp( creepNode->classname, "team_droid_spawn" ) ) ||
+ ( !Q_stricmp( creepNode->classname, "team_droid_def1" ) ) )
{
VectorSubtract( client->ps.origin, creepNode->s.origin, temp_v );
- if( ( VectorLength( temp_v ) <= creepNode->s.frame ) &&
+ if( ( VectorLength( temp_v ) <= CREEP_BASESIZE ) &&
( temp_v[ 2 ] <= 21 ) && //assumes mins of player is (x, x, -24)
( client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) )
{
@@ -753,7 +754,7 @@ void ClientThink_real( gentity_t *ent ) {
break;
}
}
- }*/
+ }
if( !cSlowed )
client->ps.stats[ STAT_STATE ] &= ~SS_CREEPSLOWED;
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index cc67c2eb..98fbe237 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -216,9 +216,9 @@ void DDef1_Think( gentity_t *self )
// Anthony "inolen" Pesch (www.inolen.com)
//with modifications by me of course :)
#define HDEF1_RANGE 500
-#define HDEF1_ANGULARSPEED 10
+#define HDEF1_ANGULARSPEED 15
#define HDEF1_FIRINGSPEED 200
-#define HDEF1_ACCURACYTOLERANCE 10
+#define HDEF1_ACCURACYTOLERANCE HDEF1_ANGULARSPEED - 5
#define HDEF1_VERTICALCAP 20
/*
@@ -231,6 +231,7 @@ Used by HDef1_Think to track enemy location
qboolean hdef1_trackenemy( gentity_t *self )
{
vec3_t dirToTarget, angleToTarget, angularDiff;
+ float temp;
VectorSubtract( self->enemy->s.pos.trBase, self->s.pos.trBase, dirToTarget );
VectorNormalize( dirToTarget );
@@ -246,11 +247,14 @@ qboolean hdef1_trackenemy( gentity_t *self )
else
self->turloc[ PITCH ] = angleToTarget[ PITCH ];
- if( self->turloc[ PITCH ] < -HDEF1_VERTICALCAP )
+ temp = fabs( self->turloc[ PITCH ] );
+ if( temp > 180 )
+ temp -= 360;
+
+ if( temp < -HDEF1_VERTICALCAP )
+ self->turloc[ PITCH ] = (-360)+HDEF1_VERTICALCAP;
+ else if( temp > HDEF1_VERTICALCAP )
self->turloc[ PITCH ] = -HDEF1_VERTICALCAP;
-
- if( self->turloc[ PITCH ] > HDEF1_VERTICALCAP )
- self->turloc[ PITCH ] = HDEF1_VERTICALCAP;
if( angularDiff[ YAW ] < -HDEF1_ACCURACYTOLERANCE )
self->turloc[ YAW ] += HDEF1_ANGULARSPEED;
@@ -284,7 +288,7 @@ void hdef1_fireonenemy( gentity_t *self )
AngleVectors( self->turloc, aimVector, NULL, NULL );
//fire_flamer( self, self->s.pos.trBase, aimVector );
fire_plasma( self, self->s.pos.trBase, aimVector );
- G_AddEvent( self, EV_FIRE_WEAPON, 0 );
+ //G_AddEvent( self, EV_FIRE_WEAPON, 0 );
self->count = level.time + HDEF1_FIRINGSPEED;
}
@@ -388,7 +392,6 @@ void HSpawn_Blast( gentity_t *self )
self->splashRadius, self, self->splashMethodOfDeath );
G_FreeEntity( self );
- trap_LinkEntity( self );
//update spawn counts
CalculateRanks( );
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 49868661..788aa1e1 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -945,10 +945,13 @@ void ClientUserinfoChanged( int clientNum ) {
//Q_strncpyz( model, Info_ValueForKey (userinfo, "model"), sizeof( model ) );
switch( client->pers.pclass )
{
- case PCL_D_BASE:
+ case PCL_D_O_BASE:
Q_strncpyz( model, "klesk", sizeof( model ) );
break;
- case PCL_D_BUILDER:
+ case PCL_D_D_BASE:
+ Q_strncpyz( model, "orbb", sizeof( model ) );
+ break;
+ case PCL_D_B_BASE:
Q_strncpyz( model, "lucy", sizeof( model ) );
break;
case PCL_H_BASE:
@@ -1304,7 +1307,7 @@ void ClientSpawn(gentity_t *ent) {
// clear entity values
switch( ent->client->pers.pclass )
{
- case PCL_D_BUILDER:
+ case PCL_D_B_BASE:
client->pers.maxHealth = 50;
client->ps.stats[STAT_MAX_HEALTH] = 50;
client->ps.stats[STAT_ARMOR] = 50;
@@ -1324,7 +1327,7 @@ void ClientSpawn(gentity_t *ent) {
client->classSpeed = 0.5;
break;
- case PCL_D_BASE:
+ case PCL_D_O_BASE:
client->pers.maxHealth = 25;
client->ps.stats[STAT_MAX_HEALTH] = 25;
client->ps.eFlags = flags;
@@ -1344,6 +1347,26 @@ void ClientSpawn(gentity_t *ent) {
client->classSpeed = 2.0;
break;
+ case PCL_D_D_BASE:
+ client->pers.maxHealth = 50;
+ client->ps.stats[STAT_MAX_HEALTH] = 50;
+ client->ps.eFlags = flags;
+
+ VectorCopy (playerMins, ent->r.mins);
+ VectorCopy (playerMaxs, ent->r.maxs);
+
+ client->ps.clientNum = index;
+
+ BG_packWeapon( WP_VENOM, client->ps.stats );
+ BG_packAmmoArray( WP_VENOM, client->ps.ammo, client->ps.powerups, 0, 0, 0 );
+
+ client->ps.stats[ STAT_ABILITIES ] |= SCA_WALLCLIMBER;
+ client->ps.stats[ STAT_ABILITIES ] |= SCA_CANJUMP;
+ client->ps.stats[ STAT_ABILITIES ] |= SCA_NOWEAPONDRIFT;
+ BG_packAttributes( 160, 0, 25, client->ps.stats );
+ client->classSpeed = 1.5;
+ break;
+
case PCL_H_BASE:
client->pers.maxHealth = 100;
client->ps.stats[STAT_MAX_HEALTH] = 100;
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 09884232..1bdb9f59 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -1563,25 +1563,11 @@ void Cmd_Class_f( gentity_t *ent )
}
if( !Q_stricmp(s, "0") )
- ent->client->pers.pclass = PCL_D_BUILDER;
+ ent->client->pers.pclass = PCL_D_B_BASE;
else if( !Q_stricmp(s, "1") )
- ent->client->pers.pclass = PCL_D_BASE;
+ ent->client->pers.pclass = PCL_D_O_BASE;
else if( !Q_stricmp(s, "2") )
- ent->client->pers.pclass = PCL_D_OFF1;
- else if( !Q_stricmp(s, "3") )
- ent->client->pers.pclass = PCL_D_OFF2;
- else if( !Q_stricmp(s, "4") )
- ent->client->pers.pclass = PCL_D_OFF3;
- else if( !Q_stricmp(s, "5") )
- ent->client->pers.pclass = PCL_D_OFF4;
- else if( !Q_stricmp(s, "6") )
- ent->client->pers.pclass = PCL_D_OFF5;
- else if( !Q_stricmp(s, "7") )
- ent->client->pers.pclass = PCL_D_OFF6;
- else if( !Q_stricmp(s, "8") )
- ent->client->pers.pclass = PCL_D_OFF7;
- else if( !Q_stricmp(s, "9") )
- ent->client->pers.pclass = PCL_D_OFF8;
+ ent->client->pers.pclass = PCL_D_D_BASE;
else
{
trap_SendServerCommand( ent-g_entities, va("print \"Unknown class\n\"" ) );
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index 0f915e0a..a14adeb7 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -90,140 +90,6 @@ int CalculatePoints( gentity_t *victim, gentity_t *attacker )
if( !victim->client || !attacker->client )
return 0;
- /*switch( victim->client->ps.stats[STAT_PCLASS] )
- {
- case PCL_D_BUILDER:
- victim_value = 1;
- break;
- case PCL_H_BUILDER:
- victim_value = 1;
- break;
- case PCL_D_BASE:
- victim_value = 2;
- break;
- case PCL_H_BASE:
- victim_value = 2;
- break;
- case PCL_D_OFF1:
- victim_value = 3;
- break;
- case PCL_H_OFF1:
- victim_value = 3;
- break;
- case PCL_D_OFF2:
- victim_value = 4;
- break;
- case PCL_H_OFF2:
- victim_value = 4;
- break;
- case PCL_D_OFF3:
- victim_value = 5;
- break;
- case PCL_H_OFF3:
- victim_value = 5;
- break;
- case PCL_D_OFF4:
- victim_value = 6;
- break;
- case PCL_H_OFF4:
- victim_value = 6;
- break;
- case PCL_D_OFF5:
- victim_value = 7;
- break;
- case PCL_H_OFF5:
- victim_value = 7;
- break;
- case PCL_D_OFF6:
- victim_value = 8;
- break;
- case PCL_H_OFF6:
- victim_value = 8;
- break;
- case PCL_D_OFF7:
- victim_value = 9;
- break;
- case PCL_H_OFF7:
- victim_value = 9;
- break;
- case PCL_D_OFF8:
- victim_value = 10;
- break;
- case PCL_H_OFF8:
- victim_value = 10;
- break;
- default:
- victim_value = 1;
- }
-
- switch( attacker->client->ps.stats[STAT_PCLASS] )
- {
- case PCL_D_BUILDER:
- attacker_value = 1;
- break;
- case PCL_H_BUILDER:
- attacker_value = 1;
- break;
- case PCL_D_BASE:
- attacker_value = 2;
- break;
- case PCL_H_BASE:
- attacker_value = 2;
- break;
- case PCL_D_OFF1:
- attacker_value = 3;
- break;
- case PCL_H_OFF1:
- attacker_value = 3;
- break;
- case PCL_D_OFF2:
- attacker_value = 4;
- break;
- case PCL_H_OFF2:
- attacker_value = 4;
- break;
- case PCL_D_OFF3:
- attacker_value = 5;
- break;
- case PCL_H_OFF3:
- attacker_value = 5;
- break;
- case PCL_D_OFF4:
- attacker_value = 6;
- break;
- case PCL_H_OFF4:
- attacker_value = 6;
- break;
- case PCL_D_OFF5:
- attacker_value = 7;
- break;
- case PCL_H_OFF5:
- attacker_value = 7;
- break;
- case PCL_D_OFF6:
- attacker_value = 8;
- break;
- case PCL_H_OFF6:
- attacker_value = 8;
- break;
- case PCL_D_OFF7:
- attacker_value = 9;
- break;
- case PCL_H_OFF7:
- attacker_value = 9;
- break;
- case PCL_D_OFF8:
- attacker_value = 10;
- break;
- case PCL_H_OFF8:
- attacker_value = 10;
- break;
- default:
- attacker_value = 1;
- }
-
- return ( victim_value / attacker_value ) * 10;*/
-
return 1;
}
@@ -325,8 +191,9 @@ void LookAtKiller( gentity_t *self, gentity_t *inflictor, gentity_t *attacker )
GibEntity
==================
*/
-void GibEntity( gentity_t *self, int killer ) {
- if( self->client->ps.stats[ STAT_PCLASS ] == PTE_HUMANS )
+void GibEntity( gentity_t *self, int killer )
+{
+ if( self->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
G_AddEvent( self, EV_GIB_PLAYER, killer );
else
G_AddEvent( self, EV_GIB_DROID, killer );
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 42ddcf20..7019451a 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -298,11 +298,11 @@ G_RegisterPlayerModels
*/
void G_RegisterPlayerModels( void )
{
- char *precacheModels[ MAX_CLIENTS ] = { "klesk", "lucy", "sarge", NULL };
+ char *precacheModels[ MAX_CLIENTS ] = { "klesk", "orbb", "lucy", "sarge", NULL };
char *s;
int i;
- for( i = 0; i < 3; i++ )
+ for( i = 0; i < 4; i++ )
{
s = va("n\\%s%d\\t\\%i\\model\\%s\\hmodel\\%s\\g_redteam\\%s\\g_blueteam\\%s\\c1\\%s\\hc\\%i\\w\\%i\\l\\%i\\tt\\%d\\tl\\%d", "precache", i, 0, precacheModels[ i ], precacheModels[ i ], 0, 0, "7", 100, 0, 0, 0, 0);
diff --git a/src/game/g_misc.c b/src/game/g_misc.c
index 8b776118..dc952b5d 100644
--- a/src/game/g_misc.c
+++ b/src/game/g_misc.c
@@ -70,58 +70,21 @@ void SP_light( gentity_t *self ) {
G_FreeEntity( self );
}
-#define TORCHR 200
-#define TORCHG 200
-#define TORCHB 255
-
//TA: position/colour/intensity calculating function
void ShineTorch( gentity_t *self )
{
trace_t tr;
- vec3_t from, to, length;
- vec3_t angles, forward;
- int r, g, b, i;
- int veclength;
+ vec3_t origin, angles;
- VectorCopy( self->parent->s.pos.trBase, from );
+ VectorCopy( self->parent->s.pos.trBase, origin );
VectorCopy( self->parent->s.apos.trBase, angles );
- from[2] += self->parent->client->ps.viewheight;
-
- AngleVectors( angles, forward, NULL, NULL );
- VectorMA( from, 4096, forward, to );
-
- trap_Trace( &tr, from, NULL, NULL, to, self->parent->s.number, MASK_SOLID );
-
- VectorSubtract( tr.endpos, from, length );
- veclength = VectorLength( length );
-
- //hack to place the light source slightly in front of what the player is pointing at
- VectorMA( tr.endpos, -(veclength / 5), forward, tr.endpos );
-
- //adjust brightness and intensity based on how far away subject is
- r = TORCHR * 450 / veclength;
- g = TORCHG * 450 / veclength;
- b = TORCHB * 450 / veclength;
- if( r > TORCHR ) r = TORCHR;
- if( g > TORCHG ) g = TORCHG;
- if( b > TORCHB ) b = TORCHB;
-
- i = veclength / 2;
- if( i > 255 ) i = 255;
- if( i < 0 ) i = 0;
-
- self->s.constantLight = r | ( g << 8 ) | ( b << 16 ) | ( i << 24 );
-
- if( tr.fraction < 1.0 )
- G_SetOrigin( self, tr.endpos );
- else
- G_SetOrigin( self, to );
+ G_SetOrigin( self, origin );
VectorCopy( angles, self->s.apos.trBase );
//so we can use the predicted values client side if available
- self->s.frame = self->parent->s.number;
+ self->s.clientNum = self->parent->s.number;
trap_LinkEntity( self );
}
diff --git a/src/game/g_missile.c b/src/game/g_missile.c
index 5aa3564c..7aa86cc5 100644
--- a/src/game/g_missile.c
+++ b/src/game/g_missile.c
@@ -343,8 +343,8 @@ gentity_t *fire_plasma (gentity_t *self, vec3_t start, vec3_t dir)
bolt->damage = 20;
bolt->splashDamage = 15;
bolt->splashRadius = 20;
- //bolt->methodOfDeath = MOD_PLASMA;
- //bolt->splashMethodOfDeath = MOD_PLASMA_SPLASH;
+ //bolt->methodOfDeath = MOD_FLAMER;
+ //bolt->splashMethodOfDeath = MOD_FLAMER_SPLASH;
bolt->clipmask = MASK_SHOT;
bolt->target_ent = NULL;
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index e02a453c..f378212a 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -653,8 +653,12 @@ void Weapon_Venom_Fire( gentity_t *ent ) {
LogAccuracyHit
===============
*/
-qboolean LogAccuracyHit( gentity_t *target, gentity_t *attacker ) {
- if( !target->takedamage ) {
+qboolean LogAccuracyHit( gentity_t *target, gentity_t *attacker )
+{
+ //TA: theres a crash bug in here somewhere, but i'm too lazy to find it hence,
+ return qfalse;
+
+ /*if( !target->takedamage ) {
return qfalse;
}
@@ -678,7 +682,7 @@ qboolean LogAccuracyHit( gentity_t *target, gentity_t *attacker ) {
return qfalse;
}
- return qtrue;
+ return qtrue;*/
}