mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- floatified move_missile’s API
This commit is contained in:
parent
e7197e2d73
commit
ce7533c1c4
2 changed files with 6 additions and 10 deletions
|
@ -1744,11 +1744,8 @@ inline Collision move_sprite(DSWActor* actor, const DVector3& change, double cei
|
||||||
return move_sprite(actor, change.X * worldtoint, change.Y * worldtoint, change.Z * zworldtoint, ceildist * zworldtoint, flordist * zworldtoint, cliptype, numtics);
|
return move_sprite(actor, change.X * worldtoint, change.Y * worldtoint, change.Z * zworldtoint, ceildist * zworldtoint, flordist * zworldtoint, cliptype, numtics);
|
||||||
}
|
}
|
||||||
|
|
||||||
Collision move_missile(DSWActor*, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
Collision move_missile(DSWActor* actor, const DVector3& change, double ceildist, double flordist, uint32_t cliptype, int numtics);
|
||||||
inline Collision move_missile(DSWActor* actor, const DVector3& change, double ceildist, double flordist, uint32_t cliptype, int numtics)
|
|
||||||
{
|
|
||||||
return move_missile(actor, change.X * worldtoint, change.Y * worldtoint, change.Z * zworldtoint, ceildist * zworldtoint, flordist * zworldtoint, cliptype, numtics);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DSWActor* DoPickTarget(DSWActor*, uint32_t max_delta_ang, int skip_targets);
|
DSWActor* DoPickTarget(DSWActor*, uint32_t max_delta_ang, int skip_targets);
|
||||||
|
|
|
@ -6390,10 +6390,8 @@ int MissileZrange(DSWActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
Collision move_missile(DSWActor* actor, const DVector3& change, double ceil_dist, double flor_dist, uint32_t cliptype, int numtics)
|
||||||
{
|
{
|
||||||
double ceil_dist = ceildist * zinttoworld, flor_dist = flordist * zinttoworld;
|
|
||||||
|
|
||||||
Collision retval{};
|
Collision retval{};
|
||||||
double zH;
|
double zH;
|
||||||
|
|
||||||
|
@ -6417,9 +6415,10 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int xchange = change.X * worldtoint, ychange = change.Y * worldtoint;
|
||||||
clipmove(clip_pos, &dasect,
|
clipmove(clip_pos, &dasect,
|
||||||
((xchange * numtics) << 11), ((ychange * numtics) << 11),
|
((xchange * numtics) << 11), ((ychange * numtics) << 11),
|
||||||
(((int) actor->spr.clipdist) << 2), ceildist, flordist, cliptype, retval, 1);
|
(((int) actor->spr.clipdist) << 2), ceil_dist, flor_dist, cliptype, retval, 1);
|
||||||
actor->spr.pos.XY() = clip_pos.XY();
|
actor->spr.pos.XY() = clip_pos.XY();
|
||||||
|
|
||||||
if (dasect == nullptr)
|
if (dasect == nullptr)
|
||||||
|
@ -6447,7 +6446,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
|
||||||
// missiles don't need the water to be down
|
// missiles don't need the water to be down
|
||||||
MissileWaterAdjust(actor);
|
MissileWaterAdjust(actor);
|
||||||
|
|
||||||
clip_pos.Z = actor->spr.pos.Z + ((zchange * numtics) >> 3) * zinttoworld;
|
clip_pos.Z = actor->spr.pos.Z + ((change.Z * numtics) * 0.125);
|
||||||
|
|
||||||
// NOTE: this does not tell you when you hit a floor sprite
|
// NOTE: this does not tell you when you hit a floor sprite
|
||||||
// this case is currently treated like it hit a sector
|
// this case is currently treated like it hit a sector
|
||||||
|
|
Loading…
Reference in a new issue