MantisBT - Zandronum
View Issue Details
0001304Zandronum[All Projects] Suggestionpublic2013-03-22 06:102018-09-30 22:19
Mr. Repo 
Torr Samaho 
normalfeatureN/A
closedfixed 
1.0 
3.03.0 
0001304: Additional flags for A_SpawnItemEx from ZDoom r4188
I am aware with the policy of not backporting anything out of sequence, but I figure I'd give this a whirl anyway just because of how big of a breakthrough I feel this is.

A_SpawnItemEx quite literally yesterday had a few flags added and well, I'll just paste over the descriptions from the ZDoom wiki.

SXF_CLEARCALLERTID - If the actor is spawned successfully, this actor (the one that called A_SpawnItemEx) will have its TID set to 0.
SXF_MULTIPLYSPEED - Multiply the spawned actor's velocity by its Speed property.
SXF_TRANSFERSCALE - Transfers the current Scale factor of the spawning actor to the spawned actor.

Along with the ability to directly assign TIDs to the spawned actor.

Here is the ZDoom forum topic discussing the added flags:
'http://forum.zdoom.org/viewtopic.php?f=18&t=30623 [^]'

Breaking down all 4 points with some of my thoughts of how they could be applied:

SXF_CLEARCALLERTID - This would allow for altered behaviors depending if another actor was successfully summoned. I don't feel I need to go on here and list the specific possibilities with players, inventory, items, monsters, heck even random decorations that could benefit from this. It would make a lot of inconsistent inventory item based coding 100% definite instead of hoping things work out for the best, are always in ideal situations or using hacky ACS for checks. I'm sure almost every single modder could and would benefit from using this alone in some way considering it would guarantee that spawns are always successful.

SXF_MULTIPLYSPEED - From what I can understand, it would be a great way to keep consistency on spawned actors without having to redefine with multiple actors and doing a bunch of inventoryitem checks.

SXF_TRANSFERSCALE - Pure optimization. This would make life easier for larger and smaller actors to take the size of whatever spawned rather than having to make countless new actors that would have the same code over and over with the only difference being the size. Makes things cleaner, more efficient, and like other flags, would allow certain circumstances for varied sized objects to be spawned without having to resort to countless amounts of varied actors.

TIDs - To my knowledge, there is no way to spawn an actor via decorate with a TID unless it's defined in their states. This would allow for greater control and variance without countless lines of redundant code. This also would be great to throw effects onto specific actors depending on what spawned it without having to resort to ACS.

I feel without going too far into specifics that these are good enough reasons to backport this. The possibilities and ease of use just from these few additions are seriously limitless for us modders.
Here's the link to the revision with the extra flags

'http://www.zdoom.org/Changelog/4188/files [^]'
a_spawnitemex, backport, decorate
child of 0002172closed Torr Samaho Upgrade GZDoom base to 1.8.6 
Issue History
2013-03-22 06:10Mr. RepoNew Issue
2013-10-16 13:15DuskStatusnew => acknowledged
2013-10-16 13:15DuskResolutionopen => backport later
2015-05-10 22:39WaTaKiDTarget Version => 3.0
2015-05-10 22:39WaTaKiDSummaryAdditional flags for A_SpawnEx from ZDoom r4188 => Additional flags for A_SpawnItemEx from ZDoom r4188
2015-05-10 22:39WaTaKiDRelationship addedchild of 0002172
2015-08-02 14:30WaTaKiDStatusacknowledged => needs testing
2015-08-02 14:30WaTaKiDResolutionbackport later => open
2015-09-12 05:33Ru5tK1ngNote Added: 0013488
2015-09-12 11:39DuskStatusneeds testing => resolved
2015-09-12 11:39DuskFixed in Version => 3.0
2015-09-12 11:39DuskResolutionopen => fixed
2015-09-12 11:39DuskAssigned To => Torr Samaho
2018-09-30 22:19Blzut3Statusresolved => closed

Notes
(0013488)
Ru5tK1ng   
2015-09-12 05:33   
Well this one took a while, but I was able to test all 3 aforementioned SXF_ flags as well as the TID parameter of A_SpawnItemEX. All of these were tested with 3.0-alpha-150831-1814 both offline and online using monsters as spawns. Each of the flags and TID seemed to work correctly whenever:

Player spawned monster using weapon.
Player spawned monster using inventory item.
Monster spawned Monster.