Bug? Low-Speed monsters spawned near walls are stuck

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
Cherno
Posts: 1311
Joined: Tue Dec 06, 2016 11:25 am

Bug? Low-Speed monsters spawned near walls are stuck

Post by Cherno »

Situation: Give a monster a low speed value (for example, 2) and if it's spawned near a wall, it is stuck. It will still be alerted to the player, but not move, turn, or even turn to attack, showing it's Spawn state frames but also playing ActiveSound noises.

I gave the Shotgunguy a speed of 2 (was: 8) and in E1M1, the two Shotgunguys behind the pillars near the steps to the green armor display this behavior, as they seem to spawn near a wall. The imps on the ledge in the room with the toxix slime and zig-zag bridge are nother example.

Code: Select all

ACTOR SlowShotgunGuy : ShotgunGuy replaces ShotgunGuy
{
	Radius 20
	//Speed 8
	Speed 2
	States
	{
		See:
		SPOS AAAAAABBBBBBCCCCCCDDDDDD 1 A_Chase
		Loop
	}
}
I use low-speed monsters in my Voxel Chibi Doom! mod since I wanted smoother monster movement with model-based actors. One solution I found was to give them a low speed value, and laos call A_Chase each tic. Note that the speed value seems to be the only factor for this issue; the monster becoming potentially stuck will still occur if the normal 3-tic A_Chase See state is used.

One solution for this problem is to slightly decrease the radius (for example, from 20 to 18) and any formerly stuck monsters will be able to move again.
Attachments
lowspeed.pk3
shotgunguny replacement with low speed
(234 Bytes) Downloaded 32 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Bug? Low-Speed monsters spawned near walls are stuck

Post by Graf Zahl »

That's normal. Any move that results in being stuck in a wall is invalid. Since your monster does not have sufficient movement step size to get out of the wall it cannot go anywhere.
User avatar
Cherno
Posts: 1311
Joined: Tue Dec 06, 2016 11:25 am

Re: Bug? Low-Speed monsters spawned near walls are stuck

Post by Cherno »

Thanks for the clarification. I worked out a solution; when calling A_Chase, check if it's the first time this function has been called for that actor. If yes, call A_Chase as normal, but afterwards change to speed value to the lower value (the actor starts with it's normal speed value). In effect, for the monster to become unstuck, only the very first A_Chase call has to be done with the normal speed value. Afterwards, speed can be changed to any value, and the actor monster will move around as expected.
Post Reply

Return to “Closed Bugs [GZDoom]”