Page 1 of 1

[r1578] pr_spawnmobj is used by dynamic lights (sync issue)

Posted: Thu May 30, 2013 7:54
by Edward850
At present, dynamic lights are spawning actual objects that end up using the pr_spawnmobj RNG. The 2 main problems with this is:
1) Players can load their own dynamic light definitions, none at all, or have dynamic lights disabled all-together, inconsistently offsetting pr_spawnmobj between each session.
2) Changing some display settings will re-initialize dynamic lights. Window mode and resolution, for example.

This, predictably, creates synchronization issues in demos and netgames due to inconsistent dynamic light spawns. At least preventing them or using a separate RNG at p_mobj.cpp: line 3780 (AActor::StaticSpawn) should suffice.

Re: [r1578] pr_spawnmobj is used by dynamic lights (sync iss

Posted: Thu May 30, 2013 9:17
by Graf Zahl
Before hacking around with this I'd rather change the one thing the RNG is used for (the floatbob phase), so that it becomes a user settable property and only if explicitly set to 'random' causing the RNG to be called.

All other calls of pr_spawnmobj simply cannot happen for dynamic light spawns.