World version of RETURN script

Moderator: GZDoom Developers

User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: World version of RETURN script

Post by Xaser »

InsanityBringer wrote:ok to be completely honest, even if it is sort of possible already (through means I consider sketchy and possibly not future proof), is there actually any harm in adding a feature like this? I can't imagine it will be very hard to do, and wham, suddenly you have an entirely future proof (well, you still have to be somewhat careful, just like anything) way of doing things that results in ultimately cleaner and easier to read code.

Is there something wrong with this?
Well stated. Unless there's a technical issue blocking the implementation, the workaround is trivial, or it's a case of user error, the general attitude from the devs toward these kinds of things is "why not?"


[EDIT] For the record, I think RaveYard's posts are entirely appropriate, though, because the attitude isn't "lol just du this" but rather "eh, here's some things; would be best as a real feature though".
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: World version of RETURN script

Post by Nash »

Mini update: I found some time to add this myself, but it's in a local copy, untested yet (there's modifications to both ZDoom and acc.exe) and I don't have time to test and make a PR currently. Appreciate it if this wasn't closed 'til then, thanks. :)
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: World version of RETURN script

Post by Ghastly »

NeuralStunner wrote:A RETURN script runs once for each player. Yes, you can "just" use a map variable to track whether the script has already run, but that variable is still going to be set the net time you reopen the map. Okay, "just" unset it via an UNDLOADING script. But you now have one more variable and script than you should need for such a simple operation.
This.

I mean, Nash's suggestion is the same logic for why OPEN script type exists. Without OPEN, you could do the same thing with an ENTER script, checking if it's the lowest player number running it or setting some variable to make sure it isn't done again... Or you could mark it as an OPEN script and take out all the boilerplate.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: World version of RETURN script

Post by Nash »

Update: both my stuff and Striker's KILL scripts 2.0 modify the same areas of code, so I'll wait for that one to get added first so that there won't be any conflicts. I feel like that one is more important and should take precedence. Once that one is in, I'll put my PR up.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: World version of RETURN script

Post by Nash »

Nash wrote:Update: both my stuff and Striker's KILL scripts 2.0 modify the same areas of code, so I'll wait for that one to get added first so that there won't be any conflicts. I feel like that one is more important and should take precedence. Once that one is in, I'll put my PR up.
Should I go ahead and submit my PR first? Since that other thread is locked and I don't see any activity there? I was hoping that feature would get some movement first, out of courtesy towards Striker, because we're both touching the same script type enums, and the same area in parse.c for acc... I mean I can understand it'd be inconvenient for him to have to update his PR yet again...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: World version of RETURN script

Post by Graf Zahl »

I don't have much time to review this stuff at the moment and the KILL PR is still pending, so better wait.
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: World version of RETURN script

Post by Nash »

Pull requests added to OP
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: World version of RETURN script

Post by Graf Zahl »

No idea why this took so long, considering it's just a world version of the already existing 'return' type...
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: World version of RETURN script

Post by Nash »

Let this thread be a lesson to stop suggesting hacks and workarounds when a proper solution can be built into the engine. Even more so when the solution is simple/has always been there and would take all of 10 minutes to add.

I hate it when shit breaks in new versions of the engine due to a very gross attempt at fighting the engine to achieve something. This hacker mentality needs to stop... :mrgreen:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: World version of RETURN script

Post by Graf Zahl »

So, were you talking about ZDoom or web browsers...? :twisted:
User avatar
Rachael
Posts: 13955
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: World version of RETURN script

Post by Rachael »

And that... is a quality mic drop moment.
User avatar
Major Cooke
Posts: 8211
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: World version of RETURN script

Post by Major Cooke »

I'm missing some context here...
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: World version of RETURN script

Post by Kinsie »

Graf Zahl wrote:So, were you talking about ZDoom or web browsers...? :twisted:
Now, now, let's not go crazy here.

Web browsers have functional netcode.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”