Skip to content

Commit

Permalink
turns out i broke shit lol
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Jul 23, 2023
1 parent 1a747ac commit 337adcd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn_mappings=1.20.1+build.9
loader_version=0.14.21
fabric_kotlin_version=1.10.0+kotlin.1.9.0

version=0.3.3
version=0.3.4
group=pm.n2
archives_base_name=tangerine

Expand Down
12 changes: 9 additions & 3 deletions src/main/kotlin/pm/n2/tangerine/managers/PaperClipManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,13 @@ object PaperClipManager : Manager {
}

val packets = mutableListOf<Packet<*>>()
for (i in 0 until floor(diff / MAX_MOVE_PER_PACKET).toInt()) {
val moveCount = if (player.hasVehicle()) {
floor(diff / MAX_MOVE_PER_PACKET).toInt()
} else {
stepCount
}

for (i in 0 until moveCount) {
if (player.hasVehicle()) {
// Jank way to represent a VehicleMove packet we shouldn't change pos
packets.add(buildVehicleMove(0.0, 0.0, 0.0, 0f, 0f))
Expand Down Expand Up @@ -463,9 +469,9 @@ object PaperClipManager : Manager {
}

if (player.hasVehicle()) {
packets.add(buildVehicleMove(to.x, to.y, to.z, player.yaw, player.pitch))
packets.add(buildVehicleMove(pos.x, pos.y, pos.z, player.yaw, player.pitch))
} else {
packets.add(PlayerMoveC2SPacket.PositionAndOnGround(to.x, to.y, to.z, player.isOnGround))
packets.add(PlayerMoveC2SPacket.PositionAndOnGround(pos.x, pos.y, pos.z, player.isOnGround))
}
}

Expand Down

0 comments on commit 337adcd

Please sign in to comment.