v1.7.7.0 (Winter Update 2024)
This commit is contained in:
@@ -592,7 +592,17 @@ namespace Barotrauma.Lights
|
||||
private void CheckHullsInRange(Submarine sub)
|
||||
{
|
||||
//find the list of convexhulls that belong to the sub
|
||||
ConvexHullList chList = convexHullsInRange.FirstOrDefault(chList => chList.Submarine == sub);
|
||||
|
||||
// Performance-sensitive code, hence implemented without Linq.
|
||||
ConvexHullList chList = null;
|
||||
foreach (var chl in convexHullsInRange)
|
||||
{
|
||||
if (chl.Submarine == sub)
|
||||
{
|
||||
chList = chl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//not found -> create one
|
||||
if (chList == null)
|
||||
|
||||
Reference in New Issue
Block a user