From 191e9caf90e3152eabc33e2af7fbdf44a0d0a8bf Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 14 Feb 2020 21:54:06 +0000 Subject: [PATCH] `handle_player_transformation` handler This might need changing later -- Timed transformations handled by the server? --- houdini/handlers/play/avatar.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/houdini/handlers/play/avatar.py b/houdini/handlers/play/avatar.py index e69de29..08d70f9 100644 --- a/houdini/handlers/play/avatar.py +++ b/houdini/handlers/play/avatar.py @@ -0,0 +1,10 @@ +from houdini import handlers +from houdini.handlers import XTPacket +from houdini.constants import ClientType + + +@handlers.handler(XTPacket('pt', 'spts'), client=ClientType.Vanilla) +@handlers.cooldown(1) +async def handle_player_transformation(p, transform_id: int): + p.avatar = transform_id + await p.room.send_xt('spts', p.id, transform_id)