Cybernetic pig wrote:No good. Same issue I got when changing Zone's ambient brightness: some textures remain bright afterwards and a flush of the cache is needed.
Mh you could try spawning some LE_NonIncident with maximum radius and low brightness to force a refresh. Sucks though.
And yeah a flush of GCache is probably needed, but sadly the 'FLUSH' command does more than just flushing GCache. You should really start doing a bit of C++ programming, as this vastely increases the possibilities, often with just some minor C++ code part. Like you could make a native which just calls GCache.Flush(), or even better just flushes the lighting related parts of GCache (CID_ShadowMap, CID_IlluminationMap, CID_StaticMap, CID_DynamicMap, irrc), otherwise other parts as animation tweening should be affected too.
For uc only, modiying remove const for Client in Engine.uc, run AllObjects iterator to grab the engine Object, save Client aside, set Engine.Client to None, call 'FLUSH' consolecommand, restore Client. Not sure if it works though, especially if in case Client is None the flush command will be executed at all. Otherwise it should just flush GCache.
Another idea you could try would be to iterate over all Actors and set bLightChanged=True, afaik thats some thing the editor uses and set it on the next frame to false again. But that might completely break all shadows for that one frame, but you can probably work around with some effect when switching on the light amp thing...
And just for the sake of it beeing said:
In the end, there is code which should be done in UC (nearly all gameplay related) and C++ (utility/helper code, performance critical code,etc.).
http://web.archive.org/web/200104120448 ... ative.html
And SampleNativePackage source out of ut/runepubsrc is always a great start.