Skip to content

Commit b4cff94

Browse files
committed
Ceil player health on health update.
1 parent 59b9f6f commit b4cff94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utilities/connection/packetHandler.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ export const packetHandler =
218218
.catch(handleError(addMessage, respawnError))
219219
} else if (healthRef.current !== null && newHealth < healthRef.current) {
220220
const info = healthMessage
221-
.replace('%prev', healthRef.current.toString())
222-
.replace('%new', newHealth.toString())
221+
.replace('%prev', Math.ceil(healthRef.current).toString())
222+
.replace('%new', Math.ceil(newHealth).toString())
223223
addMessage(info)
224224
} // LOW-TODO: Long-term it would be better to have a UI.
225225
healthRef.current = newHealth

0 commit comments

Comments
 (0)