Jump to content
Delexical

[TUTORIAL] FPS Boost - Enable / Disable Environmental Sounds

Recommended Posts

Author: Me (I mean, it really wasn't that hard.)

Difficulty: Really Easy 

What does it do? 

It enables / disables environmental ambient sound by pressing Shift + 0. (People claim that it gives you better FPS.) 

In my case, it gives me an extra 2 - 6 FPS depending on how much ambient sound there is.

https://community.bistudio.com/wiki/enableEnvironment

I've made it so that it only disables / enables ambient sound.

Here it is:

Step 1: Go to core\configuration.sqf - Add 'life_environment = 0;'

Do it like this:

Spoiler
*****************************
****** Backend Variables *****
*****************************
*/
life_query_time = time;
life_action_delay = time;
life_trunk_vehicle = objNull;
life_session_completed = false;
life_garage_store = false;
life_session_tries = 0;
life_net_dropped = false;
life_siren_active = false;
life_clothing_filter = 0;
life_clothing_uniform = -1;
life_redgull_effect = time;
life_is_processing = false;
life_bail_paid = false;
life_impound_inuse = false;
life_action_inUse = false;
life_spikestrip = objNull;
life_knockout = false;
life_interrupted = false;
life_respawned = false;
life_removeWanted = false;
life_action_gathering = false;
tawvd_addon_disable = true;
life_god = false;
life_frozen = false;
life_save_gear = [];
life_container_activeObj = objNull;
life_disable_getIn = false;
life_disable_getOut = false;
life_admin_debug = false;
life_preview_3D_vehicle_cam = objNull;
life_preview_3D_vehicle_object = objNull;
life_preview_light = objNull;
life_pos_exist = false;
life_pos_attach = [];
life_civ_position = [];
life_markers = false;
life_markers_active = false;
life_canpay_bail = true;
life_storagePlacing = scriptNull;
life_environment = 0; // Add it here, or anywhere else you want to put it.

 

 

Step 2: Go to core\functions\fn_keyHandler.sqf - Copy and Paste after Case 24 (FadeSound)

It should look like this without the weird indentation.

Spoiler
    //O Key
    case 24: {
        if (_shift) then {
            if !(soundVolume isEqualTo 1) then {
                1 fadeSound 1;
                systemChat localize "STR_MISC_soundnormal";
            } else {
                1 fadeSound 0.1;
                systemChat localize "STR_MISC_soundfade";
            };
        };
    };
	
	// Shift + 0 - Enable / Disable Environmental Sounds
	
	case 11: {
		if (_shift) then {
			if !(life_environment isEqualTo 1) then {
                enableEnvironment [true, false];
                life_environment = 1;
                systemChat "Environmental Sounds Disabled.";
            } else {
                enableEnvironment [true, true];
                life_environment = 0;
                systemChat "Environmental Sounds Enabled.";
            };
        };
    };

 

And that should be it.

Comment if you have any issues, I mean, you really shouldn't though.

Edited by 14e_Senator_Walter
Slightly Clearer Instructions
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×