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

Grenade throw source position closer to center of screen #550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdamTadeusz
Copy link
Contributor

@AdamTadeusz AdamTadeusz commented Aug 6, 2024

Description

Toolchain

  • Windows MSVC VS2022

Linked Issues

@AdamTadeusz
Copy link
Contributor Author

https://github.com/user-attachments/assets/49315514-5ac1-4658-9cde-994ef9221bb6
355481342-c411bef7-f2f0-4fcd-b4ea-d8f867fa8162
Initial position of thrown grenade in this branch and the original game. Note pictures were taken with no angular velocity applied, as that seems to add some rotation to the initial grenade position when its spawned client side.

@AdamTadeusz
Copy link
Contributor Author

I can remove the -fixes #466 if there are other problems that we want to fix with the grenades. For example throwing from the same position at the same angle I notice some variation in how far the grenade flies, with there being almost no variation in the original

@Agiel
Copy link
Contributor

Agiel commented Aug 6, 2024

Idk why you're making it hard on yourself. The NT grenade code is right here https://github.com/NeotokyoRebuild/neo/blob/master/mp/src/game/shared/sdk/weapon_basesdkgrenade.cpp

@AdamTadeusz
Copy link
Contributor Author

Idk why you're making it hard on yourself. The NT grenade code is right here https://github.com/NeotokyoRebuild/neo/blob/master/mp/src/game/shared/sdk/weapon_basesdkgrenade.cpp

Far as I can tell thats the weapon_basesdkgrenade code, and using the values defined there results in different behaviour to the original

@Agiel
Copy link
Contributor

Agiel commented Aug 6, 2024

Far as I can tell thats the weapon_basesdkgrenade code

Which is what OGNT inherits from. Maybe grey tweaked some values, but behavior wise it'll give you parity.

edit: Sorry, I realized I probably should've put this in #466 instead of this PR.

@AdamTadeusz AdamTadeusz marked this pull request as draft August 6, 2024 16:59
@AdamTadeusz
Copy link
Contributor Author

The grenade's velocity indeed seems to correlate to the angle at which it was thrown , but I don't have the know how to measure the grenades thrown angle compared to the eyes angle or the velocity of the grenade in the original. I'll remove the fixes 466 and leave this pr as is

@AdamTadeusz AdamTadeusz marked this pull request as ready for review August 7, 2024 10:30
Copy link
Contributor

@brysondev brysondev left a comment

Choose a reason for hiding this comment

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

LGTM

@AdamTadeusz AdamTadeusz requested a review from a team August 15, 2024 12:02
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.

3 participants