diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-11-29 20:29:30 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-11-29 20:29:30 +0100 |
commit | 3108bde4738357e3fec209e1deb7f20cf6663c6d (patch) | |
tree | 0a1e1aff9a5a1a392c2a4785be399a415d8948c2 /src/game | |
parent | b86cbd75d8ff0e1606c041b5ed77c340cb802715 (diff) |
Port to 1.1 network protocol.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 2 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 60 | ||||
-rw-r--r-- | src/game/g_buildable.c | 4 | ||||
-rw-r--r-- | src/game/g_team.c | 2 |
4 files changed, 4 insertions, 64 deletions
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 ); +*/ } /* |