Shell ejection fix (location) for ducking - NiceAss

This commit is contained in:
Bryce Hutchings 2001-11-11 20:03:09 +00:00
parent c24d952d34
commit 05a49b6eae

View file

@ -174,6 +174,11 @@ static void CG_MachineGunEjectBrass( centity_t *cent ) {
offset[1] = -4;
offset[2] = 24;
// NiceAss: Added for better starting location of brass
if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) {
offset[2] -= 14;
}
xoffset[0] = offset[0] * v[0][0] + offset[1] * v[1][0] + offset[2] * v[2][0];
xoffset[1] = offset[0] * v[0][1] + offset[1] * v[1][1] + offset[2] * v[2][1];
xoffset[2] = offset[0] * v[0][2] + offset[1] * v[1][2] + offset[2] * v[2][2];
@ -257,6 +262,11 @@ static void CG_ShotgunEjectBrass( centity_t *cent ) {
offset[1] = 0;
offset[2] = 24;
// NiceAss: Added for better starting location of brass
if (cg.predictedPlayerState.pm_flags & PMF_DUCKED) {
offset[2] -= 14;
}
xoffset[0] = offset[0] * v[0][0] + offset[1] * v[1][0] + offset[2] * v[2][0];
xoffset[1] = offset[0] * v[0][1] + offset[1] * v[1][1] + offset[2] * v[2][1];
xoffset[2] = offset[0] * v[0][2] + offset[1] * v[1][2] + offset[2] * v[2][2];