Page 2 of 4

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Jul 29, 2018 11:19 am
by phantombeta
Marisa Kirisame wrote:That's one big difference with UE1. At least it had a concept of "out of bounds" (and it was very aggressive in enforcing it).

I wonder just how hard it'd be to figure out a way to detect when things are really outside of any sector.

The easiest way would be to get the actor's current sector* and check if the actor's current position/center is inside the sector's polygon. That will only check the actor's center, but should be enough.
I'm using the algorithm from this StackOverflow answer in my mod.
Of course, such a method isn't perfect, and probably has some edge cases, but way better than nothing.

* This exploits the fact that an actor is always inside a sector.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Jul 29, 2018 11:34 am
by Graf Zahl
With a sector this won't work that well. But with a subsector it's a lot easier and all you need to do is check the actor against all one-sided lines of the subsector.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Jul 29, 2018 7:33 pm
by Kinsie
Also, going back here:
Hege Cactus wrote:also why the does the engine even still make it run if its 32K outside the map/last used linedef? Even basic game engines have "out of bounds" check to destroy an object that goes way way outside the bounds :V

I don't think anybody would cry too many tears if any non-player actor that left the map boundries got automatically deleted.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Jul 29, 2018 9:52 pm
by Arctangent
I have to wonder why sound has issues with being out of bounds when actors don't to begin with.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Aug 05, 2018 8:25 am
by Hypersonic
"Doom does not know the concept of 'outside any sector'. Any valid point inside the map boundaries belongs to some subsector and as a consequence to some sector."

This explains why when you're next to a sector with slime (but don't appear to be in any sector) you take damage. It would be interesting to show a sector's true extent with some faint lines, especially for slime sectors, so you can avoid them when nocliping around the map.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sat Aug 11, 2018 6:26 pm
by Enjay
Just got a few of these messages myself. As far as I'm aware, I didn't do anything wrong as far as item placement and so on is concerned.

I was using the Stronghold sentry gun and was just sitting back watching the gun deal with a bunch of bad guys when I started getting error messages at the top of the screen.

e.g.
Code: Select allExpand view
invalid sound position (-37717.851562, -3600.458717, -328.046570) for actor of class sentry plasma


Presumably some of the plasma balls were passing through the walls, somehow, getting into the void and then carrying on until they tried to make a sound (death sound? - though they can't have hit anything). Problem is, I don't think I can do anything about this from a mapping perspective.

[edit] I just watched the same thing but I was at the automap with cheats enabled. Sure enough, the sentry plasma was getting through the walls quite a bit. Checking the DECORATE for it, it has a radius of 1 and a speed of 20 but does not inherit from FastProjectile. Presumably, remaking it to inherit from FastProjectile would help prevent the projectiles passing through the walls. However, I'm still unsure if a) that would cure the problem 100% of the time and b) how valuable the error message is in a case like this. Although, I suppose it has flagged up a potential improvement in the actor definition. [/edit]

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Aug 12, 2018 4:37 am
by Marisa Kirisame
I've seen in the past that actors with a really small radius and/or height break collision.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Aug 12, 2018 5:01 am
by Enjay
Yup, that's been a thing forever - probably right back to people dehacking Doom projectiles to be tiny. Inheriting from FastProjectile usually cures problematic actors if the radius needs to be particularly small for whatever reason.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Aug 12, 2018 5:55 am
by Arctangent
Enjay wrote:Yup, that's been a thing forever - probably right back to people dehacking Doom projectiles to be tiny.

Before even that - it happens with imp fireballs while on Nightmare, and mancubus fireballs on any difficulty!

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Aug 12, 2018 6:06 am
by Enjay
Interesting. I see that the Mancubus projectile also has a speed of 20. I guess it's around about that value that collision with certain 1s wall starts failing.

Question is, if a mancubus fireball passes through a wall and keeps going, can it get outside the maximum map size and, if it does, will it cause one of these messages when/if it dies? If so, i guess this message could even pop-up on Doom2 IWAD maps.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Sun Aug 12, 2018 6:25 am
by Arctangent
Enjay wrote:Interesting. I see that the Mancubus projectile also has a speed of 20. I guess it's around about that value that collision with certain 1s wall starts failing.

Actually, it has less to do with the speed and more to do with the fact that its 6 radius gives it a total horizontal hitbox size of 12, which means there's 8 units it moves each tic that are just completely skipped by its collision checks. Bump it up to 10 radius and it'll suddenly stop skipping walls entirely.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Mon Aug 13, 2018 7:15 pm
by Matt
It's because of problems like these that I've used FastProjectiles or homebrewed equivalents almost exclusively now...

Re: Hide "invalid sound position/velocity" messages

PostPosted: Tue Aug 14, 2018 12:08 am
by Graf Zahl
Arctangent wrote:
Enjay wrote:Interesting. I see that the Mancubus projectile also has a speed of 20. I guess it's around about that value that collision with certain 1s wall starts failing.

Actually, it has less to do with the speed and more to do with the fact that its 6 radius gives it a total horizontal hitbox size of 12, which means there's 8 units it moves each tic that are just completely skipped by its collision checks. Bump it up to 10 radius and it'll suddenly stop skipping walls entirely.


Not correct. If the movement speed is larger than the radius the move will be split, but once the radius falls below a certain threshold, the entire movement logic becomes slightly erratic. This is some really, really bad code and not how movement should have been implemented.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Tue Aug 14, 2018 1:18 pm
by Matt
Graf Zahl wrote:...but once the radius falls below a certain threshold, the entire movement logic becomes slightly erratic.
Does this apply to TryMove as well? I've always had trouble with certain checks with very small actors where the numbers suggested nothing was wrong.

Re: Hide "invalid sound position/velocity" messages

PostPosted: Tue Aug 14, 2018 1:31 pm
by Graf Zahl
You need to be extra careful when calling this directly..

TryMove does *NOT* check the movement path but only the destination location.