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
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
Christoph Oelckers
dd3dba2ef1
- made PlayerPawn.TweakSpeeds virtual.
2018-12-29 08:43:36 +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
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
Cacodemon345
789941f24d
Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript
2018-12-20 22:54:45 +01:00
Christoph Oelckers
f6aa16947a
- re-added PlayerInfo.BringUpWeapon.
2018-12-11 00:35:53 +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
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
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
2e383073e8
- 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.
2018-12-02 19:45:45 +01:00
Christoph Oelckers
ee08412e49
- scriptified G_PlayerFinishLevel.
...
Outside of SBARINFO this was the biggest remaining piece of code that referenced AInventory internals.
2018-12-02 16:26:02 +01:00
Christoph Oelckers
4a1f011dc1
- Alt HUD scriptification, part 1.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
577af8860c
- scriptified invnext and invprev CCMDs.
2018-12-01 22:37:12 +01:00
Christoph Oelckers
09129e0113
- scriptified UseInventory and several functions using the already scriptified ones,
2018-12-01 17:17:08 +01:00
Christoph Oelckers
023efc7685
- scriptified RemoveInventory and Inventory.OnDestroy.
2018-12-01 17:09:23 +01:00
Christoph Oelckers
a426655d61
- scriptified AddInventory.
2018-12-01 17:03:58 +01:00
Christoph Oelckers
a0c0e8bdfe
Merge remote-tracking branch 'remotes/origin/weapon_scriptification' into asmjit
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2018-11-30 21:28:44 +01:00
Christoph Oelckers
5e4e9e2c2b
Merge branch 'master' into asmjit
2018-11-27 19:53:22 +01:00
Alexander
4a85e24228
fixed spelling (mostly comments)
2018-11-27 19:44:06 +01:00
Christoph Oelckers
7012179904
- moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
2018-11-25 07:43:05 +01:00
Christoph Oelckers
f218e95c4d
- scriptified cht_Takeweaps.
2018-11-25 01:26:19 +01:00
Christoph Oelckers
34b7e5f435
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2018-11-25 00:23:03 +01:00
Christoph Oelckers
f260709e73
- moved the weapon selection logic to PlayerPawn as overridable virtual functions.
2018-11-24 22:22:36 +01:00
Christoph Oelckers
b6d0d5008e
- change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
2018-11-24 21:37:00 +01:00
Christoph Oelckers
3d892d3970
- scriptified FilterCoopRespawnInventory.
2018-11-24 20:58:33 +01:00
Christoph Oelckers
fb91982da2
- scriptified APlayerPawn::Die and fixed a few things I encountered while doing it.
2018-11-24 20:32:12 +01:00
Christoph Oelckers
44d51a6de9
- scriptified GetDefaultInventory.
2018-11-24 19:03:33 +01:00
Christoph Oelckers
595208f2fd
- exported a few more weapon handling functions so that the native GetDownState stub could be removed.
2018-11-24 18:21:40 +01:00
Christoph Oelckers
9584e3bc53
- scriptified P_BringUpWeapon because this was the only native function still referencing AWeapon::GetReadyState.
2018-11-24 17:22:59 +01:00
Christoph Oelckers
bd84a60663
- scriptified the rest of the morph code.
2018-11-24 10:47:42 +01:00
Christoph Oelckers
ac1bffc51b
- scriptified P_MorphMonster.
2018-11-24 09:33:03 +01:00
Christoph Oelckers
3ed7f4066d
- fixed message output.
2018-11-24 08:41:07 +01:00
Christoph Oelckers
cce1bad042
- testing and cleanup of scripted morph code.
2018-11-24 08:39:35 +01:00
Christoph Oelckers
78d6832d14
- P_UndoPlayerMorph scriptified.
...
Not tested yet and still missing a new native interface.
2018-11-24 08:17:30 +01:00