Skip to content

fix: shotgun not gibbing unless aiming at feet - #349

Closed
WofWca wants to merge 2 commits into
OpenArena:mainfrom
WofWca:openarena-fix-shotgun-gib-dont-change-maxs
Closed

WofWca wants to merge 2 commits into
OpenArena:mainfrom
WofWca:openarena-fix-shotgun-gib-dont-change-maxs

Conversation

@WofWca

@WofWca WofWca commented Oct 7, 2025 •

Copy link
Copy Markdown

Original issue: ioquake/ioq3#794.
Original (rejected) MR: ioquake/ioq3#795.
Same MR in baseq3a project:
https://github.com/ec-/baseq3a/pull/49.

Edit: for a video demo, see my comment below, #349 (comment)

@The-Gig

The-Gig commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

I checked, and it's actually true. You can gib a player by shooting him with the shotgun in the feet, but not in the body. What an odd small bug.
I see there you also mentioned something about knockback. Is that different between shooting at body and feet, too?

@WofWca

WofWca commented Oct 8, 2025

Copy link
Copy Markdown
Author

I see there you also mentioned something about knockback. Is that different between shooting at body and feet, too?

My point about knockback was that you only get knockback for one pellet, i.e. 10 damage, and not all the damage, i.e. shotgun's knockback is much weaker than that of the railgun, for example.
As long as the player is alive, the knockback is always the same, regardless of where you aim. But maybe (I'm not sure), if you aim at the feet, the dead body will be knocked back further. Although this is not significant, because it's just 10 damage worth of knockback.

@The-Gig

The-Gig commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor

About knockback, I just did a test with OA 0.8.8 and it looks to me that how much a shotgun hit "pushes" a character already changes depending from how accurate your shot is.

My steps:

  • Launched the game in windowed mode and loaded a map with /devmap command (cheats enabled).
  • Started a second openarena client on a different window, and used Multiplayer menu to join the match hosted by the other instance.
  • Used /god cheat to make one of the characters invulnerable to weapon damage.
  • Fired the shotgun at the "god" character, from both point blank and long range.
    It looked to me that the point blank shot pushed him further back than the long range shot. It doesn't seem to scale linearly to me, but I guess that's on purpose otherwise it would be too much.
  • Set /g_knockback 10000 (default is 1000) to make it clearer.
  • Fired the shotgun at the "god" character again, from both point blank and long range.
    It seemed to me even more evident that point blank shots push the character further back than long range shots.

Note: I just aimed at the opponent, without expressly aiming at the legs. However it's possible some pellets hit the lower part of the model. I don't know whether upper or lower part of the hitbox makes any difference.

@WofWca

WofWca commented Oct 9, 2025

Copy link
Copy Markdown
Author

Hmm, you are right.
Sorry, pehaps I mixed up the actual velocity knockback and the timer. The velocity seems to be getting added up here

VectorAdd (targ->client->ps.velocity, kvel, targ->client->ps.velocity);

But the timer here only gets set by one pellet:

gamecode/code/game/g_combat.c

Lines 1173 to 1183 in d371ff1

int t;
t = knockback * 2;
if ( t < 50 ) {
t = 50;
}
if ( t > 200 ) {
t = 200;
}
targ->client->ps.pm_time = t;
targ->client->ps.pm_flags |= PMF_TIME_KNOCKBACK;

In that case, this MR still only changes how dead players behave.

@The-Gig

The-Gig commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

I just noticed in this commit https://github.com/ec-/baseq3a/pull/49/files/ad81db1b27e669c7c59aca8b1c22e6c552d1a2ac..0efcf57b4d3c5b6b794cced74864b079e15e7abe
the notes about the fact that the behaviour changes like providing fewer damage to someone behind a dead body...
Could you please explain that better to me? Thanks...

@WofWca

WofWca commented Nov 8, 2025 •

Copy link
Copy Markdown
Author

Yes sure. Here is a visual example. First, without the proposed fix, i.e. how things are currently:

no-shotgun-fix-damage.mp4
image

And now with the proposed fix:

with-shotgun-fix-damage.mp4
image

Notice that now the first Crash (her dead body, rather) eats up 4 more pellets, and the second Crash gets only 2 out of 11, and thus survives. It took 5 pellets to kill the first crash, but she took 9 pellets.

@The-Gig

The-Gig commented Nov 9, 2025 •

Copy link
Copy Markdown
Contributor

I see. Then, changing it may be considered changing part of the Q3 gameplay, despite being quite a side case. It might be an intentional choice by idsoftware instead of a bug, with a reasoning like "the shotgun is already underpowered comparing to other weapons, no need to waste pellets on dead bodies unless someone really wants to shoot the body on the floor". So, to be sure to do not fall under OA "NOTTODO", I guess one may make the fix disabled by default and controlled by an apposite cvar (or a DMFLAGS value, to avoid wasting precious cvar memory on details) as you did... or maybe having a different approach and make those pellets both hit the corpse AND one potential player behind it (like passing through the dead or gibbed body from a side to the other)?
I'm still curious to know what happens with the nailgun (or other weapons) in similar situations...

@WofWca

WofWca commented Nov 11, 2025

Copy link
Copy Markdown
Author

"the shotgun is already underpowered comparing to other weapons, no need to waste pellets on dead bodies unless someone really wants to shoot the body on the floor"

Considering that they nerfed it in Quake Live (I think it deals 80 damage now), I doubt that this is the case.

or maybe having a different approach and make those pellets both hit the corpse AND one potential player behind it (like passing through the dead or gibbed body from a side to the other)?

I think that the bug that this MR fixes cannot be fixed without affecting gameplay at all. A dead body is not purely decorative, it can shield from bullets / pellets, e.g. when it's upstairs and you try to shoot someone through it.

I'm still curious to know what happens with the nailgun (or other weapons) in similar situations...

Such weapons can't perform multiple shots in one frame, so I'm pretty sure that they're basically unaffected. Well, maybe except for the case where multiple players make a shot in the same frame?

or a DMFLAGS value

That's something that's sent from the server to the client, right? The MR only affects the server, there is no need to change the network protocol I think.

I guess one may make the fix disabled by default and controlled by an apposite cvar

OK, I am fine with merging this disabled by default for a start, enabling can be discussed separately.

@WofWca

WofWca commented Nov 11, 2025

Copy link
Copy Markdown
Author

about the fact that the behaviour changes like providing fewer damage to someone behind a dead body

Continuing: with com_blood 0 with this fix the first player will actually eat up all the pellets, not just 4.

@The-Gig

The-Gig commented Nov 17, 2025 •

Copy link
Copy Markdown
Contributor

about the fact that the behaviour changes like providing fewer damage to someone behind a dead body

Continuing: with com_blood 0 with this fix the first player will actually eat up all the pellets, not just 4.

That sounds like a problem. I'm starting to wonder whether this fix is worth the effort.
Maybe it's even more correct to call it an "alternate rule" instead of "fix", as it doesn't seem to come from a bug, but from a deliberate design choice.
I admit gibbing on fragging is satisfactory, but if it comes at the cost of your weapon being less efficient in a crowd fray? IDK.
I may still be ok with it considering it's not enabled by default.

@WofWca

WofWca commented Nov 18, 2025 •

Copy link
Copy Markdown
Author

as it doesn't seem to come from a bug, but from a deliberate design choice.

I still doubt that. This would have been easy to fix otherwise, e.g. inside of ShotgunPellet. There is already code to make pellets pass through multiple entities (see the for loop) so it's easy to keep the pellet if it's passing through a dead body:

qboolean ShotgunPellet( vec3_t start, vec3_t end, gentity_t *ent )
{
trace_t tr;
int damage, i, passent;
gentity_t *traceEnt;
vec3_t impactpoint, bouncedir;
vec3_t tr_start, tr_end;
qboolean hitClient = qfalse;
passent = ent->s.number;
VectorCopy( start, tr_start );
VectorCopy( end, tr_end );
for (i = 0; i < 10; i++) {
trap_Trace (&tr, tr_start, NULL, NULL, tr_end, passent, MASK_SHOT);
traceEnt = &g_entities[ tr.entityNum ];
// send bullet impact
if ( tr.surfaceFlags & SURF_NOIMPACT ) {
return qfalse;
}
if ( traceEnt->takedamage) {
damage = DEFAULT_SHOTGUN_DAMAGE * s_quadFactor;
if ( traceEnt->client && traceEnt->client->invulnerabilityTime > level.time ) {
if (G_InvulnerabilityEffect( traceEnt, forward, tr.endpos, impactpoint, bouncedir )) {
G_BounceProjectile( tr_start, impactpoint, bouncedir, tr_end );
VectorCopy( impactpoint, tr_start );
// the player can hit him/herself with the bounced rail
passent = ENTITYNUM_NONE;
}
else {
VectorCopy( tr.endpos, tr_start );
passent = traceEnt->s.number;
}
continue;
}
if( LogAccuracyHit( traceEnt, ent ) ) {
hitClient = qtrue;
}
G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage, 0, MOD_SHOTGUN);
return hitClient;
}
return qfalse;
}
return qfalse;
}

In fact, I can implement that. In that case the shotgun will technically get a little more powerful, for the rare case of shooting someone through someone else's feet.

@WofWca

WofWca commented Nov 18, 2025

Copy link
Copy Markdown
Author

OK, I pushed another commit. As you can see, now pellets go through dead bodies, as before. On the second screenshot, you can see that the first Crash absorbed 5 pellets before they started hitting the second Crash.

pellets-go-through-corpses-1.mp4
image
pellets-go-through-corpses-2.mp4
image

@WofWca
WofWca force-pushed the openarena-fix-shotgun-gib-dont-change-maxs branch from ace2898 to 378494a Compare November 18, 2025 10:42
WofWca added a commit to WofWca/baseq3a that referenced this pull request Nov 18, 2025
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/baseq3a that referenced this pull request Nov 18, 2025
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
@leilei-

leilei- commented Nov 23, 2025

Copy link
Copy Markdown
Member

superfluous

@leilei- leilei- closed this Nov 23, 2025
WofWca added a commit to WofWca/ioq3 that referenced this pull request Jan 3, 2026
This is a follow-up to
ca9183f
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jan 4, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/baseq3a that referenced this pull request Jan 9, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jan 14, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jan 24, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jan 24, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jan 27, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 2, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 2, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 2, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 6, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 6, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/baseq3a that referenced this pull request Feb 7, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 9, 2026
This is a follow-up to
ad81db1
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 20, 2026
This is a follow-up to
ca9183f
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Feb 20, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/baseq3a that referenced this pull request Feb 21, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Mar 3, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Mar 4, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/baseq3a that referenced this pull request Mar 4, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/flexible-hud-for-ioq3 that referenced this pull request Mar 5, 2026
This is a follow-up to
ca9183fc5efa21b536fe11313079bf31f0e50e49
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request May 9, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request May 31, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jun 7, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jun 26, 2026
This is a follow-up to
ca9183f
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jul 9, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Jul 15, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Aug 9, 2026
This is a follow-up to
ca9183f
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Aug 9, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Aug 10, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Oct 2, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Oct 2, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
WofWca added a commit to WofWca/quake3-better-gibs-mod that referenced this pull request Oct 3, 2026
This is a follow-up to
ad81db1
("fix: shotgun not gibbing unless aiming at feet")
(https://github.com/ec-/baseq3a/pull/49).
This brings the game balance closer to the original game.
For discussions, see
OpenArena/gamecode#349.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants