Commit graph

21947 commits

Author SHA1 Message Date
Boondorl
3e939b0ec1 Update quake radii from int -> double
Also enables static portal-aware distance checks as cam view offsets will now properly go through them when shaking
2024-03-28 15:48:45 -04:00
Boondorl
96594e0f34 Updated explosion distances from int -> double 2024-03-28 15:48:35 -04:00
Boondorl
442ac3f78b Updated substitution logic to only replace pointers if safe 2024-03-28 15:48:23 -04:00
Ricardo Luís Vaz Silva
e85ec240bf Store type together with pointers to allow safe substitution 2024-03-28 15:48:23 -04:00
Boondorl
6b7065899d Added interpolation to view position 2024-03-28 15:48:05 -04:00
Magnus Norddahl
e8d8dde283
Ignore vid_maxfps when vsync is enabled.
Increase vid_maxfps to 500 as modern computers have monitors in the 240-500 hz range now.
2024-03-28 02:56:29 -04:00
Ricardo Luís Vaz Silva
682dd1b22d Can't narrow down the JIT bug yet, so block JIT for functions that call Function Pointers temporarily 2024-03-22 13:28:02 -03:00
Ricardo Luís Vaz Silva
071b5c5180 fix argument pointer wrapping in function pointers 2024-03-22 13:28:02 -03:00
Kyle Evans
b1f53e7eb5 src: filesystem: move includes out of the FileSys namespace
The previous situation is unfortunately not sustainable; header pollution
isn't consistent across all non-Windows platforms.  As a result, some of
the earlier includes may pull functions/types into the global namespace too
soon, and the later includes will have no visibility of them because they're
in a different namespace.  Re-including the necessary one doesn't work
because include guards will prevent their re-inclusion, and it's not a good
idea to try and #undefine include guards now that we're in a new namespace.

This fixes the build on FreeBSD, and likely some other systems as well.
2024-03-17 22:00:00 -04:00
Ricardo Luís Vaz Silva
458d81cede Make TArray take functions by forward-reference and call them by invoke
(1. avoids copying for lambdas, and 2. allows passing methods)
2024-03-17 18:07:50 -03:00
Ricardo Luís Vaz Silva
ce479e09ff Fix A_ChangeModel serialization
I overlooked this part on my first A_ChangeModel fix
2024-03-17 18:07:50 -03:00
Ru5tK1ng
631eb5847b Use fromDeg for angle of 0. 2024-03-17 21:03:54 +01:00
Ru5tK1ng
e62651e3cf Fixed: A_LookEx did not account for the +LOOKALLAROUND flag. 2024-03-17 21:03:54 +01:00
Ricardo Luís Vaz Silva
caa4728bd4 Export A_DoChase to zscript and make A_Chase a direct native function 2024-03-17 21:02:52 +01:00
Rachael Alexanderson
7f8ce13d24
- add missing include for macos 2024-03-17 00:58:24 -04:00
Rachael Alexanderson
c73ec97027
- accidentally added erroneous quotes to the last commit 2024-03-16 23:22:42 -04:00
Rachael Alexanderson
1e2a491f9e
- don't show path if longsavemessages is false. fixes https://github.com/ZDoom/gzdoom/issues/2467 2024-03-16 22:58:29 -04:00
Ricardo Luís Vaz Silva
cc88dfbe50 Unrevert two changes
* Sorted Delete for TArray
* Typed constructor for TObjPtr
2024-03-15 17:21:59 -03:00
Ricardo Luís Vaz Silva
0092aa0772 Fix crash with DecoupledModels flag defined but no actual model 2024-03-15 21:08:59 +01:00
Christoph Oelckers
520b960ca5 Reverted the path node system
Code reviews were unfavorable so better nix it before it finds wider use.
2024-03-15 20:24:39 +01:00
Ricardo Luís Vaz Silva
c9e678b60e
Fix missing newlines in animation messages 2024-03-15 14:33:17 -03:00
Major Cooke
fe0de5053a - Fixed: ROLLCENTER was always being applied even when the flag wasn't present. 2024-03-15 01:17:19 -03:00
Ricardo Luís Vaz Silva
341c1bbede Fix crash with DecoupledModels flag defined but no actual model 2024-03-14 18:52:04 -03:00
nashmuhandes
cafafbe3a0 The default bind was wrong here (supposed to be Pov1, not Pov2. Obviously a typo) 2024-03-13 23:48:56 -03:00
Major Cooke
6d99395b68 - Fixed: Fear checks were incorrect when accounting for player being present or not. 2024-03-13 15:40:24 -03:00
Major Cooke
4682b7172e Fixed typo 2024-03-13 13:12:09 -03:00
Major Cooke
f081ef1850 Enhanced pathing for floaters
Their checks are now 2D instead of 3D.
2024-03-12 18:09:02 -04:00
nashmuhandes
0d9855cfe7 Expose LandingSpeed to ZScript. This controls the minimum Z velocity from falling down that's needed to "squat" the player's view (defaults to -8). 2024-03-12 18:08:42 -04:00
Boondorl
730ef1a23a Adjusted view angle interpolation
Now uses deltaangle to get the shortest interpolation path for angles.
2024-03-10 13:48:25 -03:00
Boondorl
0ef042562e Fix for Morph virtual
Allows class<MorphedMonster> to be used as an argument type in place of class<Actor> within the third argument for backwards compatibility.
2024-03-08 20:10:40 +01:00
Major Cooke
05167fd4ef Missed this one. 2024-03-05 13:44:38 -05:00
Major Cooke
d71af3683a Clear the path instead of advancing the node when crossing portals.
- If an actor crosses back over a portal because they're blocked, it will result in false positives.
- Fixed nodes not being targeted for aim direction.
2024-03-05 13:44:38 -05:00
Major Cooke
257ddb520a Extra safety checks. 2024-03-05 13:44:38 -05:00
Major Cooke
5abd7e1ebf Comment warning to modders. 2024-03-05 13:44:38 -05:00
Major Cooke
79fb3dfd31 Implemented KEEPPATH flag. 2024-03-05 13:44:38 -05:00
Major Cooke
69001ad4f7 Added ExcludeNode virtual for actors to reject certain nodes of choice.
- Changed MeleeRange to FriendlySeeBlocks so it's supported by Doom Builder.
2024-03-05 13:44:38 -05:00
Major Cooke
81ebd8c8c4 More progress.
- AMBUSH flag on nodes makes them blind and untargetable when getting `startnode` and `goalnode` for `FindPath()`. This is useful for indicating a node should be skipped when tele/portaling, so the current path can be preserved.
- Setup is simple: place nodes behind lines that tele/portal entities and mark them as AMBUSH.

Other changes:

- Restored global array since blockmap is not a viable option here.
- Added MAPINFO `pathing` flag which enables pathing by default.
- Added NOPATHING flag to disable pathing entirely, useful for maps that have pathing enabled.
- Added `ReachedNode(Actor mo)` virtual, responsible for handling node traversal.
- Nodes now make use of MeleeRange to limit their sight checking functions.
2024-03-05 13:44:38 -05:00
Ricardo Luís Vaz Silva
ad52e2cc1e AStar 2024-03-05 13:44:38 -05:00
Ricardo Luís Vaz Silva
3348822390 ... 2024-03-05 13:44:38 -05:00
Ricardo Luís Vaz Silva
cc51b486e0 TArray Binary Search 2024-03-05 13:44:38 -05:00
Major Cooke
b2cb4b0a6d Begin adding PathNodes. 2024-03-05 13:44:38 -05:00
Boondorl
3033fafaa7 Improvements to death and cheat handling
Extra safety to ensure dummy Actor deaths properly emulate a real death and aren't duplicate called. Fixed a crash when using the kill command while set to unmorph on death. Super morphing is now possible while using the morphme cheat if passing the morph class directly. Added a flag to ignore player invulnerability completely when morphing.
2024-03-01 08:35:31 -05:00
Boondorl
6c64a4403c Improved ZScript interface for morphing
Added getter and setter functions for handling whether or not the player fields should be gotten/set. Added MRF_KEEPARMOR flag to prevent stripping armor on morph. Optimized unmorphed Actor by setting it to NoInteraction and removing it from the blockmap and sector lists.
2024-03-01 08:35:31 -05:00
Boondorl
12dc5c1506 Further morphing clean up
Players will now use their Alternative field to check if they're morphed instead of their MorphTics. This makes the current state of morphing more reliable, otherwise setting this to 0 manually without unmorphing could have very odd results. Both monsters and players consider 0 morph time to mean infinite now (previously this only applied to monsters). Player unmorphs no longer die in the case of a failed unmorph on death. Removed inventory swapping on player pointer substitution as it's too messy to do here.
2024-03-01 08:35:31 -05:00
Boondorl
30730647fe Fixed inconsistencies between player and monster morphing
The Tome of Power and Chaos Device will now work on non-players. The STAYMORPHED flag will now work on players.
2024-03-01 08:35:31 -05:00
Boondorl
2c09a443b4 Reworked Morphing
Removed StaticPointerSubstitution in favor of a much safer function that only changes select pointers. As a result the ability to properly modify morphing has been opened back up to ZScript. Many missing virtual callbacks were amended and MorphedDeath has been reworked to only be called back on an actual morphed death. MorphedMonster is no longer required to morph an Actor. CheckUnmorph virtual added that gets called back on morphed Actors. Fixed numerous bugs related to morph behavior.
2024-03-01 08:35:31 -05:00
Boondorl
b469770ecc Reworked view offsetting
View offsets are now added after the base position and angles (accounting for interpolation) are calculated. Behavior was centralized into a singular tracer that all view offsets now use to prevent clipping out of the map. Cleaned up camera rendering behavior. Angles are now properly normalized after all offsetting is accounted for. The chase cam can now update in real-time instead of forcing interpolation.
2024-03-01 07:10:26 -05:00
Rachael Alexanderson
08a093ffda
- merge pull request https://github.com/ZDoom/gzdoom/pull/1577/files 2024-03-01 05:56:15 -05:00
Christoph Oelckers
ef4c4ee503 fixed resource leak in OpenDecompressor 2024-02-27 07:20:40 +01:00
RaveYard
205d4b5ff3 Support negative fadestep for particles 2024-02-27 07:03:16 +01:00