PUFFGETSOWNER on Blood actors makes them target the owner

Moderator: GZDoom Developers

Post Reply
User avatar
Theshooter7
Posts: 456
Joined: Sun Mar 05, 2006 6:44 pm

PUFFGETSOWNER on Blood actors makes them target the owner

Post by Theshooter7 »

As the title states, this simple patch will allow it so that if you put PUFFGETSOWNER on a spawned blood actor, the blood will target the owner of the blood.

Note: as far as I could tell, P_SpawnBlood is the only function that handles spawning blood actors (and not particles, which is what P_BloodSplatter(2) are for, I think). If I'm wrong and the patch is incomplete, just let me know. :)
Attachments
bloodowner.zip
(476 Bytes) Downloaded 45 times
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: PUFFGETSOWNER on Blood actors makes them target the owne

Post by NeuralStunner »

Handy! :)
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: PUFFGETSOWNER on Blood actors makes them target the owne

Post by Nash »

I can imagine using this to calculate the height difference between the blood actor and the owner to simulate headshots...
User avatar
Caligari87
Admin
Posts: 6236
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Re: PUFFGETSOWNER on Blood actors makes them target the owne

Post by Caligari87 »

Nash wrote:I can imagine using this to calculate the height difference between the blood actor and the owner to simulate headshots...
:shock: Do want! I imagine it could be used with various other calculations to simulate other types of hits too.

8-)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PUFFGETSOWNER on Blood actors makes them target the owne

Post by Graf Zahl »

Added. But it had to be copied to P_RipperBlood, too.
P_BloodSplatter did not need to be handled because it spawns the blood as a projectile which always gets an owner.
User avatar
Theshooter7
Posts: 456
Joined: Sun Mar 05, 2006 6:44 pm

Re: PUFFGETSOWNER on Blood actors makes them target the owne

Post by Theshooter7 »

Graf Zahl wrote:P_BloodSplatter did not need to be handled because it spawns the blood as a projectile which always gets an owner.
Ah, ok. I wasn't sure since I'm still poking at the source code and learning things, so that's more for me to know. ;)
Nash wrote:I can imagine using this to calculate the height difference between the blood actor and the owner to simulate headshots...
That's exactly one of the things I intended this for. :D
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”