Hauptseite | Movment Speed Code - Forum | Registrieren | Login
[ Neue Beiträge · User · Suche · RSS ]

Seite 1 von 11
Forum » Mapping & Modding » Mapping & Modding » Movment Speed Code

Movment Speed Code
MOVEMENT SPEED CODE

Moving speed while carring heavy weapons:
Panzer/Mortar/MG42: 50%
Panzer/Mortar/MG42 with level 3 heavy weapons: 75%

Flamethrower: 70%
Flamethrower with level 3 heavy weapons or whilest attacking (i.e. pressing
the fire button): 100%

Here the source (from the file bg_pmove.c, function PM_CmdScale):

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.
//
        if ((pm->ps->weapon == WP_PANZERFAUST) ||
            (pm->ps->weapon == WP_MOBILE_MG42) ||
            (pm->ps->weapon == WP_MOBILE_MG42_SET) ||
            (pm->ps->weapon == WP_MORTAR)) {
            if( pm->skill[SK_HEAVY_WEAPONS] >= 3 ) {
                scale *= 0.75;
            } else {
                scale *= 0.5;
            }
        }

        if (pm->ps->weapon == WP_FLAMETHROWER) { // trying some different balance     
for the FT
            if( !(pm->skill[SK_HEAVY_WEAPONS] >= 3) || pm->cmd.buttons & BUTTON_ATTACK     
)
                scale *= 0.7;
        }

submitted by Ragnar-X-

Forum » Mapping & Modding » Mapping & Modding » Movment Speed Code
Seite 1 von 11
Suche:

Copyright etpro.de © 2008-2016 . Toolbar | Impressum | Kontakt

Bookmark and Share