mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-22 11:41:08 +00:00
- SW: Replace PLAYERstruct
si*
variables with a vector.
This commit is contained in:
parent
6e130d026e
commit
03da70b3b9
5 changed files with 16 additions and 17 deletions
|
@ -345,7 +345,7 @@ void DoShadows(tspritetype* tsprite, int& spritesortcnt, tspritetype* tsp, int v
|
||||||
else if (!testnewrenderer)
|
else if (!testnewrenderer)
|
||||||
{
|
{
|
||||||
// Alter the shadow's position so that it appears behind the sprite itself.
|
// Alter the shadow's position so that it appears behind the sprite itself.
|
||||||
int look = getangle(tSpr->pos.X - Player[screenpeek].six, tSpr->pos.Y - Player[screenpeek].siy);
|
int look = getangle(tSpr->pos.X - Player[screenpeek].si.X, tSpr->pos.Y - Player[screenpeek].si.Y);
|
||||||
tSpr->pos.X += bcos(look, -9);
|
tSpr->pos.X += bcos(look, -9);
|
||||||
tSpr->pos.Y += bsin(look, -9);
|
tSpr->pos.Y += bsin(look, -9);
|
||||||
}
|
}
|
||||||
|
@ -776,16 +776,16 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie
|
||||||
{
|
{
|
||||||
// move sprite forward some so he looks like he's
|
// move sprite forward some so he looks like he's
|
||||||
// climbing
|
// climbing
|
||||||
tsp->pos.X = pp->six + MOVEx(128 + 80, tsp->ang);
|
tsp->pos.X = pp->si.X + MOVEx(128 + 80, tsp->ang);
|
||||||
tsp->pos.Y = pp->siy + MOVEy(128 + 80, tsp->ang);
|
tsp->pos.Y = pp->si.Y + MOVEy(128 + 80, tsp->ang);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tsp->pos.X = pp->six;
|
tsp->pos.X = pp->si.X;
|
||||||
tsp->pos.Y = pp->siy;
|
tsp->pos.Y = pp->si.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
tsp->pos.Z = tsp->pos.Z + pp->siz;
|
tsp->pos.Z = tsp->pos.Z + pp->si.Z;
|
||||||
tsp->ang = pp->siang;
|
tsp->ang = pp->siang;
|
||||||
//continue;
|
//continue;
|
||||||
}
|
}
|
||||||
|
@ -1445,9 +1445,9 @@ void drawscreen(PLAYERp pp, double smoothratio)
|
||||||
updatesectorz(tx, ty, tz, &tsect);
|
updatesectorz(tx, ty, tz, &tsect);
|
||||||
}
|
}
|
||||||
|
|
||||||
pp->six = tx;
|
pp->si.X = tx;
|
||||||
pp->siy = ty;
|
pp->si.Y = ty;
|
||||||
pp->siz = tz - pp->pos.Z;
|
pp->si.Z = tz - pp->pos.Z;
|
||||||
pp->siang = tang.asbuild();
|
pp->siang = tang.asbuild();
|
||||||
|
|
||||||
QuakeViewChange(camerapp, &quake_z, &quake_x, &quake_y, &quake_ang);
|
QuakeViewChange(camerapp, &quake_z, &quake_x, &quake_y, &quake_ang);
|
||||||
|
|
|
@ -628,7 +628,7 @@ struct PLAYERstruct
|
||||||
SECTORp hi_sectp, lo_sectp;
|
SECTORp hi_sectp, lo_sectp;
|
||||||
|
|
||||||
int circle_camera_dist;
|
int circle_camera_dist;
|
||||||
int six,siy,siz; // save player interp position for PlayerSprite
|
vec3_t si; // save player interp position for PlayerSprite
|
||||||
int16_t siang;
|
int16_t siang;
|
||||||
|
|
||||||
int xvect, yvect;
|
int xvect, yvect;
|
||||||
|
|
|
@ -7082,9 +7082,9 @@ DEFINE_FIELD_X(SWPlayer, PLAYERstruct, loz)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ceiling_dist)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ceiling_dist)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, floor_dist)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, floor_dist)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, circle_camera_dist)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, circle_camera_dist)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, six)
|
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, six)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siy)
|
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siy)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siz)
|
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siz)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siang)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siang)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, xvect)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, xvect)
|
||||||
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, yvect)
|
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, yvect)
|
||||||
|
|
|
@ -461,9 +461,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERstruct& w, P
|
||||||
("lo_sp", w.lowActor)
|
("lo_sp", w.lowActor)
|
||||||
("last_camera_sp", w.last_camera_act)
|
("last_camera_sp", w.last_camera_act)
|
||||||
("circle_camera_dist", w.circle_camera_dist)
|
("circle_camera_dist", w.circle_camera_dist)
|
||||||
("six", w.six)
|
("six", w.si.X)
|
||||||
("siy", w.siy)
|
("siy", w.si.Y)
|
||||||
("siz", w.siz)
|
("siz", w.si.Z)
|
||||||
("siang", w.siang)
|
("siang", w.siang)
|
||||||
("xvect", w.xvect)
|
("xvect", w.xvect)
|
||||||
("yvect", w.yvect)
|
("yvect", w.yvect)
|
||||||
|
|
|
@ -194,7 +194,6 @@ struct SWPlayer native
|
||||||
native int hiz,loz;
|
native int hiz,loz;
|
||||||
native int ceiling_dist,floor_dist;
|
native int ceiling_dist,floor_dist;
|
||||||
native int circle_camera_dist;
|
native int circle_camera_dist;
|
||||||
native int six,siy,siz; // save player interp position for PlayerSprite
|
|
||||||
native int16 siang;
|
native int16 siang;
|
||||||
|
|
||||||
native int xvect, yvect;
|
native int xvect, yvect;
|
||||||
|
|
Loading…
Reference in a new issue