Added PitchFromMomentum, UseActorPitch and UseActorRoll to VOXELDEF. Behaves exactly like their 3D model counterparts. Hardware renderer only.
This commit is contained in:
parent
eb94f81a83
commit
351a4c9a5a
3 changed files with 26 additions and 1 deletions
|
|
@ -53,7 +53,8 @@
|
|||
struct VoxelOptions
|
||||
{
|
||||
VoxelOptions()
|
||||
: DroppedSpin(0), PlacedSpin(0), Scale(1.), AngleOffset(90.), OverridePalette(false)
|
||||
: DroppedSpin(0), PlacedSpin(0), Scale(1.), AngleOffset(90.), OverridePalette(false),
|
||||
PitchFromMomentum(false), UseActorPitch(false), UseActorRoll(false)
|
||||
{}
|
||||
|
||||
int DroppedSpin;
|
||||
|
|
@ -61,6 +62,9 @@ struct VoxelOptions
|
|||
double Scale;
|
||||
DAngle AngleOffset;
|
||||
bool OverridePalette;
|
||||
bool PitchFromMomentum;
|
||||
bool UseActorPitch;
|
||||
bool UseActorRoll;
|
||||
};
|
||||
|
||||
void VOX_AddVoxel(int sprnum, int frame, FVoxelDef* def);
|
||||
|
|
@ -180,6 +184,18 @@ static void VOX_ReadOptions(FScanner &sc, VoxelOptions &opts)
|
|||
{
|
||||
opts.OverridePalette = true;
|
||||
}
|
||||
else if (sc.Compare("pitchfrommomentum"))
|
||||
{
|
||||
opts.PitchFromMomentum = true;
|
||||
}
|
||||
else if (sc.Compare("useactorpitch"))
|
||||
{
|
||||
opts.UseActorPitch = true;
|
||||
}
|
||||
else if (sc.Compare("useactorroll"))
|
||||
{
|
||||
opts.UseActorRoll = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.ScriptMessage("Unknown voxel option '%s'\n", sc.String);
|
||||
|
|
@ -249,6 +265,9 @@ void R_InitVoxels()
|
|||
def->DroppedSpin = opts.DroppedSpin;
|
||||
def->PlacedSpin = opts.PlacedSpin;
|
||||
def->AngleOffset = opts.AngleOffset;
|
||||
def->PitchFromMomentum = opts.PitchFromMomentum;
|
||||
def->UseActorPitch = opts.UseActorPitch;
|
||||
def->UseActorRoll = opts.UseActorRoll;
|
||||
VoxelDefs.Push(def);
|
||||
|
||||
for (unsigned i = 0; i < vsprites.Size(); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue