[Not a bug] Bug? Low-Speed monsters spawned near walls are stuck

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Bug? Low-Speed monsters spawned near walls are stuck

Postby Cherno » Fri Jan 24, 2020 6:55 am

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 allExpand view
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 19 times
User avatar
Cherno
Global Moderator
 
Joined: 06 Dec 2016

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

Postby Graf Zahl » Fri Jan 24, 2020 7:51 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Cherno » Fri Jan 24, 2020 10:04 am

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.
User avatar
Cherno
Global Moderator
 
Joined: 06 Dec 2016


Return to Closed Bugs

Who is online

Users browsing this forum: boris, Cliqz [Bot] and 0 guests