Commit graph

14751 commits

Author SHA1 Message Date
alexey.lysiuk
86452ed684 - fixed constant propagation for operator && in ZScript
https://forum.zdoom.org/viewtopic.php?t=69912
2020-09-20 11:03:16 +02:00
vidaritos
a12073feaf pass ScriptPosition down to color parser functions 2020-09-19 00:53:09 +02:00
Cacodemon345
aef7d59b87 Add FALLDAMAGE flag and add property to properly apply falling damage… (#1153)
* Add FALLDAMAGE flag and add property to properly apply falling damage to the monsters

* Change name of propermonsterdamage property to propermonsterfallingdamage
# Conflicts:
#	src/gamedata/g_mapinfo.h
#	src/p_mobj.cpp
2020-09-16 13:28:21 +02:00
alexey.lysiuk
1334db68a4 - fixed setting of skill level via action special
https://forum.zdoom.org/viewtopic.php?t=69858
2020-09-14 15:28:57 +02:00
drfrag
abd1d710cd - Fixed -glversion 3 was not being promoted to 3.3. 2020-09-14 15:28:55 +02:00
Kyle Johnson
4915758586 Disallow sound to be played on destroyed actors
It's possible for an actor to call Destroy() in a ZScript method (such
as Tick()) and then subsequently call A_StartSound() to play a sound.
Generally speaking this doesn't happen within a given class, but with a
class hierarchy, Destroy() may be called unbeknownst to a mod developer.
Even though checking bDestroyed is likely good practice, this ensures
that sounds won't be started on actors flagged for cleanup.

# Conflicts:
#	src/sound/s_doomsound.cpp
2020-09-13 02:31:21 +02:00
AFADoomer
e018b324cb Add string table lookup to SECRETS lump handling
- If the hint text portion of a STRINGS lump entry begins with a '$', the value is treated as a string table lookup

Allows SECRETS strings to be translated via LANGUAGE lump.  Reference: https://forum.zdoom.org/viewtopic.php?f=15&t=69827

# Conflicts:
#	src/c_cmds.cpp
2020-09-11 12:15:01 +02:00
Rachael Alexanderson
8c2d89e1eb - rename 'AlwaysCenterStatusBar' to 'FixUnityStatusBar', original name became a misnomer especially with updates that made it more specific in its use
# Conflicts:
#	src/gi.h
#	wadsrc_extra/static/iwadinfo.txt

# Conflicts:
#	src/gi.h
2020-09-09 12:38:02 +02:00
Rachael Alexanderson
904926e778 - do unity data status bar correction only if stbar is in an iwad
# Conflicts:
#	src/d_main.cpp
#	wadsrc_extra/static/iwadinfo.txt
2020-09-05 13:40:41 +02:00
drfrag
258d9dde25 - add support for the (as of now) newest version of the Unity re-releases
# Conflicts:
#	src/gi.h
#	src/win32/i_steam.cpp
#	wadsrc_extra/static/iwadinfo.txt

(with Rachael's flag and hacked JPL's fix)

# Conflicts:
#	src/gi.h
2020-09-05 00:01:53 +02:00
drfrag
b6f9fd1e02 - Now disable the old random flag mostly for game-breaking generators. 2020-09-03 00:51:11 +02:00
Marisa Kirisame
0bc5bccb3b Add Travelled virtual for PlayerPawn, akin to the same function for Inventory. (#1169) 2020-09-02 13:56:24 +02:00
Marisa Kirisame
0255ee7719 Add Pre/PostTeleport virtuals, for special handling of actor teleportation. 2020-09-02 13:56:22 +02:00
Alexander Kromm (m8f)
5f9e3522a7 autosave and make screenshot only if there is no other game actions (#1126)
In-game fix for this bug: https://forum.zdoom.org/viewtopic.php?f=43&t=59889&start=60#p1121698
because it may be also caused by other scripts or even manually.
2020-09-01 20:51:44 +02:00
3saster
a3d7029e2c Removed some time specifiers that aren't standard and can crash GZDoom (#1166)
A number of the specifiers were GNU extensions that aren't actually standard
2020-08-29 22:51:31 +02:00
drfrag
74cffeb84f - Add the DF2_NO_COOP_THING_SPAWNDM flag to prevent spawning MP things in coop. 2020-08-29 17:57:24 +02:00
alexey.lysiuk
6b16b6a0c1 - fixed compilation warnings reported by MSVC
src\common\audio\sound\s_sound.cpp(556,27): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
src\scripting\vmthunks.cpp(2678,13): warning C4244: 'return': conversion from 'time_t' to 'int', possible loss of data
2020-08-29 15:43:21 +02:00
alexey.lysiuk
8755a5efc1 - fill array of objects with nulls on reserve
When item of object array is reserved but not written, it contains random garbage that is treated as valid pointer by VM and GC

https://forum.zdoom.org/viewtopic.php?t=69703
2020-08-29 15:43:18 +02:00
alexey.lysiuk
6f3205174d - fixed getting state name with incomplete list of actor classes
https://forum.zdoom.org/viewtopic.php?t=69713
2020-08-29 11:50:18 +02:00
alexey.lysiuk
3ff3a5f846 - fixed compilation warnings introduced recently
src/console/c_cmds.cpp:690:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
src/scripting/vmthunks.cpp:2698:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
2020-08-29 11:50:16 +02:00
3saster
26f2bfe3fd Implemented Clock Class (#977)
* Simplified some stuff, made up-to-date

* Dealt with DST problems

* Made SystemTime.Format clearscope, as there is no reason for this function to be limited to the ui
# Conflicts:
#	wadsrc/static/zscript/ui/statusbar/alt_hud.zs
2020-08-28 17:20:28 +02:00
MajorCooke
4f522c0ac3 View Angles (Part 1 - Redux) (#1002)
* Added ViewAngle/Pitch/Roll properties to actors.

- These are offsets for camera angles that allow turning the camera without affecting aim or movement direction.
- Added A_SetView<Angle/Pitch/Roll>, which will set the view direction.
- Added ABSVIEWANGLES flag, used to make the view absolute instead of an offset.

* Converted functions to be direct-native.
2020-08-28 13:47:22 +02:00
MajorCooke
62f3a1cf08 Added an optional extra float parameter to $pitchshift. (#1150)
- This allows for setting a randomized range for the pitch each time the sound is initialized.
# Conflicts:
#	src/sound/s_sound.cpp
2020-08-28 13:47:09 +02:00
MajorCooke
83f82afbc8 Optimized P_CheckPosition. (#1161)
- If the actor passed into the function has THRUACTORS, PIT_CheckThing won't be called anymore.
- Moved THRUACTORS check to just under the self clipping check in PIT_CheckThing.
2020-08-28 13:46:55 +02:00
Chronos Ouroboros
3ea75a7863 Fixed an incorrect abort message on out of bounds array access. 2020-08-28 13:46:48 +02:00
alexey.lysiuk
643cba776b - added initialization for line and sector portals
Resizing of portal arrays during serialization could lead to processing of junk data

https://forum.zdoom.org/viewtopic.php?t=67494

# Conflicts:
#	src/maploader/specials.cpp
#	src/portal.cpp

# Conflicts:
#	src/portal.h
2020-08-28 13:46:10 +02:00
alexey.lysiuk
36210acc28 - update floor/ceiling for inventory items after traveling
Inventory items had dangling floor and ceiling sector pointers after transition to a new level
This could cause random issues with serialization

https://forum.zdoom.org/viewtopic.php?t=67494
2020-08-28 13:44:41 +02:00
Ed the Bat
83eeaac940 Optional override for SetSlot and ClearPlayerClasses
With this, a decade-long struggle can now be ended.

# Conflicts:
#	src/keysections.cpp
#	wadsrc/static/menudef.txt
2020-08-28 13:42:40 +02:00
drfrag
7416a1d49b - Disable compat_oldrandom for a few more PRNGs just in case. 2020-08-28 13:25:27 +02:00
drfrag
a020070bf0 - Add game load message. 2020-08-24 18:31:31 +02:00
drfrag
0a210ed7f0 - Disable chat for single player, controlled by the chat_self CVAR. 2020-08-24 17:59:51 +02:00
drfrag
a228edf64f - Disable the original Doom PRNG flag for a bunch of named generators. 2020-08-24 17:22:53 +02:00
drfrag
eeef1c2dad - Now base the old PRNG flag on Edward850's implementation but done in reverse.
Also disable it for some generators.
https://forum.zdoom.org/viewtopic.php?f=4&t=47546
2020-08-24 17:06:09 +02:00
drfrag
e002d61823 Revert "Ported the COMPATF2_OLD_RANDOM_GENERATOR compatibility flag from Zandronum".
It made demos and MP games desync.
2020-08-24 16:19:16 +02:00
drfrag
f9bd158211 - Ported the COMPATF2_OLD_RANDOM_GENERATOR compatibility flag from Zandronum and added it to the Doom (Strict) compatibility mode.
Added new compatflag "old random generator", controlled by the new CVAR compat_oldrandom. If this is enabled, the original Doom random table is used to generate random integers in [0,255], which should make for instance the SSG cause a little more damage.
2020-08-24 16:11:07 +02:00
Chronos Ouroboros
0ea4e182c7 Fixed nested structs breaking the ZScript compiler under certain circumstances. 2020-08-15 19:02:58 +02:00
RockstarRaccoonAlt
2c3303e723 Fix obscure error in Animated Doors where the Actor can be NULL
This is a quick fix for an error in which Animated Doors crash the game by trying to check "actor->player" when "actor" itself is NULL.  Deleting the check entirely also worked, but I worried it might be there for some higher-level scripting reason.  This just puts in a check to make sure actor isn't NULL before checking actor->player, and keeps the behavior in that case the same.

I think this was happening because I had doors being opened by projectiles (like in Metroid) which were being despawned into NULL pointers when they hit the doors, as this was an issue when initially programming said doors..
2020-08-15 11:27:45 +02:00
MajorCooke
3d22c635f4 P_BounceActor now calls SpecialMissileHit before any other bouncing effects are processed. Return values are as such: (#1156)
- 1: The missile will continue moving through the actor, and it's down to the modder to handle bouncing.
- 0: The missile will explode.
- Any other value will process a bouncing actor as normally done in the engine.
2020-08-14 12:46:31 +02:00
alexey.lysiuk
a4fe7b6de2 - fixed: UMAPINFO partime was multiplied by ticrate
https://www.doomworld.com/forum/post/2167749
2020-08-03 17:57:30 +02:00
Rachael Alexanderson
3197679114 - demote pwad defcvars error to a warning 2020-08-01 17:31:43 +02:00
Major Cooke
09f5d1b666 Added $PitchSet <logical name> <float> for SNDINFO.
- Sets the direct pitch of the sound to the specific float. Default is 0.0, meaning do not set a specific pitch. Regular pitch is 1.0.
- Only works for direct sound definitions.
- Overrides $PitchShift unless value is <= 0.0
- Overridden by A_StartSound's pitch parameter if the value > 0.0.
2020-07-24 12:42:17 +02:00
Rachael Alexanderson
b9e98889ef - add 'sv_alwaystally' defaults to 0 with the following states:
* 0: previous behavior (completely MAPINFO controlled)
* 1: always show level tally at the end of an episode
* 2: always show level tally even when changing levels within a hub

# Conflicts:
#	src/g_level.cpp
#	src/g_levellocals.h

# Conflicts:
#	src/g_level.cpp
2020-07-21 21:38:00 +02:00
Major Cooke
b9e2063a65 Begin TICRATE conversion.
- Moved TICRATE from Thinker to Object in ZScript so status bars have access to it.

# Conflicts:
#	src/p_effect.h
#	wadsrc/static/zscript/base.zs
2020-07-15 19:03:44 +02:00
drfrag
54482bf165 - Fix compilation with VS 2019? 2020-07-12 12:14:33 +02:00
Marisa Kirisame
b6ee4151ee Optimize UE1 vertex normal computation. 2020-07-12 12:14:30 +02:00
Rachael Alexanderson
de2d564c98 - change recent /0 fix to conform to UDMF specs
# Conflicts:
#	src/playsim/p_spec.cpp
2020-06-25 16:07:20 +02:00
drfrag
cf083f5b56 - Fixed division by zero when damageinterval was not specified from ZScript. 2020-06-25 14:02:29 +02:00
alexey.lysiuk
d3b5e952ba - fixed freeze with StartSlideshow called for undefined intermission
https://forum.zdoom.org/viewtopic.php?t=69079
2020-06-23 20:15:45 +02:00
drfrag
aad005c688 - Don't show the iwad selection box with -iwad. 2020-06-21 15:54:13 +02:00
drfrag
299cd93a3f - LZDoom 3.86. 2020-06-20 18:28:37 +02:00
alexey.lysiuk
da8c452795 - added mixin support to AST output 2020-06-20 16:25:35 +02:00
alexey.lysiuk
f2b1d45985 - fixed leaking full VM frames
https://forum.zdoom.org/viewtopic.php?t=69055
2020-06-20 10:48:32 +02:00
Cacodemon345
a0fee03209 Account for the NOTONAUTOMAP flag when using am_thingrenderstyles 2020-06-20 10:48:21 +02:00
Christoph Oelckers
8eb09a0099 - added missing target check to A_RadiusDamageSelf. 2020-06-19 11:54:03 +02:00
Christoph Oelckers
7706dd65f9 - fixed: AActor::GetModifiedDamage must account for the inventory items to get destroyed in its scripted subfunctions. 2020-06-13 01:49:23 +02:00
drfrag
19183ba157 - Fixed: check for bad sidedefs was not taking into account unused ones.
# Conflicts:
#	src/p_setup.cpp
2020-06-12 19:28:21 +02:00
Christoph Oelckers
68d95befd4 - mapped "Smooth mouse" back to m_filter CVAR and removed smooth_mouse.
The option effectively disables per frame mouse checks.
The motivation to add it was that many wireless mice 10-15 years ago had update rates of less than 35Hz, and on these it was necessary to sync mouse input with the playsim to properly interpolate between updates.
Today this is totally useless and even counterproductive because modern mice have significantly higher update rates, so this option no longer smoothes things but instead makes the mouse feel more choppy.
2020-06-10 13:54:09 +02:00
Christoph Oelckers
555dea3c8a - do not allow playing sounds during PlayerFinishLevel.
This gets called right before the level ends, any sound in here would play during the intermission or at the start of the next level.

# Conflicts:
#	src/sound/s_soundinternal.h
2020-06-09 23:29:26 +02:00
drfrag
d4dba5ed3f - Add fake missing DTA_Desaturate DrawTexture tag. 2020-06-09 19:41:28 +02:00
drfrag
796c25b056 - Add missing DrawTextureTags.
DTA_FlipY, DTA_SrcX, DTA_SrcY, DTA_SrcWidth and DTA_SrcHeight.
2020-06-09 18:42:52 +02:00
nashmuhandes
7d20e74603 Fixed wrong MINDEMOVERSION which was committed in 95f447927a 2020-06-08 15:50:37 +02:00
drfrag
5cd3f66dd2 - Bumped ZScript version. 2020-06-08 14:44:15 +02:00
Marisa Kirisame
4ca8d538b3 Hotfix: LineTrace now reports the correct number of portal crossings. 2020-06-07 15:52:15 +02:00
alexey.lysiuk
c00dddea68 - tighten rules for action functions called from Decorate
FxVMFunctionCall (previously used to call action functions from Decorate) skipped self pointer compatibility checks

https://forum.zdoom.org/viewtopic.php?t=68678
2020-06-07 14:51:48 +02:00
Christoph Oelckers
100897b406 - fixed: The full dotted lump filter string was never used.
The code added all partial matches to the file system but not the full match.

# Conflicts:
#	src/resourcefiles/resourcefile.cpp
2020-06-07 14:35:29 +02:00
alexey.lysiuk
8c877cb36a - fixed (un)morphing of more than one actor from ACS
https://forum.zdoom.org/viewtopic.php?t=68847

# Conflicts:
#	src/p_acs.cpp
2020-06-07 14:35:19 +02:00
alexey.lysiuk
55bbc4a86b - fixed setup of JIT functions that require extra frame space
https://forum.zdoom.org/viewtopic.php?t=68816
2020-06-07 14:35:05 +02:00
Alexander Kromm
d28ba37af2 make various getter and pure-math methods clearscope, and where applicable, const
Original PR: https://github.com/coelckers/gzdoom/pull/532

Status of the original PR

1. Actor
- [already in] deltaangle
- [already in] absangle
- [already in] AngleToVector
- [already in] RotateVector
- [already in] Normalize180
- [already in] BobSin
- [already in] GetDefaultSpeed
- [this PR] GetBobOffset
- [this PR] InStateSequence
- [already in] FindState
- [already in] GetDropItems
- [this PR] DistanceBySpeed
- [this PR] AccuracyFactor
- [not in original PR, for PlayerInfo.isTotallyFrozen] isFrozen

2. PlayerInfo
- [this PR] GetUserName
- [this PR] GetColor
- [this PR] GetDisplayColor
- [this PR] GetColorSet
- [this PR] GetPlayerClassNum
- [this PR] GetSkin
- [this PR] GetNeverSwitch
- [this PR] GetGender
- [this PR] GetTeam
- [this PR] GetAutoaim
- [this PR] GetNoAutostartMap
- [this PR] GetClassicFlight
- [this PR] IsTotallyFrozen

3. C++ methods, to match ZScript:

- [scriptified] AActor::AccuracyFactor() to Actor.AccuracyFactor
- [this PR] AActor::DistanceBySpeed(AActor *, double) — it is a combination of getter and pure math
- [this PR] AActor::Distance2D(AActor *, bool) — called by DistanceBySpeed
- [this PR] AActor::Distance2D(AActor *, double, double, bool) — called by DistanceBySpeed
- [not in original PR, for PlayerInfo.isTotallyFrozen] AActor::isFrozen

# Conflicts:
#	src/actor.h
#	src/actorinlines.h
2020-06-07 14:34:48 +02:00
Christoph Oelckers
3106b46481 - advanced coordinate control for overlays over DTA_Fullscreen images.
Manually merged, there were severe conflicts.

# Conflicts:
#	src/textures/textures.h
#	src/v_draw.cpp
#	src/v_video.h
2020-06-07 14:15:59 +02:00
Christoph Oelckers
bbceaa1fcb - added limited support for replacing the intermission backgrounds in Doom 1 with widescreen images.
Due to how the placement works here, it is only usable with fullscreenautoaspect mode 3.

# Conflicts:
#	src/wi_stuff.cpp
2020-06-07 13:28:12 +02:00
Christoph Oelckers
17add7f47f - don't let CHANF_AUTO hijack other channels.
With CHANF_OVERLAP this isn't needed anymore - any sound started on CHAN_AUTO can actually play on this channel with overlap implicitly allowed.
This has the added advantage that these sounds can be reliably accessed with other function by using CHAN_AUTO.

# Conflicts:
#	src/v_2ddrawer.cpp
2020-06-07 13:27:02 +02:00
Christoph Oelckers
af10281799 - fixed some double to float conversion warnings. 2020-06-04 10:50:36 +02:00
Christoph Oelckers
8ec5a4616b - fixed: vertically mirrored textures should not be subjected to empty space optimizations because the algorithm cannot deal with the inverted case.
# Conflicts:
#	src/gl/scene/gl_wall.h
2020-06-04 01:52:21 +02:00
Christoph Oelckers
30327ffa4f - fixed: the 3D floor processing code in the renderer did not restore the render style after finishing.
Normally this won't be noticable, the only exception is if the last processed 3D floor had additive translucency and colored fog - this case is special because for additive rendering the fog color needs to be disabled.

# Conflicts:
#	src/gl/scene/gl_walls.cpp
2020-06-04 01:46:14 +02:00
Edoardo Prezioso
09fbbfb1c6 - Fixed OpenAL regression with looping sounds with playing length 0.
If such case occurs, the starttime parameter passed to the sound functions is ignored and truncated to 0.
2020-06-03 17:08:47 +02:00
Christoph Oelckers
55390b2403 - fixed floorclipping checks for 3D floors.
Neither the setup nor the in-game checks were correct, because this code comes from a time where ceilings could not have a terrain, meaning that 3D floors couldn't have one.
2020-06-03 11:23:30 +02:00
Christoph Oelckers
b43d87c4cd - reject all 0-special lines for activation.
This is to ensure consistency between all callers of this function.
2020-06-03 00:07:25 +02:00
Christoph Oelckers
d8db13a539 - use modulo, not bitwise and-ing to check the damage delay for terrain based damage.
This was apparently overlooked when refactoring the damage system 4 years ago.
2020-06-03 00:07:23 +02:00
drfrag
524d8ee524 - Present the iwad selection box also with only one iwad. 2020-06-02 16:38:33 +02:00
Hugo Locurcio
03c9906b55 Add a cvar to control weapon bobbing while firing
This simulates a feature found in Crispy Doom, which keeps the
weapon bobbing while firing. This leads to a "smoother" appearance
which may look a bit prettier to some people.

The default value of 0 preserves the old behavior.
2020-06-01 10:39:09 +02:00
drfrag
0ec9af91a9 - Fixed crash printing weapon name tags. 2020-05-31 16:41:01 +02:00
drfrag
a05df40a6e - Fixed crash on maps with out of range sidedef and sector numbers, adapted from PRBoom.
# Conflicts:
#	src/p_setup.cpp
2020-05-29 23:50:49 +02:00
drfrag
98de1423ea - Reload fake fonts, people keep doing it and that made some mods incompatible. 2020-05-27 23:41:38 +02:00
Christoph Oelckers
42b037d708 - fixed: TRF_ALLACTORS did not consider actors without any flag being set. 2020-05-26 00:30:11 +02:00
Christoph Oelckers
8c9cf5234a - fixed missing sound for Polyobj_MoveTo. 2020-05-26 00:30:05 +02:00
Marisa Kirisame
be13bbb9a2 Add mapinfo option to disable merging of identical pickup messages on same tic
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2020-05-24 11:04:20 +02:00
alexey.lysiuk
c386a71c3c - added #include to fix compilation with MSVC 16.6.0
https://forum.zdoom.org/viewtopic.php?t=68641

# Conflicts:
#	src/files_decompress.cpp
#	src/sound/s_music.cpp
2020-05-22 21:35:55 +02:00
Alexander Kromm
a8282c3ec6 fix "'ictionary' is freed outside the GC process" warning 2020-05-22 21:35:51 +02:00
alexey.lysiuk
898860eebf - fixed erroneous removal of property flag members
https://forum.zdoom.org/viewtopic.php?t=63520
2020-05-17 02:10:10 +02:00
Rachael Alexanderson
f477a1aa47 - force player respawn to call up the player's default class settings before determining where to respawn the player
# Conflicts:
#	src/g_levellocals.h
#	src/p_mobj.cpp
2020-05-08 14:52:58 +02:00
Mekboss
b658d4c225 Fix MSVS compile bug and add offset parameter for SprayDecal
# Conflicts:
#	src/g_shared/a_sharedglobal.h
2020-05-08 14:52:56 +02:00
Mekboss
6e30ac5f3c Replace function variables to DVector3
# Conflicts:
#	src/g_shared/a_sharedglobal.h
2020-05-08 14:52:53 +02:00
Mekboss
bfe367fb20 Add optional direction parameters for SprayDecal and its A_SprayDecal zscript counterpart
# Conflicts:
#	src/g_shared/a_sharedglobal.h
2020-05-08 14:52:51 +02:00
Cacodemon345
19b125ca3a Fix bouncing missiles not dealing damage when hitting top/bottom (#1068)
* Fix bouncing missiles not dealing damage when hitting top/bottom
2020-04-30 11:45:45 +02:00
arookas
dec6a03caf Add option to invert mouse x 2020-04-30 11:45:43 +02:00
Christoph Oelckers
ae882d983a - fixed ZScript compiler crash with dereferencing null pointers 2020-04-30 11:45:37 +02:00
PaulyB
df1e469163 Properly namespaced UDMF flag 2020-04-28 02:23:07 +02:00
PaulyB
acdf18bc75 Exposed MTF_NOCOUNT to UDMF 2020-04-28 02:23:05 +02:00
PaulyB
e59fe8e01f Added MTF_NOCOUNT to spawn flags 2020-04-28 02:22:44 +02:00
drfrag
0d8d51f0b4 - Bump LASTRUNVERSION for defcvars. Missed this. 2020-04-23 14:03:13 +02:00