Commit graph

3059 commits

Author SHA1 Message Date
Christoph Oelckers
30512f8fe3 - made gameaction read only
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.
2019-04-28 15:09:22 +02:00
alexey.lysiuk
ec4f306463 - added compatibility entries for maps affected by buggy CheckSwitchRange behavior 2019-04-28 12:03:55 +02:00
alexey.lysiuk
9f0eb35b28 - added compatibility flag for buggy CheckSwitchRange behavior
https://forum.zdoom.org/viewtopic.php?t=63008
https://forum.zdoom.org/viewtopic.php?t=63650
2019-04-28 12:03:52 +02:00
Christoph Oelckers
83dbabfa22 - moved the displayed text in strfhelp.o to the string table. 2019-04-28 11:53:39 +02:00
Christoph Oelckers
b8ee8f3e94 - moved Strife's map names to the string table. 2019-04-28 11:53:36 +02:00
Christoph Oelckers
2cad60d9e9 - removed extraneous parameter in SpawnPlayerMissile call in A_FireProjectile.
The native variant has a MissileActor out parameter in this place, but in ZScript that's a secondary return value.
2019-04-28 11:46:51 +02:00
Christoph Oelckers
736bac7a93 - exported LevelLocals's compatibility flags to scripting and fixed all places where access to combined compatibility flags is needed.
# Conflicts:
#	src/scripting/vmthunks.cpp
#	src/scripting/vmthunks_actors.cpp
#	wadsrc/static/zscript/doom/fatso.txt
#	wadsrc/static/zscript/doom/painelemental.txt
2019-04-28 11:46:26 +02:00
Major Cooke
47dbc95e2b Added inflictor, source and flag parameters to GetModifiedDamage on actors and ModifyDamage on inventory.
- The flags are used by DamageMobj so modders can determine radius damage, for example, by checking for DMG_EXPLOSION.
2019-04-27 23:45:49 +02:00
Christoph Oelckers
0a7027489e - added a compatibility fix for KDiZD Z1M3 and fixed some tagging issues in the compatibility handler.
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.
2019-04-27 23:45:47 +02:00
Christoph Oelckers
1c410d4050 - rewrote the language table so that it doesn't have to reload everything on a language change.
It now reads everything into a two-dimensional TMap and creates a list of mappings that apply to the current setting.
The constant need for reloading was the main blocker in redesigning how Dehacked strings get inserted. Currently they override everything, but IWAD-based Dehacked text shouldn't block PWAD overrides from PWADs' LANGUAGE lumps and instead be treated as coming from an [en default] block.

This also renames the main block from [enu default] to [en default], because it should be treated as the English default for all English locales and not just make it fall through to the base default as it did before.

# Conflicts:
#	src/doomstat.cpp

# Conflicts:
#	src/stringtable.cpp
2019-04-27 16:13:21 +02:00
Christoph Oelckers
1382d79ab1 - exported all texts from Strife's dialogues to the string table.
Now all this content can be localized. However, since this is actual game content it was placed in a secondary file in zd_extra.pk3, so that it won't affect the GPL-compatible status of the main one.

# Conflicts:
#	src/p_conversation.cpp
2019-04-27 13:47:44 +02:00
Christoph Oelckers
23a4094080 - allow localization of Hexen's original ACS strings.
This way of looking up strings is intentionally limited to content from Hexen.wad and Hexdd.wad.

# Conflicts:
#	src/maploader/maploader.cpp
#	src/p_acs.cpp
#	src/p_acs.h
2019-04-27 13:47:40 +02:00
Christoph Oelckers
3b631ca766 - removed bad character from A_CustomPunch definition. 2019-04-27 13:47:37 +02:00
Christoph Oelckers
3291428c25 - fixed: The CheckEnvironmant call in PlayerThink can already invalidate the PlayerPawn so even the calls to CheckUndoMorph and CheckUse need to get the pawn through the PlayerInfo. 2019-04-27 13:45:12 +02:00
Nemrtvi
ebf5319962 Fixed “Finished:” and “Now entering” in Heretic
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.
2019-04-27 13:37:47 +02:00
Christoph Oelckers
40ad9a2584 - allow localization of Strife's log text. 2019-04-27 13:37:44 +02:00
Nemrtvi
e97d5281b4 Localized “FIND HELP” in Strife
The very first quest log that appears in Strife, “FIND HELP”, is located in a source file. This moves it to the language files.
2019-04-27 13:37:40 +02:00
Major Cooke
a3d2b159c9 Added Inventory UNCLEARABLE flag.
- Allows prevention of ClearInventory without stopping it from being dropped.
2019-04-27 13:34:30 +02:00
Major Cooke
0adf6a52f5 Added CheckReplacee.
- 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.
2019-04-27 13:34:25 +02:00
Erick Tenorio
3c913954ec - DOOM.WAD fixes 2019-04-27 13:34:23 +02:00
Christoph Oelckers
17cdc3145f - make the file name of savegame nodes read only. 2019-04-27 13:30:35 +02:00
Christoph Oelckers
4daa256e2f - fixed: RecreateAllAttachedLights must activate the lights it creates.
This also removes the gl_attachedlights CVAR because with the new management this doesn't really work anymore.

# Conflicts:
#	src/gl/system/gl_cvars.h
#	wadsrc/static/menudef.txt
2019-04-27 13:20:44 +02:00
Christoph Oelckers
309407ed61 - use map time, not hub time for map actions. 2019-04-27 13:18:08 +02:00
Christoph Oelckers
ac68316527 - call level compatibility handlers for all levels and pass the map name as a second parameter.
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
2019-04-27 13:02:58 +02:00
Christoph Oelckers
9402929209 - swapped order of checks for picking up an item.
Failure must take precedence over the morph check because this does not return a proper toucher.
2019-04-27 12:43:18 +02:00
Christoph Oelckers
5f6b6d8b8a - fixed armor bonus giving in A_CustomPunch 2019-04-27 12:37:53 +02:00
nashmuhandes
fc3769bd7e Move the "time" string in saved game comment into the LANGUAGE lump.
# Conflicts:
#	src/g_game.cpp
2019-04-27 12:37:50 +02:00
Christoph Oelckers
7407a1dca6 - fixed: ScriptUtil.PlayerAmmo must be declared static. 2019-04-27 12:27:59 +02:00
alexey.lysiuk
8639c1412f - fixed 'missing interpolation point' warning 2019-04-27 12:27:26 +02:00
alexey.lysiuk
9596564d15 - workaround code generation issue in PlayerPawn.FindMostRecentWeapon()
Multiple values in returned from a subfunction cannot be used directly as a function result

https://forum.zdoom.org/viewtopic.php?t=63284
2019-04-27 12:10:39 +02:00
Christoph Oelckers
e2c2837aa5 - allow assignment of line IDs through LevelCompatibility. 2019-04-27 11:38:41 +02:00
drfrag
a6d5e58886 - Partial port of "made some changes to how the compatibility code works" to allow exporting to ZScript. 2019-04-27 11:38:37 +02:00
alexey.lysiuk
23a84994f5 - fixed disappearing inventory after morphing pickup
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
2019-04-26 18:15:00 +02:00
alexey.lysiuk
9e6f97930b - fixed condition to produce blood splatter during line attack
https://forum.zdoom.org/viewtopic.php?t=63186
2019-04-26 18:14:54 +02:00
Christoph Oelckers
a259cd700d - fixed: Strife was missing the move factors. 2019-04-26 18:11:24 +02:00
Christoph Oelckers
21e4f0b817 - made OP_NEW a builtin function instead of an opcode.
The code was present 3 times due to the JIt, and this is not something that benefits from being a real opcode, even in the interpreted case.
2019-04-26 17:23:33 +02:00
Marrub
af27d579ac Make LevelLocals::ExecuteSpecial return int
# Conflicts:
#	wadsrc/static/zscript/base.txt
2019-04-26 17:20:44 +02:00
Christoph Oelckers
d92ac0d802 - fixed last PR.
The result of GetPointer must be null checked as well!
2019-04-26 17:10:53 +02:00
Cacodemon345
745ee03bba Move receiver NULL check above the orresult check (#695)
This is to prevent a VM abort from happening here if orresult is false.
2019-04-26 17:10:50 +02:00
Christoph Oelckers
b00a039af8 - let RunHealth clamping respect the newly added global properties. 2019-04-26 01:31:12 +02:00
Christoph Oelckers
9a99d55896 - made forwardmove and sidemove defaults configurable through the gameinfo section. 2019-04-26 01:31:07 +02:00
Christoph Oelckers
7f7c87a537 - fixed: Trying to remove the first item in an actor's inventory would lose all owned items. 2019-04-26 01:29:06 +02:00
Christoph Oelckers
251b096b48 - removed all remaining native parts of APlayerPawn.
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.
2019-04-26 01:20:02 +02:00
Christoph Oelckers
f261ec7d53 - rewrote dynamic lights to not use actors for the internal representation and made DynamicLight a purely scripted class.
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
2019-04-26 00:19:03 +02:00
Christoph Oelckers
bc8af1cab8 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.
2019-04-25 20:59:06 +02:00
Christoph Oelckers
99dd234d10 - exported all native components of APlayerPawn.
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
2019-04-25 17:42:11 +02:00
Christoph Oelckers
94eb0ecdda - scriptified the remaining PlayerPawn methods. 2019-04-25 17:35:44 +02:00
Christoph Oelckers
b28faa6793 - took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places. 2019-04-25 17:34:56 +02:00
Christoph Oelckers
6f2a32ecbe - scriptified PlayerPawn.ResetAirSupply. 2019-04-25 17:34:53 +02:00
Christoph Oelckers
1c577e4c97 - scriptified APlayerPawn's DamageFade handling. 2019-04-25 17:34:51 +02:00