Skip to content

Commit 58713d0

Browse files
committed
adjustments
1 parent 578a858 commit 58713d0

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

cfg/cs2fixes/cs2fixes.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cs2f_hide_enable 0 // Whether to enable hide (WARNING: randomly crashes cli
1313
cs2f_votemanager_enable 0 // Whether to enable votemanager features such as map vote fix, nominations, RTV and extends
1414
cs2f_trigger_timer_enable 0 // Whether to process countdown messages said by Console (e.g. Hold for 10 seconds) and append the round time where the countdown resolves
1515
cs2f_block_nav_lookup 0 // Whether to block navigation mesh lookup, improves server performance but breaks bot navigation
16-
cs2f_flashlight_enable 0 // Whether to enable flashlights
16+
cs2f_flashlight_enable 0 // Whether to enable flashlights (0=disabled, 1=light_barn flashlight, limited vertical movement, 2=particle flashlight, no cvar customization)
1717
cs2f_infinite_reserve_ammo 0 // Whether to enable infinite reserve ammo on weapons
1818
cs2f_disable_subtick_move 0 // Whether to disable subtick movement
1919
cs2f_disable_subtick_shooting 0 // Whether to disable subtick shooting, experimental (WARNING: add "log_flags Shooting +DoNotEcho" to your cfg to prevent console spam on every shot fired)
@@ -40,8 +40,8 @@ cs2f_flashlight_brightness 1.0 // How bright should flashlights be
4040
cs2f_flashlight_distance 54 // How far flashlights should be from the player's head (the default is such that an equipped awp doesn't block the light if shadows are enabled)
4141
cs2f_flashlight_angle 45.0 // How wide should the flashlight be in degrees
4242
cs2f_flashlight_color "255 255 255 0" // What color to use for flashlights
43-
cs2f_flashlight_attachment axis_of_intent // Which attachment to parent a flashlight to. If the player model is not properly setup, you might have to use clip_limit here instead
44-
cs2f_flashlight_particle "particles/cs2fixes/simple_flashlight.vpcf" //If set, ignore all other flashlight settings and spawn this particle as flashlight
43+
cs2f_flashlight_attachment "clip_limit" // Which attachment to parent a flashlight to
44+
cs2f_flashlight_particle "particles/cs2fixes/simple_flashlight.vpcf" // Path to flashlight particle
4545

4646
// Damage block settings
4747
cs2f_block_molotov_self_dmg 0 // Whether to block self-damage from molotovs

src/playermanager.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ CConVar<int> g_cvarAdminImmunityTargetting("cs2f_admin_immunity", FCVAR_NONE, "M
4646
CConVar<bool> g_cvarEnableMapSteamIds("cs2f_map_steamids_enable", FCVAR_NONE, "Whether to make Steam ID's available to maps", false);
4747

4848
ZEPlayerHandle::ZEPlayerHandle() :
49-
m_Index(INVALID_ZEPLAYERHANDLE_INDEX) {};
49+
m_Index(INVALID_ZEPLAYERHANDLE_INDEX){};
5050

5151
ZEPlayerHandle::ZEPlayerHandle(CPlayerSlot slot)
5252
{
@@ -163,14 +163,15 @@ void ZEPlayer::SetHideDistance(int distance)
163163
g_pUserPreferencesSystem->SetPreferenceInt(m_slot.Get(), HIDE_DISTANCE_PREF_KEY_NAME, distance);
164164
}
165165

166+
CConVar<int> g_cvarFlashLightEnable("cs2f_flashlight_enable", FCVAR_NONE, "Whether to enable flashlights (0=disabled, 1=light_barn flashlight, limited vertical movement, 2=particle flashlight, no cvar customization)", false);
166167
CConVar<bool> g_cvarFlashLightShadows("cs2f_flashlight_shadows", FCVAR_NONE, "Whether to enable flashlight shadows", true);
167168
CConVar<bool> g_cvarFlashLightTransmitOthers("cs2f_flashlight_transmit_others", FCVAR_NONE, "Whether to transmit other player's flashlights, recommended to have shadows off for this", false);
168169
CConVar<float> g_cvarFlashLightBrightness("cs2f_flashlight_brightness", FCVAR_NONE, "How bright should flashlights be", 1.0f);
169170
CConVar<float> g_cvarFlashLightDistance("cs2f_flashlight_distance", FCVAR_NONE, "How far flashlights should be from the player's head", 54.0f); // The minimum distance such that an awp wouldn't block the light
170171
CConVar<float> g_cvarFlashLightAngle("cs2f_flashlight_angle", FCVAR_NONE, "How wide should the flashlight be in degrees", 45.0f);
171172
CConVar<Color> g_cvarFlashLightColor("cs2f_flashlight_color", FCVAR_NONE, "What color to use for flashlights", Color(255, 255, 255));
172-
CConVar<CUtlString> g_cvarFlashLightAttachment("cs2f_flashlight_attachment", FCVAR_NONE, "Which attachment to parent a flashlight to. If the player model is not properly setup, you might have to use clip_limit here instead", "axis_of_intent");
173-
CConVar<CUtlString> g_cvarFlashLightParticle("cs2f_flashlight_particle", FCVAR_NONE, "If set, ignore all other flashlight settings and spawn this particle as flashlight", "");
173+
CConVar<CUtlString> g_cvarFlashLightAttachment("cs2f_flashlight_attachment", FCVAR_NONE, "Which attachment to parent a flashlight to. If the player model is not properly setup, you might have to use clip_limit here instead", "clip_limit");
174+
CConVar<CUtlString> g_cvarFlashLightParticle("cs2f_flashlight_particle", FCVAR_NONE, "If set, ignore all other flashlight settings and spawn this particle as flashlight", "particles/cs2fixes/simple_flashlight.vpcf");
174175

175176
void TeleportFlashLight(CCSPlayerPawn* pPawn, CBaseEntity* pLight, float flDistance = -1.f, QAngle angOverride = vec3_angle)
176177
{
@@ -241,7 +242,7 @@ void ZEPlayer::ToggleFlashLight()
241242
pController->EmitSoundFilter(filter, "HudChat.Message");
242243

243244
// particle flashlight
244-
if (g_cvarFlashLightParticle.Get().Length())
245+
if (g_cvarFlashLightEnable.Get() == 2)
245246
{
246247
pController->DispatchParticle(g_cvarFlashLightParticle.Get().String(), &filter);
247248
return;
@@ -951,8 +952,6 @@ void CPlayerManager::CheckInfractions()
951952
g_pAdminSystem->SaveInfractions();
952953
}
953954

954-
CConVar<bool> g_cvarFlashLightEnable("cs2f_flashlight_enable", FCVAR_NONE, "Whether to enable flashlights", false);
955-
956955
void CPlayerManager::FlashLightThink()
957956
{
958957
if (!g_cvarFlashLightEnable.Get() || !GetGlobals())

0 commit comments

Comments
 (0)