Cant remove nointeraction flag

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.
Post Reply
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Cant remove nointeraction flag

Post by Apeirogon »

Actor cant remove nointeraction flag from himself.
Same with pointers to such actor.

Code: Select all

class tdi : doomimp
{

override void tick()
{
	if( (level.time % 373) == 0){self.bnointeraction = true; console.printf("Im horror flying on the wings of night");}
	if( (level.time % 757) == 0){self.bnointeraction = false; console.printf("I should work, but I dont work");}
	super.tick();
}
}
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Cant remove nointeraction flag

Post by _mental_ »

After removing NOINTERACTION flag you need to explicitly restore BLOCKMAP flag by calling

Code: Select all

A_ChangeLinkFlags(0);
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Cant remove nointeraction flag

Post by Apeirogon »

And why it works in such way? "No interaction"is a some kind of a flag comdo?
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Cant remove nointeraction flag

Post by _mental_ »

If I knew that, I could move this topic to closed bugs along with the explanation.
From what I saw in the code NOINTERACTION flag is switching on NOBLOCKMAP implicitly.
There is no way to restore it back, i.e. engine doesn't track any flag changes between game tics.
No matter bug or feature it is, to make work at the moment you need to call A_ChangeLinkFlags(0) on the same actor.
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: Cant remove nointeraction flag

Post by Graf Zahl »

NOINTERACTION needs to set NOBLOCKMAP because the actor does not get linked into the blockmap. But if the flag is cleared, some code may try to access the block links and crash.

Sorry, can't change.
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Cant remove nointeraction flag

Post by Apeirogon »

Then it must be added to wiki.

I write it because I cant do so.
Post Reply

Return to “Closed Bugs [GZDoom]”