Commit graph

33 commits

Author SHA1 Message Date
Major Cooke
8a61badcad Removed some residuals. 2022-02-22 19:35:50 +01:00
Major Cooke
579c4152d2 Added GetTerrainDef and Sector variant of GetFloorTerrain.
- GetTerrainDef takes the raw number of the Terrains[] index. Can return null.
- GetFloorTerrain (Sector) gets the defs from the position given (either Sector.Floor or Sector.Ceiling).
2022-02-22 19:35:50 +01:00
Major Cooke
4e8d59951b Added A_SetViewPos(Vector3 Offset, int Flags = -1)
- Offset: The offset from the actor's view to move the camera about.
 - Flags: (Default is -1, which means don't change flags)
  - VPSF_ABSOLUTEOFFSET: Don't include actor angles in calculation.
  - VPSF_ABSOLUTEPOS: Position is absolute, and disables all transformations. Modders are responsible for being portal aware!

Notes:
- `ViewPos` in Actor will be `null` until A_SetViewPos is called for the first time.

**Issues:**
- Hiding sprite while in portal incomplete.
2022-01-24 12:00:33 -05:00
Christoph Oelckers
6c12a8de12 - properly track whether some action in the current frame may have triggered a dynamic light activation. 2021-09-21 20:31:43 +02:00
alexey.lysiuk
411b4976c0
- fixed EBlastFlags enum definition 2021-07-21 15:44:07 +03:00
Kaelan
65d9d83ddd Add 'BF_ONLYVISIBLETHINGS' Flag to A_Blast
Adds 'BF_ONLYVISIBLETHINGS' flag to A_Blast, and enables A_Blast to only affect actors that have a line of sight to calling actor.
2021-07-21 06:48:50 -04:00
Marisa Kirisame
a172513535 Expose level_info_t to scripting + helper functions. 2021-04-24 22:37:50 -04:00
nashmuhandes
d98b401daf Add missing ZScript constants for the Strife targeter PSprite layers 2021-02-19 09:56:44 +01:00
Alexander Kromm (m8f)
99ab1e3317
add Pi and some other constants to ZScript (#1304) 2021-02-13 21:34:19 +01:00
drfrag
4ff72e937f - Fixed: Monster reaction time was always zero with fast monsters and not just on nightmare. 2021-01-13 06:30:13 -05:00
Rachael Alexanderson
6e3a4c590d - fix missing SKILLP property in zscript code 2020-11-04 01:29:40 -05:00
Major Cooke
a6bbddf167 Finished implementing PSprite interpolation for vertices.
- Setting WOF_INTERPOLATE on any of the functions with flags (except A_OverlayFlags) will enable one tic for interpolating.
- Setting PSPF_INTERPOLATE with A_OverlayFlags will permanently enable it for that layer, but requires manual calling.
2020-10-25 15:42:11 +01:00
Major Cooke
7c4c0163a3 Added A_OverlayPivotAlign and A_OverlayVertexOffset.
A_OverlayPivotAlign(int layer, int halign, int valign)
- Aligns the pivot point origin to a corner of the PSprite before applying offsets.
- - halign: Horizontal. Applicable constants are PSPA_<LEFT/CENTER/RIGHT>.
- - valign: Vertical. Applicable constants are PSPA_<TOP/CENTER/BOTTOM>.
- - Default is top left.

A_OverlayVertexOffset(int layer, int index, double x, double y, int flags)
- Allows offsetting the corners of the psprite, granting modders the ability to skew weapon sprites as they see fit.
- - index: The index of the vertice. Valid ranges are between [0,3].
- - x/y: Offsets of vertices.
- - flags: Takes WOF_ flags.

Other changes:
- Removed pivot point interpolation since it's pointless.
- Removed PSPF_PIVOTSCREEN due to complications with it having relativity. This will be revisited either later or in another submission.
- Added ResetPSprite() to be called with BringUpWeapon(), A_Lower(), and morph weapon raising to reset all the new properties to 0.

Nearly ready now. Just some final testing needed.
2020-10-25 15:42:11 +01:00
Major Cooke
f9f6e896f3 - Added functionality to WOF_Relative. Untested until the relative code from GetWeaponRect is taken out.
- Fixed A_OverlayPivot carrying over copying of X to Y if Y is zero. This is meant to be exclusive to A_OverlayScale only.
- Added WOF_ZeroY to prevent copying X to Y for A_OverlayScale when desired, mirroring A_SetScale's behavior.
2020-10-25 15:42:09 +01:00
Major Cooke
4a3a5c3877 Replaced PSPF_PIVOTOFFSETREL with WOF_RELATIVE.
The idea behind this is to outright remove the relative position adding from the engine side and let it happen with A_OverlayOffset instead. Still more work to do.
2020-10-25 15:42:09 +01:00
Christoph Oelckers
6336e0e168 - resorted base.zs and constants.zs so that all pure engine content but nothing else is in base.zs, 2020-10-16 22:57:27 +02:00
Player701
ffb4c52c96 - Added NORANDOMPUFFZ flag to A_Saw 2020-10-04 08:07:13 +02:00
Christoph Oelckers
399388d177 - transmit the actual run mode in BT_RUN, because BT_SPEED was poorly designed. 2020-09-26 22:26:26 +02:00
Rachael Alexanderson
7073bd8f5f - add missing SPAC constants 2020-09-18 19:52:03 -04:00
PaulyB
573b2958c6 Added MTF_NOCOUNT to spawn flags 2020-04-27 20:30:37 +02:00
Christoph Oelckers
32300f7d26 - use translation slot 0 for reserved content, like font translations. 2020-04-11 20:20:39 +02:00
Christoph Oelckers
828cba13a1 - changed translation management so that the fonts also use translation IDs. 2020-03-16 17:23:30 +01:00
Christoph Oelckers
3e9a43d7f0 - added missing render style constants to ZScript. 2020-01-12 12:02:26 +01:00
Christoph Oelckers
4a67bfcddb - deprecated A_PlaySound for real and transitoned the internal scripts to A_StartSound 2020-01-04 14:25:55 +01:00
Christoph Oelckers
b7e1a35e6f - cleaned up the parameters of A_StartSound.
There were two booleans that could be merged into the flag word.
This also fixes a bug with CHAN_NOSTOP not working for local sounds because it checked the wrong sound source for the playing sound.
2020-01-04 14:25:55 +01:00
Cacodemon345
7fd27bc925 Add PSPF_PLAYERTRANSLATED flag (makes a PSprite layer translated to the user's color) 2019-12-30 13:05:38 +01:00
Christoph Oelckers
d08bb93b84 - elimintated all cases from the ZScript code where channel indices and flags were combined into one parameter and removed all remnants of CHAN_PICKUP. 2019-12-30 09:47:25 +01:00
Christoph Oelckers
e82565373f - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
2019-12-16 23:52:39 +01:00
Marisa Kirisame
14dc288f22 Allow custom status bars to override notifications, centered prints and chat prompt. 2019-08-19 11:19:36 +02:00
Christoph Oelckers
d73f8faafa - added monospacing support to Screen.DrawText and its native counterparts. 2019-04-13 12:17:38 +02:00
Christoph Oelckers
0341a3d75b - made the gross railing hack for Strife a compatibility option and restricted it to MAP04
The side effects here broke other maps and this is really too glitchy to be turned on unless really necesasary.
2019-03-26 00:38:54 +01:00
Christoph Oelckers
dc67355e95 - added A_Explode compatibility options.
There are two options here - one only disables the vertical thrust and the other goes back fully to the original non-z-aware code.
Both options are settable through MAPINFO.
For the compatibility presets, the normal ones only disable the vertical thrust, the strict ones force use of the old code entirely.
2019-03-24 12:42:57 +01:00
Christoph Oelckers
b542d1371d - reorganized the ZScript content in gzdoom.pk3 and changed the files' extensions to something unique for easier syntax highlighting. 2019-02-23 12:08:27 +01:00
Renamed from wadsrc/static/zscript/constants.txt (Browse further)