Correct `util::protocol_velocity` - it should multiply, not divide
@@ -17,13 +17,13 @@ pub use spawn::SpawnerSystem;
use specs::Entity;
/// Converts float-based velocity in blocks per tick
-/// to the obnoxious format used by the protocol.
+/// to the format used by the protocol.
pub fn protocol_velocity(vel: DVec3) -> (i16, i16, i16) {
// Apparently, these are in units of 1/8000 block per tick.
(
- (vel.x / 8000.0) as i16,
- (vel.y / 8000.0) as i16,
- (vel.z / 8000.0) as i16,
+ (vel.x * 8000.0) as i16,
+ (vel.y * 8000.0) as i16,
+ (vel.z * 8000.0) as i16,
)
}
