Chronos Ouroboros
c64ce0fdfd
Fixed multidimensional array definitions.
2019-01-23 21:02:33 +01:00
alexey.lysiuk
5132119812
- increased range of valid sound positions and velocities
...
https://forum.zdoom.org/viewtopic.php?t=61420
2019-01-23 20:59:38 +01:00
Christoph Oelckers
0fa92d59e2
- same for the ambient sound
...
# Conflicts:
# src/s_advsound.cpp
2019-01-23 20:57:39 +01:00
Christoph Oelckers
36f0ab2ea1
- removed dependency on global time in sound sequence code.
...
This can better use a countdown timer that doesn't depend on external behavior.
2019-01-23 20:56:49 +01:00
Christoph Oelckers
ed3bb2fd09
Moved access to ACS instance data out of ScriptUtil worker class
...
This is better done at a higher level.
2019-01-23 20:55:59 +01:00
Christoph Oelckers
848d9c3750
- Moved high level parts of view border drawing to status bar.
2019-01-23 20:55:38 +01:00
alexey.lysiuk
86acb876f1
- fixed key number assignment during parsing of locks
...
https://forum.zdoom.org/viewtopic.php?t=63171
2019-01-23 20:45:36 +01:00
alexey.lysiuk
59d84296bf
- fixed crash on creation of scroll texture
...
Example: Hadephobia MAP19 crashes on loading
2019-01-23 20:45:21 +01:00
alexey.lysiuk
11958b713e
- fixed many compilation errors with GCC and Clang
2019-01-23 20:45:01 +01:00
Chronos Ouroboros
4fdcc47edc
Added support for implicitly-sized initialized arrays.
...
Also fixed dynamic arrays not being cleared before initializing.
2019-01-23 20:43:46 +01:00
Chronos Ouroboros
7c91b27463
Fixed some issues in the ZScript array compilation code.
2019-01-23 20:43:06 +01:00
Major Cooke
7666997580
Fixed Thing_ProjectileAimed being broken.
...
- It was calling the fallback aiming in the wrong place when it should have been outside the speed check.
- Credit to _mental_ for the base code, but no gotos involved.
2019-01-23 20:42:17 +01:00
Christoph Oelckers
83ce72db48
- check the shader timer only once per frame, not once per draw call.
2019-01-23 20:40:17 +01:00
Christoph Oelckers
4de649d4d1
- major cleanup of p_scroll.cpp to eliminate the use of indices to access sidedefs and sectors.
2019-01-23 20:39:38 +01:00
Christoph Oelckers
55339761f6
- fixed serialization of ACS thinker.
2019-01-06 10:25:46 +01:00
Christoph Oelckers
a11eea98b5
- replaced some NULLs with nullptr.
2019-01-06 09:39:35 +01:00
Christoph Oelckers
8ead5a3a6b
- pass level num to string locking functions as a parameter.
2019-01-06 09:37:11 +01:00
Christoph Oelckers
cf7ab6d085
- let level stats screen operate only on the data it got provided instead of getting the current level from global variables.
2019-01-06 09:03:58 +01:00
Christoph Oelckers
dca4a42dd6
- changed light mode handling of the hardware renderer so that it only operates on local copies but doesn't alter the level's setting.
...
There are several places where a temporary change of light mode is needed, all these made this change in the global level struct. Now the change is only local to the active draw info.
2019-01-06 09:00:52 +01:00
Christoph Oelckers
3328821a98
- pass 'level' as a parameter to AABBTree. Also renamed a few things to make the code easier to read.
2019-01-06 08:24:04 +01:00
Chronos Ouroboros
a0ce8f2988
Implemented compound initializers for arrays.
2019-01-06 00:46:56 +01:00
Christoph Oelckers
b445c6fabc
- actually use the newly added indices.
2019-01-06 00:46:09 +01:00
Christoph Oelckers
8b18ed4759
- store the index of each map item in the struct itself and return that for the Index function.
...
If we ever want to refactor the global level data these must not reference the 'level' variable.
The main parts of the map loader cannot use this information, because it can only be created after running the node builder, so it got its own set of index functions instead.
2019-01-06 00:41:46 +01:00
Christoph Oelckers
c05968146e
- starting to reduce references to global level variable.
2019-01-05 22:46:45 +01:00
Christoph Oelckers
6f6dc60e2b
- moved the global ACS ActiveThinker variable into FLevelLocals.
2019-01-05 21:59:34 +01:00
Christoph Oelckers
b386a09358
- changed AFuncDesc initialization to avoid generating initializer functions.
...
Visual C++ will never statically initialize a class instance where a member field has a default value set, so the DEFINE_ACTION_FUNCTION variants without a direct native call need to be handled differently. The easiest way to do this is to leave out the nullptr default and omit the value in the initializer list. For trailing fields this will always get them nulled.
2019-01-05 20:48:22 +01:00
Player701
28531c3f8f
- Fixed spawn height of projectiles created by SpawnPlayerMissile.
2019-01-05 18:19:51 +01:00
Christoph Oelckers
7b235ea13e
- moved the per-level ACS state into FLevelLocals.
2019-01-05 18:19:35 +01:00
Christoph Oelckers
131eef9eb9
- converted the ACS Stringbuilder macros into inline functions.
2019-01-05 16:09:59 +01:00
Christoph Oelckers
c651045ed3
- let RunHealth clamping respect the newly added global properties.
2019-01-05 15:37:14 +01:00
Christoph Oelckers
639fb43682
-reordered sector_t so that the internal declarations are at the top, followed by the member variables and the methods.
...
Also tried to sort them by renderer use but that turned out to be without any performance effect, even though the struct is a bit better aligned now and several bytes shorter.
2019-01-05 13:27:32 +01:00
Christoph Oelckers
a0ad4ea193
- made the corpse queue a simple array in FLevelLocals.
...
I have to wonder why it had to use such a complicated implementation that provided no advantages whatsoever.
The new code is just 1/5th of the old one's size and much closer to Hexen's original implementation which also was a simple array but with no means to resize the queue.
2019-01-05 10:53:06 +01:00
Christoph Oelckers
dab68184f5
- moved the global spot state into FLevelLocals.
...
This way it doesn't even have to be a thinker.
2019-01-05 10:04:27 +01:00
Christoph Oelckers
7b16433e97
- changed FraggleScript setup so that the MapLoader does not use the global level variable anymore.
...
This involves passing the level explicitly to many functions. What was done here may seem a bit excessive but at least it covers everything.
Most importantly, the global ActiveThinker pointer has been moved into FLevelLocals and is now getting tracked properly by the level without using dangerous assumptions about how the game organizes its data.
2019-01-05 09:40:03 +01:00
Christoph Oelckers
95995e4aa3
- use a local pointer to the current level in FraggleScript parser.
...
Just to test a few things.
2019-01-05 08:59:45 +01:00
Christoph Oelckers
86551e53df
- bumped savegame version because the recent scriptification of APlayerPawn will render all old savegames unusable.
2019-01-05 08:52:21 +01:00
Christoph Oelckers
bfbf7ff9c9
- made forwardmove and sidemove defaults configurable through the gameinfo section.
2019-01-05 08:48:57 +01:00
Christoph Oelckers
b47a3804d2
- fixed delete calls on FDynamicLight.
...
This isn't allocated from the system heap so it cannot be freed by it.
2019-01-04 16:12:39 +01:00
Christoph Oelckers
980977d444
- fixed: GetSoundClass must be able to handle non-players.
2019-01-04 16:08:45 +01:00
Magnus Norddahl
f10ded756e
- split shadowmap AABB tree into two parts. one for static and one for dynamic
...
- upload only the dynamic AABB subtree using glBufferSubData
- change internal raytracing stack limit from 16 to 32
- update shadowmap AABB tree after R_SetupFrame for proper frame interpolation
2019-01-04 15:51:59 +01:00
Magnus Norddahl
4f4d10ce5f
- disable polyobj AABBTree updates
2019-01-04 13:56:36 +01:00
Christoph Oelckers
3b77e2db68
- fixed: The update check for a changed AABBTree was inverted.
2019-01-04 08:46:07 +01:00
Christoph Oelckers
9ba0e7b783
- fixed: The player sound lookup would fail if a sound was only available for the last gender in the list.
...
This is an ancient bug, but it never registered before - only after making 'other' the default gender for nonsense input it became apparent.
2019-01-04 00:32:47 +01:00
drfrag666
845141d9af
- Default gender for sound classes should be male and not other since it could be undefined in SNDINFO.
2019-01-03 18:05:13 -05:00
Christoph Oelckers
f9ff097457
- fixed A_Chase default detection.
2019-01-03 23:43:15 +01:00
Christoph Oelckers
6d87716381
- fixed: G_StartTravel must remove all dynamic lights from the actors it is about to carry over to the next level.
2019-01-03 23:23:08 +01:00
Christoph Oelckers
9521b6cd1f
- removed all remaining native parts of APlayerPawn.
...
Unlike the other classes, the places where variables from this class were accessed were quite scattered so there isn't much scriptified code. Instead, most of these places are now using the script variable access methods.
This was the last remaining subclass of AActor, meaning that class Actor can now be opened for user-side extensions.
2019-01-03 22:05:49 +01:00
Christoph Oelckers
c18e895272
- exported all native components of APlayerPawn.
...
Only the class definition itself remains and needs to be taken care of.
2019-01-03 18:01:58 +01:00
Christoph Oelckers
3314a1efe5
- scriptified the remaining PlayerPawn methods.
2019-01-03 14:35:17 +01:00
Christoph Oelckers
2258a71c36
- took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places.
2019-01-03 13:59:46 +01:00
alexey.lysiuk
4cc78c3273
- fixed compilation warning with GCC and Clang
...
src/hwrenderer/dynlights/hw_aabbtree.cpp:143:24: warning: comparison of integers of different signs: 'const int' and 'unsigned int' [-Wsign-compare]
2019-01-03 14:24:09 +02:00
Christoph Oelckers
23146f1af2
- scriptified PlayerPawn.ResetAirSupply.
2019-01-03 13:04:48 +01:00
Christoph Oelckers
badacbb968
- scriptified APlayerPawn's DamageFade handling.
2019-01-03 12:47:34 +01:00
Christoph Oelckers
2bd72478ee
- scriptified P_CalcHeight.
...
This was the only code using the ViewBob member variable.
This also moves the range check for this variable to its application, because a badly behaved mod can just as easily change it at run time instead of just setting an absurdly large value in the class definition.
2019-01-03 11:57:20 +01:00
Christoph Oelckers
9e5c5b68c5
- did some more lightening on the PlayerPawn class. 4 more properties and one native member function have been handled.
2019-01-03 10:06:45 +01:00
Christoph Oelckers
8da1b5c1b0
- properly handle passing of the light flags.
...
Since these can be changed on the placed light actor they have to be read from there, so this is now a pointer in FDynamicLight, just like the other properties that can be user-changed.
Also did some cleanup on the interface so that external code doesn't need to dereference the lightflags pointer but can use utility functions for all flags.
2019-01-03 09:24:22 +01:00
Christoph Oelckers
da735c0e87
- initialize the PlayerPawn members only used by scripts through the script variable interface.
...
The goal here is to eliminate the native PlayerPawn class, after all, so this will be needed anyway.
2019-01-03 08:27:41 +01:00
Magnus Norddahl
850ef1cd78
- Add missing screenshot sRGB gamma when vid_hdr is active
2019-01-03 03:48:47 +01:00
Christoph Oelckers
d057af7c3b
- fixed: DeactivateLight called Activate instead of Deactivate.
2019-01-03 00:39:42 +01:00
Christoph Oelckers
c753d59a72
- scriptified A_SkullPop and ObtainInventory.
...
These were the last relevant items to access PlayerPawn.InvFirst.
2019-01-03 00:35:56 +01:00
Christoph Oelckers
6eb8ded471
- made ColorRangeStart and ColorRangeEnd meta properties of APlayerPawn.
...
These are only used during initialization and they should have been readonly from the start.
2019-01-02 22:13:57 +01:00
Major Cooke
8bbbd95dfd
- Fixed: NODAMAGE was not accounted for with pain.
2019-01-02 15:37:43 +01:00
alexey.lysiuk
cb6b5e92ab
- added missing range checks to level compatibility handler
2019-01-02 16:35:23 +02:00
Christoph Oelckers
bc47fdfa78
- scriptified useflechette CCMD's item finding code.
2019-01-02 11:58:26 +01:00
Timo Myyrä
9e80caa85d
fix Unix builds without backtrace functions in their libc
...
backtrace functions are not present in all libc implementations. Cmake has
module to add external libraries into build if needed so use it to fix build on
Unix systems without backtrace in libc.
2019-01-02 08:44:26 +01:00
Christoph Oelckers
dc612703d5
- scriptified the declaration of AmbientSound
...
Most of the code is still native, but this means that PlayerPawn is the last remaining child of AActor.
2019-01-02 01:05:20 +01:00
Christoph Oelckers
cea97e5cc6
- fixed memory leaks in network code.
...
ReadString allocates a buffer, so saving it in a local variable and then forgetting it will not free the buffer afterward.
(This should probably be refactored to use some safer methods to read the string than this old-school method...)
2019-01-01 19:40:57 +01:00
Christoph Oelckers
d654e02dea
- rewrote dynamic lights to not use actors for the internal representation and made DynamicLight a purely scripted class.
...
This should be less of a drag on the playsim than having each light a separate actor. A quick check with ZDCMP2 showed that the light processing time was reduced to 1/3rd from 0.5 ms to 0.17 ms per tic.
It's also one native actor class less.
2019-01-01 19:35:55 +01:00
Christoph Oelckers
3f8d565dbb
- split up P_FreeLevelData, so that everything that clears out fields in FLevelLocals is now in a member function of that class.
2018-12-31 12:42:03 +01:00
Christoph Oelckers
c45e1cbbf0
- fixed typo in sky preparation.
2018-12-31 00:14:15 +01:00
player701
7c8cdf80d1
- Fixed settings_controller not updating properly when a player becomes the new arbitrator in a netgame.
2018-12-30 10:48:55 +02:00
Christoph Oelckers
53be21eb58
- added missing return in P_RemoveThing.
2018-12-30 08:40:04 +01:00
Christoph Oelckers
5ca6f9af9a
- added missing null pointer check to SBarInfo's inventory bar drawer.
2018-12-30 08:31:40 +01:00
Christoph Oelckers
65b01bd16d
- fixed incomplete commit.
...
I have no idea where the rest of this stuff went...
2018-12-30 08:22:34 +01:00
Christoph Oelckers
de375ce187
- fixed the direct native variant of DynamicLight.SetOffset.
2018-12-29 17:50:31 +01:00
Christoph Oelckers
4d34e5997b
- pass level as an argument to some code being used by the map loader.
2018-12-29 16:20:06 +01:00
Christoph Oelckers
eecf3a203a
- let UDMFParser use the level from the map loader, not the global variable.
2018-12-29 16:20:06 +01:00
Christoph Oelckers
f35ac75ca2
- fixed precaching of switches.
...
The backwards animation accessed the wrong array which in case of sequences with different length could crash
2018-12-29 14:01:07 +01:00
Christoph Oelckers
0aeaed4207
- use a TArray to store the sprite model hash to get rid of one atterm call.
2018-12-29 13:28:22 +01:00
Christoph Oelckers
313ec62a5c
- removed the static members from FMaterial.
...
Their functionality has been moved to more appropriate places already and they were essentially unused.
2018-12-29 13:28:22 +01:00
Christoph Oelckers
20184e1e99
- removed some unused bits of code.
2018-12-29 13:28:22 +01:00
Christoph Oelckers
3fbc55a8dd
- do not use global variables to track state in the decal code.
...
Setups like this have caused problems in the past so best get rid of it.
2018-12-29 13:28:22 +01:00
Christoph Oelckers
17e053499e
- reworked the lock code to remove the 255 locks limit and to allow it to automatically deinitialize.
2018-12-29 10:19:31 +01:00
Christoph Oelckers
982c622367
- fixed: The polyobject spawn point collector did not properly check for bad mapthings.
2018-12-29 08:49:53 +01:00
Christoph Oelckers
f31b1b92c9
- eliminated the two global FraggleScript variables by moving them into DFraggleThinker.
2018-12-29 01:18:21 +01:00
Christoph Oelckers
496dd4ee68
- treat non-existent arrays in the savegame as zero length.
2018-12-29 01:17:59 +01:00
Christoph Oelckers
cad43e431c
- cleanuo.
2018-12-28 23:19:01 +01:00
Christoph Oelckers
3559f7dffb
Merge branch 'master' of https://github.com/coelckers/gzdoom
2018-12-28 23:14:22 +01:00
Christoph Oelckers
5f303859e9
- made some changes to how the compatibility code works to allow removing the last remaining global variables of the map loading code.
...
Everything temporary is now part of the MapLoader class.
2018-12-28 23:14:11 +01:00
Christoph Oelckers
d066a1f10f
- renamed some variables because they were getting into the way of analyzing usage of the global variable of the same name.
2018-12-28 18:11:33 +01:00
Major Cooke
7acf43741a
Fixed: IsFakePain received the modified damage instead of the raw, preventing ALLOWPAIN from working as intended.
2018-12-28 17:23:55 +01:00
Christoph Oelckers
0e904286e8
- moved renderinfo.cpp entriely into the map loader.
2018-12-28 15:51:32 +01:00
Christoph Oelckers
e66e594dd0
- moved the sidetemp array into the map loader.
2018-12-28 15:30:23 +01:00
Christoph Oelckers
11e9cdae33
- split polyobject init into its own file and cleaned things up a bit.
2018-12-28 15:05:05 +01:00
Christoph Oelckers
9de2f5c1e7
- made polyobject init code part of MapLoader.
2018-12-28 14:48:10 +01:00
Christoph Oelckers
326e4d8559
- store the master pointer for the subsector lists in sector_t and the seg lists in side_t in FLevelLocals as a TArray instead of relying on the first element's pointer for this.
...
This simply way bad style.
2018-12-28 14:24:22 +01:00
Magnus Norddahl
c499c563a0
- remove WallSampler
2018-12-28 13:04:54 +01:00
Christoph Oelckers
64595abe60
- moved main polyobject array into FLevelLocals and simplified the setup process to not depend on P_SpawnMapThing.
...
Since the SpawnedThings array is still available when polyobjects are spawned it makes no sense to create an expensive linked list in P_SpawnMapThing.
This can be done far better by scanning through the array again and collect all matching items in a second array.
2018-12-28 10:08:39 +01:00
Christoph Oelckers
84a28454dc
- split maploader.cpp so that the parts that are not setting up the actual map data go back to p_setup.cpp.
2018-12-28 09:17:10 +01:00
Rachael Alexanderson
c980f1c27f
- g3.8pre
2018-12-27 23:46:21 -05:00