Announcement

Collapse
No announcement yet.

Game Glitch

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Interesting, do you know where in the code the entity death is determined and choice to display a body is made?

    Comment


    • #17
      Hello Syber Raith,

      an entity can "die" when it has .health and a .th_die function declared.
      There is only 1 function in the complete game mechanic that reduces health.
      When the entities .health value gets <=0 its .th_die function will be called.
      That is usually its death animation, which in case of a monster has several animation frames.

      That is basically it (simplifying a bit here).

      The model and thereby the bbox size and shape usually does not change when its dead (except it explodes or something...). But the bbox property changes: It will not block other entities anymore for example. But it still interacts with the world as before.

      The monster with the most wrongly sized bbox is the dog by the way. Its bbox size is much to tall, so you can shoot a dog even though you shoot clearly above/over its head. That is in my eyes a bug and the z-height should be reduced for the dog´s bbox.

      I hope that this post could clear up some questions for you.

      Best wishes,
      Seven

      Comment


      • #18
        Thank you yes, that's exactly was I was wondering about.

        I presume the the size of the bounding box could be changed by that function or a new one so that it would then enclose the dead entity to a greater extent. So, if that were to happen do you think the engine would then reposition the entity as necessary for it to avoid collisions with walls and such, or would that require a new function too?

        Comment


        • #19
          Hello Syber Raith,

          Yes, the size of the bbox can be changed/adapted when a monster dies.
          So that it will not have its head or arms stick into walls.

          The only thing you need is an additional function that checks for the surroundings before and while expaning the bbox and move the entity accordingly. It is not very difficult.

          Regards,
          Seven

          Comment

          Working...
          X