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