mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-07 13:23:50 +00:00
feat: UGC server that makes and serves player models' meshes and icons
A new server (dUgcServer, started by master with enable_ugc_server=1) that takes unprocessed ugc and ugc_modular_build rows from the database and makes what the client downloads with UGCUSE3DSERVICES: an optimized NIF (hidden faces removed, ambient occlusion baked into vertex colors) and a 128px DDS icon for player models, rendered by a software rasterizer from the client's LDD brick primitives, and icons for cars and rockets assembled from their modules per ModularBuildComponent/ModuleComponent. It serves them, with the models' LXFML, over HTTP in the client's UGCC<dc>/3DOPTIMIZED and IMAGE128DDS layout with .gz and .checksum files, and keeps its folder under a size cap. Processing state lives in ugc.is_optimized plus new processed_at, process_attempts and process_error columns (and the same on ugc_modular_build). ServiceType::UGC is appended. NifFile moves to dCommon and records named node transforms for the modules' attach points. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
10
migrations/dlu/sqlite/64_ugc_processing.sql
Normal file
10
migrations/dlu/sqlite/64_ugc_processing.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
/* UGC server state: see the MySQL migration. */
|
||||
ALTER TABLE ugc ADD COLUMN processed_at BIGINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ugc ADD COLUMN process_attempts INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ugc ADD COLUMN process_error TEXT NOT NULL DEFAULT '';
|
||||
ALTER TABLE ugc_modular_build ADD COLUMN is_optimized INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ugc_modular_build ADD COLUMN processed_at BIGINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ugc_modular_build ADD COLUMN process_attempts INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE ugc_modular_build ADD COLUMN process_error TEXT NOT NULL DEFAULT '';
|
||||
CREATE INDEX IF NOT EXISTS ugc_is_optimized ON ugc (is_optimized);
|
||||
CREATE INDEX IF NOT EXISTS ugc_modular_build_is_optimized ON ugc_modular_build (is_optimized);
|
||||
Reference in New Issue
Block a user