mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- vel assignments
This commit is contained in:
parent
151fc46ef3
commit
f1d3126435
9 changed files with 70 additions and 70 deletions
|
@ -253,8 +253,8 @@ void aiChooseDirection(DBloodActor* actor, int a3)
|
|||
int vc = getincangle(actor->int_ang(), a3);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int vsi = ((t1 * 15) >> 12) / 2;
|
||||
int v8 = 341;
|
||||
|
@ -339,8 +339,8 @@ void aiMoveDodge(DBloodActor* actor)
|
|||
{
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
|
|
@ -205,8 +205,8 @@ static void batMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -230,8 +230,8 @@ static void batMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -321,8 +321,8 @@ static void batMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -352,8 +352,8 @@ static void batMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
@ -381,8 +381,8 @@ static void batMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -424,8 +424,8 @@ static void sub_628A0(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -460,8 +460,8 @@ static void sub_62AE0(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
|
@ -494,8 +494,8 @@ static void sub_62D7C(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -220,8 +220,8 @@ static void eelMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -245,8 +245,8 @@ static void eelMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -333,8 +333,8 @@ static void eelMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -361,8 +361,8 @@ static void eelMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
@ -387,8 +387,8 @@ static void eelMoveAscend(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -292,8 +292,8 @@ static void sub_65D04(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -329,8 +329,8 @@ static void sub_65F44(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
|
@ -364,8 +364,8 @@ static void sub_661E0(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -281,8 +281,8 @@ static void gargMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -309,8 +309,8 @@ static void gargMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -534,8 +534,8 @@ static void gargMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -568,8 +568,8 @@ static void gargMoveSlow(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 = nAccel >> 1;
|
||||
|
@ -608,8 +608,8 @@ static void gargMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
@ -647,8 +647,8 @@ static void gargMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -260,8 +260,8 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
|
|||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -288,8 +288,8 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->__int_vel.X;
|
||||
int dy = actor->__int_vel.Y;
|
||||
int dx = actor->int_vel().X;
|
||||
int dy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
|
||||
int t2 = DMulScale(dx, nSin, -dy, nCos, 30);
|
||||
if (actor->xspr.dodgeDir > 0)
|
||||
|
@ -430,8 +430,8 @@ static void ghostMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -464,8 +464,8 @@ static void ghostMoveSlow(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 = nAccel >> 1;
|
||||
|
@ -501,8 +501,8 @@ static void ghostMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
@ -537,8 +537,8 @@ static void ghostMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -279,8 +279,8 @@ static void sub_6CB00(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
@ -315,8 +315,8 @@ static void sub_6CD74(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel;
|
||||
|
@ -349,8 +349,8 @@ static void sub_6D03C(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
t1 += nAccel >> 1;
|
||||
|
|
|
@ -487,8 +487,8 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
// quick hack to prevent spinning around or changing attacker's sprite angle on high movement speeds
|
||||
// when attacking the target. It happens because vanilla function takes in account x and y velocity,
|
||||
// so i use fake velocity with fixed value and pass it as argument.
|
||||
int xvelocity = actor->__int_vel.X;
|
||||
int yvelocity = actor->__int_vel.Y;
|
||||
int xvelocity = actor->int_vel().X;
|
||||
int yvelocity = actor->int_vel().Y;
|
||||
if (inAttack(actor->xspr.aiState))
|
||||
xvelocity = yvelocity = ClipLow(actor->spr.clipdist >> 1, 1);
|
||||
|
||||
|
@ -1128,8 +1128,8 @@ void aiGenDudeMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int vx = actor->__int_vel.X;
|
||||
int vy = actor->__int_vel.Y;
|
||||
int vx = actor->int_vel().X;
|
||||
int vy = actor->int_vel().Y;
|
||||
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
|
||||
int t2 = DMulScale(vx, nSin, -vy, nCos, 30);
|
||||
if (actor->GetTarget() == nullptr)
|
||||
|
|
Loading…
Reference in a new issue