summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_pmove.c9
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_client.c22
-rw-r--r--src/game/g_cmds.c3
4 files changed, 16 insertions, 19 deletions
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 );