mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- moved Blood's velocity vector to DCoreActor.
This commit is contained in:
parent
2f7995619e
commit
a5a04b1123
4 changed files with 13 additions and 10 deletions
|
@ -45,6 +45,8 @@ public:
|
||||||
DVector3 opos;
|
DVector3 opos;
|
||||||
int time;
|
int time;
|
||||||
DAngle oang;
|
DAngle oang;
|
||||||
|
vec3_t vel;
|
||||||
|
|
||||||
int16_t spritesetindex;
|
int16_t spritesetindex;
|
||||||
|
|
||||||
|
|
||||||
|
@ -209,6 +211,12 @@ public:
|
||||||
spr.yint = int(spr.yint * v);
|
spr.yint = int(spr.yint * v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DVector3 fVel() const
|
||||||
|
{
|
||||||
|
return { FixedToFloat(vel.X), FixedToFloat(vel.Y), FixedToFloat(vel.Z) };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Same as above but with inverted y and z axes to match the renderer's coordinate system.
|
// Same as above but with inverted y and z axes to match the renderer's coordinate system.
|
||||||
|
|
||||||
double interpolatedx(double const smoothratio, int const scale = 16)
|
double interpolatedx(double const smoothratio, int const scale = 16)
|
||||||
|
|
|
@ -677,7 +677,10 @@ void DCoreActor::Serialize(FSerializer& arc)
|
||||||
("sprite", spr)
|
("sprite", spr)
|
||||||
("time", time)
|
("time", time)
|
||||||
("spritesetindex", spritesetindex)
|
("spritesetindex", spritesetindex)
|
||||||
("spriteext", sprext);
|
("spriteext", sprext)
|
||||||
|
("xvel", vel.X)
|
||||||
|
("yvel", vel.Y)
|
||||||
|
("zvel", vel.Z);
|
||||||
|
|
||||||
if (arc.isReading()) spsmooth = {};
|
if (arc.isReading()) spsmooth = {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ class DBloodActor : public DCoreActor
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int dudeSlope;
|
int dudeSlope;
|
||||||
vec3_t vel;
|
|
||||||
bool hasx;
|
bool hasx;
|
||||||
XSPRITE xspr;
|
XSPRITE xspr;
|
||||||
SPRITEHIT hit;
|
SPRITEHIT hit;
|
||||||
|
@ -43,11 +42,6 @@ public:
|
||||||
bool hasX() { return hasx; }
|
bool hasX() { return hasx; }
|
||||||
void addX() { hasx = true; }
|
void addX() { hasx = true; }
|
||||||
|
|
||||||
DVector3 fVel() const
|
|
||||||
{
|
|
||||||
return { FixedToFloat(vel.X), FixedToFloat(vel.Y), FixedToFloat(vel.Z) };
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetOwner(DBloodActor* own)
|
void SetOwner(DBloodActor* own)
|
||||||
{
|
{
|
||||||
ownerActor = own;
|
ownerActor = own;
|
||||||
|
|
|
@ -471,9 +471,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, DUDEEXTRA& w, DUDE
|
||||||
void DBloodActor::Serialize(FSerializer& arc)
|
void DBloodActor::Serialize(FSerializer& arc)
|
||||||
{
|
{
|
||||||
Super::Serialize(arc);
|
Super::Serialize(arc);
|
||||||
arc("xvel", vel.X)
|
arc
|
||||||
("yvel", vel.Y)
|
|
||||||
("zvel", vel.Z)
|
|
||||||
("hasx", hasx)
|
("hasx", hasx)
|
||||||
("basepoint", basePoint);
|
("basepoint", basePoint);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue