diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_local.h | 3 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 15 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 9 | ||||
-rw-r--r-- | src/game/bg_public.h | 1 | ||||
-rw-r--r-- | src/game/g_client.c | 22 | ||||
-rw-r--r-- | src/game/g_cmds.c | 3 |
7 files changed, 31 insertions, 28 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 92a2cae4..495c9089 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1226,7 +1226,8 @@ extern vmCvar_t cg_trueLightning; extern vmCvar_t cg_creepRes; extern vmCvar_t cg_drawSurfNormal; extern vmCvar_t cg_debugAlloc; -extern vmCvar_t cg_smoothTime; +extern vmCvar_t cg_wwSmoothTime; +extern vmCvar_t cg_wwFollow; //TA: hack to get class an carriage through to UI module extern vmCvar_t ui_currentClass; diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index e3752458..392478ac 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -179,7 +179,8 @@ vmCvar_t cg_trueLightning; vmCvar_t cg_creepRes; vmCvar_t cg_drawSurfNormal; vmCvar_t cg_debugAlloc; -vmCvar_t cg_smoothTime; +vmCvar_t cg_wwSmoothTime; +vmCvar_t cg_wwFollow; //TA: hack to get class an carriage through to UI module vmCvar_t ui_currentClass; @@ -266,7 +267,8 @@ static cvarTable_t cvarTable[] = { { &cg_creepRes, "cg_creepRes", "16", CVAR_ARCHIVE }, { &cg_drawSurfNormal, "cg_drawSurfNormal", "0", CVAR_CHEAT }, { &cg_debugAlloc, "cg_debugAlloc", "0", 0 }, - { &cg_smoothTime, "cg_smoothTime", "300", 0 }, + { &cg_wwSmoothTime, "cg_wwSmoothTime", "300", 0 }, + { &cg_wwFollow, "cg_wwFollow", "0", CVAR_USERINFO }, { &ui_currentClass, "ui_currentClass", "0", 0 }, { &ui_carriage, "ui_carriage", "", 0 }, diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index ed59c526..714aedbe 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -840,7 +840,7 @@ static void CG_addSmoothOp( vec3_t rotAxis, float rotAngle ) for( i = 0; i < MAXSMOOTHS; i++ ) { //found an unused index in the smooth array - if( cg.sList[ i ].time + cg_smoothTime.integer < cg.time ) + if( cg.sList[ i ].time + cg_wwSmoothTime.integer < cg.time ) { //copy to array and stop VectorCopy( rotAxis, cg.sList[ i ].rotAxis ); @@ -914,14 +914,17 @@ static void CG_smoothWWTransitions( playerState_t *ps, const vec3_t in, vec3_t o for( i = 0; i < MAXSMOOTHS; i++ ) { //if this op has time remaining, perform it - if( cg.time < cg.sList[ i ].time + cg_smoothTime.integer ) + if( cg.time < cg.sList[ i ].time + cg_wwSmoothTime.integer ) { - stLocal = 1.0 - ( ( ( cg.sList[ i ].time + cg_smoothTime.integer ) - cg.time ) / cg_smoothTime.integer ); + stLocal = 1.0 - ( ( ( cg.sList[ i ].time + cg_wwSmoothTime.integer ) - cg.time ) / cg_wwSmoothTime.integer ); sFraction = -( cos( stLocal * M_PI ) + 1 ) / 2; - RotatePointAroundVector( outAxis[ 0 ], cg.sList[ i ].rotAxis, inAxis[ 0 ], sFraction * cg.sList[ i ].rotAngle ); - RotatePointAroundVector( outAxis[ 1 ], cg.sList[ i ].rotAxis, inAxis[ 1 ], sFraction * cg.sList[ i ].rotAngle ); - RotatePointAroundVector( outAxis[ 2 ], cg.sList[ i ].rotAxis, inAxis[ 2 ], sFraction * cg.sList[ i ].rotAngle ); + RotatePointAroundVector( outAxis[ 0 ], cg.sList[ i ].rotAxis, + inAxis[ 0 ], sFraction * cg.sList[ i ].rotAngle ); + RotatePointAroundVector( outAxis[ 1 ], cg.sList[ i ].rotAxis, + inAxis[ 1 ], sFraction * cg.sList[ i ].rotAngle ); + RotatePointAroundVector( outAxis[ 2 ], cg.sList[ i ].rotAxis, + inAxis[ 2 ], sFraction * cg.sList[ i ].rotAngle ); AxisCopy( outAxis, inAxis ); performed = qtrue; diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 9460600b..b4ae892f 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -177,7 +177,7 @@ static void PM_Friction( void ) { //TA: make sure vertical velocity is NOT set to zero when wall climbing VectorCopy( vel, vec ); if ( pml.walking && - pm->ps->stats[ STAT_STATE ] & ~SS_WALLCLIMBING ) { + !( pm->ps->stats[ STAT_STATE ] & SS_WALLCLIMBING ) ) { vec[2] = 0; // ignore slope movement } @@ -1506,8 +1506,11 @@ static void PM_GroundClimbTrace( void ) //set the correction angle traceANGsurf *= 1.0f - ldDOTtCs; - //correct the angle - pm->ps->delta_angles[ PITCH ] -= ANGLE2SHORT( traceANGsurf ); + if( !( pm->ps->stats[ STAT_STATE ] & SS_WALLCLIMBINGFOLLOW ) ) + { + //correct the angle + pm->ps->delta_angles[ PITCH ] -= ANGLE2SHORT( traceANGsurf ); + } //transition from wall to ceiling //normal for subsequent viewangle rotations diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 9238fca1..84b313be 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -239,6 +239,7 @@ typedef enum { #define SS_WALLCLIMBING 1 #define SS_WALLCLIMBINGCEILING 2 +#define SS_WALLCLIMBINGFOLLOW 4 #define SS_CREEPSLOWED 8 #define SS_SPEEDBOOST 16 #define SS_INFESTING 32 diff --git a/src/game/g_client.c b/src/game/g_client.c index 4c000809..ef8efe0e 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1065,22 +1065,12 @@ void ClientUserinfoChanged( int clientNum ) { s = BG_FindModelNameForClass( client->pers.pclass ); Q_strncpyz( model, s, sizeof( model ) ); -/* - // team - switch( client->sess.sessionTeam ) { - case TEAM_HUMANS: - //ForceClientSkin(client, model, "red"); - break; - case TEAM_ALIENS: - //ForceClientSkin(client, model, "blue"); - break; - } - if ( g_gametype.integer >= GT_TEAM && client->sess.sessionTeam == TEAM_SPECTATOR ) { - // don't ever use a default skin in teamplay, it would just waste memory - //ForceClientSkin(client, model, "red"); - } -*/ - + // wallwalk follow + s = Info_ValueForKey( userinfo, "cg_wwFollow" ); + if( atoi( s ) ) + client->ps.stats[ STAT_STATE ] |= SS_WALLCLIMBINGFOLLOW; + else + client->ps.stats[ STAT_STATE ] &= ~SS_WALLCLIMBINGFOLLOW; // teamInfo s = Info_ValueForKey( userinfo, "teamoverlay" ); diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index c69e6da4..9eed943b 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -2277,6 +2277,9 @@ void Cmd_Spawnbody_f( gentity_t *ent ) { gentity_t *dummy = G_Spawn( ); vec3_t forward; + + if( !CheatsOk( ent ) ) + return; AngleVectors( ent->client->ps.viewangles, forward, NULL, NULL ); VectorMA( ent->client->ps.origin, 128.0f, forward, dummy->r.currentOrigin ); |