Skip to content

Commit c672711

Browse files
committed
viewmodel goldsrc viewbob
1 parent aea2675 commit c672711

File tree

6 files changed

+55
-8
lines changed

6 files changed

+55
-8
lines changed

game/mod_tf/cfg/user_default.scr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ DESCRIPTION INFO_OPTIONS
657657
"#TF_backgroundmap_music_mix"
658658
"#Tooltip_backgroundmap_music_mix"
659659
{ SLIDER 0 1 }
660-
{ "0.65" }
660+
{ "1.0" }
661661
}
662662

663663
"hud_takesshots"

game/quiver/cfg/user_default.scr

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ DESCRIPTION INFO_OPTIONS
659659
"#TF_backgroundmap_music_mix"
660660
"#Tooltip_backgroundmap_music_mix"
661661
{ SLIDER 0 1 }
662-
{ "0.65" }
662+
{ "1.0" }
663663
}
664664

665665
"hud_takesshots"
@@ -702,6 +702,18 @@ DESCRIPTION INFO_OPTIONS
702702
{ "0" }
703703
}
704704

705+
"viewmodel_goldsource_stylebob"
706+
{
707+
"#GameUI_ViewModelBob_Goldsrc"
708+
"#Tooltip_ViewModelBob_Goldsrc"
709+
{ LIST
710+
"#gameui_disabled" "0"
711+
"#GameUI_ViewModelBob_Goldsrc_Steam" "1"
712+
"#GameUI_ViewModelBob_Goldsrc_WON" "2"
713+
}
714+
{ "0" }
715+
}
716+
705717
"cl_spraydisable"
706718
{
707719
"#GameUI_DisableSprays"

game/quiver/info_changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Quiver Private Alpha 1.1.0 (WIP):
4242
- All Australium weapons will now turn players gold.
4343
- Set tf_mm_next_map_vote_time from 30s to 15s (From the Summer 2025 update).
4444
- Updated the item schema to support Summer 2025 items.
45+
- Added Goldsource-styled viewmodel bobbing.
4546
- Added the following Source SDK Pull Requests:
4647
- #1437: MvM: Fix Explosive Headshot working on invulnerable target
4748
- #1440: Treat being in background map as not in-game
706 Bytes
Binary file not shown.

src/game/client/cdll_client_int.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static ConVar s_cl_class("cl_class", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "D
346346
#ifdef BDSBASE
347347
ConVar cl_backgroundmap_music("cl_backgroundmap_music", "1", FCVAR_ARCHIVE);
348348
ConVar cl_backgroundmap_music_volume("cl_backgroundmap_music_volume", "1.0", FCVAR_ARCHIVE);
349-
ConVar cl_backgroundmap_music_duck("cl_backgroundmap_music_duck", "0.65", FCVAR_ARCHIVE);
349+
ConVar cl_backgroundmap_music_duck("cl_backgroundmap_music_duck", "1.0", FCVAR_ARCHIVE);
350350

351351
#ifdef BDSBASE_DISCORD
352352
#ifdef WIN32

src/game/shared/tf/tf_weaponbase.cpp

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ ConVar tf_scout_hype_pep_min_damage( "tf_scout_hype_pep_min_damage", "5.0", FCVA
8484

8585
ConVar tf_weapon_criticals_nopred( "tf_weapon_criticals_nopred", "1.0", FCVAR_REPLICATED | FCVAR_CHEAT );
8686

87+
#if defined(QUIVER_DLL)
88+
ConVar viewmodel_goldsource_stylebob("viewmodel_goldsource_stylebob", "0", FCVAR_ARCHIVE | FCVAR_REPLICATED);
89+
#endif
90+
8791
#ifdef _DEBUG
8892
ConVar tf_weapon_criticals_anticheat( "tf_weapon_criticals_anticheat", "1.0", FCVAR_REPLICATED );
8993
ConVar tf_weapon_criticals_debug( "tf_weapon_criticals_debug", "0.0", FCVAR_REPLICATED );
@@ -4953,18 +4957,48 @@ void AddViewModelBobHelper( Vector &origin, QAngle &angles, BobState_t *pBobStat
49534957
Vector forward, right;
49544958
AngleVectors( angles, &forward, &right, NULL );
49554959

4960+
#if defined(QUIVER_DLL)
4961+
if (viewmodel_goldsource_stylebob.GetInt() == 0)
4962+
{
4963+
// Apply bob, but scaled down to 40%
4964+
VectorMA(origin, pBobState->m_flVerticalBob * 0.4f, forward, origin);
4965+
4966+
// Z bob a bit more
4967+
origin[2] += pBobState->m_flVerticalBob * 0.1f;
4968+
4969+
// bob the angles
4970+
angles[ROLL] += pBobState->m_flVerticalBob * 0.5f;
4971+
angles[PITCH] -= pBobState->m_flVerticalBob * 0.4f;
4972+
angles[YAW] -= pBobState->m_flLateralBob * 0.3f;
4973+
4974+
VectorMA(origin, pBobState->m_flLateralBob * 0.2f, right, origin);
4975+
}
4976+
else
4977+
{
4978+
if (viewmodel_goldsource_stylebob.GetInt() > 1)
4979+
{
4980+
// throw in a little tilt.
4981+
angles[ROLL] -= pBobState->m_flVerticalBob * 1;
4982+
angles[PITCH] -= pBobState->m_flVerticalBob * 0.3;
4983+
angles[YAW] -= pBobState->m_flVerticalBob * 0.5;
4984+
}
4985+
4986+
VectorMA(origin, pBobState->m_flVerticalBob * 0.8f, forward, origin);
4987+
}
4988+
#else
49564989
// Apply bob, but scaled down to 40%
4957-
VectorMA( origin, pBobState->m_flVerticalBob * 0.4f, forward, origin );
4990+
VectorMA(origin, pBobState->m_flVerticalBob * 0.4f, forward, origin);
49584991

49594992
// Z bob a bit more
49604993
origin[2] += pBobState->m_flVerticalBob * 0.1f;
49614994

49624995
// bob the angles
4963-
angles[ ROLL ] += pBobState->m_flVerticalBob * 0.5f;
4964-
angles[ PITCH ] -= pBobState->m_flVerticalBob * 0.4f;
4965-
angles[ YAW ] -= pBobState->m_flLateralBob * 0.3f;
4996+
angles[ROLL] += pBobState->m_flVerticalBob * 0.5f;
4997+
angles[PITCH] -= pBobState->m_flVerticalBob * 0.4f;
4998+
angles[YAW] -= pBobState->m_flLateralBob * 0.3f;
49664999

4967-
VectorMA( origin, pBobState->m_flLateralBob * 0.2f, right, origin );
5000+
VectorMA(origin, pBobState->m_flLateralBob * 0.2f, right, origin);
5001+
#endif
49685002
}
49695003

49705004
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)