<commit_before>#include "cbase.h"
#include "c_user_message_register.h"
#include "iclientvehicle.h"
#include "input.h"
#include "c_basetempentity.h"
#include "hud_macros.h"
#include "engine/ivdebugoverlay.h"
#include "bone_setup.h"
#include "in_buttons.h"
#include "r_efx.h"
#include "cl_animevent.h"
#include "c_asw_point_camera.h"
#include "soundenvelope.h"
#include <inetchannelinfo.h>
#include "materialsystem/imesh.h"		//for materials->FindMaterial
#include "iviewrender.h"				//for view->
#include "tier0/vprof.h"
#include "prediction.h"
#include "c_env_ambient_light.h"
#include "game_timescale_shared.h"

// effects
#include "ivieweffects.h"
#include "view.h"
#include "ieffects.h"
#include "fx.h"
#include "smoke_fog_overlay.h"
#include "dlight.h"
#include "shake.h"

// VGUI
#include <vgui/vgui.h>
#include <vgui_controls/Controls.h>
#include "vgui_controls/frame.h"
#include "vgui_controls/Label.h"
#include <vgui_controls/PHandle.h>
#include <vgui_controls/Button.h>
#include "controller_focus.h"
#include "iclientmode.h"

// ASW HUD
#include "vgui\asw_vgui_info_message.h"
#include "vgui\FadeInPanel.h"
#include "vgui\asw_vgui_ingame_panel.h"
#include "asw_vgui_stylin_cam.h"
#include "asw_hud_crosshair.h"
#include "asw_hud_chat.h"
#include "PlayerListPanel.h"
#include "asw_vgui_frame.h"
#include "MedalCollectionPanel.h"
#include "CreditsPanel.h"
#include "CainMailPanel.h"
#include "asw_vgui_skip_intro.h"
#include "CampaignFrame.h"
#include "OutroFrame.h"
#include "MissionCompleteFrame.h"
#include "BriefingFrame.h"
#include "clientmode_asw.h"
#include "vgui\PlayerListContainer.h"
#include "asw_loading_panel.h"

// ASW Game
#include "c_asw_player.h"
#include "c_asw_game_resource.h"
#include "c_asw_objective.h"
#include "asw_marine_profile.h"
#include "c_asw_marine_resource.h"
#include "c_asw_marine.h"
#include "c_asw_mesh_emitter_entity.h"
#include "c_asw_generic_emitter_entity.h"
#include "asw_weapon_parse.h"
#include "c_asw_pickup.h"
#include "c_asw_door_area.h"
#include "asw_gamerules.h"
#include "asw_equipment_list.h"
#include "c_asw_weapon.h"
#include "asw_marineandobjectenumerator.h"
#include "asw_usableobjectsenumerator.h"
#include "c_asw_jeep_clientside.h"
#include "obstacle_pushaway.h"
#include "asw_shareddefs.h"
#include "asw_campaign_info.h"
#include "c_asw_voting_missions.h"
#include "c_asw_camera_volume.h"
#include "asw_medal_store.h"
#include "asw_remote_turret_shared.h"
#include "c_asw_snow_volume.h"
#include "c_asw_snow_emitter.h"
#include "asw_util_shared.h"
#include "c_asw_flare_projectile.h"
#include "c_asw_flamer_projectile.h"
#include "collisionutils.h"
#include "asw_input.h"
#include "c_asw_sentry_base.h"
#include "asw_weapon_sniper_rifle.h"
#include "asw_melee_system.h"
#include "c_asw_jukebox.h"
#include "missionchooser/iasw_mission_chooser.h"
#include "missionchooser/iasw_random_missions.h"

//MOD
#include "../c_mod_build_mission_map_for_next_mission.h"

#if defined( CASW_Player )
	#undef CASW_Player
#endif

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

extern ConVar asw_controls;
extern ConVar asw_marine_collision;
ConVar g_DrawPlayer("asw_drawplayermesh", "0", FCVAR_ARCHIVE, "Draw the player entity or not");
ConVar asw_clientside_avoidance("asw_clientside_avoidance", "1", FCVAR_CHEAT);
ConVar asw_debug_clientside_avoidance("asw_debug_clientside_avoidance", "0", FCVAR_CHEAT);
ConVar asw_clientside_avoidance_scale("asw_clientside_avoidance_scale", "1.0", FCVAR_CHEAT);
// stim cams: (p/y/r) (x/y/z)
// (0/-10/0)  (-60 60 30) - foot level forward looking
// (40/180/0) (50 0 70)	- close marine view cam
ConVar asw_stim_cam_pitch("asw_stim_cam_pitch", "10", 0, "Controls angle of the small in-picture Stim camera");
ConVar asw_stim_cam_yaw("asw_stim_cam_yaw", "15", 0, "Controls angle of the small in-picture Stim camera");
ConVar asw_stim_cam_roll("asw_stim_cam_roll", "0", 0, "Controls angle of the small in-picture Stim camera");
ConVar asw_stim_cam_x("asw_stim_cam_x", "-20", 0, "Controls offset of the small in-picture Stim camera");
ConVar asw_stim_cam_y("asw_stim_cam_y", "-30", 0, "Controls offset of the small in-picture Stim camera");
ConVar asw_stim_cam_z("asw_stim_cam_z", "70", 0, "Controls offset of the small in-picture Stim camera");
ConVar asw_stim_cam_rotate_speed("asw_stim_cam_rotate_speed", "0", 0, "Rotation speed of the stim camera");
ConVar asw_spinning_stim_cam("asw_spinning_stim_cam", "1", 0, "If set, slow motion will display a small spinning camera view");
ConVar asw_show_mouse_entity("asw_show_mouse_entity", "0", FCVAR_CHEAT, "Show entity under the mouse cursor");
ConVar asw_marine_switch_blend_speed("asw_marine_switch_blend_speed", "2.5", 0, "How quickly the camera blends between marines when switching");
ConVar asw_marine_switch_blend_max_dist("asw_marine_switch_blend_max_dist", "1500", 0, "Maximum distance apart marines can be for a camera blend to occur");

// default inventory convars
ConVar asw_default_primary_0("asw_default_primary_0", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_0("asw_default_secondary_0", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_0("asw_default_extra_0", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_1("asw_default_primary_1", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_1("asw_default_secondary_1", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_1("asw_default_extra_1", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_2("asw_default_primary_2", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_2("asw_default_secondary_2", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_2("asw_default_extra_2", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_3("asw_default_primary_3", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_3("asw_default_secondary_3", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_3("asw_default_extra_3", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_4("asw_default_primary_4", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_4("asw_default_secondary_4", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_4("asw_default_extra_4", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_5("asw_default_primary_5", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_5("asw_default_secondary_5", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_5("asw_default_extra_5", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_6("asw_default_primary_6", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_6("asw_default_secondary_6", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_6("asw_default_extra_6", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_7("asw_default_primary_7", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_7("asw_default_secondary_7", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_7("asw_default_extra_7", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_8("asw_default_primary_8", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_8("asw_default_secondary_8", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_8("asw_default_extra_8", "-1", FCVAR_NONE, "Default extra equip for marine with this number");

ConVar asw_particle_count("asw_particle_count", "0", 0, "Shows how many particles are being drawn");
ConVar asw_dlight_list("asw_dlight_list", "0", 0, "Lists dynamic lights");

ConVar asw_stim_music( "asw_stim_music", "", FCVAR_ARCHIVE, "Custom music file used for stim music" );
ConVar asw_player_avoidance( "asw_player_avoidance", "1", FCVAR_CHEAT, "Enable/Disable player avoidance." );
ConVar asw_player_avoidance_force( "asw_player_avoidance_force", "1024", FCVAR_CHEAT, "Marine avoidance separation force." );
ConVar asw_player_avoidance_bounce( "asw_player_avoidance_bounce", "1.0", FCVAR_CHEAT, "Marine avoidance bounce." );
ConVar asw_player_avoidance_fakehull( "asw_player_avoidance_fakehull", "25.0", FCVAR_CHEAT, "Marine avoidance hull size." );

ConVar asw_roster_select_bypass_steam( "asw_roster_select_bypass_steam", "0", FCVAR_CHEAT, "Bypass checking if data has been downloaded from steam when selecting a Marine." );

void fnAutoReloadChangedCallback(IConVar *var, const char *pOldString, float flOldValue )
{
	if ( engine->IsInGame() )
	{
		engine->ClientCmd( VarArgs( "cl_autoreload %d\n", ((ConVar *)var)->GetInt() ) );
	}
}
ConVar asw_auto_reload("asw_auto_reload", "1", FCVAR_ARCHIVE, "Whether your marines should autoreload when reaching 0 bullets", true, 0, true, 1, fnAutoReloadChangedCallback);

ConVar asw_turret_fog_start("asw_turret_fog_start", "900", 0, "Fog start distance for turret view");
ConVar asw_turret_fog_end("asw_turret_fog_end", "1200", 0, "Fog end distance for turret view");

void ASW_Controls_Changed(IConVar *var, const char *pOldValue, float flOldValue);
ConVar asw_controls("asw_controls", "1", FCVAR_ARCHIVE, "Disable to get normal FPS controls (affects only you)", true, 0, true, 2, ASW_Controls_Changed);
void ASW_Controls_Changed(IConVar *var, const char *pOldValue, float flOldValue)
{
	if (!ASWGameRules())
		return;

	Assert(ASWInput());

	if (asw_controls.GetInt() == 0)
	{
		ASWInput()->CAM_ToFirstPerson();
	}
	else
	{
		ASWInput()->CAM_ToThirdPerson();
	}

	if (engine->IsInGame())
	{
		engine->ClientCmd(VarArgs("cl_asw_controls %d\n", asw_controls.GetInt()));
	}
}

extern ConVar asw_allow_detach;
extern ConVar asw_stim_cam_time;
extern ConVar asw_rts_controls;
extern ConVar asw_hud_alpha;
extern ConVar asw_building_room_thumbnails;

// How fast to avoid collisions with center of other object, in units per second
#define AVOID_SPEED 2000.0f
extern ConVar cl_forwardspeed;
extern ConVar cl_backspeed;
extern ConVar cl_sidespeed;
<commit_msg>UI: add a fov_desired for each asw_controls value<commit_after>#include "cbase.h"
#include "c_user_message_register.h"
#include "iclientvehicle.h"
#include "input.h"
#include "c_basetempentity.h"
#include "hud_macros.h"
#include "engine/ivdebugoverlay.h"
#include "bone_setup.h"
#include "in_buttons.h"
#include "r_efx.h"
#include "cl_animevent.h"
#include "c_asw_point_camera.h"
#include "soundenvelope.h"
#include <inetchannelinfo.h>
#include "materialsystem/imesh.h"		//for materials->FindMaterial
#include "iviewrender.h"				//for view->
#include "tier0/vprof.h"
#include "prediction.h"
#include "c_env_ambient_light.h"
#include "game_timescale_shared.h"

// effects
#include "ivieweffects.h"
#include "view.h"
#include "ieffects.h"
#include "fx.h"
#include "smoke_fog_overlay.h"
#include "dlight.h"
#include "shake.h"

// VGUI
#include <vgui/vgui.h>
#include <vgui_controls/Controls.h>
#include "vgui_controls/frame.h"
#include "vgui_controls/Label.h"
#include <vgui_controls/PHandle.h>
#include <vgui_controls/Button.h>
#include "controller_focus.h"
#include "iclientmode.h"

// ASW HUD
#include "vgui\asw_vgui_info_message.h"
#include "vgui\FadeInPanel.h"
#include "vgui\asw_vgui_ingame_panel.h"
#include "asw_vgui_stylin_cam.h"
#include "asw_hud_crosshair.h"
#include "asw_hud_chat.h"
#include "PlayerListPanel.h"
#include "asw_vgui_frame.h"
#include "MedalCollectionPanel.h"
#include "CreditsPanel.h"
#include "CainMailPanel.h"
#include "asw_vgui_skip_intro.h"
#include "CampaignFrame.h"
#include "OutroFrame.h"
#include "MissionCompleteFrame.h"
#include "BriefingFrame.h"
#include "clientmode_asw.h"
#include "vgui\PlayerListContainer.h"
#include "asw_loading_panel.h"

// ASW Game
#include "c_asw_player.h"
#include "c_asw_game_resource.h"
#include "c_asw_objective.h"
#include "asw_marine_profile.h"
#include "c_asw_marine_resource.h"
#include "c_asw_marine.h"
#include "c_asw_mesh_emitter_entity.h"
#include "c_asw_generic_emitter_entity.h"
#include "asw_weapon_parse.h"
#include "c_asw_pickup.h"
#include "c_asw_door_area.h"
#include "asw_gamerules.h"
#include "asw_equipment_list.h"
#include "c_asw_weapon.h"
#include "asw_marineandobjectenumerator.h"
#include "asw_usableobjectsenumerator.h"
#include "c_asw_jeep_clientside.h"
#include "obstacle_pushaway.h"
#include "asw_shareddefs.h"
#include "asw_campaign_info.h"
#include "c_asw_voting_missions.h"
#include "c_asw_camera_volume.h"
#include "asw_medal_store.h"
#include "asw_remote_turret_shared.h"
#include "c_asw_snow_volume.h"
#include "c_asw_snow_emitter.h"
#include "asw_util_shared.h"
#include "c_asw_flare_projectile.h"
#include "c_asw_flamer_projectile.h"
#include "collisionutils.h"
#include "asw_input.h"
#include "c_asw_sentry_base.h"
#include "asw_weapon_sniper_rifle.h"
#include "asw_melee_system.h"
#include "c_asw_jukebox.h"
#include "missionchooser/iasw_mission_chooser.h"
#include "missionchooser/iasw_random_missions.h"

//MOD
#include "../c_mod_build_mission_map_for_next_mission.h"

#if defined( CASW_Player )
	#undef CASW_Player
#endif

// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"

extern ConVar asw_controls;
extern ConVar asw_marine_collision;
ConVar g_DrawPlayer("asw_drawplayermesh", "0", FCVAR_ARCHIVE, "Draw the player entity or not");
ConVar asw_clientside_avoidance("asw_clientside_avoidance", "1", FCVAR_CHEAT);
ConVar asw_debug_clientside_avoidance("asw_debug_clientside_avoidance", "0", FCVAR_CHEAT);
ConVar asw_clientside_avoidance_scale("asw_clientside_avoidance_scale", "1.0", FCVAR_CHEAT);
// stim cams: (p/y/r) (x/y/z)
// (0/-10/0)  (-60 60 30) - foot level forward looking
// (40/180/0) (50 0 70)	- close marine view cam
ConVar asw_stim_cam_pitch("asw_stim_cam_pitch", "10", 0, "Controls angle of the small in-picture Stim camera");
ConVar asw_stim_cam_yaw("asw_stim_cam_yaw", "15", 0, "Controls angle of the small in-picture Stim camera");
ConVar asw_stim_cam_roll("asw_stim_cam_roll", "0", 0, "Controls angle of the small in-picture Stim camera");
ConVar asw_stim_cam_x("asw_stim_cam_x", "-20", 0, "Controls offset of the small in-picture Stim camera");
ConVar asw_stim_cam_y("asw_stim_cam_y", "-30", 0, "Controls offset of the small in-picture Stim camera");
ConVar asw_stim_cam_z("asw_stim_cam_z", "70", 0, "Controls offset of the small in-picture Stim camera");
ConVar asw_stim_cam_rotate_speed("asw_stim_cam_rotate_speed", "0", 0, "Rotation speed of the stim camera");
ConVar asw_spinning_stim_cam("asw_spinning_stim_cam", "1", 0, "If set, slow motion will display a small spinning camera view");
ConVar asw_show_mouse_entity("asw_show_mouse_entity", "0", FCVAR_CHEAT, "Show entity under the mouse cursor");
ConVar asw_marine_switch_blend_speed("asw_marine_switch_blend_speed", "2.5", 0, "How quickly the camera blends between marines when switching");
ConVar asw_marine_switch_blend_max_dist("asw_marine_switch_blend_max_dist", "1500", 0, "Maximum distance apart marines can be for a camera blend to occur");

// default inventory convars
ConVar asw_default_primary_0("asw_default_primary_0", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_0("asw_default_secondary_0", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_0("asw_default_extra_0", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_1("asw_default_primary_1", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_1("asw_default_secondary_1", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_1("asw_default_extra_1", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_2("asw_default_primary_2", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_2("asw_default_secondary_2", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_2("asw_default_extra_2", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_3("asw_default_primary_3", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_3("asw_default_secondary_3", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_3("asw_default_extra_3", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_4("asw_default_primary_4", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_4("asw_default_secondary_4", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_4("asw_default_extra_4", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_5("asw_default_primary_5", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_5("asw_default_secondary_5", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_5("asw_default_extra_5", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_6("asw_default_primary_6", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_6("asw_default_secondary_6", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_6("asw_default_extra_6", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_7("asw_default_primary_7", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_7("asw_default_secondary_7", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_7("asw_default_extra_7", "-1", FCVAR_NONE, "Default extra equip for marine with this number");
ConVar asw_default_primary_8("asw_default_primary_8", "-1", FCVAR_NONE, "Default primary equip for marine with this number");
ConVar asw_default_secondary_8("asw_default_secondary_8", "-1", FCVAR_NONE, "Default secondary equip for marine with this number");
ConVar asw_default_extra_8("asw_default_extra_8", "-1", FCVAR_NONE, "Default extra equip for marine with this number");

ConVar asw_particle_count("asw_particle_count", "0", 0, "Shows how many particles are being drawn");
ConVar asw_dlight_list("asw_dlight_list", "0", 0, "Lists dynamic lights");

ConVar asw_stim_music( "asw_stim_music", "", FCVAR_ARCHIVE, "Custom music file used for stim music" );
ConVar asw_player_avoidance( "asw_player_avoidance", "1", FCVAR_CHEAT, "Enable/Disable player avoidance." );
ConVar asw_player_avoidance_force( "asw_player_avoidance_force", "1024", FCVAR_CHEAT, "Marine avoidance separation force." );
ConVar asw_player_avoidance_bounce( "asw_player_avoidance_bounce", "1.0", FCVAR_CHEAT, "Marine avoidance bounce." );
ConVar asw_player_avoidance_fakehull( "asw_player_avoidance_fakehull", "25.0", FCVAR_CHEAT, "Marine avoidance hull size." );

ConVar asw_roster_select_bypass_steam( "asw_roster_select_bypass_steam", "0", FCVAR_CHEAT, "Bypass checking if data has been downloaded from steam when selecting a Marine." );

void fnAutoReloadChangedCallback(IConVar *var, const char *pOldString, float flOldValue )
{
	if ( engine->IsInGame() )
	{
		engine->ClientCmd( VarArgs( "cl_autoreload %d\n", ((ConVar *)var)->GetInt() ) );
	}
}
ConVar asw_auto_reload("asw_auto_reload", "1", FCVAR_ARCHIVE, "Whether your marines should autoreload when reaching 0 bullets", true, 0, true, 1, fnAutoReloadChangedCallback);

ConVar asw_turret_fog_start("asw_turret_fog_start", "900", 0, "Fog start distance for turret view");
ConVar asw_turret_fog_end("asw_turret_fog_end", "1200", 0, "Fog end distance for turret view");

ConVar asw_fov_desired[] {
	ConVar("fov_desired_0", "0", FCVAR_ARCHIVE, "fov_desired when setting asw_controls to 0", true, 0, true, 90),
	ConVar("fov_desired_1", "0", FCVAR_ARCHIVE, "fov_desired when setting asw_controls to 1", true, 0, true, 90),
	ConVar("fov_desired_2", "0", FCVAR_ARCHIVE, "fov_desired when setting asw_controls to 2", true, 0, true, 90),
};

void ASW_Controls_Changed(IConVar *var, const char *pOldValue, float flOldValue);
ConVar asw_controls("asw_controls", "1", FCVAR_ARCHIVE, "Disable to get normal FPS controls (affects only you)", true, 0, true, 2, ASW_Controls_Changed);
void ASW_Controls_Changed(IConVar *var, const char *pOldValue, float flOldValue)
{
	if (!ASWGameRules())
		return;

	Assert(ASWInput());

	if (asw_controls.GetInt() == 0)
	{
		ASWInput()->CAM_ToFirstPerson();
	}
	else
	{
		ASWInput()->CAM_ToThirdPerson();
	}

	Assert(asw_controls.GetInt() < NELEMS(asw_fov_desired));
	float fov = asw_fov_desired[asw_controls.GetInt()].GetFloat();
	if (fov >= 1)
	{
		engine->ClientCmd_Unrestricted(VarArgs("fov_desired %f\n", fov));
	}

	if (engine->IsInGame())
	{
		engine->ClientCmd(VarArgs("cl_asw_controls %d\n", asw_controls.GetInt()));
	}
}

extern ConVar asw_allow_detach;
extern ConVar asw_stim_cam_time;
extern ConVar asw_rts_controls;
extern ConVar asw_hud_alpha;
extern ConVar asw_building_room_thumbnails;

// How fast to avoid collisions with center of other object, in units per second
#define AVOID_SPEED 2000.0f
extern ConVar cl_forwardspeed;
extern ConVar cl_backspeed;
extern ConVar cl_sidespeed;

{'fraction_non_alphanumeric': 0.11864027230383375, 'fraction_numerical': 0.016615908276603367, 'mean_word_length': 7.654651162790698, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2257355', 'n_tokens_mistral': 8500, 'n_tokens_neox': 8251, 'n_words': 1959}