Giter VIP home page Giter VIP logo

Comments (6)

coelckers avatar coelckers commented on July 1, 2024

For hitting actors this already exists in the form of SpecialMissileHit. That function can even decide if the missile is supposed to explode or not.

from gzdoom.

Cherepoc avatar Cherepoc commented on July 1, 2024

Sorry, should've clarified what I want to achive with it. I want to make projectiles transform into non-projectiles if they hit anything they cannot damage (floors, walls, solid decorations, actors of same species as the shooter). So, ideally, I want to use the function that is called when the projectile is about to explode, and do some checks there - did it hit actor or something else, what kind of actor that was, etc. SpecialMissileHit is not the function I'm looking for because it's not called when missile hits wall/floor, and also precisely because it is called to decide if the missile should explode at all - that's something I want to be decided before my logic.

from gzdoom.

MajorCooke avatar MajorCooke commented on July 1, 2024

+USEBOUNCESTATES is your solution in this case. Set it up so it bounces off of floors/walls/ceilings so the moment it hits something, it will do x/y/z without killing the missile.

from gzdoom.

Cherepoc avatar Cherepoc commented on July 1, 2024

I know I can use that, but that is a workaround. I'd like to have a cleaner solution, if possible.
I can try to do a PR myself, unless virtualizing this function has downsides.

from gzdoom.

MajorCooke avatar MajorCooke commented on July 1, 2024

There most likely will be.

If anything, make it so SpecialMissileHit is called with a null victim actor upon hitting geometry. That should be simple enough to accomplish.

from gzdoom.

Cherepoc avatar Cherepoc commented on July 1, 2024

I'll just stick to hittracer for the time being.
As for PR, turns out ExplodeMissile is not a member of Actor or Thinker, unlike all of the exported virtual functions I checked. So is DamageMobj, so I'll see how it will be handled.

from gzdoom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.