Fixed bullet tracers being incorrect

This should fix almost immobile bullet tracers on t1l1
This commit is contained in:
smallmodel 2024-06-11 23:46:50 +02:00
parent a74b966b7c
commit de02c868a2
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -2524,8 +2524,12 @@ float BulletAttack(
if (tracerspeed == 1.f) {
gi.MSG_WriteBits(0, 1);
} else {
int speed;
speed = tracerspeed * (1 << 9);
gi.MSG_WriteBits(1, 1);
gi.MSG_WriteBits(Q_clamp(tracerspeed, 1, 1023), 10);
gi.MSG_WriteBits(Q_clamp(speed, 1, 1023), 10);
}
}
@ -2611,8 +2615,12 @@ void FakeBulletAttack(
if (tracerspeed == 1.f) {
gi.MSG_WriteBits(0, 1);
} else {
int speed;
speed = tracerspeed * (1 << 9);
gi.MSG_WriteBits(1, 1);
gi.MSG_WriteBits(Q_clamp(tracerspeed, 1, 1023), 10);
gi.MSG_WriteBits(Q_clamp(speed, 1, 1023), 10);
}
}