From 8ab04bc1e9c77c08cdb44b24aa3552500e05ffd7 Mon Sep 17 00:00:00 2001 From: ro <44623254+rsakeys@users.noreply.github.com> Date: Wed, 5 Jun 2019 18:02:59 +0200 Subject: [PATCH] Update navigation.py - load player packet is sent, displays correct data for the individual penguin --- houdini/handlers/play/navigation.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/houdini/handlers/play/navigation.py b/houdini/handlers/play/navigation.py index 377095e..63089a5 100644 --- a/houdini/handlers/play/navigation.py +++ b/houdini/handlers/play/navigation.py @@ -1,7 +1,7 @@ from houdini import handlers from houdini.handlers import XTPacket -import random +import random, time @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), 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) await spawn.add_penguin(p) await p.load() p.joined_world = True - + p.server.penguins_by_id[p.data.id] = p