Some fun with the engine
Sad to see this section so dead, maybe some others will come back for fun when they aren't busy.
Loop through client models:
Loop server models:
Example setting the players scale:
https://gyazo.com/02e9a149bb1634f083e00e44f3741e9b
Code:
typedef LTObject* HOBJECT;
typedef LTObject* HLOCALOBJ;
struct LTVector
{
float x, y, z; //0x0, 0x4, 0x8
};
struct ClientData {
float m_fLastUpdatePosTime;
LTVector lastPos;
LTVector lastVel; //0x10
HLOCALOBJ ltLineSystem; //0x1C
};
struct LTObject {
char pad[0x98];
UINT8 m_ColorR; //0x98
UINT8 m_ColorG; //0x99
UINT8 m_ColorB; //0x9A
UINT8 m_ColorA; //0x9B
char pad1[0x8]; //0x9C
LTVector scale; //0xA4
char pad2[0x38];
LTVector pos; //0xE8
char pad3[0x10]; //F4
LTVector vel; //0x104
char pad4[0x1C]; //0x110
LTVector accel; //0x12C
char pad5[0x24];//0x138
LTObject *standingOn;//0x15C
ClientData clientData;
};
struct WorldClientBsp {
char pad[0x08];
void ** worldData;
UINT32 numModels;
};
struct ClientShell {
char pad[0x64];
UINT16 objId;
};
struct LTRecord
{
unsigned char m_nRecordType;
void * m_pRecordData;
};
struct ClientMgr {
char pad[0x0B14];
LTRecord * map_data;
UINT32 m_ObjectMapSize; //0xB18
char pad2[0x38]; //B1C
ClientShell * pClientShell;//b54
};
struct ServerMgr {
char pad[0x738];
LTRecord * map_data;
UINT32 m_ObjectMapSize;
};
struct Canvas {
char pad[0x218];
float radius;
};
Code:
DWORD pClientshell = 0x116ABD4; DWORD g_pServerMgr = 0x0116BB0C; ClientMgr * pClientmgr = (ClientMgr*)(*(DWORD*)pClientshell); ServerMgr * pServerMgr = (ServerMgr*)(*(DWORD*)g_pServerMgr);
Loop through client models:
Code:
LTObject * mPlayer = (LTObject*)pClientmgr->map_data[pClientmgr->pClientShell->objId].m_pRecordData;
for (UINT16 id = 0; id < pClientmgr->m_ObjectMapSize; id++) {
if (pClientmgr->map_data[id].m_nRecordType) {
LTObject * pPlayer = (LTObject*)pClientmgr->map_data[id].m_pRecordData;
if (pPlayer) {
printf("Pos: %.2f %.2f %.2f \n", pPlayer->pos.x, pPlayer->pos.y, pPlayer->pos.z);
pPlayer->m_ColorB = 0x0;
pPlayer->m_ColorR = 0x0;
pPlayer->m_ColorA = 0xFF;
pPlayer->scale.x = f_scale;
pPlayer->scale.y = f_scale;
pPlayer->scale.z = f_scale;
}
}
}
Code:
for (UINT16 uId = 0; uId < pServerMgr->m_ObjectMapSize; uId++) {
if (pServerMgr->map_data->m_nRecordType) {
LTObject * pServerObj = (LTObject*)pServerMgr->map_data[uId].m_pRecordData;
if (pServerObj) {
//Do Stuff
}
}
}
https://gyazo.com/02e9a149bb1634f083e00e44f3741e9b



, @

