Without this the class cannot be properly subclassed.
# Conflicts:
# wadsrc/static/zscript/ui/menu/optionmenuitems.zs
# Conflicts:
# wadsrc/static/zscript/ui/menu/optionmenuitems.zs
The side effects here broke other maps and this is really too glitchy to be turned on unless really necesasary.
# Conflicts:
# src/gamedata/g_mapinfo.h
# src/gamedata/stringtable.cpp
# src/maploader/maploader.cpp
# src/p_map.cpp
# src/p_udmf.cpp
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.
# Conflicts:
# wadsrc/static/language.csv
- Allows grabbing the currently playing song, base order, and loop properties.
# Conflicts:
# wadsrc/static/zscript/base.zs
# Conflicts:
# wadsrc/static/zscript/base.zs
Passing something non-constant at compile time here is extremely dangerous, especially when users can replace those strings if they like.
It now uses FString::Substitute in all cases where something needs to be inserted into a template string.
This had two different flags that were checked totally inconsistently, and one was not even saved.
Moved everything into a few subfunctions so that these checks do not have to be scattered all over the code.
# Conflicts:
# src/actorinlines.h
# src/decallib.cpp
# src/g_levellocals.h
# src/hwrenderer/scene/hw_sprites.cpp
# src/p_mobj.cpp
# src/p_saveg.cpp
# src/p_user.cpp
# src/polyrenderer/scene/poly_particle.cpp
# src/scripting/vmthunks.cpp
# src/swrenderer/things/r_particle.cpp
# wadsrc/static/zscript/actors/player/player.zs
# wadsrc/static/zscript/base.zs
# Conflicts:
# src/g_levellocals.h
# src/hwrenderer/scene/hw_sprites.cpp
# wadsrc/static/zscript/base.txt
The script side cannot do anything useful with this, because most actions require parameters in global variables, so this is a first grade candidate for rogue mods to make the engine misbehave.
One sector in an underwater area of KDIZD Z1M3 got tagged with an incorrect Transfer_Heights effect which caused render glitches in that area.
There were also a few AddSectorTag calls without first clearing the sector's tags leading to potentially undefined behavior.
The text file
gzdoom/wadsrc/static/zscript/statscreen/statscreen.txt
is set to use strings called “$ENTERING” and “$FINISHED”, located in the language files, in intermission screens between levels in Heretic. However, these strings are named incorrectly in the language files, instead being written as “$WI_ENTERING” and “$WI_FINISHED” for some reason I’m unaware of. After renaming the original script, the ingame text shows up through what is written in the language files, as intended.
On a miscellaneous note: in GZDoom, the text between levels in Heretic says “Entering:”. In the DOS version, it says “Now entering:”. This is accurately reflected in the English language file, though, and thus faithful to the original when displayed ingame.
- Allows defining of what actor is replacing another for information.
- If multiple arachnotrons, a modder can attribute them as being a replacer of Arachnotron itself, allowing A_BossDeath and GetReplacee to work with it.
This is for user-made handlers for which the checksum is rather useless both for deciding whether to call the handler and for identifying the map.
# Conflicts:
# src/compatibility.cpp
# wadsrc/static/zscript/level_compatibility.txt
When player is picked up item that does morph, the corresponding toucher actor is changed in process
Previously, morhing item was removed from original actor leaving player's inventory in inconsistent state
https://forum.zdoom.org/viewtopic.php?t=63124
Unlike the other classes, the places where variables from this class were accessed were quite scattered so there isn't much scriptified code. Instead, most of these places are now using the script variable access methods.
This was the last remaining subclass of AActor, meaning that class Actor can now be opened for user-side extensions.
This should be less of a drag on the playsim than having each light a separate actor. A quick check with ZDCMP2 showed that the light processing time was reduced to 1/3rd from 0.5 ms to 0.17 ms per tic.
It's also one native actor class less.
# Conflicts:
# src/g_shared/a_dynlight.cpp
# src/g_shared/a_dynlight.h
# src/hwrenderer/dynlights/hw_dynlightdata.cpp
# src/hwrenderer/dynlights/hw_dynlightdata.h
# src/hwrenderer/scene/hw_renderhacks.cpp
# src/namedef.h
# src/scripting/thingdef_data.cpp
# src/swrenderer/line/r_walldraw.cpp
# Conflicts:
# src/d_main.cpp
# src/g_levellocals.h
# src/g_shared/a_dynlight.cpp
# src/g_shared/a_dynlight.h
# src/gl/dynlights/gl_dynlight.h
# src/gl/dynlights/gl_dynlight1.cpp
# src/gl/scene/gl_spritelight.cpp
# src/gl/scene/gl_walls.cpp
# src/hwrenderer/dynlights/hw_shadowmap.cpp
# src/hwrenderer/dynlights/hw_shadowmap.h
# src/hwrenderer/scene/hw_flats.cpp
# src/p_setup.cpp
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.
Only the class definition itself remains and needs to be taken care of.
# Conflicts:
# src/g_statusbar/sbarinfo_commands.cpp
# src/hu_scores.cpp
# src/scripting/thingdef_data.cpp
# Conflicts:
# src/actorinlines.h
# src/hu_scores.cpp
This was the only code using the ViewBob member variable.
This also moves the range check for this variable to its application, because a badly behaved mod can just as easily change it at run time instead of just setting an absurdly large value in the class definition.
The current behaviour offsets to the front of the actor rather than the side, due to an oversight in the code, which oddly is not present in the A_FireBullets equivalent.
The loop never checked if the item was still valid and would continue to try to use it, even after it was removed from the inventory and destroyed.
As native code this just failed silently, but with the VM it needs to be explicitly checked.
- TriggerPainChance(Name mod, bool forcedPain)
- One exception: PainThrehold is only checked in ReactToDamage, since this function does not require checking damage amount.
Unlike everything else from the IWADs this had to use the 'light' keyword in ZScript because this is merely a base class for many others and the light definitions here need to be inheritable.
Many uses of random() & value have been turned into random(0, value).
This is not only more efficient, it also ensures better random distribution because the parameter-less variant only returns values between 0 and 255.
- disallow bool as a return value for direct native calls because it only sets the lowest 8 bits of the return register.
- changed return type for several functions from bool to int where the return type was the only thing blocking use as direct native call.
This was the last bit of code standing in the way of making AInventory a fully scripted class.
All that's left to sort out is some variable accesses - the vast majority of them in SBARINFO.
- moved the ALTHUDCF parser PClass::StaticInit, so that it gets done right after creating the actor definitions.
All left to do is not to reallocate the AltHud object for each frame but store it in a better suited place.
# Conflicts:
# src/d_main.cpp
# Conflicts:
# src/info.cpp
Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.
# Conflicts:
# src/g_inventory/a_pickups.cpp
# src/g_inventory/a_pickups.h
Now a child type can decide for itself how to treat 'amount'.
The scripting interfaces to this function in ACS and FraggleScript have been consolidated and also scriptified.
- offloaded key list generation for alternative HUD to non-UI parts.
This change also revealed a problem with handling empty sprites in the key list so this got fixed, too.
# Conflicts:
# src/g_shared/shared_hud.cpp
Overriding this would make the engine vulnerable to badly behaving mods. Intercepting this and altering the behavior can render the entire game inoperable, especially if more internal code gets scriptified later. So even at the risk of breaking some carelsss mods this must be blocked.
This was by far the largest block of native virtuals, and they were only native to be able to allow checking if the event was implemented for the current handler. This can easily be done by looking at the byte code, just like VMCall also does but in turn it removes more than half of the existing native virtuals from the interface.
It has been like this initially but was changed when ZDoom gained an overly complicated polymorphic class descriptor object that required a lot of support code. All these complications have long been removed but these methods remained. Since they prevent a class from being moved to the script side entirely they had to be removed.
This was the last major blocker to make Weapon a purely scripted class, the only remaining native method is Serialize which is of no concern for the coming work.
This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.