MantisBT - Zandronum
View Issue Details
0001341Zandronum[All Projects] Bugpublic2013-05-14 22:422015-09-05 18:01
Ijon Tichy 
 
highmajoralways
closedout of scope 
1.0 
 
0001341: OPEN scripts run *after* ENTER scripts in anything but coop
OPEN scripts should run before ENTER scripts, and they do... but only in single player. In literally every other mode, ENTER runs first. This is inconsistent and very much undesired.
1. Run opennotfirst.pk3.
2. "map map01"
3. Notice that "Enter has run" is what you see on the screen.
3a. Check the console to see "Open has run" is before "Enter has run".
4. "deathmatch 1; map map01"
5. "Open has run" is what you see on the screen.
5a. "Enter has run" is now before "Open has run" on the console.
This has screwed Samsara up heavily. It has a new mode, called Punchdrunk, where all weapons are removed save melee weapons. It relies on the OPEN script running first to set a map variable called IsPunchdrunk, which a bunch of other scripts then check; as it stands, in all non-coop modes (including Survival), for the first tic of a map, Punchdrunk is effectively disabled. This is not a good thing.
No tags attached.
? opennotfirst.pk3 (563) 2013-05-14 22:42
/tracker/file_download.php?file_id=967&type=bug
? opennotfirst-timer.pk3 (592) 2013-05-14 23:22
/tracker/file_download.php?file_id=968&type=bug
Issue History
2013-05-14 22:42Ijon TichyNew Issue
2013-05-14 22:42Ijon TichyFile Added: opennotfirst.pk3
2013-05-14 22:54Ijon TichyNote Added: 0006329
2013-05-14 23:08Ijon TichyNote Added: 0006330
2013-05-14 23:22Ijon TichyNote Added: 0006331
2013-05-14 23:22Ijon TichyFile Added: opennotfirst-timer.pk3
2013-11-26 18:27HypnotoadNote Added: 0007610
2013-11-28 13:02DuskNote Added: 0007630
2013-12-01 11:20Torr SamahoNote Added: 0007650
2013-12-01 11:20Torr SamahoAssigned To => Torr Samaho
2013-12-01 11:20Torr SamahoStatusnew => assigned
2013-12-01 11:28Torr SamahoNote Edited: 0007650bug_revision_view_page.php?bugnote_id=7650#r4242
2013-12-01 11:43Torr SamahoNote Added: 0007651
2013-12-04 20:31Torr SamahoStatusassigned => needs testing
2013-12-23 03:37Ijon TichyNote Added: 0007720
2013-12-23 09:35Torr SamahoNote Added: 0007723
2013-12-23 22:21Ijon TichyNote Added: 0007724
2013-12-24 09:04Torr SamahoNote Added: 0007725
2013-12-25 05:16Ijon TichyNote Added: 0007726
2013-12-25 17:48DuskNote Added: 0007727
2013-12-27 15:57Torr SamahoNote Added: 0007743
2013-12-27 15:58Torr SamahoStatusneeds testing => needs review
2013-12-27 15:58Torr SamahoStatusneeds review => feedback
2013-12-27 22:47Ijon TichyNote Added: 0007746
2013-12-27 22:47Ijon TichyStatusfeedback => assigned
2015-09-05 18:01DuskStatusassigned => closed
2015-09-05 18:01DuskAssigned ToTorr Samaho =>
2015-09-05 18:01DuskResolutionopen => out of scope

Notes
(0006329)
Ijon Tichy   
2013-05-14 22:54   
Update: It seems OPEN runs first in deathmatch online, but *not* in LMS online.
(0006330)
Ijon Tichy   
2013-05-14 23:08   
18:06 <+Hypnotoad> okay this is what i can ascertain ijon
18:06 <+Hypnotoad> on map change/start, open runs first, but on round start
18:06 <+Hypnotoad> enter runs first
18:07 <+Hypnotoad> you can confirm this by exiting a map
18:07 <+Hypnotoad> on survival
(0006331)
Ijon Tichy   
2013-05-14 23:22   
screenshots of the console:

'http://i.imgur.com/hxQ3ArE.png [^]' - deathmatch
'http://i.imgur.com/LB7MBtY.png [^]' - LMS
'http://i.imgur.com/DVlYOTM.png [^]' - deathmatch, Timer() added
(0007610)
Hypnotoad   
2013-11-26 18:27   
Any update on this? This is causing problems for me currently.
(0007630)
Dusk   
2013-11-28 13:02   
Is it specifically defined behavior that OPEN scripts are to run before ENTER ones? It sounds like we're hitting a case of "Don't do that!" for me.
(0007650)
Torr Samaho   
2013-12-01 11:20   
(edited on: 2013-12-01 11:28)
Actually I'd assume that open OPEN scripts are meant to be executed before ENTER ones. It sounds very natural to me that you have to open a map, before anyone can enter it. If the behavior in deathmatch and LMS differs online, that sounds like a bug in the map reset system to me. I'll have a look.

EDIT: Yeah, it seems to a bug in the map reset logic.

(0007651)
Torr Samaho   
2013-12-01 11:43   
This should fix the issue. I'm not sure if the fix (which only affects map resets) has any undesired side effects though. Needs to be tested thoroughly.
(0007720)
Ijon Tichy   
2013-12-23 03:37   
Now ENTER scripts consistently run before OPEN scripts in competitive game modes. I'm not entirely sure if that constitutes a fix, since now competitive and cooperative game modes are inconsistent in how they run OPEN and ENTER scripts.

Is joining players handled differently in competitive game modes?
(0007723)
Torr Samaho   
2013-12-23 09:35   
FYI, my fix only affects the behavior of map resets.

I had a quick look at GZDoom 880 and it seems to be doing the same as Zandronum in Deathmatch. Can you check the latest GZDoom version?
(0007724)
Ijon Tichy   
2013-12-23 22:21   
Apparently, ENTER before OPEN is how it's done in GZDoom as well. That's... kind of weird.
(0007725)
Torr Samaho   
2013-12-24 09:04   
I'd say that GZDoom doesn't intentionally do this, just that it's an oversight nobody ever noticed. Can you ask over there to confirm this?
(0007726)
Ijon Tichy   
2013-12-25 05:16   
It's undefined in ZDoom, apparently. I'd recommend changing that by making OPEN scripts always run before ENTER scripts.
(0007727)
Dusk   
2013-12-25 17:48   
'http://forum.zdoom.org/viewtopic.php?p=736112#p736112 [^]'

So I was right. Don't do that! Going to close this unless we want to specifically change the zdoom behavior here.
(0007743)
Torr Samaho   
2013-12-27 15:57   
I'd definitely like to know why ZDoom keeps the behavior undefined and what's making the actual script order depend on the game mode before deciding what to do here.
(0007746)
Ijon Tichy   
2013-12-27 22:47   
For that, I'd seriously recommend getting direct contact with Randy or Graf, since I might be a bit biased as proxies go and they'd have a better rationale for it, if one exists at all.