BulletZ: Proof-of-concept universal hitscan replacement
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
Re: BulletZ: Proof-of-concept universal hitscan replacement
I found a better way to solve the chainsaw bug. Probably.
Now, if a puff doesn't hit anything--not even the sky--then it simply won't appear! Thus, the chainsaw only fires bullets if the limited-range hitscan would have hit something anyway--that is, if something would be right on top of where the bullet would go.
EDIT: Unfortunately this marks the return of the sky bullet bug.
Now, if a puff doesn't hit anything--not even the sky--then it simply won't appear! Thus, the chainsaw only fires bullets if the limited-range hitscan would have hit something anyway--that is, if something would be right on top of where the bullet would go.
EDIT: Unfortunately this marks the return of the sky bullet bug.
- wildweasel
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
- Contact:
Re: BulletZ: Proof-of-concept universal hitscan replacement
I've had a look at this to implement a variation of it into Cola3, but discovered a very strange side-effect: although the mod does not alter Chaingunners at all, Chaingunners absolutely refuse to rapid-fire. They fire a single shot and then resume wandering. I can't figure out why their fire sequence is getting short-circuited, because they're not entering the pain state at all.
Re: BulletZ: Proof-of-concept universal hitscan replacement
It's because the A_CPosRefire function checks to see if the target is in sight before refiring, but the BulletZPuff actor is setting the actor's target to itself (the puff), which has a spawn state duration of 0 tics, so is gone by the time the A_CPosRefire call happens (so isn't found, so no refire).
EDIT: Upping the frame duration and doing something like this (saving the shooter's real target, and restoring it after the projectile is spawned) seems to work:Otherwise, with just upping the state duration, you get some weird effects as the chaingunner continuously faces whatever puff was last set as his target, and he fires wildly.
EDIT: Upping the frame duration and doing something like this (saving the shooter's real target, and restoring it after the projectile is spawned) seems to work:
Code: Select all
Actor aimtarget = target.target; // Remember the real actor that is being aimed at
target.target = self;
target.A_SpawnProjectile("BulletZRound");
target.target = aimtarget; // Restore the real target
Re: BulletZ: Proof-of-concept universal hitscan replacement
Noted! I'll add this to the mod ASAP.AFADoomer wrote:It's because the A_CPosRefire function checks to see if the target is in sight before refiring, but the BulletZPuff actor is setting the actor's target to itself (the puff), which has a spawn state duration of 0 tics, so is gone by the time the A_CPosRefire call happens (so isn't found, so no refire).
EDIT: Upping the frame duration and doing something like this (saving the shooter's real target, and restoring it after the projectile is spawned) seems to work:Otherwise, with just upping the state duration, you get some weird effects as the chaingunner continuously faces whatever puff was last set as his target, and he fires wildly.Code: Select all
Actor aimtarget = target.target; // Remember the real actor that is being aimed at target.target = self; target.A_SpawnProjectile("BulletZRound"); target.target = aimtarget; // Restore the real target
-
- Posts: 377
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: BulletZ: Proof-of-concept universal hitscan replacement
Wow! This is really good! My only complain, really, is how ugly these bullets look when firing weapons such as the SSG. Now, i think most of the people that download this mod know how to decorate and edit they bullet as they wish. But i think the bullet should be smaller (so it doens't make a barricade of bullets that block your vision) and maybe add a better trail? of course, this is just my mere opinion. But i think that making the bullet something like a 3D tracer of maybe a smaller projectile with more trail would look better.
- simpletonnn
- Posts: 313
- Joined: Thu Nov 13, 2014 8:20 pm
Re: BulletZ: Proof-of-concept universal hitscan replacement
oh wow nice job
Re: BulletZ: Proof-of-concept universal hitscan replacement
New update, finally. I fixed the melee problem, and added the ability to adjust bullet speed!
Re: BulletZ: Proof-of-concept universal hitscan replacement
The bullet puffs are way behind the actual shot when set on 150, don't know why.
also, shooting from an alcove or whatever's practically impossible.
also, shooting from an alcove or whatever's practically impossible.
Re: BulletZ: Proof-of-concept universal hitscan replacement
The alcove issue is a problem, I'll have to figure out something to work around that. Probably has to do with the z-offset of the hitscan versus the z-offset of the projectile.
As for the puffs being way behind the actual projectile...that *might* be the puff trail effect. I should probably get around to implementing the fancy tracers that one guy suggested instead of my ugly trail effect.
As for the puffs being way behind the actual projectile...that *might* be the puff trail effect. I should probably get around to implementing the fancy tracers that one guy suggested instead of my ugly trail effect.
Re: BulletZ: Proof-of-concept universal hitscan replacement
It follows the "autoaim" issue, as if I moved back a bit and fired at the same position, the puffs would hit the ceiling.dawnbreez wrote:The alcove issue is a problem, I'll have to figure out something to work around that. Probably has to do with the z-offset of the hitscan versus the z-offset of the projectile.
As for the puffs being way behind the actual projectile...that *might* be the puff trail effect. I should probably get around to implementing the fancy tracers that one guy suggested instead of my ugly trail effect.
Re: BulletZ: Proof-of-concept universal hitscan replacement
Found this in Operation Body Count, when using railguns, this mod likes to spawn a tracer along with it.
[imgur]https://i.imgur.com/XW5vlMq[/imgur]
EDIT: Found that the racer system also affects the MDK cheat, turning it into a tracer that does little damage.
[imgur]https://i.imgur.com/XW5vlMq[/imgur]
EDIT: Found that the racer system also affects the MDK cheat, turning it into a tracer that does little damage.
Re: BulletZ: Proof-of-concept universal hitscan replacement
I need to figure out how GZDoom changes the damage on bullet puffs. If I'm right, it works by modifying the "damage" property of the puff...which *should* mean I can pass that to the projectile. If I'm wrong then I dunno how to fix it--to my knowledge there's no way to get the parameters of a function called by something outside of my mod. Gonna do some testing.Shadez12 wrote:EDIT: Found that the racer system also affects the MDK cheat, turning it into a tracer that does little damage.
EDIT: Reading the "damage" variable of a puff doesn't work, but WorldThingDamaged exists. The only problem is, WorldThingDamaged only gets called when something is damaged. Which means if I read damage from WorldThingDamaged, then when you lead targets your bullets will not have a set damage amount! More work needs to be done. I should ask someone who works on the engine how exactly hitscan attacks set damage.
Re: BulletZ: Proof-of-concept universal hitscan replacement
Pretty interesting mod, unfortunately, doesn't work with Smooth doom.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: BulletZ: Proof-of-concept universal hitscan replacement
To stop people from further reporting the above post as a necrobump: I've made the decision to not take any action and leave that post alone.
-
- Posts: 377
- Joined: Tue Dec 20, 2016 4:53 pm
- Location: MURICAA BROTHER! Just kidding, Brazil.
Re: BulletZ: Proof-of-concept universal hitscan replacement
I am probably a bit late to this thread, but has anyone fixed the tracer damage replacing the master damage? for debbuging, a zombieman that deals 500 damage with a hitscan always deals the standard (3 * random(1,3)) damage formula. Has anyone found a fix to this?