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

fix: Make pets behave more accurately to Live #1305

Draft
wants to merge 100 commits into
base: main
Choose a base branch
from

Conversation

jadebenn
Copy link
Collaborator

Working on making the pets behave more like they did in live. Want to fix #536, #984, and #1241. As of this draft's posting, I have very roughly managed to get the treasure dig behavior prompt to appear as in Live. Still need to work on cleaning up the code and getting the functionality nailed-down better.

2023-11-18.18-32-01_output.mp4

@aronwk-aaron aronwk-aaron changed the title FIX: Make pets behave more accurately to Live fix: Make pets behave more accurately to Live Nov 19, 2023
Copy link
Collaborator Author

@jadebenn jadebenn left a comment

Choose a reason for hiding this comment

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

Note to self: The pet taming minigame is currently broken on success. Fix!

@jadebenn jadebenn self-assigned this Apr 20, 2024
@jadebenn
Copy link
Collaborator Author

I'm pretty happy with where this is functionality-wise. Opening this for review.

@jadebenn jadebenn marked this pull request as ready for review December 14, 2024 23:53
@jadebenn
Copy link
Collaborator Author

never-mind, still needs some extra time in the oven

@jadebenn jadebenn marked this pull request as draft December 15, 2024 00:19
Copy link
Collaborator

@EmosewaMC EmosewaMC left a comment

Choose a reason for hiding this comment

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

only 1 required change regarding OnUse vs EntityEnter. aside from that the pr looks good, though there are a lot of changes to its hard to try and think of all implications of the changes, but i know you're testing this a lot and theres not too much to check so it should be a-ok.

dGame/dGameMessages/GameMessages.h Outdated Show resolved Hide resolved
@@ -258,8 +316,7 @@ void PetComponent::OnUse(Entity* originator) {
GameMessages::SendNotifyPetTamingPuzzleSelected(originator->GetObjectID(), bricks, originator->GetSystemAddress());

m_Tamer = originator->GetObjectID();
SetStatus(5);
Game::entityManager->SerializeEntity(m_Parent);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this being serialized elsewhere in here to let clients know of the change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let me do some testing to verify

dGame/dComponents/PetComponent.cpp Outdated Show resolved Hide resolved
@@ -3593,6 +3606,33 @@ void GameMessages::SendBouncerActiveStatus(LWOOBJID objectId, bool bActive, cons
SEND_PACKET;
}

void GameMessages::SendRequestClientBounce(const LWOOBJID objectId, const LWOOBJID bounceTargetId, const NiPoint3& bounceTargetPos, const NiPoint3& bouncedObjLinVel, const LWOOBJID& requestSourceId, const bool bAllBounced, const bool bAllowClientOverload, const SystemAddress& sysAddr) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A bit of a note: I'm not sure how to test this with multiple players on my own. I can verify it works for one only.

Copy link
Collaborator

Choose a reason for hiding this comment

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

you can launch multiple game clients on your computer at once to test this, if you're physically unable to I can test it

@@ -3547,7 +3560,7 @@ void GameMessages::SendShowPetActionButton(const LWOOBJID objectId, const ePetAb
bitStream.Write(petAbility);
bitStream.Write(bShow);

if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST; // TODO: Don't think this should ever be broadcasted, need to confirm
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, is this comment accurate?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ill take a look

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.

BUG: Pet Bouncer incomplete implementation
4 participants