A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 3:32 am

1. Take two actors: the "active" actor ("collider") that was blasted into another actor and the "passive" actor ("collidee") into which the first one was blasted. The damage to both of them is applied 2 times per collision (maybe sometimes more, but in my experiments it happened 2 times exactly). If you blast an actor into architecture, the damage is applied 2 times per collision at the minimum, often 3 times, sometimes more than ten times.

2. The collider and collidee become "entangled". After you have collided one into another once, you can blast one while the other is nowhere near your field of view, and the other gets blasted too.

Re: A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 3:34 am

Please provide a runnable example.

Re: A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 3:57 am

It's not in a mod, it's in the default game (Hexen). The only mod I'm using is this, to detect when the damage is applied:

MAPINFO

Code:
Gameinfo
{
   AddEventHandlers = "DamLogger"
}


ZSCRIPT
Code:
class DamLogger : EventHandler
{
   override void WorldThingDamaged(Worldevent event)
   {
      Console.Printf("Victim: "..event.Thing.GetClassName()..", dam: "..event.damage..", Type: "..event.DamageType..", flags: "..event.DamageFlags);   }
}


I start a new game, type "give all" in the console to get a lot of ArtiBlastRadius'es at once, and start blasting the Ettins in the starting area into architecture or one another. When I collide one into another, the output is always (per one use of the artifact):

Code:
Victim: Ettin, dam: 2, Type: None, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 2, Type: None, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0


And if they both had full health (175), the collider ends up with 165 health, the collidee with 171 health.

When I blast one Ettin into architecture, the output per one use of the artifact is different. Mostly it's 2 lines with "dam: 5" per use of the artifact, sometimes it's like this or more (with one Ettin being affected):

Code:
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0
Victim: Ettin, dam: 5, Type: Melee, flags: 0


Concerning the second bug: I collide one of them into another, then get between them so that only one is in the field of view, and the other one is behind me and could not possibly be affected normally. Then blast the one in front of me, and the one behind me is also blasted some distance from the point where it was standing.

Re: A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 4:58 am

Kzer-Za wrote:It's not in a mod, it's in the default game (Hexen).


Yeah but you can still make a small mod with your damage logger and a test map with some handy artifacts and some ettins to make things faster and simpler for the developers to investigate your issue.

Re: A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 6:26 am

Ah, okay, I'll whip something up soon then.

Re: A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 8:52 am

I have made a small mod with the above-described damage logger, an EttinePassive (replacement that inherits everything from Ettin but never moves from one place or attacks, for easier testing), and a small map with 100 ArtiBlastRadius'es and three EttinePassives.

The code for EttinePassive (of course, it's in the package, but just in case):

Code:
class EttinPassive : Ettin replaces Ettin
{
   States
   {
   Pain:
   See:
   Spawn:
      ETTN A 10;
      Loop;
   }
}
You do not have the required permissions to view the files attached to this post.

Re: A_Blast, 2 bugs, probably connected to each other

Sat Nov 21, 2020 11:29 pm

I'm sorry about reporting the second bug, as it turns out it's not a bug at all, since ArtiBlastRadius is supposed to blast away actors all around you, not just in front of you, as I thought.

However, the first bug is 100% reproducible, the actors blasted away take the damage the minumum of 2 times, often more times, and sometimes as much as 20 times. The latter figure can be difficult to reproduce because I can't figure out what exactly this amount depends on, but it is possible.