Commit graph

15279 commits

Author SHA1 Message Date
Magnus Norddahl
6090e5ec24 - fix compile error 2019-04-16 22:00:50 +02:00
Magnus Norddahl
cd03a487fe - GetInventoryIcon must return an integer for it to work for VM native calls 2019-04-16 22:00:48 +02:00
Christoph Oelckers
a42ece4fb4 - added missing min/max unsigned instructions for the VM. 2019-04-16 22:00:46 +02:00
Rachael Alexanderson
b7d22e2b1e - always apply vid_scalefactor now, even when vid_scalemode is not 0 or 1.
# Conflicts:
#	src/r_videoscale.cpp
2019-04-16 21:57:07 +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
d8d52f67b4 - hardened the seg integrity checks against extremely broken mods.
Temple of the Lizardmen 3 has segs lumps in every level that seem to use a different data format and are completely unusable, up to triggering undefined behavior.
2019-04-16 21:52:58 +02:00
Christoph Oelckers
59e0871f00 - fixed: The static variant of PClass::FindFunction may only be used for actual static variables. 2019-04-16 21:52:56 +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
fc341c901f - fixed issues with Dehacked's ad-hoc script code generation
* The functions had no prototype and caused crashes.
* even after creating a prototype it didn't work because CreateAnonymousFunction was set up incorrectly for the case where a known return type was given.
2019-04-16 21:52:47 +02:00
drfrag
48c2f6451e - disable alpha test on models if the renderstyle isn't STYLE_Normal
- compare against the thing renderstyle since the local copy has been modified
(patches by dpJudas)
2019-04-16 21:51:19 +02:00
Christoph Oelckers
ba0e19f2a2 - made the BUddha checks readable again. 2019-04-16 21:34:55 +02:00
Christoph Oelckers
dc29eee077 - fixed compile warning 2019-04-16 21:34:53 +02:00
Christoph Oelckers
0a36ad0182 - removed assert that got triggered in an edge case that must pass here. 2019-04-16 21:34:51 +02:00
Christoph Oelckers
1bfa1fd5a6 - implemented missing 'exact' parameter for ThinkerIterator.Next. 2019-04-16 21:34:49 +02:00
Christoph Oelckers
7e75aa1d36 - fixed accidentally misnamed parameter in A_Explode. 2019-04-16 21:34:47 +02:00
Christoph Oelckers
5043106e97 - started replacing direct references to class AInventory.
The easiest part was the type checks which could be changed to the name variant with a global search and replace.

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp
2019-04-16 21:34:23 +02:00
Major Cooke
4e8d88f7df - fixed: P_PoisonPlayer and P_PoisonDamage did not check for NODAMAGE.
- fixed: P_PoisonDamage's check for Buddha2 and the Buddha powerup were inverted.
- fixed: P_PoisonDamage checked the modified damage instead of the raw, allowing amplifiers to boost the damage beyond telefrag and circumventing regular buddha.
2019-04-16 21:28:39 +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
Magnus Norddahl
abc4406d18 - ptest is a SSE 4.1 instruction 2019-04-16 21:28:35 +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
Christoph Oelckers
9ff5257ce9 - scriptified P_DropItem. 2019-04-16 21:28:30 +02:00
Christoph Oelckers
17862639a1 - scriptified the no-spawn flag check for armor and health items. 2019-04-16 21:28:29 +02:00
Christoph Oelckers
e9dd8f3e4f - consolidated the check for "is actor an owned inventory item" into a subfunction.
This check occured 9 times in the source, better have it only once.
2019-04-16 21:28:26 +02:00
Christoph Oelckers
e8a6f82682 - scriptified G_PlayerFinishLevel.
Outside of SBARINFO this was the biggest remaining piece of code that referenced AInventory internals.
2019-04-16 21:28:24 +02:00
Christoph Oelckers
8dfcdc1219 - fixed incomplete null checks in A_RadiusThrust. 2019-04-16 21:28:23 +02:00
Christoph Oelckers
9315a217b3 - scriptified AActor::ClearInventory 2019-04-16 21:28:21 +02:00
Christoph Oelckers
a2ffe6327b - took the last methods aside from Tick and Serialize out of AInventory.
# Conflicts:
#	src/g_inventory/a_pickups.cpp
#	src/g_inventory/a_pickups.h
2019-04-16 21:28:19 +02:00
drfrag
8ef732704c - Missing include. 2019-04-16 19:55:28 +02:00
Christoph Oelckers
a1615457ac - properly hook up the alt HUD with the status bar.
# Conflicts:
#	src/d_main.cpp
2019-04-16 19:09:14 +02:00
Christoph Oelckers
0d8975ed31 - scriptified the last components of the alternative HUD.
- 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
2019-04-16 19:03:43 +02:00
Christoph Oelckers
376266b6a0 - scriptified the main drawer for the in-game HUD and removed all intermediate VM calls from the native source. 2019-04-16 19:02:01 +02:00
Christoph Oelckers
9d8dd5c529 - scriptified the AltHUD'S powerup drawer. 2019-04-16 19:01:55 +02:00
Christoph Oelckers
f509fdfdaa - scriptified and cleaned up the AltHUD's DrawCoordinates, DrawTime and DrawLatency functions.
Some backing functionality was moved elsewhere because scripting should not have access to low level system information.
2019-04-16 19:01:53 +02:00
Christoph Oelckers
eb07b8e543 - scriptified the AltHUD's inventory drawer and fixed the InvPrev CCMD. 2019-04-16 19:01:51 +02:00
Christoph Oelckers
e0915877b4 - scriptified the AltHUD's weapon drawer. 2019-04-16 19:01:50 +02:00
Christoph Oelckers
045d6d4355 - added the missing TNT1A0 check for icon-less keys.
Since it tries to get the icon from the spawn state it also has to check if that actually has a valid sprite.
2019-04-16 19:01:48 +02:00
Christoph Oelckers
437c72a089 - AltHUD ammo drawer scriptified. 2019-04-16 19:01:46 +02:00
Christoph Oelckers
cbb92af1db - allow %*d etc. format specifiers in ZScript, but only for numeric types. 2019-04-16 19:01:45 +02:00
Christoph Oelckers
1033dc3b10 - Alt HUD scriptification, part 1. 2019-04-16 19:01:43 +02:00
Magnus Norddahl
08f415bad9 - don't use SSE for integer min/max 2019-04-16 18:46:09 +02:00
Magnus Norddahl
1e533d726c - Use SSE2 for min/max instead 2019-04-16 18:46:07 +02:00
Major Cooke
7ff76366ef Fixed A_JumpIfNoAmmo not working. 2019-04-16 18:46:06 +02:00
Christoph Oelckers
1b55e708bc - fixed the AngleToVector calls in stateprovider.txt.
This looks like a search & replace gone wrong.
2019-04-16 18:46:04 +02:00
Christoph Oelckers
ca67327d1c - this was wrong... 2019-04-16 18:46:01 +02:00
Major Cooke
4ae14c402b - Restored A_SpawnItemEx's "chance" to "failchance" to prevent mod breakage from named parameters. 2019-04-16 18:46:00 +02:00
Christoph Oelckers
ff9eaed1ba - fixed script call in PickNewWeapon. 2019-04-16 18:45:58 +02:00
Christoph Oelckers
53c1614a51 - fixed: P_Massacre without a class restriction no longer worked. 2019-04-16 18:45:56 +02:00
Christoph Oelckers
d18ed18d2e - scriptified invnext and invprev CCMDs. 2019-04-16 18:45:54 +02:00