Commit graph

16311 commits

Author SHA1 Message Date
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
Christoph Oelckers
5cd3f86775 - fixed return type. 2019-01-10 18:03:32 +01:00
Christoph Oelckers
2b30ae6ccd - fixed misplaced variable initialization. 2019-01-10 18:02:23 +01:00
Marrub
5dbd81ea7f Make LevelLocals::ExecuteSpecial return int 2019-01-10 17:28:19 +01:00
Marrub
82736985cc Make LevelLocals::ExecuteSpecial return int 2019-01-10 17:28:19 +01:00
Christoph Oelckers
203110c6fe Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-01-10 16:13:41 +01:00
alexey.lysiuk
2cd1ac49eb - unary minus operator propagates boolean operand to integer
https://forum.zdoom.org/viewtopic.php?t=63214
2019-01-10 12:21:16 +01:00
alexey.lysiuk
2bb7d49664 - register interpolators on reading serialization only
Interpolators were added twice when saving a game which led to a cycle in linked list and so to an infinite loop
2019-01-10 11:15:35 +02:00
alexey.lysiuk
f44cf007b7 - fixed sector marker initialization
This fixes a crash when starting a new game for the second time
2019-01-10 10:43:18 +02:00
Christoph Oelckers
d6d66ca774 - the final batch of level removal before refactoring the underlying data. 2019-01-10 03:44:19 +01:00
Christoph Oelckers
ad17bce1f0 - use map time, not hub time for map actions. 2019-01-10 03:42:54 +01:00
Christoph Oelckers
7e3ef4d72d - fixed: The sector tag iterator needs access to the level.
This is done through the tag manager to avoid #include dependency hell. Trying to reference FLevelLocals directly from the inline functions will inevitably create a circular dependency.
2019-01-10 02:50:48 +01:00
Christoph Oelckers
72d09c0338 - the next batch of 'level' removals.
Untested, may not work!
2019-01-10 02:30:38 +01:00
Christoph Oelckers
80427b72e9 - made OP_NEW a builtin function instead of an opcode.
The code was present 3 times due to the JIt, and this is not something that benefits from being a real opcode, even in the interpreted case.
2019-01-10 02:12:43 +01:00
Christoph Oelckers
9506b0e337 - moved the SectorMarker handling into the level itself. 2019-01-10 02:00:58 +01:00
Christoph Oelckers
8cc563b80f - moved particle storage to FLevelLocals. 2019-01-10 01:21:17 +01:00