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

Drop the nade with illegal explode points if the thrower is dead #1201

Merged
merged 3 commits into from
Aug 21, 2023

Conversation

Emojigit
Copy link
Contributor

@Emojigit Emojigit commented Aug 10, 2023

Fixes #1160

This PR add checks to player HP before adding nades back to thrower's inventory. If the player is head, the nade is dropped at its explode point.

This PR is ready for review.

@farooqkz
Copy link
Contributor

Code LGTM and solves the problem. However, during testing, I discovered another bug :D #1203

@farooqkz
Copy link
Contributor

farooqkz commented Aug 12, 2023

Fixes #1160 Fixes #1203

This PR add checks to player HP before adding nades back to thrower's inventory. If the player is head, the nade is dropped at its explode point.

This PR is ready for review.

And if the player respawns before the nade lands, their HP is not zero and therefore the newly found bug(#1203) is not solved.

@LoneWolfHT
Copy link
Member

LoneWolfHT commented Aug 12, 2023

That bug can be solved in a separate PR if Emojigit wants

@Emojigit
Copy link
Contributor Author

That bug can be solved in a separate PR

The logic of solving #1203 may can also solve this problem, so they will be the same code. However, the fix isn't trivial, and I don't have a plan to work on it soon. This PR is able to merge, but the codes inside this PR may be replaced in the future.

@LoneWolfHT
Copy link
Member

I'll leave this for now then

@farooqkz
Copy link
Contributor

I'll leave this for now then

What do you mean?

That bug can be solved in a separate PR if Emojigit wants

Yeah no reason to make this PR wait.

@LoneWolfHT LoneWolfHT merged commit d58dd35 into MT-CTF:master Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The smoke and poison grenades vanish if thrown right before death near bases
3 participants