-
Notifications
You must be signed in to change notification settings - Fork 94
Add grenades mod #357
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
Add grenades mod #357
Conversation
|
I'm okay with not adding flashbang - it's not necessary. Will test soon. Is there anything I should look out for? Anything I should test more carefully? |
Mainly physics. I'm not sure what looks fine and what doesn't. Or how far it should be possible to throw them |
|
|
Didn't we want to convert shooter into a submodule? I suggest to simply unregister shooter's grenade in this mod here. |
That doesn't seem to be happening anytime soon, unfortunately. Until that PR is merged, we'd end up with two grenades. But on second thought, this PR removes grenade's treasure registration, which means that players won't be able to obtain it anyway. That's fine too. |
I did actually mean to completely remove the shooter mod grenade entirely by using |
I was basing it off of the speed a rock flies when I throw it
I thought 3 seconds was what it was for real life. But upon googling I got this:
Changed to 4 seconds for the same reason lol
Changed to 45 |
|
Awesome, will test again soon ™️. |
(-m/2) - (dir.y*2)This little bit of code reduces/increases the weight of the grenades depending on how far up/down the player is looking. I can remove if you don't like the effect |
Interesting, will test. |
|
I'm sorry, but the new behaviour seems to be inconsistent. Ideally, the initial velocity should be very high, and the acceleration, simulating air resistance and gravity, should be updated every step. The x and the z components of acceleration should be set to |
|
I'll make those changes once I get on my computer. How does 'grenades:frag' sound? |
|
The code for slowing the grenade velocity is on line 65+ |
|
@ClobberXD I've mostly forgotten how you wanted the grenade physics. I went and watched some videos of grenades being thrown and used that to base how the grenade physics work |
|
The frag grenade's sound can still be improved. Currently, it's somewhat softer, more like a cannon firing, and there's also another sound being played in the background some where at the middle. (Sounds to me like an empty shell falling on a hard floor) |
…eded to trigger bounce
|
Ton of commits lol. Should be rebased though |
This reverts commit 05dd6ff.
|
Thanks for shedding blood and tears to rebase this PR. ;) @LoneWolfHT Please also note the following:
|
|
Had some old code to account for increased grenade speed |
ClobberXD
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is as good as it can get, IMO. We can always improve upon this if required.
For now, this PR seems merge-worthy to me. Good work 👍
I broke #279 when rebasing it so here's the updated PR
This PR only adds smoke/regular grenades. It'll be a bit of a hassle to do a flashbang grenade. So I decided to leave that for later
Todo:
Find bugs pls