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
Christoph Oelckers
c326c4c521
- exported a few more weapon handling functions so that the native GetDownState stub could be removed.
2019-04-15 21:58:45 +02:00
Christoph Oelckers
c1442fae0d
- scriptified P_BringUpWeapon because this was the only native function still referencing AWeapon::GetReadyState.
2019-04-15 21:58:41 +02:00
Christoph Oelckers
9e6279ed5b
- scriptified the rest of the morph code.
2019-04-15 21:56:28 +02:00
Christoph Oelckers
b886219f53
- scriptified P_MorphMonster.
2019-04-15 21:56:23 +02:00
Christoph Oelckers
d4ff49e110
- fixed message output.
2019-04-15 21:56:22 +02:00
Christoph Oelckers
02f785f794
- testing and cleanup of scripted morph code.
2019-04-15 21:56:20 +02:00
Christoph Oelckers
9b1e96262c
- P_UndoPlayerMorph scriptified.
...
Not tested yet and still missing a new native interface.
2019-04-15 21:56:18 +02:00
Christoph Oelckers
395413fc9a
- scriptified P_MorphPlayer and dependencies.
...
It still needs its counterpart scriptified as well before it can work.
# Conflicts:
# src/gi.cpp
# wadsrc/static/zscript/base.txt
2019-04-15 21:56:16 +02:00
Christoph Oelckers
f00892e06d
- exported ADecal to ZScript as a non-native class.
...
Its one function is still native but this was by far the easiest of the remaining actor classes to export.
2019-04-15 16:09:05 +02:00
Alexander
aa6820737a
fixed spelling (mostly comments)
2018-11-28 15:37:45 +01:00
ZZYZX
7905a0e041
Exported destructible geometry to ZScript
2018-11-07 11:00:08 +01:00