Skip to content

Commit

Permalink
Fix SpeakConceptIfAllowed error from no active weapon
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo committed May 13, 2024
1 parent 605724c commit 90bce04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripting/randomizer/dhook.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,8 @@ public MRESReturn DHook_SpeakConceptIfAllowedPre(int iClient, DHookReturn hRetur
if (iConcept == MP_CONCEPT_KILLED_PLAYER)
{
int iActiveWeapon = GetEntPropEnt(iClient, Prop_Send, "m_hActiveWeapon");
if (iActiveWeapon == INVALID_ENT_REFERENCE)
return MRES_Ignored;

int iMode;
TF2Attrib_HookValueInt(iMode, "set_weapon_mode", iActiveWeapon);
Expand Down

0 comments on commit 90bce04

Please sign in to comment.