fix: prevent dropping weapons on "Drop C4" command

This commit is contained in:
Владислав Сухов 2022-03-20 15:43:05 +06:00 committed by GitHub
commit 45992e3044
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5378,11 +5378,11 @@ void Bot::dropWeaponForUser (edict_t *user, bool discardC4) {
m_aimFlags |= AimFlags::Entity;
m_lookAt = user->v.origin;
if (discardC4) {
if (discardC4 && m_hasC4) {
selectWeaponByName ("weapon_c4");
issueCommand ("drop");
}
else {
else if (!discardC4) {
selectBestWeapon ();
issueCommand ("drop");
}