[r4172] 0 tic frames not always lasting 0 tics

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [r4172] 0 tic frames not always lasting 0 tics

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

by randi » Wed May 01, 2013 6:08 pm

Fixed in r4245.

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

by Graf Zahl » Wed May 01, 2013 2:34 pm

Hmm... I somehow expected this from looking at the code.

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

by Fishytza » Wed May 01, 2013 1:38 pm

Finally, DECORATE actors are working as expected.
...
...
I'm probably going to regret making this post, but anyway. (So far so good.)
So, I've messed around with NODELAY and discovered a itsy bitsy teeny tiny problem with it.
It seems that you can't use it in a 0 state chain where it ends with the actor being destroyed (Stop at the end)

Code: Select all

Actor AnotherOne
{
	States
	{
	Spawn:
		TNT1 A 0 Nodelay A_SpawnItem("Gibs")
		TNT1 A 0 A_SpawnItem("Clip")
		TNT1 A 0 A_SpawnItem("Shotgun")
		Stop
	}
}
Once you spawn this and leave/close the console, you get a crash.
Of course you can just give one of the three states (I think that's what they're called) a one tick delay and things are fine.

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

by Nash » Wed May 01, 2013 12:34 pm

Everything >seems< to be back to the way they were... for now... hopefully no more problems come up after this... :P

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

by GFD » Wed May 01, 2013 12:17 pm

what have i done

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

by Blue Shadow » Wed May 01, 2013 12:12 pm

Enjay wrote:I only uploaded it about 15 minutes ago. ;)
Heh, I thought the post/upload time of the builds was according to my time zone, for some reason, and I forgot that it wasn't. :lol:
I've tested it with briefly Cammy and another couple of mods and I haven't noticed any problems yet.
That's a relief. Because to be honest, I was starting to get worried...

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

by Enjay » Wed May 01, 2013 10:46 am

I only uploaded it about 15 minutes ago. ;)

I've tested it with briefly Cammy and another couple of mods and I haven't noticed any problems yet.

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

by Blue Shadow » Wed May 01, 2013 10:35 am

So, has anyone tested the latest build to see if everything is alright? Is it safe to update my ZDoom version, again? :P

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

by randi » Tue Apr 30, 2013 8:22 pm

Fixed in r4243.

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

by Nash » Tue Apr 30, 2013 1:20 pm

And in my mod, jumping will make the player float in the air, never to drop. I'm willing to bet it's related to this change. I'll need some time to trace down what exactly that my mod is doing that is triggering this behaviour though...

EDIT:

Code: Select all

Actor Z_FloorCheck
{
    Radius 9
    Height 4
    +SOLID
    States
    {
        Spawn:
            TNT1 A 1
            Stop
    }
}
 
This actor is responsible for some collision checks I'm doing with the player. For example...

Code: Select all

// player is on ground
Function int CheckPlayerOnGround(void)
{
    int onground;
    if(GetActorZ (0) == GetActorFloorZ (0) || GetActorVelZ(0) == 0 && !Spawn("Z_FloorCheck", GetActorX(0), GetActorY(0), GetActorZ(0) - (4 << 16), 0, GetActorAngle(0)))
    {
        onground = 1;
        //Setfont("smallfont");
        //print(s: "on ground");
    }
    else
    {
        onground = 0;
        //Setfont("smallfont");
        //print(s: "in air");
    }
    return onground;
}
 
Removing the +SOLID flag from Z_FloorCheck returns things to normal (ie, player can fall down again) but will obviously break all the collision checks I've specifically set the Thing up for.

Unfortunately this is all I can give for now. An isolated example file might take a while to make but I'm pretty sure the changes in here are making this happen.

EDIT 2: Oh hey I just remembered I have a small ZDoom-compatible project that uses the same code as what I'm describing above. So it's easy to test right away:

https://dl.dropboxusercontent.com/u/47355875/house.pk3

Jump and you will never fall down.

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

by Fishytza » Tue Apr 30, 2013 10:58 am

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)

Re: [r4242] Monsters Disappear After Death

by Enjay » Tue Apr 30, 2013 10:47 am

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.

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

by Fishytza » Tue Apr 30, 2013 10:40 am

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.

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

by Enjay » Tue Apr 30, 2013 10:21 am

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]

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

by Enjay » Tue Apr 30, 2013 10:01 am

Doh! How did I not remember those - especially "Bright"?

Top