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
Christoph Oelckers
de5ab0b4b6
- deprecated a few functions that depend on AAPTR_* to be useful.
2018-12-05 18:33:59 +01:00
Christoph Oelckers
6c9d0b166a
Added direct native entry points to a larger number of functions.
2018-12-05 17:34:11 +01:00
Christoph Oelckers
fd801ca91b
- fixed: SlotPriority must be a float.
...
It was a fixed before but I missed that when refactoring it into an automatic property.
2018-12-05 08:13:52 +01:00
Christoph Oelckers
33db5792b4
- moved a large part of the VM thunks out of p_mobj.cpp.
2018-12-05 00:21:16 +01:00
Christoph Oelckers
45d7e5a038
- scriptified ASpecialSpot.
...
This only had two simple native methods so the class is not fully scripted.
2018-12-04 18:21:48 +01:00
Christoph Oelckers
5e4b366724
Removed all native components from AInventory.
2018-12-04 18:06:09 +01:00
Christoph Oelckers
d66516ec82
- scriptified A_SpawnSingleItem, which was the last piece of native code still referencing AInventory
2018-12-04 17:55:45 +01:00
Christoph Oelckers
44e43c48b5
- scriptified A_SelectWeapon
2018-12-04 17:31:25 +01:00
Christoph Oelckers
9348baeeb1
Removed all remaining references to AInventory
...
What remains is the class definition and one single reference that will be scriptified.
2018-12-04 17:11:36 +01:00
Christoph Oelckers
99a87f62b6
- The 'A' prefix has no meaning in class names on the script side - even in comments.
2018-12-04 00:23:52 +01:00
Christoph Oelckers
9e70701e50
- fixed max. ammo display on AltHud.
2018-12-03 23:34:23 +01:00
Christoph Oelckers
b6d0492478
- 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.
2018-12-03 18:51:24 +01:00
Christoph Oelckers
0e095b0c05
- removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code.
2018-12-03 17:41:05 +01:00
Marisa Kirisame
d6d3dd038e
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.
2018-12-03 17:29:08 +01:00
Christoph Oelckers
d96d505520
- fixed accidentally misnamed parameter in A_Explode.
2018-12-02 21:39:28 +01:00
Christoph Oelckers
807df33e1a
- 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.
2018-12-02 20:58:15 +01:00