- floatified the return data from Trace().

This commit is contained in:
Christoph Oelckers 2016-03-23 18:07:04 +01:00
commit 2dbd79cc8d
17 changed files with 105 additions and 108 deletions

View file

@ -286,7 +286,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeathChunks)
// with no relation to the size of the self shattering. I think it should
// base the number of shards on the size of the dead thing, so bigger
// things break up into more shards than smaller things.
// An actor with _f_radius() 20 and height 64 creates ~40 chunks.
// An actor with radius 20 and height 64 creates ~40 chunks.
numChunks = MAX<int>(4, int(self->radius * self->Height)/32);
i = (pr_freeze.Random2()) % (numChunks/4);
for (i = MAX (24, numChunks + i); i >= 0; i--)

View file

@ -9,7 +9,7 @@ static FRandom pr_orbit ("Orbit");
// Custom bridge --------------------------------------------------------
/*
args[0]: Bridge _f_radius(), in mapunits
args[0]: Bridge radius, in mapunits
args[1]: Bridge height, in mapunits
args[2]: Amount of bridge balls (if 0: Doom bridge)
args[3]: Rotation speed of bridge balls, in byte angle per seconds, sorta:

View file

@ -777,20 +777,20 @@ DBaseDecal *ShootDecal(const FDecalTemplate *tpl, AActor *basisactor, sector_t *
{
if (permanent)
{
decal = new DBaseDecal(FIXED2DBL(trace.HitPos.z));
decal = new DBaseDecal(trace.HitPos.Z);
wall = trace.Line->sidedef[trace.Side];
decal->StickToWall(wall, FIXED2DBL(trace.HitPos.x), FIXED2DBL(trace.HitPos.y), trace.ffloor);
decal->StickToWall(wall, trace.HitPos.X, trace.HitPos.Y, trace.ffloor);
tpl->ApplyToDecal(decal, wall);
// Spread decal to nearby walls if it does not all fit on this one
if (cl_spreaddecals)
{
decal->Spread(tpl, wall, FIXED2DBL(trace.HitPos.x), FIXED2DBL(trace.HitPos.y), FIXED2DBL(trace.HitPos.z), trace.ffloor);
decal->Spread(tpl, wall, trace.HitPos.X, trace.HitPos.Y, trace.HitPos.Z, trace.ffloor);
}
return decal;
}
else
{
return DImpactDecal::StaticCreate(tpl, DVector3(FIXED2DBL(trace.HitPos.x), FIXED2DBL(trace.HitPos.y), FIXED2DBL(trace.HitPos.z)), trace.Line->sidedef[trace.Side], NULL);
return DImpactDecal::StaticCreate(tpl, trace.HitPos, trace.Line->sidedef[trace.Side], NULL);
}
}
return NULL;

View file

@ -144,7 +144,7 @@ void DEarthquake::Tick ()
fixed_t dist;
dist = m_Spot->AproxDistance (victim, true);
// Check if in damage _f_radius()
// Check if in damage radius
if (dist < m_DamageRadius && victim->Z() <= victim->floorz)
{
if (pr_quake() < 50)

View file

@ -151,7 +151,7 @@ class ARandomSpawner : public AActor
{
tracer = target->target;
}
newmobj = P_SpawnMissileXYZ(_f_Pos(), target, target->target, cls, false);
newmobj = P_SpawnMissileXYZ(Pos(), target, target->target, cls, false);
}
else
{

View file

@ -50,6 +50,6 @@ IMPLEMENT_CLASS (ASpark)
void ASpark::Activate (AActor *activator)
{
Super::Activate (activator);
P_DrawSplash (args[0] ? args[0] : 32, _f_X(), _f_Y(), _f_Z(), FLOAT2ANGLE(Angles.Yaw.Degrees), 1);
P_DrawSplash (args[0] ? args[0] : 32, Pos(), Angles.Yaw, 1);
S_Sound (this, CHAN_AUTO, "world/spark", 1, ATTN_STATIC);
}