mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 17:27:19 +02:00
The game keeps each kind of light (PbrSpotLight, PbrSphereLight, ...) in a table of 8,192 and crashes at Skate.exe+0x4ea4094 when a level makes more. - Each kind's light factory is hooked: once the kind's table is nearly full it gives no entity, as the game's own factory does for a light it should not make. The light is not drawn and the game goes on. - Said in the log: the kind of light and how many were left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
567 B
C++
13 lines
567 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
// The game keeps each kind of light (PbrSpotLight, PbrSphereLight, ...) in a table of 8,192 and
|
|
// crashes when a level makes more (Engine/Game/Build/<build>/light_tables.h). Once a kind's table is
|
|
// nearly full, the guard has the game make no more lights of that kind: they are not drawn, where
|
|
// the game would have crashed.
|
|
namespace dingosdk::light_table_guard {
|
|
// Checks this build's functions and hooks the six light factories; once. False when the build
|
|
// differs (no guard).
|
|
bool install(std::uintptr_t base) noexcept;
|
|
}
|