redeclipse / base

Base environment for Red Eclipse and associated source files.
https://redeclipse.net/
436 stars 89 forks source link

Indicators and bot AI for weapon modes that heal #1439

Open MirceaKitsune opened 1 year ago

MirceaKitsune commented 1 year ago

When setting the weapon variables *selfdamage or *teamdamage to negative vales, a gun can be used to heal yourself or team mates. In the mod I'm working on which will includes redone weapon settings, this is being used on a few guns. It works but there are a few things RE isn't aware of when using this option:

  1. HUD: When you hover the crosshair over a team mate, the forbidden sign shows up so you know not to shoot. When team damage is enabled on one or both firing modes, it should be a healing sign of a different color (eg: green) to make it obvious you can heal allies using that mode.
  2. Bots, team healing: Bots should know to shoot allies with weapons that heal team members, also if a mode always heals by default (eg: *damage -100) they should never shoot enemies with that firing mode. Priority should probably depend on how damaged an ally is, so a bot only bothers if an ally is in danger otherwise focus on attacking foes or other objectives.
  3. Bots, self healing: Optional and less important. When a projectile with radius damage can be launched in the air or shot at a wall to heal yourself, bots should know to make use of this possibility: If a firing mode has negative self damage as well as a radius and the collision mask to allow hitting the owner, bots should look at the floor and shoot themselves when not busy to restore extra health. Be aware of regen / decay so bots don't get stuck healing endlessly to get 150 health when it decays back to 145 every second.