Skip to content

Commit

Permalink
fix hord velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
stalkerg committed Jun 30, 2024
1 parent eb3557c commit 089ca5d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/units/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2766,13 +2766,13 @@ void HordeObject::Quant(void)

d = vTarget.vabs();
if(d){
vDelta += vTarget*Precision / d;
vDelta += (vTarget*Precision / d) * XTCORE_FRAME_NORMAL;
d = vDelta.vabs();
if(d > Speed) vDelta = vDelta * Speed / d;
};
};
};

R_curr += vDelta;
R_curr += vDelta * XTCORE_FRAME_NORMAL;
cycleTor(R_curr.x,R_curr.y);
};
}else{
Expand All @@ -2784,9 +2784,9 @@ void HordeObject::Quant(void)
if(d < PALLADIUM_RADIUS){
vDelta = v * Speed;
vDelta /= d;
R_curr += vDelta;
R_curr += (vDelta * XTCORE_FRAME_NORMAL);
cycleTor(R_curr.x,R_curr.y);
};
};
break;
};
g = g->Next;
Expand All @@ -2797,7 +2797,7 @@ void HordeObject::Quant(void)

d = vTarget.vabs();
if(d){
vDelta += vTarget*Precision / d;
vDelta += (vTarget*Precision / d) * XTCORE_FRAME_NORMAL;
d = vDelta.vabs();
if(d > Speed) vDelta = vDelta * Speed / d;
};
Expand Down Expand Up @@ -2825,7 +2825,7 @@ void HordeObject::Quant(void)
};
};
n = (VangerUnit*)(n->NextTypeList);
};
};
};
};
break;
Expand Down Expand Up @@ -2858,8 +2858,8 @@ void HordeObject::Quant(void)
if(d > Speed) vDelta = vDelta * Speed / d;
}else vDelta = Vector(0,0,0);

R_curr += vDelta;
cycleTor(R_curr.x,R_curr.y);
R_curr += vDelta * XTCORE_FRAME_NORMAL;
cycleTor(R_curr.x,R_curr.y);
};
}else{
vTarget = Vector(getDistX(vZone.x,R_curr.x),getDistY(vZone.y,R_curr.y),vZone.z - R_curr.z);
Expand All @@ -2871,7 +2871,7 @@ void HordeObject::Quant(void)
if(d > Speed) vDelta = vDelta * Speed / d;
}else vDelta = Vector(0,0,0);

R_curr += vDelta;
R_curr += vDelta * XTCORE_FRAME_NORMAL;
cycleTor(R_curr.x,R_curr.y);
};
};
Expand Down

0 comments on commit 089ca5d

Please sign in to comment.