Commit graph

1129 commits

Author SHA1 Message Date
Christoph Oelckers
f1b345dc73 - 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.
2019-04-25 13:04:21 +02:00
Major Cooke
5209d43bf3 - Fixed: SXF_CLEARCALLERSPECIAL cleared the spawned actor's special instead of the caller. 2019-04-25 13:03:50 +02:00
Christoph Oelckers
5bb0428fa8 - made PlayerPawn.TweakSpeeds virtual. 2019-04-25 12:55:16 +02:00
alexey.lysiuk
32f0bbfe03 - fixed ammo check for weapon with 'uses both' flags
https://forum.zdoom.org/viewtopic.php?t=63047
2019-04-25 12:52:20 +02:00
alexey.lysiuk
8e230eebaf - fixed missing attack sound in A_CustomPunch
See 7bb3855439/src/p_actionfunctions.cpp (L1729)

https://forum.zdoom.org/viewtopic.php?t=63049
2019-04-25 12:51:49 +02:00
Erick Tenorio
3262af7514 - TNT.WAD fixes 2019-04-25 12:45:25 +02:00
Erick Tenorio
63313d0214 - Have Plutonia MAP16 pit kill player 2019-04-25 12:45:23 +02:00
Major Cooke
662b2ed759 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.
2019-04-18 19:56:38 +02:00
alexey.lysiuk
4044a6e724 - declared Actor's Morph() and UnMorph() functions virtual
They are expected to be virtual on C++ side
2019-04-18 19:55:26 +02:00
Christoph Oelckers
18cec62458 - fixed random number generation in SpawnFizzle.
This should now produce the same value range as Hexen's original code.
2019-04-18 17:46:21 +02:00
Christoph Oelckers
ff12eab7e5 - fixed bad attempt at restoring position in A_CustomBulletAttack. 2019-04-18 17:46:19 +02:00
Christoph Oelckers
cc34946e80 - missed this. 2019-04-18 17:46:17 +02:00
Christoph Oelckers
18dd23c79d - 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.
2019-04-18 17:46:15 +02:00
Christoph Oelckers
0dcbc02cd7 - renamed back arguments of A_FireProjectile. 2019-04-18 17:46:14 +02:00
Christoph Oelckers
e6af596af0 - removed the redundant GetOffsetPosition export and added direct native support to its existing variants 2019-04-18 17:01:17 +02:00
Christoph Oelckers
999894af25 - 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.
2019-04-18 17:01:14 +02:00
Christoph Oelckers
bda2a75466 - fixed PlayerInfo.FindMostRecentWeapon
returning multiple values from a subfunction is currently not working so this has to add an indirection.
2019-04-18 17:01:07 +02:00
Christoph Oelckers
3291cecad9 - fixed: For an initial weapon pickup, sv_unlimited_pickup wasn't checked for the included ammo. 2019-04-18 16:23:04 +02:00
Cacodemon345
fdd6e3cec9 Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript 2019-04-18 16:23:01 +02:00
Player701
5c248053f3 - Fixed the position of the soul sphere within one of the secret areas (sector 324) of Alien Vendetta MAP28. 2019-04-18 15:01:11 +02:00
Christoph Oelckers
f7fe19ee51 - made Ammo.GetParentAmmo virtual 2019-04-18 14:34:28 +02:00
Chronos Ouroboros
218b7e95ca Added a function for triggering use/push specials for usage in custom monster AI. 2019-04-18 14:22:07 +02:00
Chronos Ouroboros
803cb16d99 Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript. 2019-04-18 14:22:05 +02:00
Christoph Oelckers
4d7e945dc1 - 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. 2019-04-18 14:22:02 +02:00
Rachael Alexanderson
f442d4bd54 - split gl_texture_hqresize into two variables - one for mode, one for multiplier.
# Conflicts:
#	src/textures/hires/hqresize.cpp

# Conflicts:
#	src/gl/textures/gl_hqresize.cpp
#	src/r_videoscale.cpp
2019-04-17 21:04:41 +02:00
alexey.lysiuk
77e47087b7 - fixed stuck memory usage warning in options menu
https://forum.zdoom.org/viewtopic.php?t=62186
2019-04-17 20:59:49 +02:00
Rachael Alexanderson
301246236c - added normal5x and normal6x 2019-04-17 20:59:20 +02:00
Rachael Alexanderson
cd126b08ba - use correct multipliers for the memory warnings for normalNx scalers 2019-04-17 20:58:47 +02:00
drfrag
96f996d8aa Revert "Revert "- update xBRZ upscaler to version 1.6""
This reverts commit 285791622d.

# Conflicts:
#	src/gl/textures/gl_hqresize.cpp
#	wadsrc/static/menudef.txt

Goodbye to TDM-GCC.
2019-04-17 20:33:41 +02:00
Christoph Oelckers
f40e5c7edc - re-added PlayerInfo.BringUpWeapon. 2019-04-17 19:44:12 +02:00
Christoph Oelckers
cf4f573a25 - 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.
2019-04-17 17:27:39 +02:00
Christoph Oelckers
082cb5b656 - scriptified P_CheckMeleeRange2. 2019-04-17 16:24:10 +02:00
Christoph Oelckers
15ab1fb09b - deprecated a few functions that depend on AAPTR_* to be useful.
- fixed wrong name for the LineAttack action function.
2019-04-17 16:24:05 +02:00
Christoph Oelckers
792aaa5b88 Added direct native entry points to a larger number of functions.
# Conflicts:
#	src/scripting/vmthunks_actors.cpp
2019-04-17 15:11:22 +02:00
Christoph Oelckers
77e60865a0 - fixed: SlotPriority must be a float.
It was a fixed before but I missed that when refactoring it into an automatic property.
2019-04-17 15:11:12 +02:00
Christoph Oelckers
a5e16e3261 - moved a large part of the VM thunks out of p_mobj.cpp. 2019-04-17 14:55:58 +02:00
Christoph Oelckers
f22aaca74d - scriptified ASpecialSpot.
This only had two simple native methods so the class is not fully scripted.
2019-04-17 14:32:10 +02:00
Christoph Oelckers
c87724ef0a Removed all native components from AInventory. 2019-04-16 23:57:22 +02:00
Christoph Oelckers
d40de21bae - scriptified A_SpawnSingleItem, which was the last piece of native code still referencing AInventory 2019-04-16 23:57:19 +02:00
Christoph Oelckers
d2225040ea - scriptified A_SelectWeapon 2019-04-16 23:57:15 +02:00
Christoph Oelckers
b8e1218645 Removed all remaining references to AInventory
What remains is the class definition and one single reference that will be scriptified.
2019-04-16 23:57:12 +02:00
Christoph Oelckers
36af613dfa - The 'A' prefix has no meaning in class names on the script side - even in comments. 2019-04-16 22:01:06 +02:00
Christoph Oelckers
318a9d7893 - fixed max. ammo display on AltHud. 2019-04-16 22:00:59 +02:00
Christoph Oelckers
e176410ab6 - fixed crash with weapons which remove themselves from the inventory but continue calling action functions.
This is still an error, so now this throws a meaningful exception.
2019-04-16 21:53:00 +02:00
Christoph Oelckers
c0686309fc - removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code. 2019-04-16 21:52:53 +02:00
Marisa Kirisame
739999b5ed Fix RemoveInventory not calling DetachFromOwner when an item is the first in the owner's inventory.
Fix CheckAddToSlots not working because it uses GetReplacement incorrectly.
2019-04-16 21:52:50 +02:00
Christoph Oelckers
7e75aa1d36 - fixed accidentally misnamed parameter in A_Explode. 2019-04-16 21:34:47 +02:00
Christoph Oelckers
9f2b62c99c - scriptified AInventory::Tick.
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.
2019-04-16 21:28:37 +02:00
Christoph Oelckers
bdd6d31a63 - scriptified the AutoUseHealth feature.
This again is a piece of code that reads and even writes to inventory items' properties, so better have it on the script side.
2019-04-16 21:28:34 +02:00
Christoph Oelckers
80e3ce735b - scriptified the decision making of the invuseall CCMD.
Custom items had no way to adjust to this - and it also was the last native access to ItemFlags.
2019-04-16 21:28:32 +02:00