Changeset 183:72b70f3b0e29

Show
Ignore:
Timestamp:
05/22/08 22:50:51 (2 years ago)
Author:
mdoison@…
Branch:
default
Message:
  • Revert jump logic modifications (ticket #171)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/game/bg_pmove.c

    r174 r183  
    666666static qboolean PM_CheckJump( void ) 
    667667{ 
    668   vec3_t normal; 
    669   vec3_t vmagnitude; 
    670   double magnitude; 
    671   int i; 
    672  
    673668  if( BG_Class( pm->ps->stats[ STAT_CLASS ] )->jumpMagnitude == 0.0f ) 
    674669    return qfalse; 
     
    725720 
    726721  // jump away from wall 
    727   BG_GetClientNormal( pm->ps, normal ); 
    728  
    729   magnitude = BG_Class( pm->ps->stats[ STAT_CLASS ] )->jumpMagnitude; 
    730   VectorScale( normal, magnitude, vmagnitude ); 
    731   VectorMA( pm->ps->velocity, magnitude, normal, pm->ps->velocity ); 
    732   for( i=0; i < 3; i++) 
    733   { 
    734     if( vmagnitude[i] > 0 ) 
    735       pm->ps->velocity[i] = ( pm->ps->velocity[i] > vmagnitude[i] ) ? pm->ps->velocity[i] : vmagnitude[i]; 
    736         else if( vmagnitude[i] < 0 ) 
    737       pm->ps->velocity[i] = ( pm->ps->velocity[i] < vmagnitude[i] ) ? pm->ps->velocity[i] : vmagnitude[i]; 
    738  
    739   } 
     722  if( pm->ps->stats[ STAT_STATE ] & SS_WALLCLIMBING ) 
     723  { 
     724    vec3_t normal = { 0, 0, -1 }; 
     725 
     726    if( !( pm->ps->stats[ STAT_STATE ] & SS_WALLCLIMBINGCEILING ) ) 
     727      VectorCopy( pm->ps->grapplePoint, normal ); 
     728 
     729    VectorMA( pm->ps->velocity, BG_Class( 
     730          pm->ps->stats[ STAT_CLASS ] )->jumpMagnitude, normal, pm->ps->velocity ); 
     731  } 
     732  else 
     733    pm->ps->velocity[ 2 ] = BG_Class( pm->ps->stats[ STAT_CLASS ] )->jumpMagnitude; 
    740734 
    741735  PM_AddEvent( EV_JUMP );