-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/missile pos other clients #127
Conversation
WalkthroughThe changes primarily focus on improving missile positioning in the game. The Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- src/Client/Systems/Events/EventsSystems.cpp (2 hunks)
- src/ECS/Systems/BulletsSystems.cpp (3 hunks)
- src/ECS/Systems/Systems.hpp (1 hunks)
Files skipped from review due to trivial changes (2)
- src/ECS/Systems/BulletsSystems.cpp
- src/ECS/Systems/Systems.hpp
Additional comments: 2
src/Client/Systems/Events/EventsSystems.cpp (2)
85-109: The
adjustMissilePosition
function has been updated to include a new parametermissileTypes_e typeOfMissile
. This function now uses collision rect data from a JSON object to adjust missile positions. The function also uses the newgetMissileId
function to get the missile ID from the missile type. Ensure that all calls to this function throughout the codebase have been updated to match the new signature and that the JSON object contains the necessary data. Also, verify that thegetMissileId
function is correctly implemented and returns the expected results.132-136: The
adjustMissilePosition
function is now used inplayerShootBullet
to adjust the missile position before creating and sending a bullet message. This replaces the previousadjustPlayerBulletPosition
function. Ensure that this change does not affect the game's functionality and that the missile positions are correctly adjusted.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- src/Client/Systems/Events/EventsSystems.cpp (2 hunks)
Additional comments: 2
src/Client/Systems/Events/EventsSystems.cpp (2)
85-109: The
adjustMissilePosition
function has been updated to include a new parametermissileTypes_e typeOfMissile
. This function now adjusts missile positions based on collision rect data from a JSON object, improving the accuracy of missile positioning. The function also uses the newgetMissileId
function to get the missile ID from the missile type. Ensure that the JSON object contains the correct data for each missile type and that thegetMissileId
function correctly identifies each missile type.132-136: The
playerShootBullet
function has been updated to replace theadjustPlayerBulletPosition
function with a call toadjustMissilePosition
, ensuring consistent missile positioning before creating and sending a bullet message. This change should improve the accuracy of missile positioning in the game.
What is the current behavior? (link an issue based on the kind of change this pr introduce)
What is the new behavior (if this is a feature change)?
Other information:
Summary by CodeRabbit
Please note, these changes are under-the-hood improvements and won't result in noticeable visual changes in the game interface. However, they contribute to a smoother and more responsive gaming experience.