SkreamerVirii
Administrator
Full Member
Posts: 133
|
|
« on: September 03, 2008, 11:05:57 PM » |
|
Weapon controled player speeds In this Tutorial i will show you how to increase your players speed by which weapon he has i will be using the venom for demonstration purposes at the moment when you switch to the venom you walk REALLy slow well were goping to fix that and allow you to run as fast as if you werent carrying it all so set your project to game and open up bg_pmove.c and scroll to line 368 were you should see this code // JPW NERVE -- half move speed if heavy weapon is carried // this is the counterstrike way of doing it -- ie you can switch to a non-heavy weapon and move at // full speed. not completely realistic (well, sure, you can run faster with the weapon strapped to your // back than in carry position) but more fun to play. If it doesn't play well this way we'll bog down the // player if the own the weapon at all. // // added #ifdef for game/cgame to project so we can get correct g_gametype variable and only do this in // multiplayer if necessary if (pm->gametype != GT_SINGLE_PLAYER) { if ((pm->ps->weapon == WP_VENOM) || (pm->ps->weapon == WP_VENOM_FULL) || (pm->ps->weapon == WP_PANZERFAUST)) scale *= 0.5; if (pm->ps->weapon == WP_FLAMETHROWER) // trying some different balance for the FT scale *= 0.7; } // jpw return scale; }
Now make it look like this // JPW NERVE -- half move speed if heavy weapon is carried // this is the counterstrike way of doing it -- ie you can switch to a non-heavy weapon and move at // full speed. not completely realistic (well, sure, you can run faster with the weapon strapped to your // back than in carry position) but more fun to play. If it doesn't play well this way we'll bog down the // player if the own the weapon at all. // // added #ifdef for game/cgame to project so we can get correct g_gametype variable and only do this in // multiplayer if necessary if (pm->gametype != GT_WOLF) { if ((pm->ps->weapon == WP_VENOM) || (pm->ps->weapon == WP_VENOM_FULL) || (pm->ps->weapon == WP_PANZERFAUST)) scale *= 0.9; if (pm->ps->weapon == WP_FLAMETHROWER) // trying some different balance for the FT scale *= 0.7; } // jpw return scale; }
Once again changed if (pm->gametype != GT_SINGLE_PLAYER) { to if (pm->gametype != GT_WOLF) { Just for good measure.
and then i changed scale *= 0.5;
to scale *= 0.9;
a while back it didnt seem to want to go over 9 if you have that problem then tell me especially if you fixed it maybe 9 is its max
|