- fixed two refactoring errors:
* A_BridgeOrbit had its radius as an int, not a fixed_t. * PIT_CheckThing used the wrong coordinate for checking actor distance.
This commit is contained in:
parent
e9b23cf833
commit
500bc2b852
2 changed files with 4 additions and 4 deletions
|
|
@ -100,14 +100,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_BridgeOrbit)
|
|||
// Set default values
|
||||
// Every five tics, Hexen moved the ball 3/256th of a revolution.
|
||||
int rotationspeed = ANGLE_45/32*3/5;
|
||||
int rotationradius = ORBIT_RADIUS;
|
||||
int rotationradius = ORBIT_RADIUS * FRACUNIT;
|
||||
// If the bridge is custom, set non-default values if any.
|
||||
|
||||
// Set angular speed; 1--128: counterclockwise rotation ~=1--180°; 129--255: clockwise rotation ~= 180--1°
|
||||
if (self->target->args[3] > 128) rotationspeed = ANGLE_45/32 * (self->target->args[3]-256) / TICRATE;
|
||||
else if (self->target->args[3] > 0) rotationspeed = ANGLE_45/32 * (self->target->args[3]) / TICRATE;
|
||||
// Set rotation radius
|
||||
if (self->target->args[4]) rotationradius = ((self->target->args[4] * self->target->radius) / (100 * FRACUNIT));
|
||||
if (self->target->args[4]) rotationradius = ((self->target->args[4] * self->target->radius) / 100);
|
||||
|
||||
self->angle += rotationspeed;
|
||||
self->SetOrigin(self->target->Vec3Angle(rotationradius, self->angle, 0), true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue