- Moved character nametag visibility culling to the update method (doesn't make sense for the update rate to be tied to rendering framerate).

- Name tags on characters that are outside the camera view are automatically hidden to avoid the costly visibility checks.
- If the controlled character or the target has no head, the visibility check is done based on the position of the torso.
- Fixed sub->outside visibility checks.
- Fixed invalid attributes in the flashlight config.
This commit is contained in:
Joonas Rikkonen
2017-12-17 21:47:03 +02:00
parent 62bb5119ab
commit 6127bb473d
3 changed files with 49 additions and 70 deletions
@@ -1400,6 +1400,8 @@ namespace Barotrauma
public virtual void Update(float deltaTime, Camera cam)
{
UpdateProjSpecific(deltaTime, cam);
if (GameMain.Client != null && this == Controlled && !isSynced) return;
if (!Enabled) return;
@@ -1542,6 +1544,8 @@ namespace Barotrauma
partial void UpdateControlled(float deltaTime, Camera cam);
partial void UpdateProjSpecific(float deltaTime, Camera cam);
private void UpdateOxygen(float deltaTime)
{
float prevOxygen = oxygen;