MysteriousMilk / NS2_CombatPlusPlus

Recreation of Natural Selection Combat mode with with some tweaks and enhancements.
MIT License
6 stars 5 forks source link

Grant XP to players when their nearby teammate gets a kill #26

Closed keatsandyeats closed 6 years ago

keatsandyeats commented 6 years ago

When a player kills an enemy player, all teammates of the killer within kNearbyKillXPDistance will receive some XP, determined by kNearbyKillXPModifier. The killer does not receive this XP.

Adds the above two constants to CPPBalance.lua. Adds CombatScoreMixin.AddCombatAssistKill

Note that kXPSourceType is still Kill for these nearby kills. Adds a new source of XP, kXPSourceType.Nearby.

Fixes #22

keatsandyeats commented 6 years ago

Adding another XP type seemed like a design decision that I figured you'd want to make yourself, especially since you were so specific about everything else in that issue. That's why I didn't add to that enum, and instead just pointed it out above. But I'll add that in.

Any choices I make about the notifications (color, position, etc.) would be shit and require you to rewrite them. I assumed it'd be easier for you to add them yourself instead of looking through what I wrote to make it better. But now that I'm actually looking at the code, it seems like all the non-damage XP notifications go in the same spot and simultaneous notifications are not shown. So I will add a simple notification as you suggest.

MysteriousMilk commented 6 years ago

all the non-damage XP notifications go in the same spot and simultaneous notifications are not shown

I was thinking about this as well. Should I try to show simultaneous notifications? I think most of the time with the "nearby kill" feature, if you at least get a shot in, you'll also get the assist xp and one will always overshadow the other.

One option would also be to not show an xp notification for "nearby kills". But I'm not opposed to updating the xp notification GUI to make it better. I want to move that code off into it's own GUI script anyway so that there will be no conflicts with the GUINotifications.lua (I believe NS2+ hooks into that as well).