@@ -2,6 +2,8 @@ package player
22
33import  (
44"time" 
5+ 
6+ "github.com/gofiber/websocket" 
57)
68
79const  (
@@ -21,9 +23,6 @@ const (
2123DirectionRight  =  1 
2224DirectionDown  =  2 
2325DirectionLeft  =  3 
24- 
25- // Blob IDs 
26- BlobowoID  =  0 
2726)
2827
2928type  CoordinatesAny  struct  {
@@ -32,26 +31,27 @@ type CoordinatesAny struct {
3231}
3332
3433type  Player  struct  {
35- Username  string  `json:"username"` 
36- BR  int  `json:"br"` 
37- Blob  uint8  `json:"blob"`  // Blob ID 
38- Role  int8  `json:"role"` 
39- ID  string  `json:"id"` 
40- LastNom  int64  `json:"lastNom"` 
41- Direction  uint8  `json:"direction"` 
42- DirectionChangeCoordinates  CoordinatesAny  `json:"directionChangeCoordinates"` 
43- DirectionChangedAt  int64  `json:"directionChangedAt"` 
44- Guest  bool  `json:"guest"` 
45- Distance  int  `json:"distance"` 
46- Health  uint8  `json:"health"` 
47- AntiCheatFlags  int  `json:"antiCheatFlags"` 
48- X  int  `json:"x"` 
49- Y  int  `json:"y"` 
50- LastRegeneration  int64  `json:"lastRegeneration"` 
51- LastPing  int64  `json:"lastPing"` 
52- Coins  int  `json:"coins"` 
53- Noms  int  `json:"noms"` 
54- XP  int  `json:"xp"` 
34+ Username  string  `json:"username"` 
35+ BR  int  `json:"br"` 
36+ Blob  string  `json:"blob"` 
37+ Role  int8  `json:"role"` 
38+ ID  string  `json:"id"` 
39+ LastNom  int64  `json:"lastNom"` 
40+ Direction  uint8  `json:"direction"` 
41+ DirectionChangeCoordinates  CoordinatesAny  `json:"directionChangeCoordinates"` 
42+ DirectionChangedAt  int64  `json:"directionChangedAt"` 
43+ Guest  bool  `json:"guest"` 
44+ Distance  int  `json:"distance"` 
45+ Health  uint8  `json:"health"` 
46+ AntiCheatFlags  int  `json:"antiCheatFlags"` 
47+ X  int  `json:"x"` 
48+ Y  int  `json:"y"` 
49+ LastRegeneration  int64  `json:"lastRegeneration"` 
50+ LastPing  int64  `json:"lastPing"` 
51+ Coins  int  `json:"coins"` 
52+ Noms  int  `json:"noms"` 
53+ XP  int  `json:"xp"` 
54+ Conn  * websocket.Conn  `json:"-"` 
5555}
5656
5757func  (p  * Player ) Update (br  int , coins  int , xp  int ) {
0 commit comments