HITSELF flag for projectiles
Moderator: GZDoom Developers
HITSELF flag for projectiles
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
- 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
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?"
)

Re: HITSELF flag for projectiles
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.)

(ie It wouldn't turn around and try to target the shooter simply because it had the flag.)
Re: HITSELF flag for projectiles
Feel free to change name 

-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: HITSELF flag for projectiles
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:
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.
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.
- 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.
Re: HITSELF flag for projectiles
What should i use to create patches now? Just "svn diff > something.txt"?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: HITSELF flag for projectiles
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,
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,
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: HITSELF flag for projectiles
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.