Open Arthri opened 1 year ago
/slap player
N/A
https://github.com/Pryaxis/TShock/blob/2c06e2bdf5d3057aaaaf7588519ce9ee305d7079/TShockAPI/Commands.cs#L4615 https://github.com/Pryaxis/TShock/blob/2c06e2bdf5d3057aaaaf7588519ce9ee305d7079/TShockAPI/TSPlayer.cs#L1818 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
(new Random()).Next(-1, 1)
-1
0
.log
.txt
TShockAPI only
Reproduction steps (if applicable)?
/slap player
/slap player
/slap player
Any stack traces or error messages (if known)?
N/A
Any screenshots?
https://github.com/Pryaxis/TShock/blob/2c06e2bdf5d3057aaaaf7588519ce9ee305d7079/TShockAPI/Commands.cs#L4615 https://github.com/Pryaxis/TShock/blob/2c06e2bdf5d3057aaaaf7588519ce9ee305d7079/TShockAPI/TSPlayer.cs#L1818 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) and0
(no knockback) are being generatedAny 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