handle_player_transformation handler

This might need changing later -- Timed transformations handled by the server?
This commit is contained in:
Ben 2020-02-14 21:54:06 +00:00
parent b930f49d30
commit 191e9caf90

View File

@ -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)