Sasabmeg / FOnline-BraveNewWorld

FOClassic and PReloaded project, mostly for fodev.net tutorials or module code shares.
https://fodev.net/forum/index.php/topic,30344.0.html
GNU General Public License v3.0
11 stars 4 forks source link

FEATURE: Enable 1-hexing with all or specific weapons (Rado) #7

Closed Sasabmeg closed 1 year ago

Sasabmeg commented 1 year ago

Enable 1-hexing with either all weapons or specific weapons. Weapons with close range perk and/or SMGs should be able to full burst into target at 1 hex distance. Describe how to switch between the two options, in case different server hosts or devs plans.

Sasabmeg commented 1 year ago

Whitespaces unfortunately have been committed, but the relevant part is:

    ////////////////////////
    ////    1-hexing    ////

    ////    only specific weapons
    bool threeLines = !isNoSpread;   // weapon not shotgun-like
    if (shotDist == 1) {
        if ((weapPid == PID_10MM_SMG) || (weapPid == PID_HK_P90C) || (weapPid == PID_GREASE_GUN) || (weapPid == PID_TOMMY_GUN)
                || (weapPid == PID_HK_G11) || (weapPid == PID_HK_G11E) || (weapPid == PID_LASER_SMG)) {
            threeLines = false;
        }
    }
    ////

    ////    use this to 1-hex with every weapon, and remove above
    //  bool threeLines = shotDist > 1 ? !isNoSpread : false;   // target not adjacent and weapon not shotgun-like -> use three lines, otherwise 1-hex with every weapon

    /////////////////////////////