Hi
After have used my evening trying to track down where and how I could implement some shrub-like double jumping, I finally have somewhat succeded. But here goes:
In bg_pmove.c function PmoveSingle (around line 5400). Find the subsection that looks like this:
} else if ( pml.walking && !(pm->ps->eFlags & EF_MOUNTEDTANK)) {
// walking on ground
PM_WalkMove();
} else if (!(pm->ps->eFlags & EF_MOUNTEDTANK)) {
// airborne
PM_AirMove();
}
and change it to
} else if ( pml.walking && !(pm->ps->eFlags & EF_MOUNTEDTANK)) {
// walking on ground
PM_WalkMove();
} else if (!(pm->ps->eFlags & EF_MOUNTEDTANK)) {
// CHRUKER: Double-jumping
if ((pm->cmd.serverTime - pm->pmext->jumpTime < 850) && pm->cmd.doubleTap == DT_UP)
pm->ps->velocity[2] = JUMP_VELOCITY * 1.4f;
// airborne
PM_AirMove();
}
There are still some differences between shrubet-style and this:
- No double jumping from water here. However duplicating this new code into one of the other if’s above would probably solve it.
- The window in which you have to double tap, seems a lot shorter than the 850 used here.
- Also it feels a lot easier to strafe jump here than with shrub.
Anyhoo, I thought I would share this with you guys.
[/b]

