quake2ts 0.0.261 → 0.0.263

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4134,7 +4134,14 @@ var applyPmove = (state, cmd, trace, pointContents2) => {
4134
4134
  let newState = { ...state };
4135
4135
  newState = categorizePosition2(newState, trace);
4136
4136
  newState = checkWater(newState, pointContents2);
4137
- const { origin, velocity, onGround, waterLevel } = newState;
4137
+ const { origin, velocity, onGround, waterLevel, viewAngles } = newState;
4138
+ const adjustedAngles = waterLevel >= 2 ? viewAngles : {
4139
+ // For ground/air movement, reduce pitch influence (rerelease/p_move.cpp:1689)
4140
+ x: viewAngles.x > 180 ? (viewAngles.x - 360) / 3 : viewAngles.x / 3,
4141
+ y: viewAngles.y,
4142
+ z: viewAngles.z
4143
+ };
4144
+ const { forward, right } = angleVectors(adjustedAngles);
4138
4145
  const frictionedVelocity = applyPmoveFriction({
4139
4146
  velocity,
4140
4147
  frametime: FRAMETIME,
@@ -4147,13 +4154,13 @@ var applyPmove = (state, cmd, trace, pointContents2) => {
4147
4154
  pmWaterFriction: 1
4148
4155
  });
4149
4156
  const wish = waterLevel >= 2 ? buildWaterWish({
4150
- forward: { x: 1, y: 0, z: 0 },
4151
- right: { x: 0, y: 1, z: 0 },
4157
+ forward,
4158
+ right,
4152
4159
  cmd,
4153
4160
  maxSpeed: 320
4154
4161
  }) : buildAirGroundWish({
4155
- forward: { x: 1, y: 0, z: 0 },
4156
- right: { x: 0, y: 1, z: 0 },
4162
+ forward,
4163
+ right,
4157
4164
  cmd,
4158
4165
  maxSpeed: 320
4159
4166
  });