Christoph Oelckers
5b78d7faaa
- fixed run health clamping.
...
This didn't scale the move factors properly.
2019-04-28 15:09:25 +02:00
Christoph Oelckers
736bac7a93
- exported LevelLocals's compatibility flags to scripting and fixed all places where access to combined compatibility flags is needed.
...
# Conflicts:
# src/scripting/vmthunks.cpp
# src/scripting/vmthunks_actors.cpp
# wadsrc/static/zscript/doom/fatso.txt
# wadsrc/static/zscript/doom/painelemental.txt
2019-04-28 11:46:26 +02:00
Christoph Oelckers
3291428c25
- 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-04-27 13:45:12 +02:00
Major Cooke
a3d2b159c9
Added Inventory UNCLEARABLE flag.
...
- Allows prevention of ClearInventory without stopping it from being dropped.
2019-04-27 13:34:30 +02:00
Christoph Oelckers
309407ed61
- use map time, not hub time for map actions.
2019-04-27 13:18:08 +02:00
Christoph Oelckers
9402929209
- 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-04-27 12:43:18 +02:00
alexey.lysiuk
8639c1412f
- fixed 'missing interpolation point' warning
2019-04-27 12:27:26 +02:00
alexey.lysiuk
9596564d15
- 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-04-27 12:10:39 +02:00
Christoph Oelckers
b00a039af8
- let RunHealth clamping respect the newly added global properties.
2019-04-26 01:31:12 +02:00
Christoph Oelckers
251b096b48
- 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-04-26 01:20:02 +02:00
Christoph Oelckers
f261ec7d53
- 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.
# Conflicts:
# src/g_shared/a_dynlight.cpp
# src/g_shared/a_dynlight.h
# src/hwrenderer/dynlights/hw_dynlightdata.cpp
# src/hwrenderer/dynlights/hw_dynlightdata.h
# src/hwrenderer/scene/hw_renderhacks.cpp
# src/namedef.h
# src/scripting/thingdef_data.cpp
# src/swrenderer/line/r_walldraw.cpp
# Conflicts:
# src/d_main.cpp
# src/g_levellocals.h
# src/g_shared/a_dynlight.cpp
# src/g_shared/a_dynlight.h
# src/gl/dynlights/gl_dynlight.h
# src/gl/dynlights/gl_dynlight1.cpp
# src/gl/scene/gl_spritelight.cpp
# src/gl/scene/gl_walls.cpp
# src/hwrenderer/dynlights/hw_shadowmap.cpp
# src/hwrenderer/dynlights/hw_shadowmap.h
# src/hwrenderer/scene/hw_flats.cpp
# src/p_setup.cpp
2019-04-26 00:19:03 +02:00
Christoph Oelckers
bc8af1cab8
Fixed initialization issues with dynamic lights.
...
Actors get initialized from their defaults so anything done in the constructor or some explicit member initialization will be overwritten.
They must use their properties for setting up configurable fields and do the rest in BeginPlay.
2019-04-25 20:59:06 +02:00
Christoph Oelckers
99dd234d10
- exported all native components of APlayerPawn.
...
Only the class definition itself remains and needs to be taken care of.
# Conflicts:
# src/g_statusbar/sbarinfo_commands.cpp
# src/hu_scores.cpp
# src/scripting/thingdef_data.cpp
# Conflicts:
# src/actorinlines.h
# src/hu_scores.cpp
2019-04-25 17:42:11 +02:00
Christoph Oelckers
94eb0ecdda
- scriptified the remaining PlayerPawn methods.
2019-04-25 17:35:44 +02:00
Christoph Oelckers
b28faa6793
- took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places.
2019-04-25 17:34:56 +02:00
Christoph Oelckers
6f2a32ecbe
- scriptified PlayerPawn.ResetAirSupply.
2019-04-25 17:34:53 +02:00
Christoph Oelckers
1c577e4c97
- scriptified APlayerPawn's DamageFade handling.
2019-04-25 17:34:51 +02:00
Christoph Oelckers
cf890a24c3
- 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-04-25 17:34:49 +02:00
Christoph Oelckers
8e376754fc
- did some more lightening on the PlayerPawn class. 4 more properties and one native member function have been handled.
2019-04-25 17:34:47 +02:00
Christoph Oelckers
cb2e46a4fe
- scriptified A_SkullPop and ObtainInventory.
...
These were the last relevant items to access PlayerPawn.InvFirst.
2019-04-25 17:34:43 +02:00
Christoph Oelckers
08e2a86f64
- made ColorRangeStart and ColorRangeEnd meta properties of APlayerPawn.
...
These are only used during initialization and they should have been readonly from the start.
2019-04-25 17:34:41 +02:00
Christoph Oelckers
51499e167d
- scriptified useflechette CCMD's item finding code.
2019-04-25 17:34:39 +02:00
Christoph Oelckers
4be9217215
- scriptified the declaration of AmbientSound
...
Most of the code is still native, but this means that PlayerPawn is the last remaining child of AActor.
# Conflicts:
# src/g_shared/a_dynlight.cpp
2019-04-25 17:34:37 +02:00
Player701
3d1e810e72
- Since GetParentAmmo is now virtual, BackpackItem and the "give ammo" cheat should call GetParentAmmo to determine base ammo classes.
2019-04-25 13:10:41 +02:00
alexey.lysiuk
b706e8fead
- 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-04-25 13:04:25 +02:00
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
Christoph Oelckers
5bb0428fa8
- made PlayerPawn.TweakSpeeds virtual.
2019-04-25 12:55:16 +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
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
Cacodemon345
fdd6e3cec9
Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript
2019-04-18 16:23:01 +02:00
Christoph Oelckers
f40e5c7edc
- re-added PlayerInfo.BringUpWeapon.
2019-04-17 19:44:12 +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
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
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
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
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
1033dc3b10
- Alt HUD scriptification, part 1.
2019-04-16 19:01:43 +02:00
Christoph Oelckers
d18ed18d2e
- scriptified invnext and invprev CCMDs.
2019-04-16 18:45:54 +02:00
Christoph Oelckers
a614f2a81e
- scriptified UseInventory and several functions using the already scriptified ones,
...
# Conflicts:
# src/g_statusbar/sbar.h
2019-04-16 18:45:36 +02:00
Christoph Oelckers
d2741813ab
- scriptified RemoveInventory and Inventory.OnDestroy.
2019-04-16 18:44:59 +02:00
Christoph Oelckers
2a192cde92
- scriptified AddInventory.
2019-04-16 18:44:53 +02:00
Christoph Oelckers
7caa6a922d
- moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 22:29:35 +02:00
Christoph Oelckers
f9dfdace16
- scriptified cht_Takeweaps.
2019-04-15 22:29:30 +02:00
Christoph Oelckers
951ed466b3
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2019-04-15 22:29:19 +02:00
Christoph Oelckers
82ffdd5e6b
- moved the weapon selection logic to PlayerPawn as overridable virtual functions.
2019-04-15 21:59:07 +02:00
Christoph Oelckers
27c67716df
- change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:03 +02:00
Christoph Oelckers
08059f718b
- scriptified FilterCoopRespawnInventory.
2019-04-15 21:59:00 +02:00
Christoph Oelckers
d123230fb1
- scriptified APlayerPawn::Die and fixed a few things I encountered while doing it.
2019-04-15 21:58:56 +02:00
Christoph Oelckers
e234d450aa
- scriptified GetDefaultInventory.
2019-04-15 21:58:50 +02:00