HITSELF flag for projectiles

Moderator: GZDoom Developers

Post Reply
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

HITSELF flag for projectiles

Post by kgsws-CZ »

This flag will allow projectiles to hit even shooter (player only). Projectile becomes lethal once you stop touching it for first time.
Attachments
hitself.zip
(2.87 KiB) Downloaded 44 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: HITSELF flag for projectiles

Post by NeuralStunner »

Wouldn't HITSHOOTER be a more intuitive name? (Seeing as my first thought, upon seeing the title, was "why would you want a projectile to hit itself?" :lol: )
User avatar
Enjay
 
 
Posts: 26987
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: HITSELF flag for projectiles

Post by Enjay »

Or even +CANHITSHOOTER to indicate that it can do it but isn't compelled to. ;)

(ie It wouldn't turn around and try to target the shooter simply because it had the flag.)
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

Re: HITSELF flag for projectiles

Post by kgsws-CZ »

Feel free to change name :)
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: HITSELF flag for projectiles

Post by Edward-san »

kgsws, let me say this: don't use "diff -rup".
I tried to apply the patch in the src directory with this command:
"patch -Np2 -i ../hitself.diff -F5 --ignore-whitespace"
and the result was:

Code: Select all

patching file actor.h
Hunk #1 succeeded at 330 with fuzz 3.
Hunk #2 succeeded at 817 with fuzz 3.
patching file p_map.cpp
Hunk #1 FAILED at 1024.
1 out of 1 hunk FAILED -- saving rejects to file p_map.cpp.rej
patching file p_mobj.cpp
Hunk #1 succeeded at 5303 with fuzz 3.
patching file thingdef/thingdef_data.cpp
Hunk #1 succeeded at 233 with fuzz 3.
Now I re-created the patch ("svn diff > canhitshooter.txt" ) with the following changes:
- Change the name HITSELF to CANHITSHOOTER;
- Moved the "return" attached to the "if( )" in p_map.cpp in a new line for a better readability.

The compiling is fine, so here it is.
canhitshooter.txt
(2.67 KiB) Downloaded 48 times
kgsws-CZ
Posts: 70
Joined: Sun Jul 19, 2009 9:50 pm

Re: HITSELF flag for projectiles

Post by kgsws-CZ »

What should i use to create patches now? Just "svn diff > something.txt"?
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: HITSELF flag for projectiles

Post by Edward-san »

Yes.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: HITSELF flag for projectiles

Post by Graf Zahl »

As it is I won't add it. There's some issues here:

1. Why only players? That restriction makes no sense.
2. Any new actor variable involved needs to be saved in savegames or there'll be some problems,
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49230
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: HITSELF flag for projectiles

Post by Graf Zahl »

What I said before. If you just dump an incomplete feature in here and don't respond to feedback I see no reason to add it.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”