Survival mode bugfixes and revive mechanism
All checks were successful
CI / lint (push) Successful in 31s
CI / build (push) Successful in 32s
CI / release (push) Successful in 32s

This commit is contained in:
Kamal Tufekcic 2026-07-08 18:10:09 +03:00
commit 2fa85e8b1f
14 changed files with 529 additions and 35 deletions

View file

@ -67,6 +67,16 @@ internal static class WorldText
return true;
}
// Orientation for a WORLD-anchored panel (e.g. the revive beacon) that should FACE a viewer at `viewer`, placed at `at`.
// The inverse of TryEyeFrame's viewer-facing convention (yaw = the viewer's look-yaw + 270). `roll` lets a fixed panel
// stay upright (90) rather than tracking the viewer's pitch. Keeps the +270 magic here, in the one file that owns the
// point_worldtext facing convention, instead of duplicated at call sites.
public static QAngle FacePointAngle(Vector at, Vector viewer, float roll = 90f)
{
double yaw = Math.Atan2(at.Y - viewer.Y, at.X - viewer.X) * 180.0 / Math.PI;
return new QAngle(0f, (float)yaw + 270f, roll);
}
// Source-engine AngleVectors with roll assumed 0 (HUD/shop panels never roll).
private static (Vector forward, Vector right, Vector up) AngleVectors(QAngle a)
{