mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- eliminated move_sprite wrapper
This commit is contained in:
parent
efe7f7c90e
commit
5628590c7c
2 changed files with 4 additions and 9 deletions
|
@ -1708,12 +1708,7 @@ inline void getzrangepoint(const DVector3& pos, sectortype* sect, double* hiz, C
|
|||
*loz = lo * zinttoworld;
|
||||
}
|
||||
|
||||
Collision move_sprite(DSWActor* , int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
|
||||
inline Collision move_sprite(DSWActor* actor, const DVector3& change, double ceildist, double flordist, uint32_t cliptype, int numtics)
|
||||
{
|
||||
return move_sprite(actor, change.X * worldtoint, change.Y * worldtoint, change.Z * zworldtoint, ceildist * zworldtoint, flordist * zworldtoint, cliptype, numtics);
|
||||
}
|
||||
|
||||
Collision move_sprite(DSWActor* actor, const DVector3& change, double ceildist, double flordist, uint32_t cliptype, int numtics);
|
||||
Collision move_missile(DSWActor* actor, const DVector3& change, double ceildist, double flordist, uint32_t cliptype, int numtics);
|
||||
|
||||
|
||||
|
|
|
@ -6404,7 +6404,7 @@ void SpriteControl(void)
|
|||
|
||||
*/
|
||||
|
||||
Collision move_sprite(DSWActor* actor, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
|
||||
inline Collision move_sprite(DSWActor* actor, const DVector3& change, double ceildist, double flordist, uint32_t cliptype, int numtics)
|
||||
{
|
||||
Collision retval{};
|
||||
double zH;
|
||||
|
@ -6432,7 +6432,7 @@ Collision move_sprite(DSWActor* actor, int xchange, int ychange, int zchange, in
|
|||
|
||||
|
||||
// ASSERT(inside(actor->spr.x,actor->spr.y,dasectnum));
|
||||
|
||||
int xchange = change.X * worldtoint, ychange = change.Y * worldtoint;
|
||||
clipmove(clip_pos, &dasect,
|
||||
((xchange * numtics) << 11), ((ychange * numtics) << 11),
|
||||
(((int) actor->spr.clipdist) << 2), ceildist, flordist, cliptype, retval, 1);
|
||||
|
@ -6468,7 +6468,7 @@ Collision move_sprite(DSWActor* actor, int xchange, int ychange, int zchange, in
|
|||
// Takes info from global variables
|
||||
DoActorGlobZ(actor);
|
||||
|
||||
clip_pos.Z = actor->spr.pos.Z + ((zchange * numtics) * 0.125) * inttoworld;
|
||||
clip_pos.Z = actor->spr.pos.Z + ((change.Z * numtics) * 0.125);
|
||||
|
||||
// test for hitting ceiling or floor
|
||||
if ((clip_pos.Z - zH <= globhiz) || (clip_pos.Z - zH > globloz))
|
||||
|
|
Loading…
Reference in a new issue