mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-10 06:41:37 +00:00
Don't try link the baked light probes with the original actors as that's problematic on the gzdoom end of things
This commit is contained in:
parent
3b57fa7f79
commit
53328e8f65
1 changed files with 10 additions and 2 deletions
|
@ -722,7 +722,7 @@ void LightmapBuilder::AddLightmapLump(FWadWriter &wadFile)
|
|||
int surfacesSize = surfaces.size() * 5 * sizeof(uint32_t);
|
||||
int texCoordsSize = numTexCoords * 2 * sizeof(float);
|
||||
int texDataSize = textures.size() * textureWidth * textureHeight * 3 * 2;
|
||||
int lightProbesSize = lightProbes.size() * (1 + sizeof(uint32_t) + 3 * sizeof(float));
|
||||
int lightProbesSize = lightProbes.size() * 6 * sizeof(float);
|
||||
int lumpSize = headerSize + lightProbesSize + surfacesSize + texCoordsSize + texDataSize;
|
||||
|
||||
// Setup buffer
|
||||
|
@ -741,7 +741,15 @@ void LightmapBuilder::AddLightmapLump(FWadWriter &wadFile)
|
|||
// Write light probes
|
||||
for (size_t i = 0; i < lightProbes.size(); i++)
|
||||
{
|
||||
lumpFile.Write32(map->ThingLightProbes[i]);
|
||||
int thingIndex = map->ThingLightProbes[i];
|
||||
const IntThing& thing = map->Things[thingIndex];
|
||||
float x = (float)(thing.x >> FRACBITS);
|
||||
float y = (float)(thing.y >> FRACBITS);
|
||||
float z = (float)thing.z + thing.height * 0.5f;
|
||||
|
||||
lumpFile.WriteFloat(x);
|
||||
lumpFile.WriteFloat(y);
|
||||
lumpFile.WriteFloat(z);
|
||||
lumpFile.WriteFloat(lightProbes[i].x);
|
||||
lumpFile.WriteFloat(lightProbes[i].y);
|
||||
lumpFile.WriteFloat(lightProbes[i].z);
|
||||
|
|
Loading…
Reference in a new issue