Commit graph

19238 commits

Author SHA1 Message Date
Boondorl
714eb8910c Reworked player loading
Resolves a host of issues related to playing loading, both in singleplayer and multiplayer. Name-based player data selection now works meaning join order no longer has to be preserved.
2024-11-03 19:50:16 -05:00
Christoph Oelckers
a899571d8c got rid of strlwr.
The 3 remaining uses were completely redundant.
2024-11-02 09:07:07 +01:00
Christoph Oelckers
6fc256709c fixed the particle replacement code.
OldestParticle was not properly tracked which could result in circular lists.
To make maintenance easier, the replacement code and the free particle part were merged into one to only have one place where the linked list is modified.
2024-11-01 08:46:02 +01:00
Boondorl
de8d839885 Moved Actor TID selector out of header 2024-10-31 14:52:34 -03:00
Boondorl
f5ceaafbbc Added net id functions for ACS
Includes net id getter and activator setter functionality. Essentially acts as a pseudo pointer system for Actors within ACS.
2024-10-31 14:52:34 -03:00
Major Cooke
9ca5bef4ea Fixed STRETCHPIXELS flag not being exposed. 2024-10-30 18:54:23 -03:00
Ricardo Luís Vaz Silva
7b95977e2a Allow using Self as the class name in the default block to refer to the current class 2024-10-26 22:59:33 -03:00
Dileep V. Reddy
2ba57b5068 Reduce number of multiply ops per frame and increase x-axis clipper range for orthographic projection. 2024-10-26 18:36:45 -04:00
Kaelan
8b73332366 Proper static function use 2024-10-26 00:21:16 -03:00
Kaelan
d9fa7c3894 Re-move bounds checks out of core engine per request 2024-10-26 00:21:16 -03:00
Kaelan
4b3273b229 Add bounds check 2024-10-26 00:21:16 -03:00
Kaelan
275635adc5 add set/get plane reflectivity 2024-10-26 00:21:16 -03:00
Rachael Alexanderson
fe28defeca
- cap the size of the string copy calls in LevelStatEntry() 2024-10-25 19:15:26 -04:00
Christoph Oelckers
a14bba3561 Check array size for overflow.
Since ZScript is a 32 bit VM, the largest safe value for an array's physical size is 2GB. Any larger value will be destroyed by the compiler which relies on signed 32 bit values too much.
2024-10-25 08:47:19 +02:00
Christoph Oelckers
ee6991e6d8 Do a check if a local variable exceeds the available stack space.
Windows stack is 1 MB so play it safe and allow 512 kb as max. stack space for a single function.
2024-10-25 07:55:17 +02:00
Rachael Alexanderson
8e16822ef9
- error out if destroying a canvas object 2024-10-22 20:51:56 -04:00
Major Cooke
6ed8aa6d69 Removed debug line 2024-10-22 00:45:48 -04:00
Ricardo Luís Vaz Silva
d0e6bce4e6 add CVar to control footstep volume 2024-10-21 14:53:53 -03:00
Ricardo Luís Vaz Silva
d07d08ce9f Add velocity/distance based footsteps 2024-10-21 14:53:53 -03:00
Ricardo Luís Vaz Silva
7b59642844 make sure WalkStepTics and RunStepTics read ints, not floats 2024-10-21 14:53:53 -03:00
Professor Hastig
40546420b0 fixed UMAPINFO's label field to allow 'clear' as argument. 2024-10-21 12:22:20 -03:00
inkoalawetrust
34dc204517
Re-added sector damage for non-players. (#2773)
* Re-add non-player sector damage.

Reimplements SECMF_HURTMONSTERS and SECMF_HARMINAIR.

* Fixed 3D floor handling for sector damage.

Fixes sector damage to either monsters or players not working on (non-)solid 3D floors.
2024-10-20 07:51:36 -04:00
nashmuhandes
12c6d1361a Move no-mipmapping from actor renderflag/particle flag, to a material property in GLDEFS, where it makes more sense. The feature was introduced in the short-lived engine version of 4.13 which was deemed too broken and needed to be replaced with a newer version anyway, so might as well perform an API-breaking change at this point in time. Note that this currently only works for sprites (its primary targeted use case) -- walls, flats and models can be patched in later. 2024-10-19 18:35:54 -04:00
Ricardo Luís Vaz Silva
c5da81763d Fully revert #2479 2024-10-19 11:31:50 -03:00
Rachael Alexanderson
4ba53e34e4
Revert "Added SECMF_HURTMONSTERS, SECMF_HARMINAIR and NOSECTORDAMAGE."
This reverts commit 391f496512.
2024-10-19 10:25:03 -04:00
Rachael Alexanderson
dd740b59e0
Revert "- simplify and deconstruct logic for applying sector damage - also fixes voodoo doll sector damage in TNT MAP30"
This reverts commit 3e33e31d19.

Revert "Added MF9_FORCESECTORDAMAGE."

This reverts commit 61bd3a739a.
2024-10-19 10:17:22 -04:00
Christoph Oelckers
e81d563cf4 made FCommandLine::operator[] return a const char * and fixed two places where this triggered a compile error. 2024-10-19 13:22:30 +02:00
Christoph Oelckers
c5308e4448 fix bad string comparison. 2024-10-19 13:13:11 +02:00
Christoph Oelckers
c0bd024094 do not open resource files from non-open file readers. 2024-10-19 13:11:48 +02:00
dileepvr
6e7148b074 Missed a line in RenderOrthoNoFog
Tying up the fov fix.
2024-10-18 03:34:29 -04:00
dileepvr
c38b119435 FOV scales ortho up to 180 degrees
One line change in r_utility.cpp affecting a custom field.

Orthographic projection sees "more" of the sceen as fov increases, but only up to 180 degrees, after which it will have no effect.
Orthographic projection has no meaning for fov since there is no Frustum. But since this is fundamental to the engine, I am reinterpreting it. Cherno wanted this too.
I'll update the wiki if this gets in.
2024-10-18 03:34:29 -04:00
Rachael Alexanderson
3bf3af9441
- readd canvas check 2024-10-17 23:45:09 -04:00
Rachael Alexanderson
c2fd99a24d
Revert "- Actor.GetSpecies() is a non-destructive function"
This reverts commit ee5442c06b.
2024-10-17 21:28:52 -04:00
Ricardo Luís Vaz Silva
758c0dbc7e allow getting checksum for current map 2024-10-17 22:07:21 +02:00
Christoph Oelckers
261881e0d7 do not set console mode from an uninitialized variable. 2024-10-16 16:54:15 +02:00
Rachael Alexanderson
2a8b629a12
- keep ENABLE_VIRTUAL_TERMINAL_PROCESSING mode in isolated console mode 2024-10-16 06:05:15 -04:00
Rachael Alexanderson
fcf65bee27
- we don't need these includes anymore 2024-10-16 06:01:34 -04:00
Rachael Alexanderson
0a9eb474cd
- fix isolated console mode (i.e. launching from explorer.exe) 2024-10-16 05:59:59 -04:00
Kaelan
81f2bef4ac Further cleanup as per recommendations 2024-10-16 00:39:32 -03:00
Kaelan
b4d214a0cf add PARAM_PROLOGUE 2024-10-16 00:39:32 -03:00
Kaelan
9d725276ac Add manual config saving to CVar struct
Allows for calling to save custom cvars manually to ensure they're reliably stored. As is, the only way to ensure that cvars are saved is to safely/manually close out GZDoom, meaning if a crash occurs, that data is lost.

THis is very detrimental to mods/standalone projects that rely on CVars for storing custom data, and or data that transcends save games.
2024-10-16 00:39:32 -03:00
Rachael Alexanderson
70eb4b974d
- enable console subsystem processing for Windows, enable runtime detection 2024-10-15 10:50:24 -04:00
Rachael Alexanderson
ee5442c06b
- Actor.GetSpecies() is a non-destructive function 2024-10-14 17:31:18 -04:00
Major Cooke
fa467073eb Added (SPF_)STRETCHPIXELS.
This counteracts the squaring implied by rolling sprites.
2024-10-14 16:14:25 -04:00
Rachael Alexanderson
3e33e31d19
- simplify and deconstruct logic for applying sector damage - also fixes voodoo doll sector damage in TNT MAP30 2024-10-14 03:48:02 -04:00
inkoalawetrust
9df656a9cf
Added LookForEnemiesEx() for returning all enemies in an area. (#2753)
* Compartmentalized the LookForEnemiesInBlock checks

* Added LookForEnemiesEx().

This function allows for ZScript code to get an array with all enemies of the caller found in range. Using similar sight logic as functions like LookForEnemies().

* Added noPlayers parameter to LookForEnemiesEx().

This parameter allows the function to also find players around it.

* Added VM abort to LookForEnemiesEx().

Prevent crashes by passing a null array by reference.
2024-10-14 03:47:53 -04:00
Cacodemon345
c603494057
Interpolate non-Burn screen wipes 2024-10-14 03:47:41 -04:00
inkoalawetrust
12d1afcc4e
Fixed WalkStepTics & RunStepTics in terrain parser
Fixed the discrepancy where WalkStepTics and RunStepTics were called, well, that. In the terrain struct in both C++ and ZScript. While the terrain parser looked for WALKINGSTEPTIME and RUNNINGSTEPTIME instead.
Also made the parse not multiply these time values by the ticrate to treat them as seconds instead of tics.

Added flags for P_HitWater().

Added optional overridable footsteps for players.

Added an overridable MakeFootsteps() virtual in PlayerPawn. Which allows for adding totally custom footstep logic for players. By default, it comes with a basic footstep system that uses the footstep properties of whatever terrain the pawn is standing on. bMakeFootsteps must be enabled on the pawn for the virtual to run.

Added generic StepSound TERRAIN property.

Added a generic step sound TERRAIN property, for defining foot-agnostic step sounds. Used by the built-in footstep system over the individual foot ones.

Simplified MakeFootsteps().

Also removed a leftover debug message.
2024-10-14 03:47:02 -04:00
Jan Engelhardt
8e4080f8d1 Resolve compiler warning about destructor syntax
gcc-14 warns:

tarray.h:927:9: warning: template-id not allowed for destructor in C++20 [-Wtemplate-id-cdtor]
  927 |         ~TDeletingArray<T, TT> ()
2024-10-12 12:00:32 -03:00
Rachael Alexanderson
573cd2f12c
g4.14pre 2024-10-12 01:30:20 -04:00
Rachael Alexanderson
e562111a51
- don't show iwad box if priority iwad has been located for the currently loaded mods gameinfo 2024-10-12 01:25:21 -04:00
Rachael Alexanderson
24792913ca
- don't spam the console log if there's math errors - mostly affects Linux/MacOS because there is no distinction from console apps or GUI apps so they put all the data in the console which can cause lag 2024-10-10 07:28:29 -04:00
inkoalawetrust
61bd3a739a Added MF9_FORCESECTORDAMAGE.
This flag forces non-player actors to take  damage from hurt floors even if SECMF_HURTMONSTERS isn't true.
2024-10-09 13:51:48 -03:00
Christoph Oelckers
d90de3a8a1
avoid floats in integer math. 2024-10-09 09:15:29 -04:00
Dileep V. Reddy
f9a59a989b Orthographic projection Widescreen aspect ratio horizontal clipping fixed. This one-line change only affects ortho viewpoints. Easy to verify in windowed mode. 2024-10-08 12:36:00 -04:00
nashmuhandes
f5c06551e4 Use a light_ prefix for custom ZDRay stuff, and actually parse light_softshadowradius for map things 2024-10-06 11:24:04 -03:00
Ricardo Luís Vaz Silva
19e1d400e4 Add bounds checking to GetMidTexturePosition, add assert to P_GetMidTexturePosition 2024-10-05 23:03:05 -03:00
Christoph Oelckers
413aefb0ab added CVAR to select the preferred MOD player and SNDINFO option to set it per song. 2024-10-05 12:37:55 +02:00
Christoph Oelckers
f0676cdf01 fixed a few memory leaks 2024-10-05 10:22:05 +02:00
Christoph Oelckers
2b2e85005c fix MBF21 ClearCountItem 2024-10-04 18:34:32 +02:00
Christoph Oelckers
ccbebfcf34 fix kill count management in CopyFriendliness when used on corpses. 2024-10-04 18:33:53 +02:00
Christoph Oelckers
6aa71184f7 fixed: MBF21's flag functions did not call the special wrappers for MF_FRIENDLY. 2024-10-03 23:01:09 +02:00
Christoph Oelckers
3798fd815f the MISSILE(EVEN)MORE flags still need to be accessible by ZScript for backwards compatibility.
Since these do not exist anymore an internal interface to Handle/CheckDeprecatedFlags was added.
2024-10-03 12:32:09 +02:00
Christoph Oelckers
8354c4a5c3 Replaced MISSILE(EVEN)MORE with a real property and added related Dehacked options from Crispy Doom.
This also adds proper deprecation messages to the deprecated flags which were missing due to a bad definition macro.
2024-10-03 12:24:16 +02:00
Rachael Alexanderson
ad4eef3b6c
- SPAC_Walking should check for SPAC_MCross not SPAC_PCross 2024-10-01 17:38:58 -04:00
Professor Hastig
2decf10863 add missing 'author' and 'label' UMAPINFO fields. 2024-10-01 12:23:27 -04:00
Christoph Oelckers
d455f57346 remove test code. 2024-10-01 17:28:42 +02:00
Ricardo Luís Vaz Silva
896c73b1e5
Fix compilation 2024-10-01 12:05:49 -03:00
Ricardo Luís Vaz Silva
9f7a8188c5
Fix broken if statement in ParseFireTexture 2024-10-01 11:59:05 -03:00
jekyllgrim
70ec8ce711 Fixed MF9_ISPUFF overlapping with MF9_NOSECTORDAMAGE 2024-10-01 11:53:11 -03:00
jekyllgrim
1392db2f5b Made DamageSource and bIsPuff readonly 2024-10-01 11:53:11 -03:00
Ricardo Luís Vaz Silva
f8b68a6927 Serialize damagesource, fix bad character in actor.zs 2024-10-01 11:53:11 -03:00
jekyllgrim
83165dccbf Add damagesource 2024-10-01 11:53:11 -03:00
jekyllgrim
f13bc09840 Add bIsPuff flag 2024-10-01 11:53:11 -03:00
Christoph Oelckers
59b567689a make the broken ID24 levelnums work somehow so that Legacy of Rust's intermissions play. 2024-10-01 16:48:07 +02:00
Cacodemon345
e88d912892 ID24 interlevel lumps implementation 2024-10-01 16:48:07 +02:00
inkoalawetrust
2c9b8f4eec Fixed problem in CheckForShadows().
Fixed a regression in CheckForShadows() that made it always return a +SHADOW or +SHADOWBLOCK actor even when there were none. Causing monsters to always have messy aim if +DOSHADOWBLOCK is on.
2024-10-01 11:47:33 -03:00
Dileep V. Reddy
568a39d203 Removing pre-clipping of Frustum if pitch > 46 degrees and viewpoint is not allowed out of bounds. This is like old behavior. 2024-09-30 10:16:50 -04:00
Boondorl
8e1b25803e Fix for NoLocalRender not snapshotting between hub levels 2024-09-30 02:21:52 -04:00
Rachael Alexanderson
0b3ee04025
- bail out if shape is null in F2DDrawer::AddShape 2024-09-30 02:09:52 -04:00
Jon Heard
4c27b55eb9 SetSkin and GetSkinCount added to PlayerInfo class 2024-09-29 18:14:52 -04:00
inkoalawetrust
9b8c79d182 Added check for hurt floors in P_IsUnderDamage(). 2024-09-29 18:12:30 -04:00
inkoalawetrust
391f496512 Added SECMF_HURTMONSTERS, SECMF_HARMINAIR and NOSECTORDAMAGE.
- Added SECMF_HURTMONSTERS, which allows monsters in the flagged sector to be hurt with the same behavior as players (i.e damage leaking).
- Added SECMF_HARMINAIR, which allows players (And monsters with SECMF_HURTMONSTERS) to be hurt when they're inside the sector in general, instead of only when they're walking on it. Replicates the behavior of the DAMAGE_IN_AIR flag that SectorDamage() uses.
- Added NOSECTORDAMAGE, which makes actors with the flag immune to any harmful floors.
2024-09-29 18:12:30 -04:00
Rachael Alexanderson
bbeaea1ea7
- implement anamorphesis proof-of-concept (#2431)
Co-authored-by: Rachael Alexanderson <madame-rachelle@users.noreply.github.com>
2024-09-29 18:09:07 -04:00
Hexadec
5cc718ec77
Search more paths in SHARE_DIR (#2610)
* Search more paths in SHARE_DIR

Makes it more compatible with more exotic systems such as Guix or NixOS. (one day we'll have a gzdoom without patches)

* Make more places search in SHARE_DIR.

---------

Co-authored-by: Rachael Alexanderson <18584402+madame-rachelle@users.noreply.github.com>
2024-09-29 18:06:49 -04:00
RaveYard
a4c98d8dd9 Add RADF_CIRCULARTHRUST and matching XF_/RTF_ flags 2024-09-29 17:56:41 -04:00
Boondorl
1e96ed31aa Exported DPrintf
Allows for custom debug message handling using the built-in
2024-09-29 17:56:16 -04:00
HHonzik
96ec9b9dbd Add another soundfonts search directory for *nix
This adds another soundfont search directory for the convenience of the user.
2024-09-29 16:08:51 -04:00
jekyllgrim
994078feae Added FloatBobFactor
This adds a new actor property: `FloatBobFactor` (default 1.0). This will be a multiplier for level.time in `AActor::GetBobOffset`, which finally allows to control not only the range of float bobbing (which is FloatBobStrength) but also the frequency of bobbing.
2024-09-29 16:08:02 -04:00
Rachael Alexanderson
89ce70fd0b - implement SPAC_Walking, mostly useful for teleports or for line crossings that should not happen when the player is falling or flying
- update UDMF spec entry
2024-09-29 16:06:36 -04:00
Rachael Alexanderson
ca9ab7bd5b
- rename 'restart' ccmd to 'debug_restart' since it is in a broken state right now 2024-09-29 16:04:00 -04:00
Rachael Alexanderson
85ae8f8194
- flat sprites are already square, no need to adjust them 2024-09-29 10:05:43 -04:00
Rachael Alexanderson
2c25cc1d9b
- well ... this was a lil redundant 2024-09-28 15:56:42 -04:00
Ricardo Luís Vaz Silva
326480cb31 Fix typo 2024-09-25 18:57:05 -03:00
Boondorl
8c10ac6f38 Added GetDecalName() 2024-09-24 23:38:43 -04:00
Rachael Alexanderson
3524d06813 - export FFont::GetChar() to ZScript 2024-09-20 20:00:01 +02:00
Gene
de87493c41
Fix incorrect boolean logic for drawBillboardFacingCamera 2024-09-20 08:38:45 -04:00
Gene
5347cdf569
Fix billboard facing camera only taking effect when used with XY billboarding 2024-09-19 10:56:24 -04:00
Ricardo Luís Vaz Silva
712dd1133d Fix typo 2024-09-17 14:14:23 -03:00
nashmuhandes
0c3ebf451f Fix missing serialization for skyspeed1 and skyspeed2 2024-09-16 19:02:09 -03:00