Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SwitchTeam): add of bomb removal on team switch #895

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Javekson
Copy link
Contributor

No description provided.

m_bHasC4 = false;
pev->body = 0;
SetBombIcon(FALSE);
SetProgressBarTime(0);
Copy link

@justgo97 justgo97 Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pPlayer->m_bHasC4 = false;
pPlayer->pev->body = 0;
pPlayer->SetBombIcon(FALSE);
pPlayer->SetProgressBarTime(0);

You probably can remove these 4 lines since RemovePlayerItemEx already has them. also the bRemoveAmmo param of RemovePlayerItemEx can be set to false since we are dealing with an item that has no ammo.

Copy link
Contributor Author

@Javekson Javekson Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback! I'll remove the suggested 4 lines. Regarding bRemoveAmmo, I'll keep it as true because in certain non-standard scenarios or mods, there might be a possibility of having ammo reserves for the bomb. I've tested this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants