Skip to content

added arrow to target cave #189

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

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

added arrow to target cave #189

wants to merge 1 commit into from

Conversation

cryham
Copy link
Contributor

@cryham cryham commented Mar 29, 2025

I think it is even better around player, since you focus on sceen center and flying instead of looking at Hud above. But yeah looks a bit artificial

@@ -7,27 +7,35 @@ namespace caveexpress {
class TargetCaveMessage: public IProtocolMessage {
private:
uint8_t _targetCave; // 0 none, 100 stone
float _angle; // arrow angle to target cave -1 if none
Copy link
Owner

Choose a reason for hiding this comment

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

there is no need to send this as a 4 byte float value - uint16_t would be enough here.

@@ -154,6 +158,8 @@ void Player::update (uint32_t deltaTime)
{
IEntity::update(deltaTime);

sendTargetCaveAngle();
Copy link
Owner

Choose a reason for hiding this comment

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

doing this every frame is a waste of traffic. it would be better to send the position once the target cave is selected and do the whole arrow thing client side.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I don't know yet how to do it on client side, which files/classes would I need to edit?

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.

2 participants