Skip to content

Commit fefebb5

Browse files
authored
Bots place player pings when engaging enemy (#1902)
* Bots place player pings when engaging enemy * Skip text notification for bot pings
1 parent 45329f5 commit fefebb5

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/game/client/neo/ui/neo_hud_player_ping.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,14 @@ void CNEOHud_PlayerPing::NotifyPing(const int playerSlot)
364364

365365
if (cl_neo_player_pings_chat_message.GetBool())
366366
{
367-
CBaseHudChat* hudChat = (CBaseHudChat*)GET_HUDELEMENT(CHudChat);
368-
if (hudChat)
367+
// Skip text notification for bots
368+
if (g_PR && !g_PR->IsFakePlayer(playerSlot + 1))
369369
{
370-
hudChat->ChatPrintf(0, CHAT_FILTER_NONE, "%s pinged a location\n", pPlayer->GetNeoPlayerName());
370+
CBaseHudChat* hudChat = (CBaseHudChat*)GET_HUDELEMENT(CHudChat);
371+
if (hudChat)
372+
{
373+
hudChat->ChatPrintf(0, CHAT_FILTER_NONE, "%s pinged a location\n", pPlayer->GetNeoPlayerName());
374+
}
371375
}
372376
}
373377

src/game/server/neo/bot/behavior/neo_bot_behavior.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,8 @@ void CNEOBotMainAction::FireWeaponAtEnemy( CNEOBot *me )
887887

888888
if (bOnTarget)
889889
{
890+
me->PressSpecialFireButton(); // place a player ping to alert friends
891+
890892
if (bThreatIsGhoster)
891893
{
892894
me->GetBodyInterface()->AimHeadTowards(vShootablePos, IBody::CRITICAL, 1.0f, nullptr,

0 commit comments

Comments
 (0)