Skip to content

Commit

Permalink
game: fix bot doesn't received 2nd weapon, fixes #2565
Browse files Browse the repository at this point in the history
  • Loading branch information
Aranud authored and rafal1137 committed May 15, 2024
1 parent 59d98ca commit 08a17b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game/g_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,10 @@ void AddWeaponToPlayer(gclient_t *client, weapon_t weapon, int ammo, int ammocli
// skill handling
AddExtraSpawnAmmo(client, weapon);

#ifdef FEATURE_OMNIBOT
Bot_Event_AddWeapon(client->ps.clientNum, Bot_WeaponGameToBot(weapon));
#endif

// add alternative weapon if exist for primary weapon
if (GetWeaponTableData(weapon)->weapAlts)
{
Expand All @@ -1144,10 +1148,6 @@ void AddWeaponToPlayer(gclient_t *client, weapon_t weapon, int ammo, int ammocli
Bot_Event_AddWeapon(client->ps.clientNum, Bot_WeaponGameToBot(GetWeaponTableData(weapon)->weapAlts));
#endif
}

#ifdef FEATURE_OMNIBOT
Bot_Event_AddWeapon(client->ps.clientNum, Bot_WeaponGameToBot(weapon));
#endif
}

/**
Expand Down

0 comments on commit 08a17b3

Please sign in to comment.