MantisBT - Zandronum
View Issue Details
0001797Zandronum[All Projects] Bugpublic2014-05-07 05:102015-11-29 22:14
TerminusEst13 
 
normalminoralways
confirmedbackport later 
MicrosoftWindows98/ME
1.2 
 
0001797: Weapons replaced with CustomInventory items do not respect sv_noweaponspawn and always show in Multiplayer spawns.
See topic.
For mods which replace the weapon pickups with CustomInventory items to give a minor amount of scripting for their pickups, this effectively renders sv_noweaponspawn useless. Whether or not the flag is disabled or enabled, the Multiplayer weapon spawns set by the map are always triggered.
For earlier maps, like Doom 2/Heretic/etc, this is kind of an annoying thing since it effectively gives players a full loadout upon entering map02, rendering the rest of the early mapset trivial. The only option available is sv_coop_spactorspawn, which removes extra monsters from the equation and still makes things pretty trivial.

Perhaps a +RESPECTMULTIPLAYERSPAWN flag for Custom Inventory that checks to see if the spawn has a Multiplayer flag attached?
1: Host a Doom 2 server with a mod that replaces weapon spawns with CustomInventory. (Examples: Samsara or Cyberrunner)
2: Enable sv_noweaponspawn
3: Marvel at how Map01 is still chock full of weapons.
No tags attached.
has duplicate 0002405closed  Weapons replaced by CustomInventories don't respect "Don't spawn multiplayer weapons in coop games" flag 
png Screenshot_Doom_20140507_010947.png (226,972) 2014-05-07 05:10
https://zandronum.com/tracker/file_download.php?file_id=1208&type=bug
png
Issue History
2014-05-07 05:10TerminusEst13New Issue
2014-05-07 05:10TerminusEst13File Added: Screenshot_Doom_20140507_010947.png
2014-05-07 18:02jamNote Added: 0008733
2014-05-07 20:50jamNote Edited: 0008733bug_revision_view_page.php?bugnote_id=8733#r4722
2014-05-07 21:02jamNote Edited: 0008733bug_revision_view_page.php?bugnote_id=8733#r4723
2014-05-07 21:03jamNote Edited: 0008733bug_revision_view_page.php?bugnote_id=8733#r4724
2014-05-07 22:13TerminusEst13Note Added: 0008735
2014-05-09 14:26jamNote Added: 0008756
2014-05-09 14:26jamNote Edited: 0008756bug_revision_view_page.php?rev_id=4744
2014-05-09 14:27jamNote Deleted: 0008756
2014-05-09 14:27jamNote Added: 0008757
2014-06-15 16:35WatermelonNote Added: 0009452
2014-06-15 16:35WatermelonStatusnew => feedback
2014-07-20 11:31ZzZomboNote Added: 0010010
2014-07-20 15:56Edward-sanNote Added: 0010011
2014-07-20 16:42TerminusEst13Note Added: 0010013
2014-07-20 16:42TerminusEst13Statusfeedback => new
2014-07-21 09:18ZzZomboNote Added: 0010024
2014-07-21 14:59PopsoapNote Added: 0010027
2014-07-21 15:00PopsoapNote Edited: 0010027bug_revision_view_page.php?bugnote_id=10027#r5381
2014-07-22 06:16ZzZomboNote Added: 0010032
2014-07-22 07:21TerminusEst13Note Added: 0010033
2014-07-22 11:23ZzZomboNote Added: 0010034
2014-07-23 05:53TerminusEst13Note Added: 0010041
2014-07-23 05:53TerminusEst13Note Edited: 0010041bug_revision_view_page.php?bugnote_id=10041#r5390
2014-07-23 12:45IvanNote Added: 0010042
2014-07-23 12:58ZzZomboNote Added: 0010043
2014-07-23 13:00ZzZomboNote Edited: 0010043bug_revision_view_page.php?bugnote_id=10043#r5392
2014-07-23 16:32PopsoapNote Added: 0010044
2014-07-23 16:42TerminusEst13Note Added: 0010045
2014-07-27 16:41PopsoapNote Added: 0010059
2014-07-27 16:42PopsoapNote Edited: 0010059bug_revision_view_page.php?bugnote_id=10059#r5407
2014-07-28 00:11ZzZomboNote Added: 0010060
2014-07-28 00:13ZzZomboNote Edited: 0010060bug_revision_view_page.php?bugnote_id=10060#r5409
2014-07-28 00:26TerminusEst13Note Added: 0010061
2014-07-28 00:48PopsoapNote Added: 0010062
2015-08-17 17:47WaTaKiDRelationship addedhas duplicate 0002405
2015-08-17 18:14WaTaKiDStatusnew => confirmed
2015-08-17 18:14WaTaKiDResolutionopen => backport later
2015-08-17 20:25IvanNote Added: 0013226
2015-11-29 22:14WaTaKiDNote Added: 0013920

Notes
(0008733)
jam   
2014-05-07 18:02   
(edited on: 2014-05-07 21:03)
I'll try this one out. Feel free to fix it if you already know how though :)
EDIT: I may have fixed it, but I need to know a couple more things:

1) Does this apply to weapons only, or items too? Coz there are extra item pickups w/o sv_noweaponspawn which is spawned too.

I'm assuming this is not only a weapon problem, but items too. Since even the items haven't respected sv_noweaponspawn (meaning they are also custominventory items)

(0008735)
TerminusEst13   
2014-05-07 22:13   
I believe it does affect items as well. I'm not 100% absolutely sure, due to not having a lot of maps on hand where extraneous items are spawned in multiplayer instead of just weapons, but it seems in Heretic at least there are a ton of extra items.
(0008757)
jam   
2014-05-09 14:27   
Fixing this would mean modifying zdoom code, this might cause conflicts while porting to newer versions of zdoom. We might have to modify zdoom's source and push there instead :/
(0009452)
Watermelon   
2014-06-15 16:35   
Can you see if zdoom wants to fix this? After that result, we can go from there
(0010010)
ZzZombo   
2014-07-20 11:31   
I'd WONTFIX this. Those items could use an ACS script to check for gamemode and the CVAR, and act accordingly. Even if authors don't bother a patch .WAD can be created.
(0010011)
Edward-san   
2014-07-20 15:56   
Did someone report to zdoom?
(0010013)
TerminusEst13   
2014-07-20 16:42   
ZzZombo: That would change...absolutely nothing. There is currently no way for a cvar to check if a specific weapon spawn is for multiplayer and thus shouldn't spawn yet/in that area.

Edward-san: Sorry, I forgot. I'll do so right away.
(0010024)
ZzZombo   
2014-07-21 09:18   
What do you mean? What the map author completely don't know what did he insert into the map? He knows well what items will appear in multiplayer, so he just have to check the gamemode and the CVAR.
(0010027)
Popsoap   
2014-07-21 14:59   
(edited on: 2014-07-21 15:00)
Quote from "ZzZombo"
What do you mean? What the map author completely don't know what did he insert into the map? He knows well what items will appear in multiplayer, so he just have to check the gamemode and the CVAR.

The point of the feature is to work with any map, not just ones designed specifically to have this work. And I'm pretty sure the solution you posted wouldn't even work in the intended manner because the initial item placement is handled during initialization of the map.

(0010032)
ZzZombo   
2014-07-22 06:16   
Just try it before jumping to conclusions, sir.
(0010033)
TerminusEst13   
2014-07-22 07:21   
Please refer to the picture in the OP.

Those areas are multiplayer-only spawns, which spawn weapons in multiplayer game modes. With sv_noweaponspawn, these areas do not spawn weapons.
Compare this with the shotgun outside or the rocket launcher in the little cubby, which are not multiplayer-only spawns and always spawn weapons whether sv_noweaponspawn is on or off.

If I do a cvar check and make all weapons not spawn when sv_noweaponspawn is on, that completely removes the weapons from the multiplayer-only weapon spawns AS WELL AS the weapons from the not-multiplayer-only weapon spawns.

The problem is that sv_noweaponspawn is supposed to remove only the multiplayer-only weapon spawns, not all weapon spawns on the map.
Because custominventory weapon pickups don't register as weapons, sv_noweaponspawn does not remove the multiplayer-only weapon spawns.
(0010034)
ZzZombo   
2014-07-22 11:23   
'http://pastebin.com/MXjN7sty [^]'
Anyway I'm done arguing here.
(0010041)
TerminusEst13   
2014-07-23 05:53   
'https://www.dropbox.com/s/ivvtvjq6sl2jk6z/te13-custominventorynoweaponspawnexperiment.pk3 [^]'

Tried it, and as expected, absolutely nothing changes.

For the sake of testing, all weapons sans the Chainsaw and BFG9000 have been replaced with custominventory pickups. BFG9000 only appears as a multiplayer-only spawn weapon and the Chainsaw appears normally, so those acted as the control for this experiment.
I adjusted the script to check for co-op instead (since this is a co-op issue and not a deathmatch issue), and when the map loads up with sv_noweaponspawn 0, all weapons spawn normally. When the map loads up with sv_noweaponspawn 1, the BFG9000 is gone and the Chainsaw still spawns...but the custominventory pickups are still spread across the map.

(0010042)
Ivan   
2014-07-23 12:45   
I can also confirm that this exists on weapons dropped with Randomspawners as well, thanks to WaTaKid. Should definitely be fixed.
(0010043)
ZzZombo   
2014-07-23 12:58   
(edited on: 2014-07-23 13:00)
I don't know why I even bothered to check your code, I absolutely expected you will fail to code it properly, and indeed, you even code awfully in Decorate (SGN2 1 loop instead of SGN2 -1 stop yeah, let's waste CPU cycles doing unnecessary animation loops for every replaced actor).
First:
TNT1 A 0 ACS_ExecuteAlways(873,0,args[1])

You had to set args[0] to either 0 (don't remove) or 1 (remove), and always supply args[0] (don't even touch other args, do you get it?) to the script. Also args are supposed to be set from map editor, not in the actor definition, because they will always override map supplied values.

(0010044)
Popsoap   
2014-07-23 16:32   
Quote from "ZzZombo"
I don't know why I even bothered to check your code, I absolutely expected you will fail to code it properly

And I expected you to fail to understand the point of the suggestion in the first place.
Quote from "ZzZombo"
You had to set args[0] to either 0 (don't remove) or 1 (remove), and always supply args[0] (don't even touch other args, do you get it?) to the script. Also args are supposed to be set from map editor, not in the actor definition, because they will always override map supplied values.

I was giving you the benefit of the doubt and praying that args[0] corresponded to this.
(0010045)
TerminusEst13   
2014-07-23 16:42   
"Also args are supposed to be set from map editor, not in the actor definition, because they will always override map supplied values."

If we need to edit the map's Things or create new maps in order for this to work, then it's not really a solution at all.
(0010059)
Popsoap   
2014-07-27 16:41   
(edited on: 2014-07-27 16:42)
'http://forum.zdoom.org/viewtopic.php?f=18&t=46342 [^]'

Added in ZDoom

(0010060)
ZzZombo   
2014-07-28 00:11   
(edited on: 2014-07-28 00:13)
Nop, not really.'http://forum.zdoom.org/viewtopic.php?f=18&t=46342#p774909. [^]'

(0010061)
TerminusEst13   
2014-07-28 00:26   
Quote
OK, done. I added a new flag, called WEAPONSPAWN that can be placed on the replacing actors.

It is in and implemented! Neat!

Quote
Please note that this will have no effect on DF_WEAPONS_STAY, because CustomInventory items by their very nature cannot deal with that!

No worries, have it check and then have the Pickup state jump to either Fail or Stop depending on what the setting is. Neat!

How is this "not really"?
(0010062)
Popsoap   
2014-07-28 00:48   
Quote from "ZzZombo"
Nop, not really.

The DF_WEAPONS_STAY flag is easy to account for. It isn't what was requested in the first place anyway.
(0013226)
Ivan   
2015-08-17 20:25   
Is there any chance of having this commit'http://zdoom.org/Changelog/6d4eb7f6/files [^]' backported for 3.0? It's only 2 months off from the 3.0 target's last changeset, being May 2014. (This is July 2014) I believe people here have made a reasonable case for it's inclusion. It not only provides incredible ways to actually work around certain limitations with weapon pickups (case by case distribution of specific weapons on specific situations being one) it also expands what a pickup can do.
(0013920)
WaTaKiD   
2015-11-29 22:14   
using'https://www.dropbox.com/s/l6p06jpw7h89r32/zandronum-4.0-151129-1323-76ff010-windows.zip?dl=0 [^]' which is the latest 4.0 changeset as of this moment, and the example wad from ticket 2405 with an added +WEAPONSPAWN

unfortunately it doesnt seem to work in zan 4.0, but it does work correctly in zdoom