mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- use floats for internal SetActor(Z) functions.
This commit is contained in:
parent
00436bfdac
commit
f002425aee
2 changed files with 14 additions and 19 deletions
|
@ -447,21 +447,21 @@ void InitSpriteLists()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void SetActor(DCoreActor* actor, const vec3_t* newpos)
|
||||
void SetActor(DCoreActor* actor, const DVector3& newpos)
|
||||
{
|
||||
auto tempsector = actor->sector();
|
||||
actor->set_int_pos(*newpos);
|
||||
updatesector(newpos->X, newpos->Y, &tempsector);
|
||||
actor->spr.pos = newpos;
|
||||
updatesector(newpos, &tempsector);
|
||||
|
||||
if (tempsector && tempsector != actor->sector())
|
||||
ChangeActorSect(actor, tempsector);
|
||||
}
|
||||
|
||||
void SetActorZ(DCoreActor* actor, const vec3_t* newpos)
|
||||
void SetActorZ(DCoreActor* actor, const DVector3& newpos)
|
||||
{
|
||||
auto tempsector = actor->sector();
|
||||
actor->set_int_pos(*newpos);
|
||||
updatesectorz(newpos->X, newpos->Y, newpos->Z, &tempsector);
|
||||
actor->spr.pos = newpos;
|
||||
updatesectorz(newpos, &tempsector);
|
||||
|
||||
if (tempsector && tempsector != actor->sector())
|
||||
ChangeActorSect(actor, tempsector);
|
||||
|
|
|
@ -530,24 +530,19 @@ int ChangeActorStat(DCoreActor* actor, int nStatus, bool forcetail = false);
|
|||
void InitSpriteLists();
|
||||
|
||||
|
||||
void SetActorZ(DCoreActor* actor, const vec3_t* newpos);
|
||||
void SetActor(DCoreActor* actor, const vec3_t* newpos);
|
||||
void SetActorZ(DCoreActor* actor, const DVector3& newpos);
|
||||
void SetActor(DCoreActor* actor, const DVector3& newpos);
|
||||
|
||||
inline void SetActorZ(DCoreActor* actor, const vec3_t& newpos)
|
||||
inline void SetActor(DCoreActor* actor, const vec3_t* newpos)
|
||||
{
|
||||
SetActorZ(actor, &newpos);
|
||||
DVector3 ipos = { newpos->X * inttoworld, newpos->Y * inttoworld, newpos->Z * zinttoworld };
|
||||
SetActor(actor, ipos);
|
||||
}
|
||||
|
||||
inline void SetActor(DCoreActor* actor, const DVector3& newpos)
|
||||
inline void SetActorZ(DCoreActor* actor, const vec3_t* newpos)
|
||||
{
|
||||
vec3_t ipos = { int(newpos.X * worldtoint), int(newpos.Y * worldtoint), int(newpos.Z * zworldtoint) };
|
||||
SetActor(actor, &ipos);
|
||||
}
|
||||
|
||||
inline void SetActorZ(DCoreActor* actor, const DVector3& newpos)
|
||||
{
|
||||
vec3_t ipos = { int(newpos.X * worldtoint), int(newpos.Y * worldtoint), int(newpos.Z * zworldtoint) };
|
||||
SetActorZ(actor, &ipos);
|
||||
DVector3 ipos = { newpos->X * inttoworld, newpos->Y * inttoworld, newpos->Z * zinttoworld };
|
||||
SetActorZ(actor, ipos);
|
||||
}
|
||||
|
||||
inline int clipmove(vec3_t& pos, sectortype** const sect, int xvect, int yvect,
|
||||
|
|
Loading…
Reference in a new issue