Commit graph

1821 commits

Author SHA1 Message Date
Christoph Oelckers
08f66585b7 - un-deprecated the integer MSTime variant.
Due to undefined downconversion rules from double to int, there is no way to safely downcast the return from MSTimef, meaning the function is completely useless for retrieving integral time stamps.
The old version is essential for these cases and must be kept around.
2022-10-09 13:42:51 +02:00
Christoph Oelckers
519005ff4d - snd_reset cannot be shared. 2022-10-02 20:22:23 +02:00
Player701
78360c1888 - Exported GetDisplayTopOffset for font characters to ZScript 2022-09-30 10:07:41 +02:00
Christoph Oelckers
1b762474f0 - added missing obituary for Strife's turret. 2022-09-28 07:56:19 +02:00
inkoalawetrust
69b9f107f0 Added support for BLOCKLANDMONSTERS in Line_SetBlocking.
This PR was written by MrRaveYard
2022-09-28 07:56:12 +02:00
ZZYZX
a4a4e4e9f9 Fix planeval; add direct sector slope manipulation 2022-09-20 15:08:02 -04:00
ZZYZX
f049421831 Modify to have one GetVertexZ rather than IsVertexZSet / GetVertexZ 2022-09-20 15:08:02 -04:00
ZZYZX
a58acfc625 Add vertex height manipulation functions to LevelPostProcessor 2022-09-20 15:08:02 -04:00
nashmuhandes
7ce364bf0f Add sv_noextraammo. When set to true, disables that weird hardcoded behavior from original Doom that gives extra ammo when picking up weapons in deathmatch 2022-09-15 20:41:16 -04:00
Rachael Alexanderson
ca6a2152b9 - add freezetics actor property 2022-09-03 17:58:16 -04:00
Rachael Alexanderson
8468f712e0 - fix arti teleport and arti teleother not respecting useplayerstartz mapflag 2022-08-26 04:11:29 -04:00
nashmuhandes
50d16c75d9 Add corona actor 2022-08-11 20:38:24 +08:00
Christoph Oelckers
362b41be1a - use consistent index types for array function return values. 2022-08-05 21:16:20 +02:00
Marisa the Magician
931211b9db Export FindLumpFullName to ZScript. 2022-08-05 20:25:02 +02:00
Christoph Oelckers
3563c99ead - made adjustments for proper int type promotion to allow internal ZScript to compile with it on.
* Emit a warning when relational comparisons are made between signed and unsigned ints.
* Handle shift operators so that they do not fail for constant definitions.
* changed return type of Array::Size() to signed int as most code out there is using it this way and would otherwise drown in warnings.
* fixed a few deprecation warnings.
2022-08-03 10:26:29 +02:00
Alexander Kromm
46d9564507 localize "Unknown" option menu string 2022-07-30 17:54:19 +02:00
Magnus Norddahl
e2778ba442 Move TexMan.GetCanvas and GetTextureCanvas to common 2022-07-25 18:50:16 +02:00
Magnus Norddahl
bb503950df Add canvastexture definition to animdefs.
Split canvas texture rendering from camera texture rendering.
2022-07-25 18:50:16 +02:00
Magnus Norddahl
0049fea8d6 Add missing DrawText binding 2022-07-25 18:50:16 +02:00
Magnus Norddahl
4f0b02b396 Add a 2d drawer to canvas textures 2022-07-25 18:50:16 +02:00
Shiny Metagross
9ab6557822 A_ChangeModel now has generatorIndex
- To really take advantage of this function, I thought it would be useful to be able to add additional models if the user wants to. Let's say you got a player model at index 0. Your gun model has the same frames, but you don't want to duplicate the modeldef data. With generator index, you don't need to duplicate the data, just tell generator index to clone frame data from index 0.
- Implemented a little something to check if a negative skin or model index were passed, and prevent modders from pulling that off.
2022-07-22 17:11:59 +02:00
Shiny Metagross
69ee1eb0a2 Surfaceskin modification
- Made it so when rendering a model, it clones an smf to use so that data isn't overwritten
- Reimplemented the skin index property. This changes the behavior of this index if CMDL_USESURFACESKIN is activated
2022-07-22 17:11:59 +02:00
Shiny Metagross
ec3d81a34f More fixes
- Let's fill the holes of serialized data so it can properly be removed instead of leaving undefined behavior behind.
- Added CMDL_HIDEMODEL flag. This makes a model index invisible.
2022-07-22 17:11:59 +02:00
Shiny Metagross
e827e9b086 TArrays to TObjPtr
- Made the 2 TArrays into a class called DActorModelData.
- Removed the skinindex and now just uses one index
- Replaced a bunch of nullptr for modelDef checking with NAME_None
- Added some garbage cleanup to A_ChangeModel itself, as well as removing memory of modelData that is no longer needed
- Attempted serialize code, putting up for review
2022-07-22 17:11:59 +02:00
Shiny Metagross
5abadd3aab A_ChangeModeldef
-Added A_ChangeModelDef
A_ChangeModel(modeldef, modelpath, model, modelindex, skinpath, skin, skinid, flags)

This can change the modeldef, model and skins of an actor.

Currently, modelindex and skinindex accept indices from 0-15.

An actor MUST have a modeldef in order to use this function, either defined from modeldef, or given one through the modeldef parameter. You can pass "" to use the same modeldef. Likewise, passing "" for model or skin will just revert to the default model.

Available flags:
CMDL_WEAPONTOPLAYER - If used on a weapon, this instead change's the model on the player instead.

One issue I am aware of right now is that clearing a model by "" sort of works but is buggy. For now you can just manually set the model back using the names explicitly. However, I am stumped and I think getting more eyes on it would help.
2022-07-22 17:11:59 +02:00
Gutawer
937c22ff14
- add a method for filling a shape2d instead of using a texture (#1661)
Co-authored-by: Christoph Oelckers <coelckers@users.noreply.github.com>
2022-07-16 14:57:22 +02:00
Gutawer
ee0d90a983
- add stencil buffer support for 2d drawing (#1660)
Co-authored-by: Christoph Oelckers <coelckers@users.noreply.github.com>
2022-07-16 14:56:28 +02:00
Gutawer
1e27fac288 - add a system for setting all of 2D drawing's transform, not just shapes 2022-07-16 14:53:07 +02:00
nashmuhandes
c6ae73d6d2 - Expose ConsoleState to scripts
- Make ConsoleState uint8_t sized
2022-07-16 14:38:47 +02:00
Christoph Oelckers
ef8dd4d01e - fixed and consolidated artifact check in cheat code. 2022-07-15 07:56:22 +02:00
Christoph Oelckers
a952d0f36a -let A_FireProjectile pass through the second return value of SpawnPlayerMissile. 2022-07-14 07:59:52 +02:00
Christoph Oelckers
e1c458ab2f - fixed PoisonCloud's looping animation count. 2022-07-14 07:54:19 +02:00
Christoph Oelckers
b719ab53f8 - weapons are not artifacts. 2022-07-14 00:12:20 +02:00
Christoph Oelckers
a847dacaaa - fix scale members in actor.zs 2022-07-12 16:56:56 +02:00
Christoph Oelckers
ac0a68c7ca - removed the duplicate EPrintLevel definition. 2022-07-11 19:40:58 +02:00
Ricardo Luís Vaz Silva
365131e1e3 rename PrintString to PrintfEx and make it a vararg function 2022-07-11 19:35:51 +02:00
Ricardo Luís Vaz Silva
03c8da8a44 Expose Print Flags to ZScript 2022-07-11 19:35:51 +02:00
Christoph Oelckers
aae1d1439a - reverted AActor::scale to a DVector2.
This was causing comparison precision issues with existing script code.
2022-07-11 12:20:34 +02:00
Christoph Oelckers
2397b9c117 - missed a ZScript declaration. 2022-06-16 08:23:09 +02:00
RaveYard
f9bf6f9311 Implement FVector ZScript for Actor Scale 2022-06-12 17:57:44 +02:00
Blue Shadow
d862bf4347 - added FailSound property to PuzzleItem 2022-06-12 17:26:18 +02:00
Christoph Oelckers
71ce8aa79a - block wipes when streaming movies are playing.
For synchronization purposes they cannot be interrupted by the wipe loop.
This also groups the cutscene state in a struct for readability purposes.
2022-06-06 12:30:47 +02:00
Christoph Oelckers
c62e14d2c1 - Backend update from Raze
Mostly cleanup and better separation of game/backend concerns.
2022-06-06 12:09:29 +02:00
Alexander Kromm
ea007f56f2 fix scrolling when selecting item by key 2022-06-02 19:49:39 +02:00
Major Cooke
d5e448671d Added LightLevel.
- Setting it to any value > -1 will override the sector's light level.
2022-05-31 21:00:31 +02:00
nashmuhandes
f235dcc38e Squashed commit of the following:
commit 553c4c12abd15e5f8fa02496ccfde81bdfdb53b0
Merge: cb03de5d2 add4ff12a
Author: nashmuhandes <nashbackslash@gmail.com>
Date:   Mon Feb 14 18:55:52 2022 +0800

    Merge branch 'master' of https://github.com/coelckers/gzdoom into ActorFallAndSink

commit cb03de5d2fdcba8a32b83be32579be935c8b6600
Author: nashmuhandes <nashbackslash@gmail.com>
Date:   Tue Jan 25 12:54:33 2022 +0800

    Re-add WaterDepth to the custom namedef file

commit 8d1ff3c16018dd7c73c8950aa4c51f2bc0207837
Merge: f201e6307 a9eaae074
Author: nashmuhandes <nashbackslash@gmail.com>
Date:   Tue Jan 25 12:52:57 2022 +0800

    Merge branch 'master' of https://github.com/coelckers/gzdoom into ActorFallAndSink

    # Conflicts:
    #	src/common/engine/namedef.h

commit f201e630706fc0ea7628b8a32bd5d88afb712208
Author: nashmuhandes <nashbackslash@gmail.com>
Date:   Sun Jan 16 20:45:27 2022 +0800

    Fix compile error (MAX() -> max())

commit fe292ebd4312afe34b1e35e4c1eafba0dc168920
Merge: 3f9150c4e 12ed24d06
Author: nashmuhandes <nashbackslash@gmail.com>
Date:   Sun Jan 16 20:37:58 2022 +0800

    Merge branch 'master' of https://github.com/coelckers/gzdoom into ActorFallAndSink

    # Conflicts:
    #	src/playsim/p_mobj.cpp

commit 3f9150c4eae1c5c5510e8f9b1c4bfaab46a96b8f
Author: nashmuhandes <nashbackslash@gmail.com>
Date:   Sat May 29 05:32:54 2021 +0800

    - Implement virtual Actor.FallAndSink for scriptable falling and water physics
    - Added Actor.WaterDepth to retrieve how submerged and actor is, in map units

    Original work credited to "gzdoomthrowaway"
2022-05-31 18:57:38 +02:00
Major Cooke
748156c846 Optimized CanCrossLine.
- Remove P_PointOnLineSide check
- Made CanCrossLine opt-in by requiring the CROSSLINECHECK flag.
2022-05-31 10:46:06 +02:00
Major Cooke
5afd14fd4d Added a vector to CanCrossLine to indicate the next position the actor will be in if the move succeeds. 2022-05-31 10:46:06 +02:00
Major Cooke
b5b2dd0903 Added CanCrossLine virtual for actors.
- Called last after all other line checks occur. Returning false means the actor cannot cross that line.
2022-05-31 10:46:06 +02:00
Sally Coolatta
a98c1efc26 Add WorldOffset field
Adjusts the thing's 3D position on render side. This allows for adjusting a thing's visual position without impacting their hitbox.

# Conflicts:
#	src/playsim/p_mobj.cpp
2022-05-31 10:14:32 +02:00