Skip to content

Commit 9ecdf20

Browse files
frej4189Frej Alexander Nielsen
and
Frej Alexander Nielsen
authored
Fix ambigious function naming (#3161)
Co-authored-by: Frej Alexander Nielsen <[email protected]>
1 parent 39dc20a commit 9ecdf20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/plugins/physics.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ function inject (bot, { physicsEnabled, maxCatchupTicks }) {
138138
return dYaw
139139
}
140140

141-
// returns false if packet should be sent, true if not
142-
function sendPositionPacketInDeath () {
141+
// returns false if bot should send position packets
142+
function isEntityRemoved () {
143143
if (bot.isAlive === true) deadTicks = 0
144144
if (bot.isAlive === false && deadTicks <= 20) deadTicks++
145145
if (deadTicks >= 20) return true
@@ -148,7 +148,7 @@ function inject (bot, { physicsEnabled, maxCatchupTicks }) {
148148

149149
function updatePosition (now) {
150150
// Only send updates for 20 ticks after death
151-
if (sendPositionPacketInDeath()) return
151+
if (isEntityRemoved()) return
152152

153153
// Increment the yaw in baby steps so that notchian clients (not the server) can keep up.
154154
const dYaw = deltaYaw(bot.entity.yaw, lastSentYaw)

0 commit comments

Comments
 (0)