This function calculated everything correctly but ultimately set the vertical velocity wrong. Most importantly this meant that the actual velocity vector and actor pitch - if CMF_SAVEPITCH was used - did not match.
Since this bug has been present since the pitch parameter was added, this deprecates A_CustomMissile and replaces it with a properly implemented A_SpawnProjectile function and handling the compatibility case with a new flag and a scripted wrapper function.
All internal uses of A_CustomMissile have been replaced as well.
For most attack functions this is wrong, it's only the Hexen fighter attack needing this particular value, so it has been split up into two return values now.
This can see some heavy use in iterators where saving several hundreds of function calls can be achieved. In these cases, using a function to do the job will become a significant time waster.
This will get called for both actors taking part in a collision, if one of the two calls returns false it will immediately abort PIT_CheckThing with no collision taking place at all.
* It will now use #include, just like most other definition formats and can be mixed with regular definitions. However, due to how the Lemon-generated parser works this will not recursively pull in all files, but store them in a list and process them sequentially. Functionally this shouldn't make a difference, because ZScript is mostly order-independent - the only thing where order is important is native classes, but these are completely internal to zdoom.pk3 where proper order is observed.
- fixed PARAM_ACTION_PROLOGUE to assign correct types to the implicit pointers. It gave the actual class to the wrong one, which until now did not matter because all functions were using 'Actor', regardless of actual class association.
- fixed the definition of IceChunk and removed some redundant code here. Since A_FreezeDeathChunks already calls SetState, which in turn calls the state's action function, there is no need to call it again explicitly.
It is utterly pointless to require every function that wants to make a VM call to allocate a new stack first. The allocation overhead doubles the time to set up the call.
With one stack, previously allocated memory can be reused. The only important thing is, if this ever gets used in a multithreaded environment to have the stack being declared as thread_local, although for ZDoom this is of no consequence.
- eliminated all cases where native code was calling other native code through the VM interface. After scriptifying the game code, only 5 places were left which were quickly eliminated. This was mostly to ensure that the native VM function parameters do not need to be propagated further than absolutely necessary.
- added call wrappers and script hooks for all relevant virtuals in AInventory.
- made GetSpeedFactor and GetNoTeleportFreeze entirely scripted because they are too trivial - also do them iteratively, just like HandlePickup, because it's just a better way to do this stuff.
- moved health items to their own file.
- scriptified ScoreItem and MapRevealer whose entire functionality was a small TryPickup method.
- fixed: bit fields in global variables were not correctly written.
This should conclude the inventory cleanup. It is now possible again to find things in there.
- removed the native parts of SpecialBlastHandling. Since this is called from the script side and the only remaining native remnant was an empty function it's now 100% scripted.
- cleaned up the virtual function interface of APlayerPawn which still had many virtual declarations from old times when class properties were handled through virtual overrides. None of this makes sense these days anymore.
- Changed the glass shards so that they do not have to override FloorBounceMissile. It was the only place where this was virtually overridden and provided little usefulness.
- made 'out' variables work.
- fixed virtual call handling for HandlePickup.