Page 2 of 3

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Sat Feb 17, 2018 12:57 am
by dawnbreez
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.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Fri Feb 23, 2018 6:59 pm
by wildweasel
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

Posted: Fri Feb 23, 2018 7:56 pm
by AFADoomer
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:

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
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.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Fri Feb 23, 2018 10:33 pm
by dawnbreez
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:

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
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.
Noted! I'll add this to the mod ASAP.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Wed Mar 07, 2018 5:12 pm
by XASSASSINX
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.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Thu Mar 08, 2018 12:12 am
by simpletonnn
oh wow nice job

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Fri Jun 15, 2018 2:22 pm
by dawnbreez
New update, finally. I fixed the melee problem, and added the ability to adjust bullet speed!

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Fri Jun 15, 2018 8:26 pm
by EddieMann
The bullet puffs are way behind the actual shot when set on 150, don't know why.
Image

also, shooting from an alcove or whatever's practically impossible.
Image

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Fri Jun 15, 2018 11:21 pm
by dawnbreez
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

Posted: Sat Jun 16, 2018 12:05 pm
by EddieMann
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.
It follows the "autoaim" issue, as if I moved back a bit and fired at the same position, the puffs would hit the ceiling.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Sat Jun 16, 2018 3:36 pm
by Shadez12
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.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Sat Jun 16, 2018 11:14 pm
by dawnbreez
Shadez12 wrote:EDIT: Found that the racer system also affects the MDK cheat, turning it into a tracer that does little damage.
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.

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

Posted: Sat Sep 07, 2019 2:45 pm
by Kaptin
Pretty interesting mod, unfortunately, doesn't work with Smooth doom.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Sat Sep 07, 2019 8:23 pm
by Blue Shadow
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.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Posted: Wed Jul 28, 2021 9:24 pm
by XASSASSINX
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?