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.
@@ -1175,7 +1175,14 @@ var applyPmove = (state, cmd, trace, pointContents2) => {
1175
1175
  let newState = { ...state };
1176
1176
  newState = categorizePosition2(newState, trace);
1177
1177
  newState = checkWater(newState, pointContents2);
1178
- const { origin, velocity, onGround, waterLevel } = newState;
1178
+ const { origin, velocity, onGround, waterLevel, viewAngles } = newState;
1179
+ const adjustedAngles = waterLevel >= 2 ? viewAngles : {
1180
+ // For ground/air movement, reduce pitch influence (rerelease/p_move.cpp:1689)
1181
+ x: viewAngles.x > 180 ? (viewAngles.x - 360) / 3 : viewAngles.x / 3,
1182
+ y: viewAngles.y,
1183
+ z: viewAngles.z
1184
+ };
1185
+ const { forward, right } = angleVectors(adjustedAngles);
1179
1186
  const frictionedVelocity = applyPmoveFriction({
1180
1187
  velocity,
1181
1188
  frametime: FRAMETIME,
@@ -1188,13 +1195,13 @@ var applyPmove = (state, cmd, trace, pointContents2) => {
1188
1195
  pmWaterFriction: 1
1189
1196
  });
1190
1197
  const wish = waterLevel >= 2 ? buildWaterWish({
1191
- forward: { x: 1, y: 0, z: 0 },
1192
- right: { x: 0, y: 1, z: 0 },
1198
+ forward,
1199
+ right,
1193
1200
  cmd,
1194
1201
  maxSpeed: 320
1195
1202
  }) : buildAirGroundWish({
1196
- forward: { x: 1, y: 0, z: 0 },
1197
- right: { x: 0, y: 1, z: 0 },
1203
+ forward,
1204
+ right,
1198
1205
  cmd,
1199
1206
  maxSpeed: 320
1200
1207
  });