Skip to content

Commit 7274aeb

Browse files
committed
Refactor: OnHitConfirm
1 parent 51bd748 commit 7274aeb

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/game/shared/swarm/rd_inventory_shared.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,11 +3799,9 @@ namespace ReactiveDropInventory
37993799
if ( engine->IsPlayingDemo() )
38003800
return;
38013801
#endif
3802-
CASW_Game_Resource *pGameResource = ASWGameResource();
3803-
if ( !pGameResource )
3804-
return;
3805-
3806-
if ( !pAttacker || !pTarget )
3802+
if ( !ASWGameResource()
3803+
|| !pAttacker
3804+
|| !pTarget )
38073805
return;
38083806

38093807
if ( !ASWDeathmatchMode() )
@@ -3824,6 +3822,7 @@ namespace ReactiveDropInventory
38243822
&& pTarget->IsInhabitableNPC() )
38253823
{
38263824
CASW_Inhabitable_NPC *pTargetNPC = assert_cast< CASW_Inhabitable_NPC * >( pTarget );
3825+
s_RD_Inventory_Manager.IncrementStrangePropertyOnEquippedItems( pTargetNPC, 42, 1 );
38273826

38283827
#ifdef CLIENT_DLL
38293828
static bool s_bRequestedWormToucherMedal = false;
@@ -3833,9 +3832,6 @@ namespace ReactiveDropInventory
38333832
s_bRequestedWormToucherMedal = true;
38343833
}
38353834
#endif
3836-
s_RD_Inventory_Manager.IncrementStrangePropertyOnEquippedItems( pTargetNPC, 42, 1 );
3837-
3838-
return;
38393835
}
38403836
}
38413837
else

0 commit comments

Comments
 (0)