Christoph Oelckers
4431ec06fd
- scriptified the AltHUD's inventory drawer and fixed the InvPrev CCMD.
2018-12-02 14:34:09 +01:00
Christoph Oelckers
714ca9b2ce
- scriptified the AltHUD's weapon drawer.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
1406c11f8e
- added the missing TNT1A0 check for icon-less keys.
...
Since it tries to get the icon from the spawn state it also has to check if that actually has a valid sprite.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
fbc441673a
- AltHUD ammo drawer scriptified.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
4a1f011dc1
- Alt HUD scriptification, part 1.
2018-12-02 14:34:08 +01:00
Major Cooke
49f2a38799
Fixed A_JumpIfNoAmmo not working.
2018-12-02 07:28:20 +01:00
Christoph Oelckers
a291ed21fe
- fixed the AngleToVector calls in stateprovider.txt.
...
This looks like a search & replace gone wrong.
2018-12-02 00:41:23 +01:00
Major Cooke
e9df56198c
- Restored A_SpawnItemEx's "chance" to "failchance" to prevent mod breakage from named parameters.
2018-12-01 23:39:54 +01:00
Christoph Oelckers
577af8860c
- scriptified invnext and invprev CCMDs.
2018-12-01 22:37:12 +01:00
Christoph Oelckers
5c647de70c
- moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory.
2018-12-01 17:46:20 +01:00
Christoph Oelckers
bc1990b6d7
- moved AInventory::DoRespawn fully to the script side.
2018-12-01 17:29:37 +01:00
Christoph Oelckers
a14b0c58bf
- re-fixed the massacre fix for Dehacked-modified inventory items.
...
Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.
# Conflicts:
# src/g_inventory/a_pickups.cpp
# src/g_inventory/a_pickups.h
2018-12-01 17:20:52 +01:00
Christoph Oelckers
7301bbc58e
- scriptified GiveAmmo and the one remaining piece of native code still using it.
2018-12-01 17:20:23 +01:00
Christoph Oelckers
2c59172c42
- scriptified DropInventory.
2018-12-01 17:18:26 +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
588ddd185b
- scriptified TakeInventory, including the ACS/FS interfaces.
2018-12-01 17:11:09 +01:00
Christoph Oelckers
023efc7685
- scriptified RemoveInventory and Inventory.OnDestroy.
2018-12-01 17:09:23 +01:00
Christoph Oelckers
eb47fb9adc
- scriptified GiveInventory and made the interface a bit more configurable by mods.
...
Now a child type can decide for itself how to treat 'amount'.
The scripting interfaces to this function in ACS and FraggleScript have been consolidated and also scriptified.
2018-12-01 17:07:09 +01:00
Christoph Oelckers
a426655d61
- scriptified AddInventory.
2018-12-01 17:03:58 +01:00
Christoph Oelckers
aa32acae25
- a bit of code reordering for adding direct native entry points.
...
- offloaded key list generation for alternative HUD to non-UI parts.
This change also revealed a problem with handling empty sprites in the key list so this got fixed, too.
2018-12-01 14:18:28 +01:00
Christoph Oelckers
03015896d6
- seems there are two versions of Hacx's MAP05.
2018-12-01 10:30:50 +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
8e46cb3a21
Merge remote-tracking branch 'remotes/origin/master' into asmjit
2018-11-30 18:49:28 +01:00
Player701
927d333063
- Exported AActor::Grind to ZScript.
2018-11-29 23:46:47 +01:00
Christoph Oelckers
ef2c433a8b
- fixed declaration of ChangeStatNum.
2018-11-29 20:15:24 +01:00
Christoph Oelckers
ba2b9430f8
ChangeStatNum must not be virtual
...
Overriding this would make the engine vulnerable to badly behaving mods. Intercepting this and altering the behavior can render the entire game inoperable, especially if more internal code gets scriptified later. So even at the risk of breaking some carelsss mods this must be blocked.
2018-11-29 19:00:25 +01:00
Christoph Oelckers
3acd9c8116
Made all virtual base functions for the event handler scripted
...
This was by far the largest block of native virtuals, and they were only native to be able to allow checking if the event was implemented for the current handler. This can easily be done by looking at the byte code, just like VMCall also does but in turn it removes more than half of the existing native virtuals from the interface.
2018-11-29 18:46:28 +01:00
Christoph Oelckers
f43f0b9bd4
- added a few more direct native entry points.
2018-11-29 00:27:09 +01:00
Christoph Oelckers
a5a9ab07af
Merge branch 'master' into asmjit
2018-11-28 18:44:42 +01:00
Christoph Oelckers
7ff0cd70ad
- explicitly declare the constructor and destructor methods of FCheckPosition so that they get a working prototype.
2018-11-28 17:33:37 +01:00
Player701
91ea22e85a
- Fixed textures on the two switches that rise from the floor in the eastern area of TNT MAP31
2018-11-27 21:14:52 +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
47b1fa774d
Merge branch 'asmjit' into weapon_scriptification
...
# Conflicts:
# src/gi.cpp
# wadsrc/static/zscript/base.txt
2018-11-26 00:14:44 +01:00
Christoph Oelckers
90d79865a5
Merge branch 'master' into asmjit
2018-11-25 23:33:23 +01:00
Christoph Oelckers
9475bfe4f1
- declare builtins as static.
2018-11-25 21:47:28 +01:00
Christoph Oelckers
a501a22b28
- define the built-in functions defined in codegen.cpp through the regular interface instead uf just hacking them into the symbol table with incompletely set up data.
...
- added direct native variants to these builtins and fixed problems with builtin processing.
2018-11-25 11:41:29 +01:00
Christoph Oelckers
43d434b071
- removed AStateProvider from native code.
...
The only place still referencing it was CallStateChain, so this has been made a static function now instead of a class method.
2018-11-25 10:09:06 +01:00
Christoph Oelckers
f4789bdefc
- fixed handling of dummy flags.
2018-11-25 10:06:00 +01:00
Christoph Oelckers
d6b781312c
- removed all remaining native components of the weapon class.
2018-11-25 10:00:55 +01:00
Christoph Oelckers
70d3c31551
- allow defining flags in the script declaration of a class and do that for Weapon.
2018-11-25 09:29:12 +01:00
Christoph Oelckers
b5c4ab8c47
- removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
...
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2018-11-25 08:17:37 +01:00
Christoph Oelckers
00a48b09e5
- moved the 'Finalize' methods back into a single function in the parser code.
...
It has been like this initially but was changed when ZDoom gained an overly complicated polymorphic class descriptor object that required a lot of support code. All these complications have long been removed but these methods remained. Since they prevent a class from being moved to the script side entirely they had to be removed.
This was the last major blocker to make Weapon a purely scripted class, the only remaining native method is Serialize which is of no concern for the coming work.
2018-11-25 08:16:18 +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
8fa16b6c30
- some cleanup on the weapon slot interface.
...
This really shouldn't make any decisions from directly reading weapon class defaults.
2018-11-25 07:21:02 +01:00
Christoph Oelckers
f218e95c4d
- scriptified cht_Takeweaps.
2018-11-25 01:26:19 +01:00
Christoph Oelckers
460c400315
- scriptified ApplyKickback.
2018-11-25 01:12:45 +01:00
Christoph Oelckers
ae27acb944
- scriptified A_WeaponReady and its subfunctions.
2018-11-25 00:54:13 +01:00
Christoph Oelckers
34b7e5f435
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2018-11-25 00:23:03 +01:00
Christoph Oelckers
8eb4697fbd
- removed the bot related properties from AWeapon.
...
This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
2018-11-24 23:48:23 +01:00
Christoph Oelckers
4392b4e96d
- exported the blood spawning part of P_LineAttack as a virtual ZScript function.
2018-11-24 22:35:50 +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
337750b874
- scriptified BecomeItem and BecomePickup
2018-11-24 21:25:26 +01:00
Christoph Oelckers
3d892d3970
- scriptified FilterCoopRespawnInventory.
2018-11-24 20:58:33 +01:00
Christoph Oelckers
c14b7f58d3
- scriptified some simple sound functions.
2018-11-24 20:33:00 +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
cf9cd58310
- scriptified ModifyDropAmount as a virtual function hierarchy for Inventory and children.
2018-11-24 19:59:24 +01:00
Christoph Oelckers
652606f70b
- scriptified A_Explode and relatives.
2018-11-24 19:29:52 +01:00
Christoph Oelckers
44d51a6de9
- scriptified GetDefaultInventory.
2018-11-24 19:03:33 +01:00
Christoph Oelckers
be100fa5d3
- removed MeleeWeapon flag from the tomed PhoenixRod and the fighterhammer.
...
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.
2018-11-24 18:42:10 +01:00
Christoph Oelckers
814af66864
- exported one FraggleScript function for testing.
2018-11-24 18:33:42 +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
b4c272ddff
- scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
...
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2018-11-24 17:01:12 +01:00
Christoph Oelckers
6be7fc33f3
- scriptified 3 more functions in stateprovider.
2018-11-24 15:42:43 +01:00
Christoph Oelckers
4c1b3f81ab
- scriptified A_RailAttack.
2018-11-24 15:12:30 +01:00
Christoph Oelckers
5c130737c4
- scriptified A_CustomPunch
2018-11-24 14:48:30 +01:00
Christoph Oelckers
7bb3855439
- scriptified A_FireProjectile
2018-11-24 14:16:08 +01:00
Alexander
1b82e2078d
add monster tags (Friendly Names) for Hexen
2018-11-24 14:02:48 +01:00
Christoph Oelckers
e071be8371
- scriptified A_FireBullets and A_CustomBulletAttack.
2018-11-24 13:50:27 +01:00
Christoph Oelckers
6fc63b9b78
- started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
...
So far 3 functions for testing implemented.
2018-11-24 13:06:01 +01:00
alexey.lysiuk
f11b20122f
- made ZRock4 solid like in vanilla Hexen
...
9164cc6e0f/INFO.C (L5731)
c0c1771e37/src/hexen/info.c (L5748)
https://forum.zdoom.org/viewtopic.php?t=62660
2018-11-24 12:51:14 +02:00
Christoph Oelckers
ac77ca6474
- scriptified Weapon.CheckAmmo and Weapon.DepleteAmmo
2018-11-24 11:29:57 +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
Christoph Oelckers
192104aea2
- scriptified P_MorphPlayer and dependencies.
...
It still needs its counterpart scriptified as well before it can work.
2018-11-24 07:45:49 +01:00
Magnus Norddahl
31ed1da4e5
Merge remote-tracking branch 'origin/master' into asmjit
2018-11-23 22:57:11 +01:00
Marisa Kirisame
ee91cf77e4
expose defaultbloodcolor to ZScript.
2018-11-23 22:15:15 +01:00
Christoph Oelckers
a5ee673c91
- 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.
2018-11-19 17:54:38 +01:00
Christoph Oelckers
a981737855
- generate register type info for the parameter lists of all functions.
...
Currently used for loading parameters into registers.
For checking parameters of native functions some more work is needed to get the info to the function. Currently it doesn't receive the function descriptor.
2018-11-18 17:10:55 +01:00
Christoph Oelckers
16c85b532b
- restored the old A_Jump prototype because DECORATE needs this to parse the arguments.
2018-11-17 21:22:18 +01:00
Christoph Oelckers
533f66396d
Merge branch 'master' into asmjit
2018-11-17 20:16:03 +01:00
Christoph Oelckers
adde0510fe
- deconstruct A_Jump with multiple labels into A_Jump(chance, RandomPick(label1, label2, label3,...)) to remove this ugly special case from the VM calling convention.
...
This also adds the number of available choices to OP_IJMP.
2018-11-17 12:35:03 +01:00
Christoph Oelckers
cfa11046ab
- changed PhosphorousFire.DoSpecialDamage to match SVE's handling:
...
* Everything with a damage factor for fire only uses that.
* Everything that bleeds takes half damage
* Robots take quarter damage.
2018-11-16 21:36:57 +01:00
Christoph Oelckers
33fb76698b
Avoid using argument count for any kind of decision making in native VM functions.
...
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.
2018-11-16 15:25:37 +01:00
Christoph Oelckers
feef0d4b62
- corrected A_DropFire for real, using the SVE source as reference.
2018-11-15 19:35:07 +01:00
Christoph Oelckers
99f1d6b82e
- fixed: A_DropFire accidentally cleared the XF_HURTSOURCE flag by setting only XF_NOSPLASH.
2018-11-15 18:49:37 +01:00
Major Cooke
55f17fa90c
Changed A_RaiseActor to just RaiseActor.
2018-11-13 19:01:56 +01:00
Major Cooke
71d2b39d92
Added A_RaiseActor(Actor other, int flags = 0)
2018-11-13 19:01:56 +01:00
Major Cooke
b553be153d
Added CanResurrect(Actor other, bool passive)
...
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-13 19:01:56 +01:00
Christoph Oelckers
ca2defa6a2
- added ZScript export for side_t::SetSpecialColor.
2018-11-12 00:13:14 +01:00
Major Cooke
9a7f570b19
Added DMG_NO_ENHANCE for DamageMobj.
...
- Disables PowerDamage's effect, similar to DMG_NO_PROTECT disabling PowerProtect.
2018-11-10 16:18:33 +01:00
Major Cooke
9ff7f338fd
Added IsPointInMap(Vector3 p).
...
- Checks if a point is inside the map geometry or not.
2018-11-07 15:16:45 -05:00
Christoph Oelckers
bfffe6df3e
- fixed typo with RNG name.
2018-11-07 19:20:42 +01:00
ZZYZX
a276ebfb08
Exported destructible geometry to ZScript
2018-11-07 00:12:37 +01:00
ZZYZX
d85e5afdfb
Destructible geometry - minor fixes and 3D floor support
2018-11-07 00:12:37 +01:00