mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-19 16:11:28 +00:00
ramp jump code
This commit is contained in:
parent
512a7008ab
commit
d6c8711b50
1 changed files with 16 additions and 1 deletions
|
@ -202,7 +202,6 @@ void PM_ClipVelocity( vec3_t in, vec3_t normal, vec3_t out, float overbounce ) {
|
||||||
float backoff;
|
float backoff;
|
||||||
float change;
|
float change;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
backoff = DotProduct (in, normal);
|
backoff = DotProduct (in, normal);
|
||||||
|
|
||||||
if ( backoff < 0 ) {
|
if ( backoff < 0 ) {
|
||||||
|
@ -906,7 +905,18 @@ static void PM_WalkMove( void ) {
|
||||||
usercmd_t cmd;
|
usercmd_t cmd;
|
||||||
float accelerate;
|
float accelerate;
|
||||||
float vel;
|
float vel;
|
||||||
|
//Blaze: New ramp move code
|
||||||
|
vec3_t point;
|
||||||
|
trace_t trace;
|
||||||
|
|
||||||
|
point[0] = pm->ps->origin[0];
|
||||||
|
point[1] = pm->ps->origin[1];
|
||||||
|
point[2] = pm->ps->origin[2] - 0.25;
|
||||||
|
|
||||||
|
pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask);
|
||||||
|
//Com_Printf("(%f)",trace.plane.normal[2]);
|
||||||
|
|
||||||
|
//Blaze: end new ramp jump code
|
||||||
if ( pm->waterlevel > 2 && DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 ) {
|
if ( pm->waterlevel > 2 && DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 ) {
|
||||||
// begin swimming
|
// begin swimming
|
||||||
PM_WaterMove();
|
PM_WaterMove();
|
||||||
|
@ -965,6 +975,11 @@ static void PM_WalkMove( void ) {
|
||||||
wishspeed = VectorNormalize(wishdir);
|
wishspeed = VectorNormalize(wishdir);
|
||||||
wishspeed *= scale;
|
wishspeed *= scale;
|
||||||
|
|
||||||
|
//Blaze: Some ramp jump stuff here
|
||||||
|
wishspeed *= 2 - trace.plane.normal[2];
|
||||||
|
|
||||||
|
//End blaze ramp jumping stuff
|
||||||
|
|
||||||
// clamp the speed lower if ducking
|
// clamp the speed lower if ducking
|
||||||
if ( pm->ps->pm_flags & PMF_DUCKED ) {
|
if ( pm->ps->pm_flags & PMF_DUCKED ) {
|
||||||
if ( wishspeed > pm->ps->speed * pm_duckScale ) {
|
if ( wishspeed > pm->ps->speed * pm_duckScale ) {
|
||||||
|
|
Loading…
Reference in a new issue