merge pull request #321 from vladislav4kz/patch-2

fix: prevent dropping weapons on "Drop C4" command
This commit is contained in:
jeefo 2022-03-22 14:03:16 +03:00 committed by GitHub
commit bb839a9c80
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");
}