Performance Optimization
Asteroid positioning is now multithreaded Item quality calculation is now allocation free Various other garbage reductions
This commit is contained in:
parent
cf74519cd9
commit
8d6770ab15
21 changed files with 151 additions and 72 deletions
|
|
@ -55,10 +55,10 @@ public class MiningTool : IBehavior
|
|||
public bool Execute(float delta)
|
||||
{
|
||||
Range = Context.Evaluate(_data.Range, Item.EquippableItem, Entity);
|
||||
var asteroidTransform = Entity.Zone.GetAsteroidTransform(AsteroidBelt, Asteroid);
|
||||
var belt = Entity.Zone.AsteroidBelts[AsteroidBelt];
|
||||
if (AsteroidBelt != Guid.Empty &&
|
||||
Entity.Zone.AsteroidExists(AsteroidBelt, Asteroid) &&
|
||||
length(Entity.Position.xz - asteroidTransform.xz) - asteroidTransform.w < Range)
|
||||
length(Entity.Position.xz - belt.Positions[Asteroid].xz) - belt.Scales[Asteroid] < Range)
|
||||
{
|
||||
Entity.Zone.MineAsteroid(
|
||||
Entity,
|
||||
|
|
|
|||
Loading…
Reference in a new issue