summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Levin <risujin@fastmail.fm>2009-10-03 11:33:36 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:07 +0000
commit3750577e8d18451939e5ae58b90bd75a397737ba (patch)
treee10f36ec71b57a0f5da3d702b7d6ff9bedb25372
parent7f9e87b189414ea8eef4a2bcec4c380142b16bab (diff)
* Mass driver reverted to upstream (function and effect)
* Squad marking removed * Marauder walljump reverted to upstream * Minijump removed Enjoy!
-rw-r--r--scripts/weapons.particle43
-rw-r--r--src/cgame/cg_consolecmds.c24
-rw-r--r--src/cgame/cg_draw.c117
-rw-r--r--src/cgame/cg_drawtools.c53
-rw-r--r--src/cgame/cg_event.c7
-rw-r--r--src/cgame/cg_local.h1
-rw-r--r--src/cgame/cg_weapons.c37
-rw-r--r--src/game/bg_pmove.c225
-rw-r--r--src/game/g_weapon.c129
-rw-r--r--src/game/tremulous.h10
-rw-r--r--src/ui/ui_shared.c1
-rw-r--r--ui/help.txt21
-rw-r--r--ui/ingame_options.menu20
-rw-r--r--ui/menudef.h1
-rw-r--r--ui/tremulous_common_hud.h9
15 files changed, 141 insertions, 557 deletions
diff --git a/scripts/weapons.particle b/scripts/weapons.particle
index b3b8e3bf..7f793308 100644
--- a/scripts/weapons.particle
+++ b/scripts/weapons.particle
@@ -435,52 +435,35 @@ models/weapons/mdriver/impactPS
{
particle
{
- shader sync gfx/mdriver/green_particle
-
- radius 0 4.0 6.0
- alpha 70 1.0 0.0
- rotation 0 ~360 -
-
- lifeTime 140
- }
-
- count 1
- delay 0
- period 0 - ~0%
- }
-
- ejector
- {
- particle
- {
shader sync gfx/mdriver/green_particle
displacement 0 0 0 ~2.0
- normalDisplacement 7.0
+
+ normalDisplacement 10.0
velocityType normal
velocityDir linear
- velocityMagnitude 200
- velocity 0 0 0 ~90
+ velocityMagnitude 400
+ velocity 0 0 0 ~80
- accelerationType static
+ accelerationType normal
accelerationDir linear
- accelerationMagnitude 300
- acceleration 0 0 -1 ~10
+ accelerationMagnitude 200
+ acceleration 0 0 1 ~360
- radius 0 2.0~1.0 0.0
- alpha 0 1.0 1.0
+ radius 0 6.0 4.0
+ alpha 0 1.0 0.0
rotation 0 ~360 -
bounce 0.5
- lifeTime 500
+ lifeTime 1000
}
- count 3
+ count 10
delay 0
period 0 - ~0%
- }
-}
+ }
+}
models/weapons/lcannon/missilePS
{
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c
index 3a057b3e..697b0e98 100644
--- a/src/cgame/cg_consolecmds.c
+++ b/src/cgame/cg_consolecmds.c
@@ -188,29 +188,6 @@ static void CG_TellAttacker_f( void )
trap_SendClientCommand( command );
}
-static void CG_SquadMark_f( void )
-{
- centity_t *cent;
- vec3_t end;
- trace_t trace;
-
- // Find the player we are looking at
- VectorMA( cg.refdef.vieworg, 131072, cg.refdef.viewaxis[ 0 ], end );
- CG_Trace( &trace, cg.refdef.vieworg, NULL, NULL, end,
- cg.snap->ps.clientNum, CONTENTS_SOLID | CONTENTS_BODY );
- if( trace.entityNum >= MAX_CLIENTS )
- return;
-
- // Only mark teammates
- cent = cg_entities + trace.entityNum;
- if( cent->currentState.eType != ET_PLAYER ||
- cgs.clientinfo[ trace.entityNum ].team !=
- cg.snap->ps.stats[ STAT_PTEAM ] )
- return;
-
- cent->pe.squadMarked = !cent->pe.squadMarked;
-}
-
typedef struct
{
char *cmd;
@@ -242,7 +219,6 @@ static consoleCommand_t commands[ ] =
{ "destroyTestPS", CG_DestroyTestPS_f },
{ "testTS", CG_TestTS_f },
{ "destroyTestTS", CG_DestroyTestTS_f },
- { "squadmark", CG_SquadMark_f },
};
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 3687e195..0feedc68 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2265,120 +2265,6 @@ static void CG_DrawCrosshairNames( rectDef_t *rect, float scale, int textStyle )
/*
===============
-CG_DrawSquadMarkers
-===============
-*/
-#define SQUAD_MARKER_W 16.0f
-#define SQUAD_MARKER_H 8.0f
-#define SQUAD_MARKER_BORDER 8.0f
-static void CG_DrawSquadMarkers( vec4_t color )
-{
- centity_t *cent;
- vec3_t origin;
- qhandle_t shader;
- float x, y, w, h, distance, scale, u1 = 0.0f, v1 = 0.0f, u2 = 1.0f, v2 = 1.0f;
- int i;
- qboolean vertical, flip;
-
- if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR )
- return;
-
- trap_R_SetColor( color );
- for( i = 0; i < cg.snap->numEntities; i++ )
- {
- cent = cg_entities + cg.snap->entities[ i ].number;
- if( cent->currentState.eType != ET_PLAYER ||
- cgs.clientinfo[ cg.snap->entities[ i ].number ].team !=
- cg.snap->ps.stats[ STAT_PTEAM ] ||
- !cent->pe.squadMarked )
- continue;
-
- // Find where on screen the player is
- VectorCopy( cent->lerpOrigin, origin );
- origin[ 2 ] += ( ( cent->currentState.solid >> 16 ) & 255 ) - 30;
- if( !CG_WorldToScreenWrap( origin, &x, &y ) )
- continue;
-
- // Scale the size of the marker with distance
- distance = Distance( cent->lerpOrigin, cg.refdef.vieworg );
- if( !distance )
- continue;
-
- scale = 200.0f / distance;
-
- if( scale > 1.0f )
- scale = 1.0f;
-
- if( scale < 0.25f )
- scale = 0.25f;
-
- // Don't let the marker go off-screen
- vertical = qfalse;
- flip = qfalse;
- if( x < SQUAD_MARKER_BORDER )
- {
- x = SQUAD_MARKER_BORDER;
- vertical = qtrue;
- flip = qfalse;
- }
- else if( x > 640.0f - SQUAD_MARKER_BORDER )
- {
- x = 640.0f - SQUAD_MARKER_BORDER;
- vertical = qtrue;
- flip = qtrue;
- }
-
- if( y < SQUAD_MARKER_BORDER )
- {
- y = SQUAD_MARKER_BORDER;
- vertical = qfalse;
- flip = qtrue;
- }
- else if( y > 480.0f - SQUAD_MARKER_BORDER )
- {
- y = 480.0f - SQUAD_MARKER_BORDER;
- vertical = qfalse;
- flip = qfalse;
- }
-
- // Draw the marker
- if( vertical )
- {
- shader = cgs.media.squadMarkerV;
-
- if( flip )
- {
- u1 = 1.0f;
- u2 = 0.0f;
- }
-
- w = SQUAD_MARKER_H * scale;
- h = SQUAD_MARKER_W * scale;
- }
- else
- {
- shader = cgs.media.squadMarkerH;
-
- if( flip )
- {
- v1 = 1.0f;
- v2 = 0.0f;
- }
-
- w = SQUAD_MARKER_W * scale;
- h = SQUAD_MARKER_H * scale;
- }
-
- CG_AdjustFrom640( &x, &y, &w, &h );
- trap_R_DrawStretchPic( x - w / 2, y - h / 2, w, h, u1, v1, u2, v2,
- shader );
- }
-
- trap_R_SetColor( NULL );
-}
-
-/*
-===============
CG_OwnerDraw
Draw an owner drawn item
@@ -2504,9 +2390,6 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x,
case CG_HUMANS_SCORE_LABEL:
CG_DrawTeamLabel( &rect, PTE_HUMANS, text_x, text_y, color, scale, textalign, textvalign, textStyle );
break;
- case CG_SQUAD_MARKERS:
- CG_DrawSquadMarkers( color );
- break;
//loading screen
case CG_LOAD_LEVELSHOT:
diff --git a/src/cgame/cg_drawtools.c b/src/cgame/cg_drawtools.c
index fb34f991..06ae0713 100644
--- a/src/cgame/cg_drawtools.c
+++ b/src/cgame/cg_drawtools.c
@@ -349,59 +349,6 @@ qboolean CG_WorldToScreen( vec3_t point, float *x, float *y )
/*
================
-CG_WorldToScreenWrap
-================
-*/
-qboolean CG_WorldToScreenWrap( vec3_t point, float *x, float *y )
-{
- vec3_t trans;
- float px, py, dotForward, dotRight, dotUp, distance, propX, propY;
-
- px = tan( cg.refdef.fov_x * M_PI / 360.0f );
- py = tan( cg.refdef.fov_y * M_PI / 360.0f );
-
- VectorSubtract( point, cg.refdef.vieworg, trans );
-
- dotForward = DotProduct( trans, cg.refdef.viewaxis[ 0 ] );
- dotRight = DotProduct( trans, cg.refdef.viewaxis[ 1 ] );
- dotUp = DotProduct( trans, cg.refdef.viewaxis[ 2 ] );
-
- distance = abs( dotForward );
- propX = dotRight / ( distance * px );
- propY = dotUp / ( distance * py );
-
- // The distance along the forward axis does not make sense once the point
- // moves off-screen so we need to use either the side or the up axis instead
- if( propX < -1.0f || propX > 1.0f )
- {
- distance = abs( dotRight ) / px;
- propY = dotUp / ( distance * py );
- }
- if( propY < -1.0f || propY > 1.0f )
- {
- distance = abs( dotUp ) / py;
- propX = dotRight / ( distance * px );
- }
-
- if( x )
- *x = 320 - propX * 320;
- if( y )
- *y = 240 - propY * 240;
-
- // Snap to the edge of the screen when the point is behind us
- if( dotForward < 0.f && *x > 0 && *x < 640 && *y > 0 && *y < 480 )
- {
- if( abs( *x - 320 ) > abs( *y - 240 ) )
- *x = *x <= 320 ? 0.0f : 640;
- else
- *y = *y <= 240 ? 0.0f : 480;
- }
-
- return qtrue;
-}
-
-/*
-================
CG_KeyBinding
================
*/
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 2d622088..e4b9fb44 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -874,13 +874,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
CG_ShotgunFire( es );
break;
- case EV_MASS_DRIVER:
- DEBUGNAME( "EV_MASS_DRIVER" );
- ByteToDir( es->eventParm, dir );
- CG_MissileHitWall( es->weapon, es->generic1, 0, position, dir, IMPACTSOUND_DEFAULT, 0 );
- CG_MassDriverFire( es );
- break;
-
case EV_GENERAL_SOUND:
DEBUGNAME( "EV_GENERAL_SOUND" );
if( cgs.gameSounds[ es->eventParm ] )
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index d969dca1..01308332 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1617,7 +1617,6 @@ void CG_DrawRect( float x, float y, float width, float height, float size
void CG_DrawSides(float x, float y, float w, float h, float size);
void CG_DrawTopBottom(float x, float y, float w, float h, float size);
qboolean CG_WorldToScreen( vec3_t point, float *x, float *y );
-qboolean CG_WorldToScreenWrap( vec3_t point, float *x, float *y );
char *CG_KeyBinding( const char *bind );
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c
index d0968dd9..a4f8b667 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -1611,43 +1611,6 @@ void CG_MissileHitPlayer( weapon_t weaponNum, weaponMode_t weaponMode,
CG_MissileHitWall( weaponNum, weaponMode, 0, origin, dir, IMPACTSOUND_FLESH, charge );
}
-/*
-==============
-CG_MassDriverFire
-
-Draws the mass driver trail
-==============
-*/
-
-#define MDRIVER_MUZZLE_OFFSET 48.0f
-
-void CG_MassDriverFire( entityState_t *es )
-{
- vec3_t front, frontToBack;
- trailSystem_t *ts;
- float length;
-
- ts = CG_SpawnNewTrailSystem( cgs.media.massDriverTS );
- if( !CG_IsTrailSystemValid( &ts ) )
- return;
-
- // trail front attaches to the player, needs to be pushed forward a bit
- // so that it doesn't look like it shot out of the wrong location
- VectorCopy( es->origin2, front );
- VectorSubtract( es->pos.trBase, front, frontToBack );
- length = VectorLength( frontToBack );
- if( length - MDRIVER_MUZZLE_OFFSET < 0.0f )
- return;
- VectorScale( frontToBack, 1.0f / length, frontToBack );
- VectorMA( front, MDRIVER_MUZZLE_OFFSET, frontToBack, front );
- CG_SetAttachmentPoint( &ts->frontAttachment, front );
- CG_AttachToPoint( &ts->frontAttachment );
-
- // trail back attaches to the impact point
- CG_SetAttachmentPoint( &ts->backAttachment, es->pos.trBase );
- CG_AttachToPoint( &ts->backAttachment );
-}
-
/*
============================================================================
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 81563829..ee800910 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -595,114 +595,62 @@ PM_CheckWallJump
*/
static qboolean PM_CheckWallJump( void )
{
- trace_t trace;
- vec3_t mins, point, dir;
- float magnitude, towardSurf;
- int i;
- qboolean minijump;
-
- // Has to be able to walljump
- if( !BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_WALLJUMPER ) )
- return qfalse;
+ vec3_t dir, forward, right;
+ vec3_t refNormal = { 0.0f, 0.0f, 1.0f };
+ float normalFraction = 1.5f;
+ float cmdFraction = 1.0f;
+ float upFraction = 1.5f;
- // Don't allow jump until all buttons are up
if( pm->ps->pm_flags & PMF_RESPAWNED )
- return qfalse;
+ return qfalse; // don't allow jump until all buttons are up
- // Not holding jump or minijump
- minijump = pm->ps->stats[ STAT_PTEAM ] == PTE_ALIENS &&
- ( pm->cmd.buttons & BUTTON_DODGE );
- if( pm->cmd.upmove < 10 && !minijump )
+ if( pm->cmd.upmove < 10 )
+ // not holding jump
return qfalse;
- // Walljump timeout
if( pm->ps->pm_flags & PMF_TIME_WALLJUMP )
return qfalse;
// must wait for jump to be released
- if( pm->ps->pm_flags & PMF_JUMP_HELD )
+ if( pm->ps->pm_flags & PMF_JUMP_HELD &&
+ pm->ps->grapplePoint[ 2 ] == 1.0f )
{
// clear upmove so cmdscale doesn't lower running speed
pm->cmd.upmove = 0;
return qfalse;
}
- // We don't want to hit the floor so adjust the mins
- VectorCopy( pm->mins, mins );
- mins[ 2 ] += STEPSIZE;
+ pm->ps->pm_flags |= PMF_TIME_WALLJUMP;
+ pm->ps->pm_time = 200;
- // Trace to find a suitable wall
- for( i = 0; ; i++)
- {
- VectorCopy( pm->ps->origin, point );
+ pml.groundPlane = qfalse; // jumping away
+ pml.walking = qfalse;
+ pm->ps->pm_flags |= PMF_JUMP_HELD;
- switch( i )
- {
- case 0:
- point[ 0 ] += LEVEL2_WALLJUMP_RANGE; // +x
- break;
- case 1:
- point[ 0 ] -= LEVEL2_WALLJUMP_RANGE; // -x
- break;
- case 2:
- point[ 1 ] += LEVEL2_WALLJUMP_RANGE; // +y
- break;
- case 3:
- point[ 1 ] -= LEVEL2_WALLJUMP_RANGE; // -y
- break;
+ pm->ps->groundEntityNum = ENTITYNUM_NONE;
- // Give up
- default:
- return qfalse;
- }
- pm->trace( &trace, pm->ps->origin, mins, pm->maxs, point,
- pm->ps->clientNum, pm->tracemask );
- if( trace.fraction < 1.0f &&
- !( trace.surfaceFlags & ( SURF_SKY | SURF_SLICK ) ) )
- break;
- }
+ ProjectPointOnPlane( forward, pml.forward, pm->ps->grapplePoint );
+ ProjectPointOnPlane( right, pml.right, pm->ps->grapplePoint );
- VectorCopy( trace.plane.normal, pm->ps->grapplePoint );
+ VectorScale( pm->ps->grapplePoint, normalFraction, dir );
- pml.groundPlane = qfalse;
- pml.walking = qfalse;
-
- pm->ps->pm_flags |= PMF_TIME_WALLJUMP | PMF_JUMP_HELD;
- pm->ps->pm_time = LEVEL2_WALLJUMP_REPEAT;
- pm->ps->groundEntityNum = ENTITYNUM_NONE;
+ if( pm->cmd.forwardmove > 0 )
+ VectorMA( dir, cmdFraction, forward, dir );
+ else if( pm->cmd.forwardmove < 0 )
+ VectorMA( dir, -cmdFraction, forward, dir );
- // Jump magnitude is modulated for minijumps
- magnitude = BG_FindJumpMagnitudeForClass( pm->ps->stats[ STAT_PCLASS ] );
- if( minijump )
- magnitude *= ALIEN_MINI_JUMP_SCALE;
-
- // Remove the velocity component toward the surface
- towardSurf = -DotProduct( pm->ps->velocity, pm->ps->grapplePoint );
- if( towardSurf <= 0 )
- towardSurf = 0;
- VectorMA( pm->ps->velocity, towardSurf, pm->ps->grapplePoint,
- pm->ps->velocity );
-
- // Compute horizontal view component, subtracting normal
- VectorScale( pml.forward, LEVEL2_WALLJUMP_FORWARD, dir );
- dir[ 2 ] += LEVEL2_WALLJUMP_UP;
- towardSurf = -DotProduct( dir, pm->ps->grapplePoint );
- if( towardSurf > 0 )
- VectorMA( dir, towardSurf, pm->ps->grapplePoint, dir );
-
- // Add normal component and normalize
- VectorMA( dir, LEVEL2_WALLJUMP_NORMAL, pm->ps->grapplePoint, dir );
+ if( pm->cmd.rightmove > 0 )
+ VectorMA( dir, cmdFraction, right, dir );
+ else if( pm->cmd.rightmove < 0 )
+ VectorMA( dir, -cmdFraction, right, dir );
+
+ VectorMA( dir, upFraction, refNormal, dir );
VectorNormalize( dir );
-
- // Apply jump impulse to velocity
- VectorMA( pm->ps->velocity, magnitude, dir, pm->ps->velocity );
-
- if( pm->debugLevel )
- Com_Printf( "%i: walljump velocity { %f, %f, %f }\n", c_pmove,
- pm->ps->velocity[ 0 ], pm->ps->velocity[ 1 ],
- pm->ps->velocity[ 2 ] );
-
- // Cap velocity
+
+ VectorMA( pm->ps->velocity, BG_FindJumpMagnitudeForClass( pm->ps->stats[ STAT_PCLASS ] ),
+ dir, pm->ps->velocity );
+
+ //for a long run of wall jumps the velocity can get pretty large, this caps it
if( VectorLength( pm->ps->velocity ) > LEVEL2_WALLJUMP_MAXSPEED )
{
VectorNormalize( pm->ps->velocity );
@@ -711,7 +659,6 @@ static qboolean PM_CheckWallJump( void )
PM_AddEvent( EV_JUMP );
- // Set jumping animation
if( pm->cmd.forwardmove >= 0 )
{
if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) )
@@ -734,87 +681,72 @@ static qboolean PM_CheckWallJump( void )
return qtrue;
}
-/*
-=============
-PM_CheckJump
-=============
-*/
static qboolean PM_CheckJump( void )
{
vec3_t normal;
- float magnitude;
- qboolean minijump;
-
- // Can't jump in the air
- if( pm->ps->groundEntityNum == ENTITYNUM_NONE )
- return qfalse;
- // Don't rejump after a dodge or jump
- if( pm->ps->pm_flags & PMF_TIME_LAND )
+ if( BG_FindJumpMagnitudeForClass( pm->ps->stats[ STAT_PCLASS ] ) == 0.0f )
return qfalse;
- // Can't jump and pounce at the same time
+ if( BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_WALLJUMPER ) )
+ return PM_CheckWallJump( );
+
+ //can't jump and pounce at the same time
if( ( pm->ps->weapon == WP_ALEVEL3 ||
pm->ps->weapon == WP_ALEVEL3_UPG ) &&
pm->ps->stats[ STAT_MISC ] > 0 )
return qfalse;
- // Can't jump and charge at the same time
+ //can't jump and charge at the same time
if( ( pm->ps->weapon == WP_ALEVEL4 ) &&
pm->ps->stats[ STAT_MISC ] > 0 )
return qfalse;
- // Can't jump without stamina
if( ( pm->ps->stats[ STAT_PTEAM ] == PTE_HUMANS ) &&
( pm->ps->stats[ STAT_STAMINA ] < 0 ) )
return qfalse;
- // Don't allow jump until all buttons are up
if( pm->ps->pm_flags & PMF_RESPAWNED )
- return qfalse;
+ return qfalse; // don't allow jump until all buttons are up
- // Not holding jump or dodge
- minijump = pm->ps->stats[ STAT_PTEAM ] == PTE_ALIENS &&
- ( pm->cmd.buttons & BUTTON_DODGE );
- if( pm->cmd.upmove < 10 && !minijump )
+ if( pm->cmd.upmove < 10 )
// not holding jump
return qfalse;
- // Can't jump while grabbed or without releasing jump
- if( pm->ps->pm_type == PM_GRABBED ||
- ( pm->ps->pm_flags & PMF_JUMP_HELD ) )
+ //can't jump whilst grabbed
+ if( pm->ps->pm_type == PM_GRABBED )
{
- // Clear upmove so cmdscale doesn't lower running speed
pm->cmd.upmove = 0;
+ // not holding jump
return qfalse;
}
- // Have to be able to jump
- magnitude = BG_FindJumpMagnitudeForClass( pm->ps->stats[ STAT_PCLASS ] );
- if( magnitude == 0.0f )
+ // must wait for jump to be released
+ if( pm->ps->pm_flags & PMF_JUMP_HELD )
+ {
+ // clear upmove so cmdscale doesn't lower running speed
+ pm->cmd.upmove = 0;
return qfalse;
+ }
- pml.groundPlane = qfalse;
+ pml.groundPlane = qfalse; // jumping away
pml.walking = qfalse;
pm->ps->pm_flags |= PMF_JUMP_HELD;
- // Take some stamina off
+ // take some stamina off
if( pm->ps->stats[ STAT_PTEAM ] == PTE_HUMANS )
pm->ps->stats[ STAT_STAMINA ] -= STAMINA_JUMP_TAKE;
pm->ps->groundEntityNum = ENTITYNUM_NONE;
- // Jump away from walls
+ // jump away from wall
BG_GetClientNormal( pm->ps, normal );
- // Give player some velocity
- if( minijump )
- magnitude *= ALIEN_MINI_JUMP_SCALE;
- VectorMA( pm->ps->velocity, magnitude, normal, pm->ps->velocity );
+ VectorMA( pm->ps->velocity, BG_FindJumpMagnitudeForClass( pm->ps->stats[ STAT_PCLASS ] ),
+ normal, pm->ps->velocity );
PM_AddEvent( EV_JUMP );
- // Set jumping animation
if( pm->cmd.forwardmove >= 0 )
{
if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) )
@@ -1195,7 +1127,6 @@ static void PM_AirMove( void )
float scale;
usercmd_t cmd;
- PM_CheckWallJump( );
PM_Friction( );
fmove = pm->cmd.forwardmove;
@@ -1974,11 +1905,7 @@ static void PM_GroundClimbTrace( void )
//if we hit something
if( trace.fraction < 1.0f && !( trace.surfaceFlags & ( SURF_SKY | SURF_SLICK ) )
-#ifdef ALIEN_WALLWALK_ENTITIES
- )
-#else
- && !( trace.entityNum != ENTITYNUM_WORLD && i != 4 ) )
-#endif
+ && !( trace.entityNum != ENTITYNUM_WORLD && i != 4 ) )
{
if( i == 2 || i == 3 )
{
@@ -2179,6 +2106,7 @@ PM_GroundTrace
static void PM_GroundTrace( void )
{
vec3_t point;
+ vec3_t movedir;
vec3_t refNormal = { 0.0f, 0.0f, 1.0f };
trace_t trace;
@@ -2279,6 +2207,39 @@ static void PM_GroundTrace( void )
PM_GroundTraceMissed( );
pml.groundPlane = qfalse;
pml.walking = qfalse;
+
+ if( BG_ClassHasAbility( pm->ps->stats[ STAT_PCLASS ], SCA_WALLJUMPER ) )
+ {
+ ProjectPointOnPlane( movedir, pml.forward, refNormal );
+ VectorNormalize( movedir );
+
+ if( pm->cmd.forwardmove < 0 )
+ VectorNegate( movedir, movedir );
+
+ //allow strafe transitions
+ if( pm->cmd.rightmove )
+ {
+ VectorCopy( pml.right, movedir );
+
+ if( pm->cmd.rightmove < 0 )
+ VectorNegate( movedir, movedir );
+ }
+
+ //trace into direction we are moving
+ VectorMA( pm->ps->origin, 0.25f, movedir, point );
+ pm->trace( &trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask );
+
+ if( trace.fraction < 1.0f && !( trace.surfaceFlags & ( SURF_SKY | SURF_SLICK ) ) &&
+ ( trace.entityNum == ENTITYNUM_WORLD ) )
+ {
+ if( !VectorCompare( trace.plane.normal, pm->ps->grapplePoint ) )
+ {
+ VectorCopy( trace.plane.normal, pm->ps->grapplePoint );
+ PM_CheckWallJump( );
+ }
+ }
+ }
+
return;
}
}
@@ -3594,9 +3555,7 @@ void PmoveSingle( pmove_t *pmove )
AngleVectors( pm->ps->viewangles, pml.forward, pml.right, pml.up );
- if( pm->cmd.upmove < 10 &&
- ( !( pm->cmd.buttons & BUTTON_DODGE ) ||
- pm->ps->stats[ STAT_PTEAM ] != PTE_ALIENS ) )
+ if( pm->cmd.upmove < 10 )
{
// not holding jump or minijump
pm->ps->pm_flags &= ~PMF_JUMP_HELD;
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 24317bd2..045aa648 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -462,108 +462,47 @@ MASS DRIVER
void massDriverFire( gentity_t *ent )
{
- trace_t tr;
- vec3_t hitPoints[ MDRIVER_MAX_HITS ], hitNormals[ MDRIVER_MAX_HITS ],
- origin, originToEnd, muzzleToEnd, muzzleToOrigin, end;
- gentity_t *traceEnts[ MDRIVER_MAX_HITS ], *traceEnt, *tent;
- float length_offset;
- int i, hits = 0, skipent;
+ trace_t tr;
+ vec3_t end;
+ gentity_t *tent;
+ gentity_t *traceEnt;
- // loop through all entities hit by a line trace
- G_UnlaggedOn( muzzle, 8192 * 16 );
VectorMA( muzzle, 8192 * 16, forward, end );
- VectorCopy( muzzle, tr.endpos );
- skipent = ent->s.number;
- for( i = 0; i < MDRIVER_MAX_HITS && skipent != ENTITYNUM_NONE; i++ )
- {
- trap_Trace( &tr, tr.endpos, NULL, NULL, end, skipent, MASK_SHOT );
- if( tr.surfaceFlags & SURF_NOIMPACT )
- break;
- traceEnt = &g_entities[ tr.entityNum ];
- skipent = tr.entityNum;
- if( traceEnt->s.eType == ET_PLAYER )
- {
- // don't travel through teammates with FF off
- if( OnSameTeam( ent, traceEnt ) &&
- ( !g_friendlyFire.integer || !g_friendlyFireHumans.integer ) )
- skipent = ENTITYNUM_NONE;
- }
- else if( traceEnt->s.eType == ET_BUILDABLE )
- {
- // don't travel through team buildables with FF off
- if( traceEnt->biteam == ent->client->pers.teamSelection &&
- !g_friendlyBuildableFire.integer )
- skipent = ENTITYNUM_NONE;
- }
- else
- skipent = ENTITYNUM_NONE;
- // save the hit entity, position, and normal
- VectorCopy( tr.endpos, hitPoints[ hits ] );
- VectorCopy( tr.plane.normal, hitNormals[ hits ] );
- SnapVectorNormal( hitPoints[ hits ], tr.plane.normal );
- traceEnts[ hits++ ] = traceEnt;
- }
+ G_UnlaggedOn( muzzle, 8192 * 16 );
+ trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, MASK_SHOT );
+ G_UnlaggedOff( );
- // originate trail line from the gun tip, not the head!
- VectorCopy( muzzle, origin );
- VectorMA( origin, -6, up, origin );
- VectorMA( origin, 4, right, origin );
- VectorMA( origin, 24, forward, origin );
-
- // save the final position
- VectorCopy( tr.endpos, end );
- VectorSubtract( end, origin, originToEnd );
- VectorNormalize( originToEnd );
-
- // origin is further in front than muzzle, need to adjust length
- VectorSubtract( origin, muzzle, muzzleToOrigin );
- VectorSubtract( end, muzzle, muzzleToEnd );
- VectorNormalize( muzzleToEnd );
- length_offset = DotProduct( muzzleToEnd, muzzleToOrigin );
-
- // now that the trace is finished, we know where we stopped and can generate
- // visually correct impact locations
- for( i = 0; i < hits; i++ )
- {
- vec3_t muzzleToPos;
- float length;
-
- // restore saved values
- VectorCopy( hitPoints[ i ], tr.endpos );
- VectorCopy( hitNormals[ i ], tr.plane.normal );
- traceEnt = traceEnts[ i ];
-
- // compute the visually correct impact point
- VectorSubtract( tr.endpos, muzzle, muzzleToPos );
- length = VectorLength( muzzleToPos ) - length_offset;
- VectorMA( origin, length, originToEnd, tr.endpos );
+ if( tr.surfaceFlags & SURF_NOIMPACT )
+ return;
- // send impact
- if( traceEnt->takedamage && traceEnt->client )
- BloodSpurt( ent, traceEnt, &tr );
- else if( i < hits - 1 )
- {
- tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS );
- tent->s.eventParm = DirToByte( tr.plane.normal );
- tent->s.weapon = ent->s.weapon;
- tent->s.generic1 = ent->s.generic1; // weaponMode
- }
-
- if( traceEnt->takedamage )
- G_Damage( traceEnt, ent, ent, forward, tr.endpos,
- MDRIVER_DMG, 0, MOD_MDRIVER );
+ traceEnt = &g_entities[ tr.entityNum ];
+
+ // snap the endpos to integers, but nudged towards the line
+ SnapVectorTowards( tr.endpos, muzzle );
+
+ // send impact
+ if( traceEnt->takedamage && traceEnt->client )
+ {
+ tent = G_TempEntity( tr.endpos, EV_MISSILE_HIT );
+ tent->s.otherEntityNum = traceEnt->s.number;
+ tent->s.eventParm = DirToByte( tr.plane.normal );
+ tent->s.weapon = ent->s.weapon;
+ tent->s.generic1 = ent->s.generic1; //weaponMode
+ }
+ else
+ {
+ tent = G_TempEntity( tr.endpos, EV_MISSILE_MISS );
+ tent->s.eventParm = DirToByte( tr.plane.normal );
+ tent->s.weapon = ent->s.weapon;
+ tent->s.generic1 = ent->s.generic1; //weaponMode
}
- // create an event entity for the trail, doubles as an impact event
- SnapVectorNormal( end, tr.plane.normal );
- tent = G_TempEntity( end, EV_MASS_DRIVER );
- tent->s.eventParm = DirToByte( tr.plane.normal );
- tent->s.weapon = ent->s.weapon;
- tent->s.generic1 = ent->s.generic1; // weaponMode
- VectorCopy( origin, tent->s.origin2 );
-
- G_UnlaggedOff( );
+ if( traceEnt->takedamage )
+ {
+ G_Damage( traceEnt, ent, ent, forward, tr.endpos,
+ MDRIVER_DMG, 0, MOD_MDRIVER );
+ }
}
/*
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index e2723529..47049842 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -83,11 +83,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL2_AREAZAP_REPEAT 500
#define LEVEL2_AREAZAP_MAX_TARGETS 3
#define LEVEL2_WALLJUMP_MAXSPEED 1000.0f
-#define LEVEL2_WALLJUMP_NORMAL 1.0f // magnitude scale from surface
-#define LEVEL2_WALLJUMP_FORWARD 1.5f // magnitude scale in view direction
-#define LEVEL2_WALLJUMP_UP 0.0f // magnitude scale up
-#define LEVEL2_WALLJUMP_REPEAT 400 // msec before new jump
-#define LEVEL2_WALLJUMP_RANGE 8.0f // how far away the wall can be
#define LEVEL3_CLAW_DMG ADM(80)
#define LEVEL3_CLAW_UPG_RANGE 96.0f
@@ -357,11 +352,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define ALIEN_CREDITS_PER_FRAG 400
#define ALIEN_TK_SUICIDE_PENALTY 350
-#define ALIEN_MINI_JUMP_SCALE 0.71f // scales jump magnitude for a mini-jump
-
-// Uncomment to allow Aliens to wallwalk on any entity (buildables, players, etc)
-//#define ALIEN_WALLWALK_ENTITIES
-
/*
* HUMAN weapons
*
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 4513eb85..309b530d 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -5111,7 +5111,6 @@ static bind_t g_bindings[] =
{ "messagemode2", -1, -1, -1, -1 },
{ "messagemode3", -1, -1, -1, -1 },
{ "messagemode4", -1, -1, -1, -1 },
- { "squadmark", 'k', -1, -1, -1 },
};
diff --git a/ui/help.txt b/ui/help.txt
index 15a496a1..76b11c53 100644
--- a/ui/help.txt
+++ b/ui/help.txt
@@ -9,11 +9,9 @@
"We can also be reached on Freenode IRC:\n"
"#mercenariesguild"
}
- "^3Release Notes r144^7"
+ "^3Release Notes r147^7"
{
- "* New view-directed Marauder walljump\n"
- "* Dodge key is mini-jump for Aliens\n"
- "\nSee svn.mercenariesguild.net for details."
+ "See svn.mercenariesguild.net for details."
}
"Alien Healing"
{
@@ -25,13 +23,6 @@
"creep. If you are near a booster or basilisk, you will see two "
"(2X healing) or four (3X healing) barbs around the health cross."
}
- "Alien Mini-Jump"
- {
- "The sprint / dodge key can be used by Aliens as a jump key that "
- "produces a weaker, half-height jump. This is especially useful for "
- "Alien classes that have high jumps, such as the Marauder. The mini-jump "
- "is also useful for cornering and building speed in tight hallways."
- }
"Anti-Camping"
{
"Aliens will no longer be as frustrated by camping Human players because "
@@ -106,14 +97,6 @@
"press the dodge key to start a sprint. The sprint will last until you let "
"go of the forward key."
}
- "Squad Marking"
- {
- "Want to keep track of certain teammates? Mark them as members of your "
- "squad. Bind a key to 'Toggle Squad Mark' (Options -> Misc), walk up to "
- "the target player and press that key. A triangle will appear above them "
- "marking them as a squad member. The triangle will stay on screen as long "
- "as the player is around you."
- }
"Tyrant"
{
"The Tyrant is now a weaker class as its health has been lowered and "
diff --git a/ui/ingame_options.menu b/ui/ingame_options.menu
index 8675def6..1a8e1f18 100644
--- a/ui/ingame_options.menu
+++ b/ui/ingame_options.menu
@@ -1320,26 +1320,6 @@
}
}
- itemDef
- {
- name misc
- group optionsGrp
- type ITEM_TYPE_BIND
- text "Toggle Squad Mark:"
- cvar "squadmark"
- rect SCONTENT_X (SCONTENT_Y+(12*ELEM_H)) SCONTENT_W ELEM_H
- textalign ALIGN_RIGHT
- textvalign VALIGN_CENTER
- textalignx SCONTENT_OFF
- textscale .25
- forecolor 1 1 1 1
- visible MENU_FALSE
- action
- {
- play "sound/misc/menu1.wav";
- }
- }
-
//////// SYSTEM
//System menu
diff --git a/ui/menudef.h b/ui/menudef.h
index d5db721e..6b9705e1 100644
--- a/ui/menudef.h
+++ b/ui/menudef.h
@@ -177,6 +177,5 @@
#define CG_PLAYER_CHARGE_BAR_BG 76
#define CG_PLAYER_CHARGE_BAR 77
-#define CG_SQUAD_MARKERS 78
#endif
diff --git a/ui/tremulous_common_hud.h b/ui/tremulous_common_hud.h
index 485cc572..19647ff9 100644
--- a/ui/tremulous_common_hud.h
+++ b/ui/tremulous_common_hud.h
@@ -161,12 +161,3 @@ itemDef
textstyle ITEM_TEXTSTYLE_SHADOWED
}
-//SQUAD MARKERS
-itemDef
-{
- name "squad-markers"
- visible MENU_TRUE
- forecolor COMMON_HUD_R COMMON_HUD_G COMMON_HUD_B 0.5
- ownerdraw CG_SQUAD_MARKERS
-}
-