Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
TYHH10 authored and TYHH10 committed Jul 9, 2024
1 parent f1e2435 commit 0eb1ec3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mod/attr/custom_attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1907,6 +1907,10 @@ namespace Mod::Attr::Custom_Attributes
if (arrow->m_bPenetrate && ToTFPlayer(ent) != nullptr && ToTFPlayer(ent)->m_Shared->IsInvulnerable() && ent->GetTeamNumber() == arrow->GetTeamNumber()) {
return true;
}
// Lazy crash fix to m_iWeaponId becoming garbage value somewhere
if (arrow->m_iWeaponId < 0 || arrow->m_iWeaponId > TF_WEAPON_COUNT+64) {
arrow->m_iWeaponId = TF_WEAPON_COMPOUND_BOW;
}
auto ret = DETOUR_MEMBER_CALL(bbox, ent);
if (!ret && bounce_speed_target == 0) {
float bounce_speed = 0;
Expand Down

0 comments on commit 0eb1ec3

Please sign in to comment.