summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_buildable.c6
-rw-r--r--src/cgame/cg_draw.c2
-rw-r--r--src/cgame/cg_ents.c3
-rw-r--r--src/cgame/cg_local.h2
-rw-r--r--src/cgame/cg_weapons.c23
-rw-r--r--src/game/bg_misc.c2
-rw-r--r--src/game/bg_pmove.c60
-rw-r--r--src/game/g_buildable.c4
-rw-r--r--src/game/g_team.c2
-rw-r--r--src/qcommon/q_shared.h10
-rw-r--r--src/qcommon/qcommon.h2
11 files changed, 14 insertions, 102 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index 5b2582c..e2e33f8 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -709,7 +709,7 @@ static void CG_BuildableParticleEffects( centity_t *cent )
{
entityState_t *es = &cent->currentState;
team_t team = BG_Buildable( es->modelindex )->team;
- int health = es->generic1;
+ int health = es->constantLight;
float healthFrac = (float)health / BG_Buildable( es->modelindex )->health;
if( !( es->eFlags & EF_B_SPAWNED ) )
@@ -1055,7 +1055,7 @@ static void CG_BuildableStatusDisplay( centity_t *cent )
return;
}
- health = es->generic1;
+ health = es->constantLight;
healthScale = (float)health / BG_Buildable( es->modelindex )->health;
if( health > 0 && healthScale < 0.01f )
@@ -1535,7 +1535,7 @@ void CG_Buildable( centity_t *cent )
trap_S_AddLoopingSound( es->number, cent->lerpOrigin, vec3_origin, weapon->readySound );
}
- health = es->generic1;
+ health = es->constantLight;
if( health < cent->lastBuildableHealth &&
( es->eFlags & EF_B_SPAWNED ) )
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 4e2ba77..1d18023 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -4072,7 +4072,7 @@ static void CG_DrawHealthBars( void )
if( CG_PlayerIsBuilder( es->modelindex ) )
continue;
- bar->value = es->generic1;
+ bar->value = es->constantLight;
bar->max = BG_Buildable( es->modelindex )->health;
BG_BuildableBoundingBox( es->modelindex, mins, maxs );
break;
diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c
index a9663ad..13e0470 100644
--- a/src/cgame/cg_ents.c
+++ b/src/cgame/cg_ents.c
@@ -236,7 +236,8 @@ static void CG_EntityEffects( centity_t *cent )
// constant light glow
- if ( cent->currentState.constantLight )
+ if ( cent->currentState.eType == ET_MOVER &&
+ cent->currentState.constantLight )
{
int cl;
int i, r, g, b;
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 7721e45..b405cc6 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1072,8 +1072,6 @@ typedef struct
int itemPickupBlendTime; // the pulse around the crosshair is timed seperately
int weaponSelectTime;
- int weaponAnimation;
- int weaponAnimationTime;
// blend blobs
float damageTime;
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index 7fb68c9..f57eb41 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -746,27 +746,6 @@ static void CG_SetWeaponLerpFrameAnimation( weapon_t weapon, lerpFrame_t *lf, in
}
/*
-===============
-CG_WeaponAnimation
-===============
-*/
-static void CG_WeaponAnimation( centity_t *cent, int *old, int *now, float *backLerp )
-{
- lerpFrame_t *lf = &cent->pe.weapon;
- entityState_t *es = &cent->currentState;
-
- // see if the animation sequence is switching
- if( es->weaponAnim != lf->animationNumber || !lf->animation )
- CG_SetWeaponLerpFrameAnimation( es->weapon, lf, es->weaponAnim );
-
- CG_RunLerpFrame( lf, 1.0f );
-
- *old = lf->oldFrame;
- *now = lf->frame;
- *backLerp = lf->backlerp;
-}
-
-/*
=================
CG_MapTorsoToWeaponFrame
@@ -1073,8 +1052,6 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent
gun.customShader = cgs.media.invisibleShaderTeam;
}
- CG_WeaponAnimation( cent, &gun.oldframe, &gun.frame, &gun.backlerp );
-
trap_R_AddRefEntityToScene( &gun );
if( !ps )
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index f6721f5..53acd6e 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -4197,7 +4197,6 @@ void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean
s->time2 = ps->movementDir;
s->legsAnim = ps->legsAnim;
s->torsoAnim = ps->torsoAnim;
- s->weaponAnim = ps->weaponAnim;
s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number
// so corpses can also reference the proper config
s->eFlags = ps->eFlags;
@@ -4297,7 +4296,6 @@ void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s
s->time2 = ps->movementDir;
s->legsAnim = ps->legsAnim;
s->torsoAnim = ps->torsoAnim;
- s->weaponAnim = ps->weaponAnim;
s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number
// so corpses can also reference the proper config
s->eFlags = ps->eFlags;
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index f8f8a69..7af9a89 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -110,20 +110,6 @@ void PM_StartTorsoAnim( int anim )
/*
===================
-PM_StartWeaponAnim
-===================
-*/
-static void PM_StartWeaponAnim( int anim )
-{
- if( PM_Paralyzed( pm->ps->pm_type ) )
- return;
-
- pm->ps->weaponAnim = ( ( pm->ps->weaponAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT )
- | anim;
-}
-
-/*
-===================
PM_StartLegsAnim
===================
*/
@@ -191,19 +177,6 @@ static void PM_ContinueTorsoAnim( int anim )
/*
===================
-PM_ContinueWeaponAnim
-===================
-*/
-static void PM_ContinueWeaponAnim( int anim )
-{
- if( ( pm->ps->weaponAnim & ~ANIM_TOGGLEBIT ) == anim )
- return;
-
- PM_StartWeaponAnim( anim );
-}
-
-/*
-===================
PM_ForceLegsAnim
===================
*/
@@ -2886,7 +2859,6 @@ static void PM_BeginWeaponChange( int weapon )
if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) )
{
PM_StartTorsoAnim( TORSO_DROP );
- PM_StartWeaponAnim( WANIM_DROP );
}
}
@@ -2915,7 +2887,6 @@ static void PM_FinishWeaponChange( void )
if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) )
{
PM_StartTorsoAnim( TORSO_RAISE );
- PM_StartWeaponAnim( WANIM_RAISE );
}
}
@@ -2945,8 +2916,6 @@ static void PM_TorsoAnimation( void )
PM_ContinueTorsoAnim( TORSO_STAND );
}
}
-
- PM_ContinueWeaponAnim( WANIM_IDLE );
}
}
@@ -3225,8 +3194,6 @@ static void PM_Weapon( void )
PM_ContinueTorsoAnim( TORSO_STAND );
}
- PM_ContinueWeaponAnim( WANIM_IDLE );
-
return;
}
@@ -3278,7 +3245,6 @@ static void PM_Weapon( void )
//drop the weapon
PM_StartTorsoAnim( TORSO_DROP );
- PM_StartWeaponAnim( WANIM_RELOAD );
pm->ps->weaponTime += BG_Weapon( pm->ps->weapon )->reloadTime;
return;
@@ -3531,17 +3497,14 @@ static void PM_Weapon( void )
{
case WP_GRENADE:
PM_StartTorsoAnim( TORSO_ATTACK3 );
- PM_StartWeaponAnim( WANIM_ATTACK1 );
break;
case WP_BLASTER:
PM_StartTorsoAnim( TORSO_ATTACK2 );
- PM_StartWeaponAnim( WANIM_ATTACK1 );
break;
default:
PM_StartTorsoAnim( TORSO_ATTACK );
- PM_StartWeaponAnim( WANIM_ATTACK1 );
break;
}
}
@@ -3556,9 +3519,7 @@ static void PM_Weapon( void )
case WP_ALEVEL1:
if( attack1 )
{
- num /= RAND_MAX / 6 + 1;
PM_ForceLegsAnim( NSPA_ATTACK1 );
- PM_StartWeaponAnim( WANIM_ATTACK1 + num );
}
break;
@@ -3566,38 +3527,31 @@ static void PM_Weapon( void )
if( attack2 )
{
PM_ForceLegsAnim( NSPA_ATTACK2 );
- PM_StartWeaponAnim( WANIM_ATTACK7 );
}
case WP_ALEVEL2:
if( attack1 )
{
- num /= RAND_MAX / 6 + 1;
PM_ForceLegsAnim( NSPA_ATTACK1 );
- PM_StartWeaponAnim( WANIM_ATTACK1 + num );
}
break;
case WP_ALEVEL4:
num /= RAND_MAX / 3 + 1;
PM_ForceLegsAnim( NSPA_ATTACK1 + num );
- PM_StartWeaponAnim( WANIM_ATTACK1 + num );
break;
default:
if( attack1 )
{
PM_ForceLegsAnim( NSPA_ATTACK1 );
- PM_StartWeaponAnim( WANIM_ATTACK1 );
}
else if( attack2 )
{
PM_ForceLegsAnim( NSPA_ATTACK2 );
- PM_StartWeaponAnim( WANIM_ATTACK2 );
}
else if( attack3 )
{
PM_ForceLegsAnim( NSPA_ATTACK3 );
- PM_StartWeaponAnim( WANIM_ATTACK3 );
}
break;
}
@@ -3686,8 +3640,6 @@ static void PM_Animate( void )
if( pm->cmd.buttons & BUTTON_GESTURE )
{
- if( pm->ps->tauntTimer > 0 )
- return;
if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) )
{
@@ -3695,7 +3647,6 @@ static void PM_Animate( void )
{
PM_StartTorsoAnim( TORSO_GESTURE );
pm->ps->torsoTimer = TIMER_GESTURE;
- pm->ps->tauntTimer = TIMER_GESTURE;
PM_AddEvent( EV_TAUNT );
}
@@ -3706,7 +3657,6 @@ static void PM_Animate( void )
{
PM_ForceLegsAnim( NSPA_GESTURE );
pm->ps->torsoTimer = TIMER_GESTURE;
- pm->ps->tauntTimer = TIMER_GESTURE;
PM_AddEvent( EV_TAUNT );
}
@@ -3750,16 +3700,6 @@ static void PM_DropTimers( void )
if( pm->ps->torsoTimer < 0 )
pm->ps->torsoTimer = 0;
}
-
- if( pm->ps->tauntTimer > 0 )
- {
- pm->ps->tauntTimer -= pml.msec;
-
- if( pm->ps->tauntTimer < 0 )
- {
- pm->ps->tauntTimer = 0;
- }
- }
}
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 8de275e..1c161a6 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -3277,7 +3277,7 @@ void G_BuildableThink( gentity_t *ent, int msec )
ent->dcc = ( ent->buildableTeam != TEAM_HUMANS ) ? 0 : G_FindDCC( ent );
// Set health
- ent->s.generic1 = MAX( ent->health, 0 );
+ ent->s.constantLight = MAX( ent->health, 0 );
// Set flags
ent->s.eFlags &= ~( EF_B_POWERED | EF_B_SPAWNED | EF_B_MARKED );
@@ -4459,7 +4459,7 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable,
built->physicsBounce = BG_Buildable( buildable )->bounce;
built->s.groundEntityNum = -1;
- built->s.generic1 = MAX( built->health, 0 );
+ built->s.constantLight = MAX( built->health, 0 );
if( BG_Buildable( buildable )->team == TEAM_ALIENS )
{
diff --git a/src/game/g_team.c b/src/game/g_team.c
index ad0873c..3246a4a 100644
--- a/src/game/g_team.c
+++ b/src/game/g_team.c
@@ -147,6 +147,7 @@ void G_UpdateTeamConfigStrings( void )
Com_Memset( &humanTeam, 0, sizeof( clientList_t ) );
}
+/*
trap_SetConfigstringRestrictions( CS_VOTE_TIME + TEAM_ALIENS, &humanTeam );
trap_SetConfigstringRestrictions( CS_VOTE_STRING + TEAM_ALIENS, &humanTeam );
trap_SetConfigstringRestrictions( CS_VOTE_YES + TEAM_ALIENS, &humanTeam );
@@ -159,6 +160,7 @@ void G_UpdateTeamConfigStrings( void )
trap_SetConfigstringRestrictions( CS_ALIEN_STAGES, &humanTeam );
trap_SetConfigstringRestrictions( CS_HUMAN_STAGES, &alienTeam );
+*/
}
/*
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index a93b630..1b5fea7 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -1132,10 +1132,6 @@ typedef struct playerState_s {
int torsoTimer; // don't change low priority animations until this runs out
int torsoAnim; // mask off ANIM_TOGGLEBIT
- int tauntTimer; // don't allow another taunt until this runs out
-
- int weaponAnim; // mask off ANIM_TOGGLEBIT
-
int movementDir; // a number 0 to 7 that represents the reletive angle
// of movement to the view angle (axial and diagonals)
// when at rest, the value will remain unchanged
@@ -1169,8 +1165,9 @@ typedef struct playerState_s {
int stats[MAX_STATS];
int persistant[MAX_PERSISTANT]; // stats that aren't cleared on death
int misc[MAX_MISC]; // misc data
- int ammo; // ammo held
- int clips; // clips held
+ int ammo;
+ int clips;
+ int stuff[MAX_WEAPONS - 2];
int generic1;
int loopSound;
@@ -1289,7 +1286,6 @@ typedef struct entityState_s {
int weapon; // determines weapon and flash model, etc
int legsAnim; // mask off ANIM_TOGGLEBIT
int torsoAnim; // mask off ANIM_TOGGLEBIT
- int weaponAnim; // mask off ANIM_TOGGLEBIT
int generic1;
} entityState_t;
diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h
index db5812f..e24ecaf 100644
--- a/src/qcommon/qcommon.h
+++ b/src/qcommon/qcommon.h
@@ -240,7 +240,7 @@ PROTOCOL
==============================================================
*/
-#define PROTOCOL_VERSION 70
+#define PROTOCOL_VERSION 69
// maintain a list of compatible protocols for demo playing
// NOTE: that stuff only works with two digits protocols