Commit graph

16326 commits

Author SHA1 Message Date
Christoph Oelckers
a92090690e - don't check for a map's freelook setting if there is no map.
Apparently on macOS, game events even get sent in the menu. This never happened on Windows…
2019-01-16 05:28:49 +01:00
Christoph Oelckers
49abe3678a - recalculate the line deltas if a nodebuild is needed
One potential cause is moving around vertices in which case these do not match anymore
2019-01-16 05:27:48 +01:00
Christoph Oelckers
91c934ab7f - do not open the automap when no level is loaded 2019-01-16 05:05:01 +01:00
Christoph Oelckers
9616de5f8a - Fixed error reporting for the BSP loader
Using global variables for this is bad, and it didn't even catch all cases. Now a node build is only considered successful if everything is set up successfully.
2019-01-16 05:04:47 +01:00
Christoph Oelckers
6f1491aa8d - mark the thinkers for collection, even if there is no level.
This is still WIP so for now needs a workaround.
2019-01-15 19:34:33 +01:00
Christoph Oelckers
a2965df5a9 - use the same level for all automap calls.
This reminds me: The automap really needs to be converted into a class and made independent of all those global variables...
2019-01-15 19:23:49 +01:00
Christoph Oelckers
3e34725966 - fixed: The default constructor for DThinker needs to set the OF_JustSpawned flag.
Without this, PostBeginPlay will not get called so several things aren't initialized, like weapon slots and other player settings.
2019-01-15 19:13:59 +01:00
alexey.lysiuk
c6866bad4d - fixed potentially missing event handlers
Event handlers linked list might skip an entry if its order was in a middle of existing handlers

https://forum.zdoom.org/viewtopic.php?t=63258
2019-01-15 18:41:13 +01:00
alexey.lysiuk
295dd326da - fixed wrong self type in Array.Resize()
https://forum.zdoom.org/viewtopic.php?t=63275
2019-01-15 15:57:14 +02:00
alexey.lysiuk
3b3af1dfe4 - removed unreferenced local variable
src\dthinker.cpp(748): warning C4101: 'list': unreferenced local variable
2019-01-15 15:57:14 +02:00
Christoph Oelckers
703cb9cf4e - changed global thinker storage into a struct instead of some static variables inside DThinker.
As it is now it can handle multiple thinker collections for different levels, but right now there's still only one global list for everything.
2019-01-14 18:50:39 +01:00
Christoph Oelckers
dd5addd6ad - fixed crash in the precaching code.
This didn't detect software canvas textures and crashed on the missing image.
2019-01-14 00:10:08 +01:00
alexey.lysiuk
bd964d43fc - fixed inverted blend in flash fader
Adventure of Square and Doom 64: Retribution are good test cases for this issue
2019-01-13 16:23:19 +02:00
Christoph Oelckers
2200e68794 - removed the level assignment in ChangeStatNum.
This would just overwrite what got set before
2019-01-13 13:57:52 +01:00
alexey.lysiuk
c2a78bbd21 - fixed another crash with stored commands on startup
Example: +map CCMD in command line options
2019-01-13 14:50:39 +02:00
alexey.lysiuk
b07ff3f504 - fixed return value of Actor.isFrozen()
https://forum.zdoom.org/viewtopic.php?t=63255
2019-01-13 14:46:35 +02:00
Christoph Oelckers
acb71de53c - removed bSerialOverride.
Now that thinker linking is no longer part of the constructor, this hack is no longer needed.
2019-01-13 13:43:43 +01:00
Christoph Oelckers
1a633701b3 Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-01-13 13:40:29 +01:00
Christoph Oelckers
7b61965197 Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts:
#	src/dthinker.cpp
2019-01-13 13:40:13 +01:00
alexey.lysiuk
1687bd3ef3 - fixed incorrect prologue macro for Actor.isFrozen() 2019-01-13 14:39:44 +02:00
Christoph Oelckers
42b57c995a - rework of thinker creation so that it can get the level from the passed parameters.
Internally it is still one global list of thinkers, this only changes the creation code.
2019-01-13 13:39:14 +01:00
alexey.lysiuk
d3eb983dd3 - fixed loading of saved game
Wrong FName constructor was picked for name of map snapshot, it was not restored because of that
2019-01-13 12:24:17 +02:00
alexey.lysiuk
2bb3571c2c - fixed crash during initialization of polyobjects 2019-01-13 10:35:00 +02:00
alexey.lysiuk
16ee57817d - fixed crash with stored commands on startup
Example: +map CCMD in command line options
2019-01-13 10:34:17 +02:00
alexey.lysiuk
c1a4158ab0 - fixed compilation errors
src/scripting/decorate/thingdef_parse.cpp:80:11: error: no viable conversion from 'const FName' to 'FString'
src/scripting/zscript/zcc_compile.cpp:1359:26: error: use of undeclared identifier 'Name_globalfreeze'; did you mean 'NAME_globalfreeze'?
2019-01-12 18:29:31 +02:00
Christoph Oelckers
ed14951558 - ensure proper emission of deprecations.
For global variables this wasn't implemented.
2019-01-12 16:36:21 +01:00
Christoph Oelckers
36f79ea363 - added some compatibility glue for old scripts that reference the global 'globalfreeze' and 'level' variables. 2019-01-12 14:29:13 +01:00
Christoph Oelckers
1ab4ebb7ac Merge branch 'g_level_reworking' 2019-01-12 14:04:40 +01:00
Christoph Oelckers
9099dc600f - fixed the 'frozen level' handling and did some cleanup on the session data in savegames.
The handling for the two frozen flags was totally inconsistent.
Furthermore, these need to be session data, not level data.
The old exported variables for this still exist and shadow the real state, but are deprecated now.
Frozen state should only be checked with "currentSession.isFrozen()" now.

The session data in the savegame was grouped and separated from the global state, which onl consists of server CVARs and RNG state now.
2019-01-12 13:50:15 +01:00
alexey.lysiuk
b7adc4065d - fixed condition to produce blood splatter during line attack
https://forum.zdoom.org/viewtopic.php?t=63186
2019-01-12 13:11:03 +02:00
alexey.lysiuk
e353201919 - relaxed caller type check for states modified by Dehacked
https://forum.zdoom.org/viewtopic.php?t=63178
2019-01-12 12:21:34 +02:00
Christoph Oelckers
9f1aedd135 - place automap marker and scale variables in the level so that saving and restoring works properly without affecting other maps by leaving behind residual data. 2019-01-12 00:53:58 +01:00
Christoph Oelckers
fe7112188a - fixed: Strife was missing the move factors. 2019-01-11 22:14:30 +01:00
Christoph Oelckers
7b799be947 - fixed handling of snapshot buffers.
They get copied around a bit too much, so they cannot have a destructor. They must be explicitly deleted when the snapshot gets removed.
2019-01-11 22:00:07 +01:00
Christoph Oelckers
99a3b09a68 - it works now so that I can start a level, go to the next one and quit the engine without crashing.
Judging from this there will be quite a few surprises with the memory management that still need fixing.
2019-01-11 20:53:25 +01:00
Magnus Norddahl
159b45bd46 - fix black cam texture on HUD 2019-01-11 19:53:30 +01:00
Magnus Norddahl
bab9d612c3 - fix null pointer crash 2019-01-11 19:44:52 +01:00
Christoph Oelckers
70ee43a95a - started cleaning up g_level.cpp.
This works up to the point where it tries to apply snapshots, it doesn't start the level yet.
2019-01-11 19:31:56 +01:00
alexey.lysiuk
e0826726ba - fixed script line numbers after multi-line raw string literal
https://forum.zdoom.org/viewtopic.php?t=63210
2019-01-11 17:37:07 +01:00
alexey.lysiuk
731fe67600 - fixed saving and loading of games
Saved game with one map only can be loaded so far
2019-01-11 15:55:09 +02:00
Christoph Oelckers
02c9899ed3 - the sound compatibility flags do not need level support.
They are intentionally omitted from both MAPINFO and compatibility settings.
This removes the last place where it still went through the map-modified versions of the compatflags.
2019-01-11 12:10:59 +01:00
alexey.lysiuk
e68b3f6694 - fixed crash when playing sounds with no level loaded 2019-01-11 12:55:51 +02:00
alexey.lysiuk
4ee7827d2c - fixed compilation of POSIX targets
src/posix/sdl/i_main.cpp:165:59: error: ‘vp’ was not declared in this scope
src/scripting/backend/codegen.cpp:6286:69: error: invalid initialization of non-const reference of type ‘FArgumentList& {aka TDeletingArray<FxExpression*>&}’ from an rvalue of type ‘FArgumentList {aka TDeletingArray<FxExpression*>}’
2019-01-11 12:50:50 +02:00
Christoph Oelckers
1b1e2ef7d2 - added a level parameter to the thinker iterator.
Not used yet, but will be when the thinker lists are moved into FLevelLocals.
2019-01-11 01:43:43 +01:00
Christoph Oelckers
4ec2d31e9f - give P_ExecuteSpecial a Level parameter. 2019-01-11 01:03:33 +01:00
Christoph Oelckers
1c4e3ae06d - moved the static sky variables into FLevelLocals and removed the redundant ones for the texture ID. 2019-01-11 00:05:07 +01:00
Christoph Oelckers
439c36c8f7 - moved UDMF custom properties into FLevelLocals. 2019-01-10 23:22:21 +01:00
Christoph Oelckers
229dde1e67 - moved the non-map timers out of LevelLocals into GameSession and moved the composite compatibility flags into FLevelLocals, because they are level specific. 2019-01-10 23:08:35 +01:00
Christoph Oelckers
3b59afae31 - some progress. 2019-01-10 21:02:20 +01:00
Christoph Oelckers
f25397b391 - started building the framework to replace the global level variable
A few of the old level members will also be moved to the new class, now that workaround getters can be implemented.
These currently spit out some deprecation warnings which will be addressed next.
2019-01-10 19:46:51 +01:00