Created
July 6, 2011 00:23
-
-
Save sjl/1066276 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- read-packet-playerpositionlook [bot conn] | |
(let [payload (assoc {} | |
:x (-read-double conn) | |
:stance (-read-double conn) | |
:y (-read-double conn) | |
:z (-read-double conn) | |
:yaw (-read-float conn) | |
:pitch (-read-float conn) | |
:onground (-read-bool conn))] | |
(dosync (alter (:player bot) merge {:location payload})) | |
payload)) | |
(defn- write-packet-playerpositionlook [conn {x :x y :y stance :stance z :z yaw :yaw pitch :pitch onground :onground}] | |
(-write-double conn x) | |
(-write-double conn y) | |
(-write-double conn stance) | |
(-write-double conn z) | |
(-write-float conn yaw) | |
(-write-float conn pitch) | |
(-write-bool conn onground)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment