Commit graph

14453 commits

Author SHA1 Message Date
Major Cooke
6372cdaa41 Split off pain chance triggering from ReactToDamage into its own function and gave ZScript access to it.
- TriggerPainChance(Name mod, bool forcedPain)
- One exception: PainThrehold is only checked in ReactToDamage, since this function does not require checking damage amount.
2018-12-26 11:55:42 +01:00
Major Cooke
2f7fae2fb0 DamageMobj Refactor
- Split off all reactive functionality (pain, infighting, etc) into its own function, ReactToDamage.
- Refactored all DamageMobj's damage <= 0 values.
 - Any unconditional cancellations now return -1. ReactToDamage will not be called if values < 0.
 - All pain/wound/target changing allowances return 0.
2018-12-26 11:55:42 +01:00
Ijon
d2d684a35a Add NOFRICTION and NOFRICTIONBOUNCE flags
NOFRICTION disables all friction effects on the thing it's set on
(including the speed cap from water/crouching), and NOFRICTIONBOUNCE
disables the "bounce off walls on an icy floor" effect on the thing
it's set on.
2018-12-26 11:49:17 +01:00
Magnus Norddahl
1bb2bb31d4 - fix first softpoly frame being empty 2018-12-25 16:50:11 +01:00
Rachael Alexanderson
dc05220abc - set vid_scalefactor to 1 when using vid_setscale 2018-12-25 00:18:44 -05:00
Christoph Oelckers
a40c617478 - initialize the index field for particles.
This won't contribute to sort order so it should be the same for all particles, which it wasn't because it was never set.
2018-12-24 13:44:08 +01:00
Christoph Oelckers
c58f5095d9 - fixed sprite sorting in the hardware renderer.
This did no longer sort sprites in the same position reliably since the feature to render sprites which only partially are inside a sector was added.
With this, sprites in the same position are no longer guaranteed to be added to the render list in sequence.
Fixed by adding an 'order' field to AActor which gets incremented with each spawned actor and reset when a new level is started.

The software renderer will also need a variation of this fix but its data no longer has access to the defining actor when being sorted, so a bit more work is needed here.
2018-12-24 10:18:58 +01:00
Magnus Norddahl
2cd1734de3 - improve softpoly 3d floor drawing somewhat 2018-12-23 14:59:47 +01:00
Magnus Norddahl
38cffa7646 - fix null pointer crash, replace DONT_DRAW with a boolean, make rw_pic a local variable 2018-12-23 05:01:50 +01:00
alexey.lysiuk
9446ddb318 - fixed default initialization of software warp textures
https://forum.zdoom.org/viewtopic.php?t=62979
2018-12-22 14:15:35 +02:00
alexey.lysiuk
fb540d6d2b - fixed multipatch texture resolving
https://forum.zdoom.org/viewtopic.php?t=62972
2018-12-22 11:21:04 +02:00
alexey.lysiuk
5c5b9eb044 - empty screenshot array is returned by base framebuffer
src/v_video.h:556:94: warning: control reaches end of non-void function [-Wreturn-type]
2018-12-21 14:59:25 +02:00
Christoph Oelckers
f6d9110c70 - removed the redundant GetOffsetPosition export and added direct native support to its existing variants 2018-12-21 13:52:30 +01:00
Christoph Oelckers
a44e63babd - fixed the decal translation handler truncated the translation ID
This was yet another of those old misguided 16 bit space 'optimizations'.
2018-12-21 12:40:05 +01:00
Christoph Oelckers
2c3c91ff42 - fixed: The random sound handler was using 16 bit storage throughout
Changed to use 32 bit and also fixed the random number call which was using the byte value variant of the access operator, effectively limiting the number of choices to 256.
2018-12-21 12:40:05 +01:00
Christoph Oelckers
ebaabcfb4f - a few more explicit local buffer allocations removed. 2018-12-21 12:40:05 +01:00
Christoph Oelckers
cf18dbdfa7 - use a TArray to pass the screenshot buffer
This also removes a few other explicit buffer allocations.
2018-12-21 12:40:05 +01:00
alexey.lysiuk
b3d6dfb55f - fixed lost settings controller state upon new game
https://forum.zdoom.org/viewtopic.php?t=62959
2018-12-21 13:14:21 +02:00
alexey.lysiuk
73d9751bb4 - cleaned up player reinitialization upon new game 2018-12-21 13:14:21 +02:00
Magnus Norddahl
b64dfb54a5 - fix decals looking blackened due to low lookup table precision when alpha is zero 2018-12-21 10:15:09 +01:00
Cacodemon345
789941f24d Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript 2018-12-20 22:54:45 +01:00
Christoph Oelckers
66a2cdb6e9 - added missing null pointer checks to cheat code. 2018-12-20 22:09:41 +01:00
Christoph Oelckers
e279214f5b - removed the hasglnodes variables.
Since the software renderer also requires GL nodes now this was always true.
2018-12-20 18:40:19 +01:00
Christoph Oelckers
d140d767a4 - changed last commit to let the replacement take the original's place and add the old texture at the end with its name cleared.
This is to ensure that this won't break ranged animations but aside from that should produce the same end result.
2018-12-20 18:20:25 +01:00
Christoph Oelckers
120b950291 - changed FTextureManager::ReplaceTexture to only append the new texture instead of replacing the old one.
This should ensure that other references to the original will remain valid.
2018-12-20 18:10:06 +01:00
Christoph Oelckers
e05cedfc0d removed the unused DefaultExtension variant taking a char *. 2018-12-20 12:40:38 +01:00
Magnus Norddahl
b0d8a813f9 - fix missing line number for the function throwing the exception and remove the duplicate call stack line 2018-12-20 04:50:45 +01:00
Magnus Norddahl
8c52f20373 - fix MemcpyCommand not using the same lines for the threads as softpoly (visible as a race condition when screenblocks didn't start at top of screen) 2018-12-20 04:27:30 +01:00
Christoph Oelckers
0faa9111b9 - moved P_OpenMapData and related content out of p_setup.cpp. 2018-12-19 18:41:53 +01:00
Christoph Oelckers
0160841dde - reverse the order of the texture list before resolving it.
Since this deletes the resolved elements one by one and needs to start at the front to ensure consistency, it is better to reverse the order so that the deletions take place at the end of the list which requires a lot less data movement.
On Total Chaos this slowed down texture setup to the point where the mod was basically unlaunchable.
2018-12-19 18:17:59 +01:00
Christoph Oelckers
1a3df8dfba - moved all shutdown handling for sound related resources to I_ShutdownSound instead of registering separate atterm handlers. 2018-12-19 09:39:06 +01:00
Christoph Oelckers
bcff04e76f - fixed: The Heretic sky height hack needs to be stored in the already created texture object as well. 2018-12-19 09:12:58 +01:00
Christoph Oelckers
c471be4409 - added an option to GAMEINFO to either force or disable loading of the default lights and brightmaps.
The mod which prompted me to add this is "The Chosen" which is a Dehacked-based TC and repurposes many original actors for something entirely different.
The stock lights are not usable for this and would make it impossible to add a GAMEINFO lump to it because then there is no way to disable loading of lights in the startup screen.
2018-12-19 01:37:48 +01:00
Magnus Norddahl
ebfa61514e - remove InitSoftwareSky 2018-12-19 04:44:25 +01:00
Magnus Norddahl
db295fae3a - fix sky drawer issues when not using max screenblocks 2018-12-19 04:27:41 +01:00
Magnus Norddahl
e296d2819b - avoid creating labels when they are not used
- remove variable from class as it is only used locally
- set default values in the class
- remove unused field
2018-12-19 01:12:57 +01:00
Magnus Norddahl
650e6a9c1b - removed marked code for how to create GDB/LLDB debug info as it will probably never be implemented 2018-12-19 00:49:43 +01:00
Magnus Norddahl
34007a8d27 - add missing parameter on unix 2018-12-19 00:47:36 +01:00
Chronos Ouroboros
bad8c18c58 Add line numbers to JIT stack traces. (#667) 2018-12-19 00:45:40 +01:00
Magnus Norddahl
9a2b3792ef - don't include the native frames per default 2018-12-19 00:43:50 +01:00
Magnus Norddahl
7785dd1b56 - fix linking and some linux things 2018-12-19 00:23:38 +01:00
Christoph Oelckers
c6a3a6a3fb - fixed misnamed macros. 2018-12-19 00:09:36 +01:00
drfrag
39564d8933 - Fixed linking with MinGW-w64. 2018-12-18 16:43:52 -05:00
Chronos Ouroboros
bb8fcd63c4 Added a function for triggering use/push specials for usage in custom monster AI. 2018-12-18 21:09:13 +01:00
Chronos Ouroboros
e7118804ba Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript. 2018-12-18 21:09:13 +01:00
Christoph Oelckers
462fe891bd - fixed: A powered up weapon which shares its ready state with the parent but is currently in a firing sequence may not force-switch the weapon, because that will cause the sequence to run in the wrong weapon's context. 2018-12-18 20:38:25 +01:00
Christoph Oelckers
6342e85c26 - fixed: The texture scale wasn't copied to image based font characters. 2018-12-18 19:52:56 +01:00
Christoph Oelckers
c597b16f30 - fixed: 'frame' in GLDEFS light definitions was case sensitive. 2018-12-18 19:36:50 +01:00
alexey.lysiuk
8815379e15 - fixed compilation of POSIX targets
Making callstack resolving operational will require a little bit more effort

src/scripting/vm/jit_runtime.cpp:900:31: error: use of undeclared identifier 'frames'
src/scripting/vm/jit_runtime.cpp:903:23: error: use of undeclared identifier 'cnt'
2018-12-18 18:42:37 +02:00
drfrag
1ef5becd4f - Fixed compilation with MinGW-w64 64 bit. 2018-12-18 09:01:56 -05:00