- 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user