by Major Cooke » Sat Nov 23, 2019 7:15 pm
I'm working on creating these virtuals for projectiles after talking about them with Marisa Kirisame. The idea behind these is like SpecialMissileHit but for map geometry.
Code: Select all
virtual int HitWall( Line hitline, int hitside, int hitpart, F3DFloor ffloor );
virtual int HitPlane( Sector hitsector, int hitpart, F3DFloor ffloor );
- hitside - Indicates if the front, dead center or back of the wall was hit.
- hitpart - For walls, it's Side's ETexpart's top (0), mid (1) or bottom (2) constants. For planes, it's Sector's EPlane's floor (0) or ceiling (1) constants (although I don't know why they're reversed like that...)
- ffloor - Simply not null if it's actually a 3D floor that it hits.
The returns are just like SpecialMissileHit: -1 to let the engine handle it, 0 to blow up the missile, 1 to allow passing through terrain like it's not there. Want a projectile to pass through all 3D floors? Return 1 if ffloor isn't null!
If this works out well enough I may just invest time into getting these working properly with solids. But this could still be tricky.
The reason I'm working on this is because BlockingLine/Floor/Ceiling can sometimes return false positives and are very unreliable at times. I've seen BlockingLine being non-null when going over a line that's not actually supposed to be blocking.
I'm working on creating these virtuals for projectiles after talking about them with Marisa Kirisame. The idea behind these is like SpecialMissileHit but for map geometry.
[code]virtual int HitWall( Line hitline, int hitside, int hitpart, F3DFloor ffloor );
virtual int HitPlane( Sector hitsector, int hitpart, F3DFloor ffloor );[/code]
[list][*]hitside - Indicates if the front, dead center or back of the wall was hit.
[*]hitpart - For walls, it's Side's ETexpart's top (0), mid (1) or bottom (2) constants. For planes, it's Sector's EPlane's floor (0) or ceiling (1) constants (although I don't know why they're reversed like that...)
[*]ffloor - Simply not null if it's actually a 3D floor that it hits.[/list]
The returns are just like SpecialMissileHit: -1 to let the engine handle it, 0 to blow up the missile, 1 to allow passing through terrain like it's not there. Want a projectile to pass through all 3D floors? Return 1 if ffloor isn't null!
If this works out well enough I may just invest time into getting these working properly with solids. But this could still be tricky.
The reason I'm working on this is because BlockingLine/Floor/Ceiling can sometimes return false positives and are very unreliable at times. I've seen BlockingLine being non-null when going over a line that's not actually supposed to be blocking.