Skip to content

Conversation

@WofWca
Copy link

@WofWca WofWca commented Oct 7, 2025

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
Copy link
Contributor

The-Gig commented Oct 8, 2025

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
Copy link
Author

WofWca commented Oct 8, 2025

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
Copy link
Contributor

The-Gig commented Oct 9, 2025

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
Copy link
Author

WofWca commented Oct 9, 2025

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
Copy link
Contributor

The-Gig commented Nov 7, 2025

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
Copy link
Author

WofWca commented Nov 8, 2025

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
Copy link
Contributor

The-Gig commented Nov 9, 2025

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
Copy link
Author

WofWca commented Nov 11, 2025

"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
Copy link
Author

WofWca commented Nov 11, 2025

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.

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.

2 participants