Skip to content

Grenade throw source position closer to center of screen#550

Merged
AdamTadeusz merged 1 commit intoNeotokyoRebuild:masterfrom
AdamTadeusz:025_grenadeThrownFromCloserToCenter
Sep 28, 2024
Merged

Grenade throw source position closer to center of screen#550
AdamTadeusz merged 1 commit intoNeotokyoRebuild:masterfrom
AdamTadeusz:025_grenadeThrownFromCloserToCenter

Conversation

@AdamTadeusz
Copy link
Copy Markdown
Contributor

@AdamTadeusz AdamTadeusz commented Aug 6, 2024

Description

Toolchain

  • Windows MSVC VS2022

Linked Issues

@AdamTadeusz
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@AdamTadeusz AdamTadeusz merged commit 09f9c68 into NeotokyoRebuild:master Sep 28, 2024
@AdamTadeusz AdamTadeusz deleted the 025_grenadeThrownFromCloserToCenter branch September 28, 2024 19:14
@Rainyan Rainyan mentioned this pull request Sep 22, 2025
2 tasks
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.

4 participants