Commit graph

6 commits

Author SHA1 Message Date
Christoph Oelckers
aa340145ac - moved the remaining thinker code to g_shared 2019-01-31 02:51:07 +01:00
Christoph Oelckers
4984bc8c5f - prettification of a few files 2019-01-31 02:50:12 +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
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
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