Skip to content

Commit

Permalink
Merge branch 'all-in-one-vs2022' into all-in-one-vs2022-wpo
Browse files Browse the repository at this point in the history
  • Loading branch information
themrdemonized committed Jan 17, 2025
2 parents 42860a4 + 9e2e978 commit 8cd3389
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ How to compile exes:
6. For successful compilation, **the latest build tools with MFC and ATL libraries is required**
## Changelog
**2025.01.17**
* Possibility to set `fire_point_silencer` for weapons. Adjust fire point when silencer is attached, defaults to the value of fire_point
**2025.01.18**
* Possibility to set `fire_point_silencer` for weapons. Adjust fire point when silencer is attached, defaults to the value of fire_point. Supports both HUD and world models
**2025.01.13**
* privatepirate: Fixed HDR Settings UI
Expand Down
2 changes: 1 addition & 1 deletion gamedata/scripts/ltx_help_ex.script
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
base_hud_offset_rot - Editable variables that allow weapon position adjustements that don't require aim tweaks
base_hud_offset_rot_16x9 - Editable variables that allow weapon position adjustements that don't require aim tweaks
silenced_tracers - Option to disable silencers hiding the tracer on a per weapon basis
fire_point_silencer - Adjust fire point when silencer is attached, defaults to the value of fire_point
fire_point_silencer - Adjust fire point when silencer is attached, defaults to the value of fire_point. Supports both HUD and world models
Grenades
frags_ap - AP power for shrapnel
Expand Down
7 changes: 7 additions & 0 deletions src/xrGame/Weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@ void CWeapon::UpdateFireDependencies_internal()
Fvector& fp = vLoadedFirePoint;
Fvector& fp2 = vLoadedFirePoint2;
Fvector& sp = vLoadedShellPoint;
Fvector& fps = vLoadedFirePointSilencer;

parent.transform_tiny(m_current_firedeps.vLastFP, fp);
parent.transform_tiny(m_current_firedeps.vLastFP2, fp2);
parent.transform_tiny(m_current_firedeps.vLastSP, sp);
parent.transform_tiny(m_current_firedeps.vLastFPSilencer, fps);

m_current_firedeps.vLastFD.set(0.f, 0.f, 1.f);
parent.transform_dir(m_current_firedeps.vLastFD);
Expand Down Expand Up @@ -658,6 +660,11 @@ void CWeapon::Load(LPCSTR section)
else
vLoadedFirePoint2 = vLoadedFirePoint;

if (pSettings->line_exist(section, "fire_point_silencer"))
vLoadedFirePointSilencer = pSettings->r_fvector3(section, "fire_point_silencer");
else
vLoadedFirePointSilencer = vLoadedFirePoint;

// hands
eHandDependence = EHandDependence(pSettings->r_s32(section, "hand_dependence"));
m_bIsSingleHanded = true;
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/Weapon.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ class CWeapon : public CHudItemObject,
//çàãðóæàåìûå ïàðàìåòðû
Fvector vLoadedFirePoint;
Fvector vLoadedFirePoint2;
Fvector vLoadedFirePointSilencer;
bool m_bCanBeLowered;

private:
Expand Down
1 change: 1 addition & 0 deletions src/xrGame/player_hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ void attachable_hud_item::setup_firedeps(firedeps& fd)
Fmatrix& fire_mat = m_model->LL_GetTransform(m_measures.m_fire_bone_silencer);
fire_mat.transform_tiny(fd.vLastFPSilencer, m_parent->m_adjust_mode ? m_parent->m_adjust_firepoint_shell[0][0] : m_measures.m_fire_point_silencer);
m_item_transform.transform_tiny(fd.vLastFPSilencer);
fd.vLastFD.set(m_parent->m_adjust_mode ? m_parent->m_adjust_firepoint_shell[1][0] : m_measures.m_fire_direction);
VERIFY(_valid(fd.vLastFPSilencer));
}

Expand Down

0 comments on commit 8cd3389

Please sign in to comment.