Update navigation.py

- load player packet is sent, displays correct data for the individual penguin
This commit is contained in:
ro 2019-06-05 18:02:59 +02:00 committed by GitHub
parent fd1dcb97f1
commit 8ab04bc1e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
from houdini import handlers from houdini import handlers
from houdini.handlers import XTPacket from houdini.handlers import XTPacket
import random import random, time
@handlers.handler(XTPacket('j', 'js'), pre_login=True) @handlers.handler(XTPacket('j', 'js'), pre_login=True)
@ -17,10 +17,19 @@ async def handle_join_server(p, penguin_id: int, login_key: str, lang: str):
await p.send_xt('js', int(p.data.agent_status), int(0), await p.send_xt('js', int(p.data.agent_status), int(0),
int(p.data.moderator), int(p.data.book_modified)) int(p.data.moderator), int(p.data.book_modified))
#handleGetMyPlayerPuffles()
current_time = int(time.time())
penguin_standard_time = current_time * 1000
server_time_offset = 7
await p.send_xt('lp', p.server.penguin_string_compiler.compile(p), p.data.coins, 0, 1440,
penguin_standard_time, p.age, 0, p.data.minutes_played, None, server_time_offset, 1, 0, 211843)
spawn = random.choice(p.server.spawn_rooms) spawn = random.choice(p.server.spawn_rooms)
await spawn.add_penguin(p) await spawn.add_penguin(p)
await p.load() await p.load()
p.joined_world = True p.joined_world = True
p.server.penguins_by_id[p.data.id] = p p.server.penguins_by_id[p.data.id] = p