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

/slap is unable to hit rightwards #2941

Open
Arthri opened this issue May 7, 2023 · 0 comments
Open

/slap is unable to hit rightwards #2941

Arthri opened this issue May 7, 2023 · 0 comments

Comments

@Arthri
Copy link
Contributor

Arthri commented May 7, 2023

  • TShock version: 5.1.3
  • TShock build number (if known): not known

Reproduction steps (if applicable)?

  1. /slap player
  2. /slap player
  3. /slap player
  4. Player is only takes left knockback or none

Any stack traces or error messages (if known)?

N/A

Any screenshots?

f

plr.DamagePlayer(damage);

NetMessage.SendPlayerHurt(Index, PlayerDeathReason.LegacyDefault(), damage, (new Random()).Next(-1, 1), false, false, 0, -1, -1);

The above line of code uses (new Random()).Next(-1, 1) to determine the hit direction, however the upper bound is exclusive, so only the numbers -1(left knockback) and 0(no knockback) are being generated

Any log messages from files that end in .log or .txt? What are the last 100 log messages from the server console?

N/A

What plugins and what versions of those plugins are you running?

TShockAPI only

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

No branches or pull requests

1 participant