mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 22:00:50 +00:00
Extra tiny logic fixes; swinging chains are smoother, and polyobjects can follow single-waypoint sequences
This commit is contained in:
parent
1078be3c30
commit
210279625a
2 changed files with 6 additions and 2 deletions
|
@ -5024,7 +5024,7 @@ void A_MaceRotate(mobj_t *actor)
|
||||||
actor->movecount += actor->target->lastlook;
|
actor->movecount += actor->target->lastlook;
|
||||||
actor->movecount &= FINEMASK;
|
actor->movecount &= FINEMASK;
|
||||||
|
|
||||||
actor->threshold = FixedMul(FINECOSINE(actor->movecount), actor->target->lastlook);
|
actor->threshold = FixedMul(FINECOSINE(actor->movecount), actor->target->lastlook << FRACBITS);
|
||||||
|
|
||||||
v[0] = FRACUNIT;
|
v[0] = FRACUNIT;
|
||||||
v[1] = 0;
|
v[1] = 0;
|
||||||
|
@ -5032,7 +5032,7 @@ void A_MaceRotate(mobj_t *actor)
|
||||||
v[3] = FRACUNIT;
|
v[3] = FRACUNIT;
|
||||||
|
|
||||||
// Calculate the angle matrixes for the link.
|
// Calculate the angle matrixes for the link.
|
||||||
res = VectorMatrixMultiply(v, *RotateXMatrix(FixedAngle(actor->threshold << FRACBITS)));
|
res = VectorMatrixMultiply(v, *RotateXMatrix(FixedAngle(actor->threshold)));
|
||||||
M_Memcpy(&v, res, sizeof(v));
|
M_Memcpy(&v, res, sizeof(v));
|
||||||
res = VectorMatrixMultiply(v, *RotateZMatrix(actor->target->health << ANGLETOFINESHIFT));
|
res = VectorMatrixMultiply(v, *RotateZMatrix(actor->target->health << ANGLETOFINESHIFT));
|
||||||
M_Memcpy(&v, res, sizeof(v));
|
M_Memcpy(&v, res, sizeof(v));
|
||||||
|
|
|
@ -2491,6 +2491,10 @@ INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *pwdata)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hotfix to not crash on single-waypoint sequences -Red
|
||||||
|
if (!last)
|
||||||
|
last = first;
|
||||||
|
|
||||||
// Set diffx, diffy, diffz
|
// Set diffx, diffy, diffz
|
||||||
// Put these at 0 for now...might not be needed after all.
|
// Put these at 0 for now...might not be needed after all.
|
||||||
th->diffx = 0;//first->x - po->centerPt.x;
|
th->diffx = 0;//first->x - po->centerPt.x;
|
||||||
|
|
Loading…
Reference in a new issue