mirror of
https://github.com/DrBeef/Raze.git
synced 2025-04-04 15:10:45 +00:00
- replace most spr.pos in the global code.
This commit is contained in:
parent
e732e2f947
commit
3420032f02
3 changed files with 7 additions and 7 deletions
|
@ -366,7 +366,7 @@ DCoreActor* InsertActor(PClass* type, sectortype* sector, int stat, bool tail)
|
|||
|
||||
void DCoreActor::OnDestroy()
|
||||
{
|
||||
FVector3 pos = GetSoundPos(spr.pos);
|
||||
FVector3 pos = GetSoundPos(int_pos());
|
||||
soundEngine->RelinkSound(SOURCE_Actor, this, nullptr, &pos);
|
||||
|
||||
// also scan all other sounds if they have this actor as source. If so, null the source and stop looped sounds.
|
||||
|
@ -450,7 +450,7 @@ void InitSpriteLists()
|
|||
void SetActor(DCoreActor* actor, const vec3_t* newpos)
|
||||
{
|
||||
auto tempsector = actor->sector();
|
||||
actor->spr.pos = *newpos;
|
||||
actor->set_int_pos(*newpos);
|
||||
updatesector(newpos->X, newpos->Y, &tempsector);
|
||||
|
||||
if (tempsector && tempsector != actor->sector())
|
||||
|
@ -460,7 +460,7 @@ void SetActor(DCoreActor* actor, const vec3_t* newpos)
|
|||
void SetActorZ(DCoreActor* actor, const vec3_t* newpos)
|
||||
{
|
||||
auto tempsector = actor->sector();
|
||||
actor->spr.pos = *newpos;
|
||||
actor->set_int_pos(*newpos);
|
||||
updatesectorz(newpos->X, newpos->Y, newpos->Z, &tempsector);
|
||||
|
||||
if (tempsector && tempsector != actor->sector())
|
||||
|
|
|
@ -607,7 +607,7 @@ void renderDrawMapView(int cposx, int cposy, int czoom, int cang)
|
|||
{
|
||||
auto A = *(DCoreActor**)a;
|
||||
auto B = *(DCoreActor**)b;
|
||||
if (A->spr.pos.Z != B->spr.pos.Z) return B->spr.pos.Z - A->spr.pos.Z;
|
||||
if (A->int_pos().Z != B->int_pos().Z) return B->int_pos().Z - A->int_pos().Z;
|
||||
return A->time - B->time; // ensures stable sort.
|
||||
});
|
||||
|
||||
|
@ -616,7 +616,7 @@ void renderDrawMapView(int cposx, int cposy, int czoom, int cang)
|
|||
{
|
||||
if (!gFullMap && !(actor->spr.cstat2 & CSTAT2_SPRITE_MAPPED)) continue;
|
||||
vec2_t pp[4];
|
||||
GetFlatSpritePosition(actor, actor->spr.pos.vec2, pp, true);
|
||||
GetFlatSpritePosition(actor, actor->int_pos().vec2, pp, true);
|
||||
|
||||
for (unsigned j = 0; j < 4; j++)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ double Get(int index, DCoreActor* actor, int type)
|
|||
case Interp_Wall_PanX: return wall[index].xpan_;
|
||||
case Interp_Wall_PanY: return wall[index].ypan_;
|
||||
|
||||
case Interp_Sprite_Z: return !actor? 0 : actor->spr.pos.Z;
|
||||
case Interp_Sprite_Z: return !actor? 0 : actor->int_pos().Z;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void Set(int index, DCoreActor* actor, int type, double val)
|
|||
case Interp_Wall_PanX: wall[index].xpan_ = float(val); break;
|
||||
case Interp_Wall_PanY: wall[index].ypan_ = float(val); break;
|
||||
|
||||
case Interp_Sprite_Z: if (actor) actor->spr.pos.Z = xs_CRoundToInt(val); break;
|
||||
case Interp_Sprite_Z: if (actor) actor->set_int_z(xs_CRoundToInt(val)); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue