@@ -3804,18 +3804,27 @@ namespace ReactiveDropInventory
38043804
38053805 if ( !ASWDeathmatchMode () )
38063806 {
3807- // Alien Kill Streak reset after marine death
3808- if ( bKilled && pTarget && pTarget->IsInhabitableNPC () )
3809- s_RD_Inventory_Manager.IncrementStrangePropertyOnEquippedItems ( assert_cast<CASW_Inhabitable_NPC*>( pTarget ), 5007 , 0 , 0 , false );
3807+ if ( !pTarget )
3808+ return ;
3809+
3810+ // Reset the Alien Kill Streak of the player inhabiting this NPC when that NPC dies, regardless of the source of damage
3811+ if ( pTarget->IsInhabitableNPC () && bKilled )
3812+ {
3813+ CASW_Inhabitable_NPC *pInhabitableTarget = assert_cast<CASW_Inhabitable_NPC *>( pTarget );
3814+ if ( pInhabitableTarget->IsInhabited () )
3815+ s_RD_Inventory_Manager.IncrementStrangePropertyOnEquippedItems ( pInhabitableTarget, 5007 , 0 , 0 , false );
3816+ }
38103817
3811- if ( !pAttacker || !pTarget )
3818+ if ( !pAttacker )
38123819 return ;
3813-
3820+
38143821 if ( bKilled && pWeapon
3815- && pAttacker->IsInhabitableNPC ()
3816- && pTarget->IsAlien () )
3822+ && pTarget->IsAlien ()
3823+ && pAttacker->IsInhabitableNPC ()
3824+ && pAttacker != pTarget
3825+ )
38173826 {
3818- CASW_Inhabitable_NPC* pInhabitableAttacker = assert_cast<CASW_Inhabitable_NPC*>( pAttacker );
3827+ CASW_Inhabitable_NPC * pInhabitableAttacker = assert_cast<CASW_Inhabitable_NPC *>( pAttacker );
38193828 if ( pInhabitableAttacker->IsInhabited () )
38203829 {
38213830 s_RD_Inventory_Manager.IncrementStrangePropertiesForWeapon ( pInhabitableAttacker, pWeapon, 5002 , 1 ); // Aliens Killed
@@ -3824,18 +3833,18 @@ namespace ReactiveDropInventory
38243833 }
38253834 }
38263835
3827- if ( !V_stricmp ( IGameSystem::MapName (), " rd-reduction2 " )
3828- && !pAttacker ->IsInhabitableNPC ()
3829- && !V_strcmp ( STRING ( pAttacker-> GetEntityName () ) , " trigger_pitworm_hitbox " )
3830- && pTarget-> IsInhabitableNPC ( ) )
3836+ if ( !pAttacker-> IsInhabitableNPC ( )
3837+ && pTarget ->IsInhabitableNPC ()
3838+ && !V_stricmp ( IGameSystem::MapName () , " rd-reduction2 " )
3839+ && ! V_strcmp ( STRING ( pAttacker-> GetEntityName () ), " trigger_pitworm_hitbox " ) )
38313840 {
3832- CASW_Inhabitable_NPC *pTargetNPC = assert_cast< CASW_Inhabitable_NPC * >( pTarget );
3833- if ( pTargetNPC ->IsInhabited () )
3841+ CASW_Inhabitable_NPC *pInhabitableTarget = assert_cast<CASW_Inhabitable_NPC *>( pTarget );
3842+ if ( pInhabitableTarget ->IsInhabited () )
38343843 {
3835- s_RD_Inventory_Manager.IncrementStrangePropertyOnEquippedItems ( pTargetNPC , 42 , 1 );
3844+ s_RD_Inventory_Manager.IncrementStrangePropertyOnEquippedItems ( pInhabitableTarget , 42 , 1 );
38363845#ifdef CLIENT_DLL
38373846 static bool s_bRequestedWormToucherMedal = false ;
3838- if ( !s_bRequestedWormToucherMedal && pTargetNPC ->GetCommander () && pTargetNPC ->GetCommander ()->IsLocalPlayer () )
3847+ if ( !s_bRequestedWormToucherMedal && pInhabitableTarget ->GetCommander () && pInhabitableTarget ->GetCommander ()->IsLocalPlayer () )
38393848 {
38403849 AddPromoItem ( 42 );
38413850 s_bRequestedWormToucherMedal = true ;
@@ -3850,11 +3859,15 @@ namespace ReactiveDropInventory
38503859 && pAttacker && pTarget
38513860 && pAttacker != pTarget
38523861 && pAttacker->IsInhabitableNPC ()
3853- && pTarget->Classify () == (Class_T) CLASS_ASW_MARINE )
3862+ && pTarget->IsInhabitableNPC () )
38543863 {
38553864 CASW_Inhabitable_NPC *pInhabitableAttacker = assert_cast<CASW_Inhabitable_NPC *>( pAttacker );
3856- s_RD_Inventory_Manager.IncrementStrangePropertiesForWeapon ( pInhabitableAttacker, pWeapon, 5009 , 1 ); // Deathmatch Kills
3857- s_RD_Inventory_Manager.IncrementStrangePropertiesForWeapon ( pInhabitableAttacker, pWeapon, 5011 , 1 ); // Deathmatch Kills (Twitch)
3865+ CASW_Inhabitable_NPC *pInhabitableTarget = assert_cast<CASW_Inhabitable_NPC *>( pTarget );
3866+ if ( pInhabitableAttacker->IsInhabited () && pInhabitableTarget->IsInhabited () )
3867+ {
3868+ s_RD_Inventory_Manager.IncrementStrangePropertiesForWeapon ( pInhabitableAttacker, pWeapon, 5009 , 1 ); // Deathmatch Kills
3869+ s_RD_Inventory_Manager.IncrementStrangePropertiesForWeapon ( pInhabitableAttacker, pWeapon, 5011 , 1 ); // Deathmatch Kills (Twitch)
3870+ }
38583871 }
38593872 }
38603873 }
0 commit comments