[r4172] 0 tic frames not always lasting 0 tics

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by GFD »

I'm with Blzut on this one. Being able to ensure events happen immediately would be really useful for me - aside from the example pk3 in the OP, I've been able to fix a bunch of other things in the same project with this as well.
IMO, there's not much harm in experimenting to see if it can be fixed without any side-effects. Why not try to fix it?
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Enjay »

To me, it would make sense to have the behaviour that existed prior to this addition still be the default. That way no existing mods would be broken and some obscurish mods wouldn't be sitting there waiting to announce their brokenness as and when someone eventually came upon them (possibly after the release of an official version thereby creating an official version with backwards compatibility issues). The nature of this change does seem to be the kind of thing that is likely to make that happen.

However, there does seem to be a need for the new behaviour so something that can be applied to new actors but leave old actors as they were would seem to make sense and so a +NOEXTRATIC flag does seem to be a good solution at least as far as my end user perspective is concerned.

[selfish] I am not aware of anything in my mods that is broken by the current state of the change, so it is presently immaterial to me how it is finalised. :P [/selfish]
Blzut3
 
 
Posts: 3211
Joined: Wed Nov 24, 2004 12:59 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Blzut3 »

r4234 takes a different approach to solving the issue. The OP example, cammy, Nash's flashlight, and FishyClockwork's example all seem to be working.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Enjay »

I can't check it myself ATM but I've put a build of r4234 up in case any one else wants to give it a whirl.
Usual place: http://svn.drdteam.org/zdoom/
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by randi »

Added as a flag for r4240. (Any suggestions for a better name than NODELAY?)

The OP example should change this:

Code: Select all

Spawn:
    TNT1 A 0
    TNT1 A 0 A_PlaySound("cs/weapon/blade", 6) 
to this:

Code: Select all

Spawn:
    TNT1 A 0 NODELAY A_PlaySound("cs/weapon/blade", 6) 
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Nash »

I guess with this change, I should be encouraged to go through all of my mods and remove all those redundant first states and add the NODELAY flag to all of them...
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: [r4172] 0 tic frames not always lasting 0 tics

Post by Graf Zahl »

Now that's infinitely better than all these half-baked hacks that were tried before.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Enjay »

A state specific flag? Is this a new conept or are there already other similar flags?

Either way, it seems like a nice simple, easy to use solution.
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: [r4172] 0 tic frames not always lasting 0 tics

Post by Graf Zahl »

Yes, there are 2 flags: 'Bright' and 'Fast'.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Gez »

Enjay wrote:A state specific flag? Is this a new conept or are there already other similar flags?
See [wiki=Actor_states#State_keywords]wiki[/wiki]. :wink:
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Enjay »

Doh! How did I not remember those - especially "Bright"?
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r4172] 0 tic frames not always lasting 0 tics

Post by Enjay »

Just tried r4242 and GZDoom r1560. The problems with LWM's Cammy have returned with these versions and this time both problems are present in the one exe. ie the devastator enemy does not spawn bullet actors when it attacks and it doesn't produce smoke plumes from a damaged arm or from the scattering debris when the devastator explodes.

[edit]
In fact, the problems seem even more extensive than that. I noticed problems with a number of the enemies and the player weapons that I had not noticed as being part of the previous bugs. [/edit]
User avatar
Fishytza
Posts: 793
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: They/Them
Contact:

[r4242] Monsters Disappear After Death(ZDoom is broken)

Post by Fishytza »

Just tried r4242 and discovered that, for some reason, when you kill something, anything at all, it simply vanishes as if the last frame in the 'Death' state was not -1. Just kill a zombieman, imp or whatever and prepare to sigh like I did.

Just did another run with Hexen, killed an ettin, it vanished, but then the entire game sort of froze. I could still look around, music was playing, but couldn't move and the other actors simply stopped moving.

EDIT: Tried Strife, punched the first acolyte, game 'froze', acolyte was in it's idle animation instead of attacking.

So I see my thread was merged here. What a relief.
Last edited by Fishytza on Wed May 01, 2013 12:25 am, edited 4 times in total.
User avatar
Enjay
 
 
Posts: 27115
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [r4242] Monsters Disappear After Death

Post by Enjay »

Right enough. That certainly spoils some of the fun. There are other problems with r4242 as well. I suspect that they are all related to the recent changes in the thread that I just linked to.
User avatar
Fishytza
Posts: 793
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: They/Them
Contact:

Re: [r4242] Monsters Disappear After Death(ZDoom is broken)

Post by Fishytza »

Code: Select all

    if (tics != -1)
    {
        // [RH] Use tics <= 0 instead of == 0 so that spawnstates
        // of 0 tics work as expected.
        if (tics <= 0)
        {
            if (state == NULL)
            {
                Destroy();
                return;
            }
            if (!SetState(state->GetNextState()))
                return;         // freed itself
        }
        tics--;
    }
I really think tics--; should be before the if statement like it used to be before this 'noextratic' came along. But the root of the problem could be elsewhere. (Not an expert, just frustrated because I can't believe this happened)
Post Reply

Return to “Closed Bugs [GZDoom]”