Survival mode bugfixes and revive mechanism
This commit is contained in:
parent
d701598350
commit
2fa85e8b1f
14 changed files with 529 additions and 35 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue