Skip to content

Commit

Permalink
Fixed bullet tracer speed
Browse files Browse the repository at this point in the history
  • Loading branch information
smallmodel committed Nov 14, 2023
1 parent d351ced commit b852980
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/fgame/weaputils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2455,8 +2455,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);
}
}
} else {
Expand Down

0 comments on commit b852980

Please sign in to comment.