Commit graph

16526 commits

Author SHA1 Message Date
Christoph Oelckers
b4a95ccaa9 - roughly 50 more, mostly search and replace. 2019-01-27 19:16:14 +01:00
Christoph Oelckers
06ba8c4c00 - 50 more simple replacements of 'level' 2019-01-27 17:35:50 +01:00
Christoph Oelckers
8c542e9be8 - removed level references in the software renderers. 2019-01-27 17:21:36 +01:00
Christoph Oelckers
4f540c1703 - give the sector a level reference. 2019-01-27 17:12:03 +01:00
Christoph Oelckers
522cc855ad - a few more. 2019-01-27 16:59:50 +01:00
alexey.lysiuk
95679c36b2 - added virtual destructor to FDelayedCommand
src/c_dispatch.cpp:143:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
src/tarray.h:582:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
src/tarray.h:574:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
2019-01-27 17:38:10 +02:00
Christoph Oelckers
ae544fa21f - removed a few direct uses of TThinkerIterator. 2019-01-27 16:15:32 +01:00
Christoph Oelckers
c8cd11422a - translate UMAPINFO specials at execution time, not load time.
At load time the context for translation does not exist.
2019-01-27 16:09:05 +01:00
Christoph Oelckers
73696e2781 - handled most level references in actorinlines.h and p_mobj.cpp. 2019-01-27 16:08:22 +01:00
Christoph Oelckers
c94f0f47a2 - removed all remaining references to level and TThinkerIterator from p_floor.cpp, p_lights.cpp, p_pusher.cpp and p_scroll.cpp. 2019-01-27 15:02:37 +01:00
Christoph Oelckers
5aa379e50e - removed all remaining references to level and TThinkerIterator from p_enemy.cpp. 2019-01-27 14:53:08 +01:00
Christoph Oelckers
2ed2202caa - removed all remaining references to level and TThinkerIterator from p_enemy.cpp. 2019-01-27 14:49:51 +01:00
Christoph Oelckers
73ea59179c - fixed some deprecation warnings about 'level'. 2019-01-27 14:48:35 +01:00
Christoph Oelckers
84baa5bb4d - deprecated the global 'level' variable.
This will currently output 9 warnings for the UDMF property getters. To silence these a bit more work is needed.
2019-01-27 14:33:02 +01:00
Christoph Oelckers
e9954ee018 Merge branch 'master' into new_level_refactor 2019-01-27 14:08:23 +01:00
Christoph Oelckers
9bb4ea34e7 - fixed: When A_SpawnProjectile got fixed, this fix broke the old A_CustomMissile function because the added workaround was overlooked.
This now separates the code more clearly into the twp paths to make the differences easier to see and compare.
2019-01-27 14:00:23 +01:00
Christoph Oelckers
e7aa10b5c8 - changed thinker initialization to occur in a Construct function instead of the constructor itself.
This was done to ensure that this code only runs when the thinker itself is fully set up.
With a constructor there is no control about such things, if some common initialization needs to be done it has to be in the base constructor, but that makes the entire approach chosen here to ensure proper linking into the thinker chains impossible.
ZDoom originally did it that way, which resulted in a very inflexible system and required some awful hacks to let the serializer work with it - the corresponding bSerialOverride flag is now gone.

The only thinker class still having a constructor is DFraggleThinker, because it contains non-serializable data that needs to be initialized in a piece of code that always runs, regardless of whether the object is created explicitly or from a savegame.
2019-01-27 13:08:54 +01:00
Christoph Oelckers
22939aade7 Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/c_dispatch.cpp
2019-01-27 10:26:23 +01:00
Christoph Oelckers
39f53a4de0 - took the delayed console command execution out of the thinker management.
Doing this intermingled with the thinkers is highly unsafe because there are absolutely no guarantees about order of execution.
Effectively it ran these commands right in the middle of the playsim which could cause all sorts of synchronization issues, because CCMDs are part of the UI, not the playsim.

- pass a const string to AddCommandString.

This function manipulated the input buffer, leading to all sorts of code contortions to make sure that the passed parameter is clean for that.
This function will now create a copy of the passed parameter which it can manipulate without complicating its calling code.

# Conflicts:
#	src/c_dispatch.cpp
2019-01-27 10:24:49 +01:00
Christoph Oelckers
8323524014 - give thinkers a 'level' member and change linking to the chain to happen outside the constructor. 2019-01-27 01:49:20 +01:00
Christoph Oelckers
df4c7d8f56 - initialize the impact decal counter for each level. 2019-01-26 23:36:22 +01:00
Christoph Oelckers
9b1b6db85d - added a pseudo-serializer for FLevelLocals pointers.
This doesn't really write out any info for the pointer, if the level does not match it just errors out.
This is both for quick detection of badly used level data and for automatic restoring of the pointer from the serializer's working level.

This also removed the temporary workarounds in DAutomap and DLevelScript to restore these pointers when a savegame is loaded.
2019-01-26 21:23:19 +01:00
Christoph Oelckers
e5139cc325 - moved all EV_Light* functions and G_SerializeLevel into FLevelLocals 2019-01-26 17:55:15 +01:00
Christoph Oelckers
fe06c49e34 - fixed: DAutomap::Serialize needs to call its super method. 2019-01-26 17:54:58 +01:00
alexey.lysiuk
0e5320cb3a - fixed linking of optimized targets
Undefined symbols for architecture x86_64:
  "AActor::Vec3Angle(double, TAngle<double>, double, bool)", referenced from:
      Net_DoCommand(int, unsigned char**, int) in d_net.cpp.o
2019-01-26 17:22:35 +02:00
Christoph Oelckers
05830455e7 - made the automap an object.
This simplifies handling a lot because it allows to make the level the owner of its map.
2019-01-26 15:21:20 +01:00
Christoph Oelckers
625e9f2525 - the sector variables are still needed. 2019-01-26 12:22:02 +01:00
Christoph Oelckers
fb86f397a0 - Level as member variable in the sight checker. 2019-01-26 09:01:40 +01:00
Christoph Oelckers
10feb446fa - made most of the EV_* functions part of FLevelLocals. 2019-01-26 08:28:45 +01:00
Christoph Oelckers
28761b4c33 - made G_InitLevelLocals a member function of FLevelLocals.
This was another cheap one with a good number of removed references.
2019-01-25 19:46:03 +01:00
Christoph Oelckers
20989a0b41 - use a local variable to access the level in DLevelScript.
This was a relatively cheap change but removes a significant batch of references to the global variable, only making the entry points to the ACS interpreter relevant.
2019-01-25 19:36:09 +01:00
Rachael Alexanderson
2f84de9c37 - fixed indentations caused by conflict resolution in cherry-picked commit d911fa99a1 2019-01-25 13:02:30 -05:00
Christoph Oelckers
4e052f2857 - use a separate variable pointing to the current level for the UI code.
UI always runs on the primary level, so this does not need the ability to operate on multiple levels. Additionally, this can later be set to null when running play code so that scope violations result in an abort.
2019-01-25 18:31:40 +01:00
nashmuhandes
06e7ca4170 Missed "Abnt_C2" in the keybind name array. 2019-01-25 03:51:39 -05:00
Rachael Alexanderson
1407d0a7c5 - add 'cl_blockcheats' - useful for people who use debugging keys, allows a user to consciously turn off cheats without affecting the server 2019-01-24 22:09:09 -05:00
Christoph Oelckers
ba114f6f23 - give the hardware renderer's drawinfo its own level pointer 2019-01-25 01:26:16 +01:00
Christoph Oelckers
0124cecc15 - added missing #include. 2019-01-25 01:19:35 +01:00
Christoph Oelckers
bf3dc2f99b Merge branch 'rolling_back' into new_level_refactor 2019-01-25 00:57:01 +01:00
Christoph Oelckers
b2ee99c7cc - call level compatibility handlers for all levels and pass the map name as a second parameter.
This is for user-made handlers for which the checksum is rather useless both for deciding whether to call the handler and for identifying the map.
2019-01-25 00:56:15 +01:00
Christoph Oelckers
f4081c33a6 - give line_t a GetLevel function.
The portal getters need this, even though currently it only gets the global level.
2019-01-25 00:42:55 +01:00
Christoph Oelckers
3cef56249d - moved most functions of portals.cpp into FLevelLocals.
Much of this is used during level init and needs to be independent of the current level.
2019-01-25 00:30:55 +01:00
Christoph Oelckers
2623fbb54b - deleted unused mus2midi.cpp file. 2019-01-24 20:40:31 +01:00
Christoph Oelckers
7418ebef56 - use default constructors for the thinkers to avoid empty non-inlined functions. 2019-01-24 20:33:25 +01:00
Christoph Oelckers
4d55c28b60 - moved a large batch of code from p_spec.cpp and a few other files into the maploader folder. 2019-01-24 20:27:34 +01:00
Christoph Oelckers
0a6b6173de - Moved Strife conversation data into FLevelLocals. 2019-01-24 19:53:11 +01:00
Christoph Oelckers
0e5986769e - moved the tid hash into FLevelLocals and adjusted the interface to the iterators. 2019-01-24 19:28:40 +01:00
Christoph Oelckers
4c250a58ca - reroute all uses of FActorIterator and NActorIterator through FLevelLocals. 2019-01-24 18:50:22 +01:00
nashmuhandes
68f0cf111d Punctuated the input strings in UpperCamelCase format. 2019-01-24 04:07:34 -05:00
Nemrtvi
92045bea0e Improved Strife’s BIGFONT file 2019-01-24 04:01:34 -05:00
Christoph Oelckers
1f2162fea8 - moved the scripted creation functions for tag iterators to LevelLocals
The old static methods are now deprecated, this was done to clarify the relationships at play here.
2019-01-24 02:17:10 +01:00