Commit Graph

959 Commits

Author SHA1 Message Date
Christoph Oelckers d263f7bcc8 - removed most of the old LastIndexOf methods in FString, only leaving one for ZScript and clearly giving it a name that says it all. RIndexOf has been made the proper version of LastIndexOf internally now. 2018-08-25 20:54:16 +02:00
Christoph Oelckers c04c48d157 - renamed RIndexOf to RightIndexOf 2018-08-25 20:39:58 +02:00
Kevin Caccamo 884de51b70 Add the "RIndexOf" method to FString, which works like String.lastIndexOf from JavaScript
RIndexOf returns the index where the substring starts, instead of the index where the substring ends - 1.

Deprecate the LastIndexOf method of StringStruct
2018-08-25 20:37:40 +02:00
argv-minus-one 1d930b45cf Add ZScript method `LevelLocals.SphericalCoords`.
It computes spherical coordinates from one point in the world to another. Useful for checking whether one actor is inside another actor's view cone.
2018-08-21 08:22:16 +02:00
Marisa Kirisame 02926a5567 Add "IsFinal" parameter for CheckReplacement.
If set to true it guarantees that the replacement is final and will not go through the rest of the replacement chain.
2018-08-16 21:44:21 +02:00
Marisa Kirisame e18b17217f Added CheckReplacement to event handlers, a function inspired by its namesake in Unreal's Mutator class.
Performs runtime replacement of actor classes.
Takes priority over the "replaces" keyword in both DECORATE and ZScript.
2018-08-15 19:31:09 +02:00
argv-minus-one 0717f5aede Make various getter and pure-math Actor methods clearscope.
These methods do not examine or change playsim state. They only perform math or look at class metadata.

Methods changed are:

• deltaangle
• absangle
• AngleToVector
• RotateVector
• Normalize180
• BobSin
• GetDefaultSpeed
• FindState
• GetDropItems (which changes the scope of the returned struct, but the returned struct is all-readonly anyway)
2018-08-14 11:52:44 +02:00
Christoph Oelckers 4c20553a62 Revert "Add RenderStyle API"
This reverts commit 8c7d3b6ab8.

With DTA_LegacyRenderStyle being added there is no pressing need for this. Aside from that there's an utterly unhealthy amount of information duplication here and it is missing some more recent additions.
2018-08-05 20:17:50 +02:00
Zombie 8c7d3b6ab8 Add RenderStyle API 2018-08-05 09:44:05 -04:00
Marisa Kirisame 51b57cebb1 Additional blocking-related flags for Actor.LineTrace() 2018-08-05 09:42:40 -04:00
Christoph Oelckers ff69d945e1 - fixed: A global variable was used to pass MeansOfDeath to ClientObituary.
The problem here is that this affects the public scripting interface so it cannot be committed to master without further adjustments.

# Conflicts:
#	src/p_interaction.cpp
2018-07-29 17:00:05 +02:00
Christoph Oelckers 9653aa95a4 - fixed: The BossCube must account for its target being gone. 2018-07-27 08:46:28 +02:00
alexey.lysiuk 7acf9f96b6 - added placeholders for removed video menu classes 2018-07-16 17:15:41 +03:00
Christoph Oelckers 1294f3df64 - replaced the procedural backdrop texture with some warped noise texture.
This was done because the backdrop as implemented was the only texture in the entire game that had to be deleted and recreated each frame.
However, with Vulkan this would have necessitated quite a bit of synchronization with the render pipeline which wasn't really feasible just for this one single texture.
Now the texture manager can assume that once a texture was created it will be immutable and never has to change.
2018-07-15 00:00:00 +02:00
Christoph Oelckers 7a692b1557 - added DTA_LegacyRenderStyle so that STYLE_* constants can be passed directly to the Draw functions.
- fixed the optional parameter in Shape2D.Clear.
2018-07-14 22:58:24 +02:00
Christoph Oelckers 124fe63d00 Merge branch 'master' into modern 2018-07-14 10:24:41 +02:00
Marisa Kirisame 2d0fb4ed2e Adds 2D shape (triangle array) drawer, usable from ZScript. Handles most drawtexture parameters excluding those related to scaling, at the moment. 2018-07-13 20:24:06 +02:00
Erick Tenorio dfe635dd4a TNT.WAD fixes
MAP07 - Dropping onto the outdoor lava will now raise triangle sectors.
Should be impossible to get stuck in them now.
MAP08 - Fix (what I presume to be an unintentional) missing texture.
2018-07-12 17:42:58 +02:00
argv-minus-one ce1aa7e962 Move RandomSpawner's random selection logic into a virtual method.
With this, one can use its self-replacement code (which copies a bunch of its state into the replacement actor, and monitors for boss death if appropriate), but select the replacement class based on some other criteria (map number, the player's RPG stats, the player's class, etc).
2018-07-09 17:50:55 +02:00
argv-minus-one 6239796b92 Move RandomSpawner's recursion check into PostBeginPlay.
Previously, a RandomSpawner with infinite recursion would hang the game, because the recursion check was happening before the recursion counter (bouncecount) was set.
2018-07-09 17:50:55 +02:00
alexey.lysiuk 651e735246 Merge branch 'master' into modern 2018-06-29 17:51:10 +03:00
Erick Tenorio 245801ca17 Removed useless SetLineActivation
SPAC_Use removed as the line in fth666.wad MAP12 is not facing front.
2018-06-27 23:26:15 +02:00
Erick Tenorio 43919ead40 Various map fixes
Map fixes for the following maps:

MAP33: Betray (Doom II: BFG Edition)
Icarus: https://www.doomworld.com/idgames/themes/TeamTNT/icarus/icarus
Flashback to Hell: https://www.doomworld.com/idgames/levels/doom2/Ports/d-f/fth666
Hell to Pay (HTP-RAW.WAD)
2018-06-27 23:26:15 +02:00
Alexander 97aba0c416 add tags for Doom and Heretic monsters
Why? So mods that reveal enemy names don't show internal monster class names.

Tags are based on language.enu lump:
- Tags for Doom/Doom 2 monsters are referring directly to CC_* strings.
- Tags for Heretic monsters are based on obituaries.
- All tags match corresponding obituaries.
2018-06-27 21:04:00 +02:00
Christoph Oelckers b65b83edb3 - removed the hard screen resolution switch that still was present on Windows and cleaned up the entire video backend code from the remaining support code for this.
Like Linux and macOS this will only support borderless fullscreen in the active desktop resolution now, which is what modern systems need.
The list of discrete resolutions has been removed as it makes no sense anymore with a fixed video mode - all the other scaling options remain active, though.
2018-06-17 20:08:35 +02:00
Rachael Alexanderson 512082b222 - fixed: 'empty function OnGiveSecret' - this was my fault, giving bad advice to Marisa in her PR. I fixed it. 2018-06-05 10:20:02 -04:00
Marisa Kirisame 477cf23fd2 Adds "OnGiveSecret" virtual function on Actor for customizing behavior of secret finding. 2018-06-05 10:06:53 -04:00
Christoph Oelckers a851a5d151 - fixed: For melee attacks with a short attack range P_AimLineAttack must check for hits from above and below.
This is necessary to be in line with P_LineAttack which does check for those.
2018-06-03 17:49:00 +02:00
Christoph Oelckers 1266339c0f - fixed shader compilation. 2018-05-19 21:17:58 +02:00
Jonathan Russell e9050a38b3 - added LevelLocals vec2/3Offset(Z) functions for portal-aware offsetting without needing actors 2018-05-16 20:47:43 +02:00
Christoph Oelckers 72c7a05ba8 - added compatibility fix for bad sector reference in Plutonia MAP11. 2018-05-05 19:58:34 +02:00
alexey.lysiuk 6d308ca67e Fixed walkthrough blocker in Sin City 2 via compatibility entry
It was impossible to complete Sin City 2 The Satan Complex without cheating since ZDoom 2.6.0
Change in applying of DeHackEd patches from 77a4b9a29b broke triggering of important linedef that pushes friendly marine to exit switch

https://www.doomworld.com/idgames/levels/doom2/Ports/s-u/satanx
2018-04-28 17:45:15 +02:00
alexey.lysiuk c8eefd84fa Enabled playing of *gasp sound by default
https://forum.zdoom.org/viewtopic.php?t=60361
2018-04-27 11:04:21 +03:00
ZZYZX da089b09b1 Added missing commented enum entry for ETraceFlags on ZScript side 2018-04-25 19:38:29 +02:00
Christoph Oelckers 1648fc6a07 Fixed initialization issues with dynamic lights.
Actors get initialized from their defaults so anything done in the constructor or some explicit member initialization will be overwritten.
They must use their properties for setting up configurable fields and do the rest in BeginPlay.
2018-04-25 09:14:01 +02:00
Kevin Caccamo 1c58093fc8 Add info about UseSpecial flag feature conflict above Actor.Used 2018-04-24 05:56:07 -04:00
alexey.lysiuk ee9fa7c33e Made 100% kills possible on Altar of Evil, easy skill
https://www.doomworld.com/idgames/levels/doom2/Ports/a-c/altar666
2018-04-22 17:49:13 +03:00
alexey.lysiuk df634539a0 Made 100% kills possible and unstuck imp on Valhalla map
https://www.doomworld.com/idgames/levels/doom2/Ports/m-o/ma_val
2018-04-16 14:34:07 +03:00
alexey.lysiuk 87d164ee59 Added ability to set thing position in compatibility layer 2018-04-16 14:30:21 +03:00
alexey.lysiuk bb037635a8 Fixed missing textures on Valhalla with hardware renderer
It works fine with software renderer regardless of this compatibility entry because of texture bleeding
https://www.doomworld.com/idgames/levels/doom2/Ports/m-o/ma_val
-iwad doom2 -file ma_val.pk3 -nomonsters +map map01 "+warp -450 -2300"
2018-04-15 16:41:24 +03:00
Christoph Oelckers 8b4c74fad8 - the global portal data table also needs to be protected. 2018-04-15 12:16:46 +02:00
Christoph Oelckers cf8447d19c -protected critical portal data from getting written to by user code.
This data is game critical and may only be altered by code that knows what is allowed and what not. It must never be altered by any user code ever.
However, since the SkyViewpoint actors need to set up some relations between themselves and the default sky portals the previously purely internal 'internal' flag has been exported as a new keyword.
2018-04-15 12:13:02 +02:00
alexey.lysiuk ba4cc1a6ca Added activation type to WorldLine(Pre)Activated events
https://forum.zdoom.org/viewtopic.php?t=60232
2018-04-14 11:52:09 +03:00
Christoph Oelckers 13567f2505 - added a compatibility handler for Kama Sutra MAP01's ending area. 2018-04-13 20:27:21 +02:00
Christoph Oelckers ac98e5a4f8 - fixed last change of compatibility branch. 2018-04-13 19:28:35 +02:00
Christoph Oelckers 71a6cc4625 Merge branch '2D_Refactor' 2018-04-13 17:52:58 +02:00
Christoph Oelckers 387827555f - added compatibility handler for Alien Vendetta MAP01 to properly display the deep water hack and avoid problems with a node rebuild. 2018-04-11 23:08:59 +02:00
Christoph Oelckers 3988e27059 - scriptified the last remaining definition (BTSX MAP12 beta)
- Changes to map geometry must force a node rebuild (SetVertex, SetLineSectorRef.)
- fixed incorrect use of scaling constant in SetWallYScale.
2018-04-11 19:10:15 +02:00
alexey.lysiuk 6631f208b1 Scriptified remaining compatibility entries 2018-04-11 17:01:57 +03:00
alexey.lysiuk 6480946d40 Scriptified more compatibility entries 2018-04-11 15:57:27 +03:00