Commit graph

1367 commits

Author SHA1 Message Date
Christoph Oelckers
95adbc58a8 - fixed the spacing for the sliders.
- moved the scroll indicators in the menu to the right and use a brighter color for them - the old ones were only barely visible.
2019-03-17 18:32:55 +01:00
Christoph Oelckers
a6051c8231 - moved the flag display in the gameplay and compatibility menus down below the headline. 2019-03-17 18:32:48 +01:00
Christoph Oelckers
59f0a377d4 - consolidate the dependencies on the font in the option menu. 2019-03-17 18:32:48 +01:00
Christoph Oelckers
2227c15010 - create a second font based on the VGA glyphs that is stylistically more similar to the SmallFont and use that for the option menus. 2019-03-17 18:32:48 +01:00
Christoph Oelckers
2e260c6367 - use the new console font for the options menu to gain space and better character support.
So far this is just an experiment, this needs a bit of work to become viable.
2019-03-17 18:32:47 +01:00
Alexander
73d81d3983 added option search menu 2019-03-16 18:40:13 +01:00
Christoph Oelckers
04281d4a0b - fixed positoning issues in the load/save menu. 2019-03-15 20:22:40 +01:00
Rachael Alexanderson
fd4295b38c - add some /0 guards in the load/save menu to prevent VM aborts 2019-03-11 20:19:40 -04:00
Christoph Oelckers
c0d333ee56 - adjusted the script-side MidPrint calls to honor the con_midconsolefont CVAR. 2019-03-11 22:44:28 +01:00
Christoph Oelckers
8b4690bc44 - use international date format for all places that print a date.
The most important one is the autosave tagging. This was done because the old printout was missing the year and printed the month as a 3 character English string, sabotaging any attempt to sort the autosaves by anything meaningful.
2019-03-11 21:21:37 +01:00
Christoph Oelckers
22cf35c1c7 - reworked the load/save menu to use the new console font.
Parts of this menu suffered badly from lack of screen space to convey the intended information due to the oversized fonts. With the new font this is a lot less problematic (unless using 320x200, of course)
2019-03-11 20:59:43 +01:00
Christoph Oelckers
5a891f3b0a - fixed color of status screen text. 2019-03-09 17:50:23 +01:00
Christoph Oelckers
392ba7ed2e - properly construct the reply texts for Strife's merchants. 2019-03-09 13:34:47 +01:00
Sterling Parker
cabe0c583e Add LookScale property
As requested by @coelckers.
2019-03-07 21:22:33 +01:00
Sterling Parker
ae1a1df02d Add LookScale variable on weapon
This variable allows a weapon to set a custom look sensitivity multiplier without fiddling with FOVScale / DesiredFOV hacks.
2019-03-07 21:22:33 +01:00
Alexander
77cb9ae866 added MakeScreenShot and MakeAutoSave functions to FLevelLocals 2019-03-04 19:16:51 +01:00
Major Cooke
6327734659 Added CanTouchItem virtual.
- Allows an actor with +PICKUP flag to determine if it can pick up specific items or not.
2019-03-04 13:15:27 +01:00
Christoph Oelckers
735e1d1a44 - allow localization of the fallback string "Person".
The corresponding text is in the translation spreadsheet which isn't part of the repo yet.
2019-03-03 09:16:21 +01:00
Christoph Oelckers
5682b1b5bb -corrected text placement on load+save menu. 2019-03-02 16:03:56 +01:00
Christoph Oelckers
0febe20a08 - fixed: Unmorphing a monster did not clear its UNMORPHED flag. 2019-03-02 13:15:38 +01:00
Christoph Oelckers
805cf6c098 - moved the sprite box on the player menu up a bit because this was badly overlapping with some long texts in most languages. 2019-03-02 12:20:58 +01:00
Christoph Oelckers
cad2f49ceb - use BigUpper font for option menu captions. 2019-02-28 22:19:53 +01:00
Major Cooke
b48f7da43e Renamed to musplaying. 2019-02-28 18:47:28 +01:00
Major Cooke
210af0d414 Exported MusPlayingInfo to ZScript.
- Allows grabbing the currently playing song, base order, and loop properties.
2019-02-28 18:47:28 +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
Christoph Oelckers
48fcdacf06 - more work on graphics substitutiion
* added a CVAR that sets how localizable graphics need to be dealt with.
* pass the substitution string to OkForLocalization so that proper checks can be performed.
* increased item spacing on Doom's list menus to 18 from 16 pixels, because otherwise the diacritic letters would not fit. 20 would have been more ideal but 18 was the limit without compromising its visual style
* added a second text-only main menu because here the spacing cannot be changed. Doing so would render any single-patch main menu non-functional. So here the rules are that if substitution takes place, it will swap out the entire menu class.
* fixed some issues with the summary screen's "entering" and "finished" graphics.
2019-02-21 00:35:27 +01:00
Christoph Oelckers
a0c10df387 - made some adjustments so that the BigFont works as intended.
The auto-calculated height of 24 is too tall, this requires a manual setting here. Also fix the space calculations for the "finished" graphic.
2019-02-21 01:13:42 +01:00
Christoph Oelckers
7ea2f135df - did not save the latest changes. 2019-02-21 00:23:49 +01:00
Christoph Oelckers
8bdbd2e915 - fixed layout of summary screen. 2019-02-21 00:16:48 +01:00
Christoph Oelckers
6a742f8d34 - changed all places which used a localized string as a format template for printf, String.Format et.al.
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.
2019-02-20 20:20:06 +01:00
Christoph Oelckers
74f5211046 - fixed accidental commit of incomplete test code. 2019-02-20 18:54:29 +01:00
Christoph Oelckers
a6a091c83a - reworked summary screen to use consistent contents, either all patches or all text but not mixed 2019-02-20 00:44:17 +01:00
Christoph Oelckers
9f59a84a37 - allow text substitution for StaticPatch items in ListMenus 2019-02-20 00:43:31 +01:00
Christoph Oelckers
5e7fb16d05 - preparation work for substituting the menu and intermission screen text graphics for localization 2019-02-19 01:22:12 +01:00
Christoph Oelckers
91206f12be - changed zstrformat to allow %c to emit non-ASCII characters as UTF-8. 2019-02-19 00:27:47 +01:00
Christoph Oelckers
b29975503d - fixed issues with text entering
* entering a savegame description did not work anymore
* the length check was too restrictive and always underestimated the available space
* use the console font for entering a savegame description. This has more characters and better contrast for this content.
* the interface to the text enterer used bad measurements.
2019-02-19 00:08:23 +01:00
Christoph Oelckers
aa550310f6 - allow the language table to supersede the title patches, if appropriate
For the Doom IWADs the provided font looks almost identical to the characters used on the title patches. So, for any level name that got replaced in some language, it will now check if the retrieved name comes from the default table, and if not, ignore the title patch and print the name with the specified font.

This also required removing the 'en' label from the default table,  because with this present, the text would always be picked from 'en' instead of 'default'. Since 'en' and 'default' had the same contents, in any English locale the 'default' table was never hit, so this won't make any difference for the texts being chosen.

Last but not least, wminfo has been made a local variable in G_DoCompleted. There were two places where this was accessed from outside the summary screen or its setup code, and both were incorrect.
2019-02-15 00:29:24 +01:00
Christoph Oelckers
d39a624942 - fixed the player name display.
This was broken by several small unicode-incompatible code fragments.
This commit also removes the input limit for the player name and the savegame description. With multibyte encoding, limiting them to a fixed length did not work right.
Currently these will just overflow the fields if the text becomes too long, this needs some additional work.
2019-02-16 22:57:02 +01:00
Christoph Oelckers
deb233677e - made the menu's text input handler Unicode capable.
Also make sure that the savegame description remains readable. Unlike in-game text this can be done without double-encoding existing UTF-8.
2019-02-16 21:29:46 +01:00
Christoph Oelckers
914818cb88 - fixed run health clamping.
This didn't scale the move factors properly.
2019-02-13 20:12:13 +01:00
Christoph Oelckers
6ff6a6af00 - 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-02-13 14:59:55 +01:00
alexey.lysiuk
d4d010ac32 - added compatibility flag for buggy CheckSwitchRange behavior
https://forum.zdoom.org/viewtopic.php?t=63008
https://forum.zdoom.org/viewtopic.php?t=63650
2019-02-11 17:57:03 +01:00
Christoph Oelckers
3c0c076226 - 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-02-09 09:25:29 +01:00
Christoph Oelckers
3d3f260137 - exported LevelLocals's compatibility flags to scripting and fixed all places where access to combined compatibility flags is needed. 2019-02-09 09:17:57 +01:00
Major Cooke
acc510dfb3 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-02-08 20:07:49 +01:00
Christoph Oelckers
5af5717cf1 - 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-02-07 09:42:51 +01:00
Christoph Oelckers
a0042fd653 - removed bad character from A_CustomPunch definition. 2019-02-04 14:08:34 +01:00
Christoph Oelckers
53162a8a5c Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/am_map.cpp
2019-02-03 09:20:13 +01:00
Christoph Oelckers
25071e26e5 - 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-02-03 09:11:33 +01:00
Nemrtvi
4af80fa43b 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-02-02 18:29:33 +01:00
Christoph Oelckers
1dbbb56a1b Merge branch 'master' into new_level_refactor
# Conflicts:
#	src/p_user.cpp
2019-02-02 16:58:30 +01:00
Christoph Oelckers
235c4c0499 - allow localization of Strife's log text. 2019-02-02 16:56:58 +01:00
Christoph Oelckers
45dc9a7b47 - renamed the level variables.
currentUILevel is now primaryLevel.
For ZScript, currentVMLevel was added. This is also exported as 'level' and will change as needed.
This also means that no breaking deprecations will be needed in the future, because in order to sandbox a level only 4 variables need to be handled: level, players, playeringame and consoleplayer.
The remaining global variables are not relevant for the level state.

The static 'level' has been mostly removed from the code except some places that still need work.
2019-02-02 00:25:51 +01:00
Major Cooke
695eced81a Added Inventory UNCLEARABLE flag.
- Allows prevention of ClearInventory without stopping it from being dropped.
2019-02-01 18:29:31 +01:00
Christoph Oelckers
ff903da19a Merge remote-tracking branch 'remotes/origin/master' into new_level_refactor 2019-01-31 20:43:24 +01:00
Major Cooke
b1c508fa6c 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-01-31 19:05:44 +01:00
Erick Tenorio
b9e71d6db3 - DOOM.WAD fixes 2019-01-31 19:03:57 +01:00
Christoph Oelckers
cfa35f548f - make the file name of savegame nodes read only. 2019-01-31 17:57:39 +01:00
Christoph Oelckers
68bff17d63 - this was missing 2019-01-31 03:29:45 +01:00
Christoph Oelckers
ddab2c3e78 - removed the playernum parameter from CheckLocalView
This was always used with 'consoleplayer' which really is the only thing making sense here. But this is a part of the global state which should be avoided in play code.

In particular, this makes no real sense in case of secondary maps where it should always return false.
2019-01-31 03:29:25 +01:00
Christoph Oelckers
b12de04258 - fixed the remaining deprecation warnings in the base script.
All these required access to the sector's Level reference.
The remaining references to the global 'level' variable are all in deprecated functions which is ok.
2019-01-30 00:58:44 +01:00
Christoph Oelckers
6451b7d592 - moved the combined compatibility flags into FLevelLocals. 2019-01-29 19:28:22 +01:00
Christoph Oelckers
14101fa447 - health groups and software rendering textures freed of 'level'
Edited cherry-pick of an older commit.
2019-01-29 16:06:17 +01:00
Christoph Oelckers
f9239f6e0f - added a compiler-side workaround for the formerly static methods of FLevelLocals.
LevelLocals on the left side of.a function call will now always be remapped to 'Level', which will either remap to the same-named instance variable or the global deprecated one.

In a few degenerate cases where there is a conflicting local variable named 'level' it may error out but that is unavoidable here but this is very unlikely.
2019-01-29 02:04:31 +01:00
Christoph Oelckers
60873bc5d6 Moved the PointInSector functions into FLevelLocals 2019-01-29 01:30:41 +01:00
Christoph Oelckers
259ae41774 - sanitized the 'frozen level' code.
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.
2019-01-28 20:15:48 +01:00
Christoph Oelckers
3721771934 - forgot to save this. 2019-01-28 18:44:42 +01:00
Christoph Oelckers
3c14a7db76 - use map time, not hub time for map actions. 2019-01-28 18:42:56 +01:00
Christoph Oelckers
66695ac6a0 - made most of the player spawn spot handliing functions members of FLevelLocals. 2019-01-28 02:44:05 +01:00
Christoph Oelckers
b4acb857ad - the final batch of easy level replacements.
What's left will require a bit more work...
2019-01-27 21:59:19 +01:00
Christoph Oelckers
73ea59179c - fixed some deprecation warnings about 'level'. 2019-01-27 14:48:35 +01:00
Christoph Oelckers
84baa5bb4d - deprecated the global 'level' variable.
This will currently output 9 warnings for the UDMF property getters. To silence these a bit more work is needed.
2019-01-27 14:33:02 +01:00
Christoph Oelckers
05830455e7 - made the automap an object.
This simplifies handling a lot because it allows to make the level the owner of its map.
2019-01-26 15:21:20 +01:00
Christoph Oelckers
10feb446fa - made most of the EV_* functions part of FLevelLocals. 2019-01-26 08:28:45 +01:00
Christoph Oelckers
4e052f2857 - use a separate variable pointing to the current level for the UI code.
UI always runs on the primary level, so this does not need the ability to operate on multiple levels. Additionally, this can later be set to null when running play code so that scope violations result in an abort.
2019-01-25 18:31:40 +01:00
Christoph Oelckers
bf3dc2f99b Merge branch 'rolling_back' into new_level_refactor 2019-01-25 00:57:01 +01:00
Christoph Oelckers
b2ee99c7cc - 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.
2019-01-25 00:56:15 +01:00
Christoph Oelckers
3cef56249d - moved most functions of portals.cpp into FLevelLocals.
Much of this is used during level init and needs to be independent of the current level.
2019-01-25 00:30:55 +01:00
Christoph Oelckers
0e5986769e - moved the tid hash into FLevelLocals and adjusted the interface to the iterators. 2019-01-24 19:28:40 +01:00
Christoph Oelckers
1f2162fea8 - moved the scripted creation functions for tag iterators to LevelLocals
The old static methods are now deprecated, this was done to clarify the relationships at play here.
2019-01-24 02:17:10 +01:00
Christoph Oelckers
5c8ae72453 - fixed: ScriptUtil.PlayerAmmo must be declared static. 2019-01-23 21:50:11 +01:00
Christoph Oelckers
477560e1ef - 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-01-23 21:50:10 +01:00
Christoph Oelckers
f6ce5f59ae - fixed armor bonus giving in A_CustomPunch 2019-01-23 21:49:18 +01:00
alexey.lysiuk
12db808307 - fixed 'missing interpolation point' warning 2019-01-23 21:46:46 +01:00
alexey.lysiuk
7d4765b5cd - 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-01-23 21:41:03 +01:00
alexey.lysiuk
8aa47e664e - 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-01-23 21:40:44 +01:00
Christoph Oelckers
5e4ef04a4d - allow assignment of line IDs through LevelCompatbility. 2019-01-23 21:40:19 +01:00
alexey.lysiuk
c6ee8e084c - fixed condition to produce blood splatter during line attack
https://forum.zdoom.org/viewtopic.php?t=63186
2019-01-23 21:23:35 +01:00
Marrub
af06d7cb9e Make LevelLocals::ExecuteSpecial return int
# Conflicts:
#	wadsrc/static/zscript/base.txt
2019-01-23 21:15:33 +01:00
Christoph Oelckers
4126f8ce72 - 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-01-23 21:12:23 +01:00
Christoph Oelckers
a1ae01e392 - fixed last PR.
The result of GetPointer must be null checked as well!
2019-01-23 20:43:23 +01:00
Cacodemon345
70a07e154c Move receiver NULL check above the orresult check (#695)
This is to prevent a VM abort from happening here if orresult is false.
2019-01-23 20:42:41 +01:00
Christoph Oelckers
c651045ed3 - let RunHealth clamping respect the newly added global properties. 2019-01-05 15:37:14 +01:00
Christoph Oelckers
dab68184f5 - moved the global spot state into FLevelLocals.
This way it doesn't even have to be a thinker.
2019-01-05 10:04:27 +01:00
Christoph Oelckers
d898cadda5 - fixed: Trying to remove the first item in an actor's inventory would lose all owned items. 2019-01-04 18:56:14 +01:00
Christoph Oelckers
f9ff097457 - fixed A_Chase default detection. 2019-01-03 23:43:15 +01:00
Christoph Oelckers
9521b6cd1f - 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-01-03 22:05:49 +01:00
Christoph Oelckers
c18e895272 - exported all native components of APlayerPawn.
Only the class definition itself remains and needs to be taken care of.
2019-01-03 18:01:58 +01:00
Christoph Oelckers
3314a1efe5 - scriptified the remaining PlayerPawn methods. 2019-01-03 14:35:17 +01:00
Christoph Oelckers
2258a71c36 - took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places. 2019-01-03 13:59:46 +01:00
Christoph Oelckers
23146f1af2 - scriptified PlayerPawn.ResetAirSupply. 2019-01-03 13:04:48 +01:00
Christoph Oelckers
badacbb968 - scriptified APlayerPawn's DamageFade handling. 2019-01-03 12:47:34 +01:00
Christoph Oelckers
2bd72478ee - scriptified P_CalcHeight.
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.
2019-01-03 11:57:20 +01:00
Christoph Oelckers
9e5c5b68c5 - did some more lightening on the PlayerPawn class. 4 more properties and one native member function have been handled. 2019-01-03 10:06:45 +01:00
Christoph Oelckers
c753d59a72 - scriptified A_SkullPop and ObtainInventory.
These were the last relevant items to access PlayerPawn.InvFirst.
2019-01-03 00:35:56 +01:00
Christoph Oelckers
6eb8ded471 - made ColorRangeStart and ColorRangeEnd meta properties of APlayerPawn.
These are only used during initialization and they should have been readonly from the start.
2019-01-02 22:13:57 +01:00
Christoph Oelckers
bc47fdfa78 - scriptified useflechette CCMD's item finding code. 2019-01-02 11:58:26 +01:00
Marrub
3e3d21cd35 Fix A_CustomBulletAttack's spawnofs_xy parameter
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.
2019-01-02 08:13:53 +01:00
Christoph Oelckers
dc612703d5 - scriptified the declaration of AmbientSound
Most of the code is still native, but this means that PlayerPawn is the last remaining child of AActor.
2019-01-02 01:05:20 +01:00
Player701
68091db598 - Since GetParentAmmo is now virtual, BackpackItem and the "give ammo" cheat should call GetParentAmmo to determine base ammo classes. 2019-01-01 22:00:35 +01:00
Christoph Oelckers
d654e02dea - 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.
2019-01-01 19:35:55 +01:00
alexey.lysiuk
99479d84b1 - fixed everlasting fast projectile after hitting ceiling
Without the test for ceiling hit fast projectile could enter its Death state every tick infinitely

https://forum.zdoom.org/viewtopic.php?t=63023
2019-01-01 08:14:28 +01:00
Christoph Oelckers
0b2a919bbe - fixed crash in AutoUseStrifeHealth
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.
2018-12-31 19:03:02 +01:00
Major Cooke
8d9d71f55f - Fixed: SXF_CLEARCALLERSPECIAL cleared the spawned actor's special instead of the caller. 2018-12-30 19:01:31 +01:00
alexey.lysiuk
36896a1224 - fixed ammo check for weapon with 'uses both' flags
https://forum.zdoom.org/viewtopic.php?t=63047
2018-12-29 13:36:10 +02:00
alexey.lysiuk
8e684f9687 - fixed missing attack sound in A_CustomPunch
See 7bb3855439/src/p_actionfunctions.cpp (L1729)

https://forum.zdoom.org/viewtopic.php?t=63049
2018-12-29 12:34:38 +02:00
Christoph Oelckers
dd3dba2ef1 - made PlayerPawn.TweakSpeeds virtual. 2018-12-29 08:43:36 +01:00
Christoph Oelckers
3559f7dffb Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-12-28 23:14:22 +01:00
Christoph Oelckers
5f303859e9 - made some changes to how the compatibility code works to allow removing the last remaining global variables of the map loading code.
Everything temporary is now part of the MapLoader class.
2018-12-28 23:14:11 +01:00
Erick Tenorio
0a6ec054d2 - TNT.WAD fixes 2018-12-27 20:52:08 +01:00
Erick Tenorio
9ee0271320 - Have Plutonia MAP16 pit kill player 2018-12-27 18:59:29 +01:00
Kevin Caccamo
e04fc026ff Expand UDMF and ZScript API for side's own additive colors
Add 'useowncoloradd_{top,mid,bottom}' sidedef properties to the UDMF 
spec
Only use side's additive colors if 'useowncoloradd_(top|mid|bottom)' is 
set.
Rename UseOwnColors flag to UseOwnSpecialColors
Add UseOwnAdditiveColor flag to side_t::part
Add EnableAdditiveColor to side_t
Add Side.EnableAdditiveColor to ZScript API
2018-12-26 16:58:27 +01:00
Kevin Caccamo
286886e161 Minor fixes for additive colour ZScript API
Sector.SetAdditiveColor actually called Sector.SetSpecialColor
Add use boolean property, used to determine whether or not to override the sector's additive wall colour with the side's additive colour.
2018-12-26 16:58:27 +01:00
Kevin Caccamo
0773e6a98e Rework implementation as per the new specification
The new specification is more flexible, and allows assigning additive 
colors to individual parts of a sector (walls, sprites, flats) and even 
individual parts of a side (top, middle, bottom)

Add AdditiveColors arrays to sector_t and side_t::part
Initialize AdditiveColors arrays to 0
Export AdditiveColors to ZScript
Save AdditiveColors in saved game files
Use colors from AdditiveColors arrays when setting the additive color 
for the render state
Add code to parse the new UDMF additive color properties
Remove additive color slot from sector color/part enum
Add SetAdditiveColor to sector_t and side_t
Add GetAdditiveColor to side_t
Export new methods and additive color arrays to ZScript
2018-12-26 16:58:27 +01:00
Kevin Caccamo
758cd77e55 Rename ColorAdd to AddColor, and use it ingame
Rename ColorAdd to AddColor
Add AddColor to FRenderState
Tweak SpecialColors array in ZScript to include the additive color
Add uAddColor to the shader compiler
Add uAddColor to the texel
2018-12-26 16:58:27 +01:00
Major Cooke
6372cdaa41 Split off pain chance triggering from ReactToDamage into its own function and gave ZScript access to it.
- TriggerPainChance(Name mod, bool forcedPain)
- One exception: PainThrehold is only checked in ReactToDamage, since this function does not require checking damage amount.
2018-12-26 11:55:42 +01:00
alexey.lysiuk
0584ecf65e - declared Actor's Morph() and UnMorph() functions virtual
They are expected to be virtual on C++ side
2018-12-25 16:27:33 +02:00
Christoph Oelckers
fcfccfe739 - fixed random number generation in SpawnFizzle.
This should now produce the same value range as Hexen's original code.
2018-12-23 12:40:26 +01:00
Christoph Oelckers
c1a86e9a4d - fixed bad attempt at restoring position in A_CustomBulletAttack. 2018-12-23 12:13:53 +01:00
Christoph Oelckers
9208fb9b77 - missed this. 2018-12-22 19:12:34 +01:00
Christoph Oelckers
36058df025 - gave the strifehumanoid's burn states dynamic lights.
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.
2018-12-22 16:11:18 +01:00
Christoph Oelckers
5e086ec384 - renamed back arguments of A_FireProjectile. 2018-12-22 16:11:18 +01:00
Christoph Oelckers
f6d9110c70 - removed the redundant GetOffsetPosition export and added direct native support to its existing variants 2018-12-21 13:52:30 +01:00
Christoph Oelckers
0770c0022c - cleaned up use of the random function in script files.
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.
2018-12-21 12:40:05 +01:00
Christoph Oelckers
1deedd5671 - fixed PlayerInfo.FindMostRecentWeapon
returning multiple values from a subfunction is currently not working so this has to add an indirection.
2018-12-21 12:40:05 +01:00
Christoph Oelckers
9fab5f3b2c - fixed: For an initial weapon pickup, sv_unlimited_pickup wasn't checked for the included ammo. 2018-12-21 08:59:37 +01:00
Cacodemon345
789941f24d Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript 2018-12-20 22:54:45 +01:00
Player701
d049b3b3eb - Fixed the position of the soul sphere within one of the secret areas (sector 324) of Alien Vendetta MAP28. 2018-12-20 19:03:15 +01:00
Christoph Oelckers
3291d8e9ac - made Ammo.GetParentAmmo virtual 2018-12-19 18:18:15 +01:00
Chronos Ouroboros
bb8fcd63c4 Added a function for triggering use/push specials for usage in custom monster AI. 2018-12-18 21:09:13 +01:00
Chronos Ouroboros
e7118804ba Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript. 2018-12-18 21:09:13 +01:00
Christoph Oelckers
462fe891bd - fixed: A powered up weapon which shares its ready state with the parent but is currently in a firing sequence may not force-switch the weapon, because that will cause the sequence to run in the wrong weapon's context. 2018-12-18 20:38:25 +01:00
Christoph Oelckers
ab624c8c5a Merge branch 'master' into Texture_Cleanup
# Conflicts:
#	src/textures/hires/hqresize.cpp
2018-12-11 20:27:24 +01:00
Christoph Oelckers
f6aa16947a - re-added PlayerInfo.BringUpWeapon. 2018-12-11 00:35:53 +01:00
Rachael Alexanderson
28516c2def - split gl_texture_hqresize into two variables - one for mode, one for multiplier. 2018-12-10 14:25:29 -05:00
Christoph Oelckers
79a0f76801 - replaced TexMan.operator() with two functions.
This was done to make reviewing easier, again because it is virtually impossible to search for the operators in the code.

Going through this revealed quite a few places where texture animations were on but shouldn't and even more places that did not check PASLVERS, although they were preparing some paletted rendering.
2018-12-07 02:53:18 +01:00
Christoph Oelckers
32e245f2b9 - moved the software rendering specific parts of the sky setup to r_skyplane.cpp. 2018-12-06 20:52:03 +01:00
Christoph Oelckers
d500dc99ea - handle the Harmony status bar icon scaling a bit more robustly.
Considering that the physical texture size should be abstracted away from modding this needs to be done differently.
Doing any calculations with physical texture sizes on the mod side is only going to cause errors so this had been changed to always return scaled size.
2018-12-06 20:21:33 +01:00
Christoph Oelckers
494a113920 - more direct native entry points.
- 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.
2018-12-05 20:10:44 +01:00
Christoph Oelckers
2e7e6cba9d - scriptified P_CheckMeleeRange2. 2018-12-05 18:58:15 +01:00