Commit graph

16158 commits

Author SHA1 Message Date
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
Rachael Alexanderson
de88ca48ab - force CMake to use internal asmjit. I left it in a state so that it can easily be changed back in the future. 2019-01-02 08:19:03 -05: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
Marrub
3e3d21cd35 Fix A_CustomBulletAttack's spawnofs_xy parameter
The current behaviour offsets to the front of the actor rather than the side, due to an oversight in the code, which oddly is not present in the A_FireBullets equivalent.
2019-01-02 08:13:53 +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
Player701
68091db598 - Since GetParentAmmo is now virtual, BackpackItem and the "give ammo" cheat should call GetParentAmmo to determine base ammo classes. 2019-01-01 22:00:35 +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
alexey.lysiuk
99479d84b1 - fixed everlasting fast projectile after hitting ceiling
Without the test for ceiling hit fast projectile could enter its Death state every tick infinitely

https://forum.zdoom.org/viewtopic.php?t=63023
2019-01-01 08:14:28 +01:00
Christoph Oelckers
0b2a919bbe - fixed crash in AutoUseStrifeHealth
The loop never checked if the item was still valid and would continue to try to use it, even after it was removed from the inventory and destroyed.
As native code this just failed silently, but with the VM it needs to be explicitly checked.
2018-12-31 19:03:02 +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
Major Cooke
8d9d71f55f - Fixed: SXF_CLEARCALLERSPECIAL cleared the spawned actor's special instead of the caller. 2018-12-30 19:01:31 +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
alexey.lysiuk
df2bef2f60 - fixed SPC music loops
This reverts the following commit from game-music-emu repository
49238f9ae5

https://forum.zdoom.org/viewtopic.php?t=62613
2018-12-29 15:49:02 +02: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
alexey.lysiuk
36896a1224 - fixed ammo check for weapon with 'uses both' flags
https://forum.zdoom.org/viewtopic.php?t=63047
2018-12-29 13:36:10 +02:00
alexey.lysiuk
8e684f9687 - fixed missing attack sound in A_CustomPunch
See 7bb3855439/src/p_actionfunctions.cpp (L1729)

https://forum.zdoom.org/viewtopic.php?t=63049
2018-12-29 12:34:38 +02: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
dd3dba2ef1 - made PlayerPawn.TweakSpeeds virtual. 2018-12-29 08:43:36 +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