Restrict HUD tracking on players

- Gametyperules include both GTR_BUMPERS and
  GTR_CLOSERPLAYERS.
- Break the Capsules or Boss modes must not be active.
This commit is contained in:
James R 2023-02-23 01:06:07 -08:00
parent ec8e81ddb6
commit 368116bc59

View file

@ -2,6 +2,8 @@
#include <cstddef>
#include <vector>
#include "k_battle.h"
#include "k_boss.h"
#include "k_hud.h"
#include "m_fixed.h"
#include "p_local.h"
@ -229,6 +231,16 @@ void K_DrawTargetTracking(const TargetTracking& target)
bool is_player_tracking_target(const player_t *player)
{
if ((gametyperules & (GTR_BUMPERS|GTR_CLOSERPLAYERS)) != (GTR_BUMPERS|GTR_CLOSERPLAYERS))
{
return false;
}
if (battlecapsules || bossinfo.valid)
{
return false;
}
if (player == nullptr)
{
return false;