diff --git a/tools/inject_test_entities.py b/tools/inject_test_entities.py new file mode 100644 index 0000000..0f8aca3 --- /dev/null +++ b/tools/inject_test_entities.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 +""" +Simple script to send test entity packets to the OverteClient. +This simulates what the EntityServer would send. +""" + +import socket +import struct +import time + +# Overte packet types (as defined in your C++ code) +PACKET_TYPE_ENTITY_ADD = 0x10 +PACKET_TYPE_ENTITY_EDIT = 0x11 +PACKET_TYPE_ENTITY_ERASE = 0x12 + +def send_entity_add(sock, addr, entity_id, name): + """Send an EntityAdd packet""" + # Packet structure: [type:u8][id:u64][name:null-terminated string] + packet = struct.pack('