Commit graph

16384 commits

Author SHA1 Message Date
Christoph Oelckers
c15212ca82 -fixed: The HUD model info was taken from the wrong player
It used the current console player's camera, not the actual camera being used for rendering. Although this is the same most of the time, let's better do it right.

This also removes a few leftover references to the player array elsewhwere in the hardware renderer
2019-01-30 01:04:30 +01:00
Christoph Oelckers
b12de04258 - fixed the remaining deprecation warnings in the base script.
All these required access to the sector's Level reference.
The remaining references to the global 'level' variable are all in deprecated functions which is ok.
2019-01-30 00:58:44 +01:00
Christoph Oelckers
3c0200de19 - run disconnect scripts on the level the disconnected player is on
This is nearly always the primary one but let's keep the option of using bots on secondary levels.
2019-01-30 00:47:34 +01:00
Christoph Oelckers
ebdb2643c4 - moved UDMF custom properties into FLevelLocals. 2019-01-30 00:47:20 +01:00
Christoph Oelckers
f410762695 - missed two lines. 2019-01-30 00:29:42 +01:00
Christoph Oelckers
78b7b64237 - replaced all TThinkerIterators except one that probably won't be relevant anymore as things progress. 2019-01-30 00:27:05 +01:00
Christoph Oelckers
4ad327d7e0 - moved G_ChangeLevel and other exit functions into FLevelLocals. 2019-01-29 23:45:14 +01:00
Christoph Oelckers
68fe5534a4 - moved the SectorMarker handling into the level itself. 2019-01-29 21:29:44 +01:00
Christoph Oelckers
ea849e5aca - split G_DoLoadLevel into a level specific and a global part. 2019-01-29 21:19:16 +01:00
Christoph Oelckers
12351ae9bb - made dumpportals CCMD multi-level aware. 2019-01-29 20:23:18 +01:00
Christoph Oelckers
1b37d85ac3 - removed a few missed references in FLevelLocals's member functions. 2019-01-29 20:15:06 +01:00
Christoph Oelckers
4af5ea25c1 - change per-level attenuation of dynamic lights for each viewpoint.
To avoid unnecessary work, the current state is tracked.
2019-01-29 20:09:06 +01:00
Christoph Oelckers
6451b7d592 - moved the combined compatibility flags into FLevelLocals. 2019-01-29 19:28:22 +01:00
Christoph Oelckers
d716a17b96 - compatibility variable handling 2019-01-29 17:41:50 +01:00
Christoph Oelckers
4cb3ce8196 - StartTravel and EndTravel 2019-01-29 16:11:23 +01:00
Christoph Oelckers
14101fa447 - health groups and software rendering textures freed of 'level'
Edited cherry-pick of an older commit.
2019-01-29 16:06:17 +01:00
Christoph Oelckers
eb5a39960e - missed a few references 2019-01-29 15:22:26 +01:00
Christoph Oelckers
3c565c9e86 - moved the static sky variables into FLevelLocals and removed the redundant ones for the texture ID. 2019-01-29 04:44:44 +01:00
Christoph Oelckers
06e5dd1d86 - Handle level in bot code 2019-01-29 04:27:21 +01:00
Christoph Oelckers
14971c8c3a - missed references in p_effect.cpp 2019-01-29 04:20:36 +01:00
Christoph Oelckers
d4ee52f606 - handle G_StartSlideshow 2019-01-29 04:17:58 +01:00
Christoph Oelckers
de1b89707d Handle level in block iterators.
The scripted interface isn't done yet.
2019-01-29 03:26:22 +01:00
Christoph Oelckers
7d3cd53c7e - handle the software renderer's GetColorTable function
The real question here should be: Why does this need to get called in over 40 differenrt locations…?
2019-01-29 03:15:42 +01:00
Christoph Oelckers
f823e57446 Handle level check in texture coordinate calculation 2019-01-29 02:51:06 +01:00
Christoph Oelckers
473892dede - changed all model related references to level. 2019-01-29 02:18:19 +01:00
Christoph Oelckers
8652f140f2 - fixed missing declaration 2019-01-29 02:17:25 +01:00
Christoph Oelckers
932bbee928 - fixed some warnings 2019-01-29 02:16:36 +01:00
Christoph Oelckers
1d748b72a8 Split G_DoCompleted into a global part and a level specific part. 2019-01-29 02:39:14 +01:00
Christoph Oelckers
87859b2950 - add Level parameter to G_LeavingHub 2019-01-29 02:08:53 +01:00
Christoph Oelckers
f9239f6e0f - added a compiler-side workaround for the formerly static methods of FLevelLocals.
LevelLocals on the left side of.a function call will now always be remapped to 'Level', which will either remap to the same-named instance variable or the global deprecated one.

In a few degenerate cases where there is a conflicting local variable named 'level' it may error out but that is unavoidable here but this is very unlikely.
2019-01-29 02:04:31 +01:00
Christoph Oelckers
60873bc5d6 Moved the PointInSector functions into FLevelLocals 2019-01-29 01:30:41 +01:00
Christoph Oelckers
68667e5eaa - moved particle storage into FLevelLocals.
- moved parts of the render setup out of the separate render functions.

Things like particle and polyobject linking were duplicated several times for rendering different things in different renderers.
These things only need to be set up once before the renderer is started so it makes a lot more sense to consolidate them into one place outside the actual rendering code.
2019-01-29 01:09:02 +01:00
Christoph Oelckers
50d59e99cb - moved sound sequence head of list into FLevelLocals. 2019-01-28 23:53:40 +01:00
Christoph Oelckers
623330f938 - initial adjustments for P_Ticker. 2019-01-28 22:33:50 +01:00
Christoph Oelckers
befacddab4 - removed level references in p_trace.cpp. Also added a null check to the sector pointer of the LineTracer Trace function because a null pointer here would crash. 2019-01-28 22:19:09 +01:00
Christoph Oelckers
6312c44234 - removed the remaining level references from p_acs.cpp. 2019-01-28 22:04:33 +01:00
Christoph Oelckers
259ae41774 - sanitized the 'frozen level' code.
This had two different flags that were checked totally inconsistently, and one was not even saved.
Moved everything into a few subfunctions so that these checks do not have to be scattered all over the code.
2019-01-28 20:15:48 +01:00
Christoph Oelckers
3721771934 - forgot to save this. 2019-01-28 18:44:42 +01:00
Christoph Oelckers
3c14a7db76 - use map time, not hub time for map actions. 2019-01-28 18:42:56 +01:00
Christoph Oelckers
3364988680 - moved the interpolator into FLevelLocals and refactored its use to happen outside the renderers.
There is no need to do this deep inside the renderer where it required code duplication and made it problematic to execute on multiple levels.
This is now being done before and after the top level call into the renderer in d_main.cpp.
This also serializes the interpolator itself to avoid problems with the Serialize functions adding the interpolations into the list which can only work with a single global instance.
2019-01-28 18:26:14 +01:00
Christoph Oelckers
6a43d6c7ff Merge remote-tracking branch 'origin/master' into new_level_refactor 2019-01-28 15:50:42 +01:00
Christoph Oelckers
44f622c644 - more XCode warnings fixed. 2019-01-28 15:41:52 +01:00
Christoph Oelckers
d1ca3ef994 - added braces as per XCode's suggestion. 2019-01-28 15:20:02 +01:00
Christoph Oelckers
1dc11c5032 - changed infighting check so that the static skill checker does not access the level
Instead the level needs to be queried now.
2019-01-28 14:31:23 +01:00
Christoph Oelckers
d0942bcb97 - moved FirstThinker function to FLevelLocals
Currently it is meaningless but that's where it should be later.
2019-01-28 14:06:19 +01:00
Christoph Oelckers
41e576bbb5 - removed the intermediate P_SpawnPlayer inline 2019-01-28 03:02:25 +01:00
Christoph Oelckers
66695ac6a0 - made most of the player spawn spot handliing functions members of FLevelLocals. 2019-01-28 02:44:05 +01:00
Christoph Oelckers
0ef0698d24 - use the proper level for setting up a hardware rendered scene.
The shader timer may be taken from the primary level for the entire scene, because it will always be the same for all levels in a set.
The camera textures need to be prepared for all levels.
2019-01-28 02:43:39 +01:00
Christoph Oelckers
d941dea005 - added a level iterator for operations that need to make changes to all open levels.
Since currently there is only one level, this will obvciously only run once on that level for the time being.

This is mainly used for CCMDs and CVARs which either print some diagnostics or change some user-settable configuration.
2019-01-28 02:41:29 +01:00
Christoph Oelckers
64e9f7e43b - changemap must use the current UI level if the user wants to go to "*". 2019-01-28 02:08:49 +01:00