Invisible player+sound alert = hopelessly stuck monsters

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
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Invisible player+sound alert = hopelessly stuck monsters

Post by Matt »

Code: Select all

class invis:inventory{
    override void DoEffect(){
        owner.binvisible=true;
    }
} 
1. Aggro a bunch of monsters.
2. Give the invis.
3. Watch them stand still and hear them constantly (but not impossibly rapidly) making alertsounds.
4. Shoot.
5.expected: Watch them stand still as in 3.
5.actual: Watch them stand still and hear them caught in a neverending 1-tic rapid-fire loop of alertsounds.

Adding owner.A_ClearSoundTarget(); to the DoEffect does nothing.

(edited to add expected behaviour)
Last edited by Matt on Fri Sep 15, 2017 11:33 pm, edited 1 time in total.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Invisible player+sound alert = hopelessly stuck monsters

Post by _mental_ »

As far as I know it always works like that. Consider the following DECORATE code:

Code: Select all

actor TotalInvis: CustomInventory
{
    states
    {
    Pickup:
        TNT1 A 0 A_HideThing
        Stop
    }
}
I'm not sure what you expected from this exactly. Monsters returned to a Spawn state?
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Invisible player+sound alert = hopelessly stuck monsters

Post by Nash »

I believe I have already given several warnings in various posts in the past that setting "bInvisible = true" on the PlayerPawn will cause monster AI to not work correctly anymore. It's probably like that by design?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Invisible player+sound alert = hopelessly stuck monsters

Post by Graf Zahl »

Invisible means 'invisible', i.e. monsters cannot see the player at all! That obviously gets reflected by the AI no longer working
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Invisible player+sound alert = hopelessly stuck monsters

Post by Matt »

The AI merely stopping isn't the problem, it's that they get into this infinite loop where they're alerted and then the alert is aborted every tic.

What I'm not getting is why the monsters are even being alerted at all while the player is invisible.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Invisible player+sound alert = hopelessly stuck monsters

Post by Graf Zahl »

Being alerted is purely dependent on sound status. Being able to chase a target on the other hand depends on being able to see the target.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Invisible player+sound alert = hopelessly stuck monsters

Post by Matt »

Now I'm really confused how invisibility works... if it were just a matter of "they're alerted but they can't see the player" shouldn't they be wandering around in their see states like they do when you're out of LOS, instead of being frozen in place?

(not continuing this with the intention of insisting this is in fact a bug, just want to clarify exactly how this stuff is processed by the monster code)
Post Reply

Return to “Closed Bugs [GZDoom]”