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.

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