mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- Added a CopyInfo function to FTexture that contains all code required to
clone a texture. Used for creating warping textures. - Fixed: P_FindFloorCeiling should not be called before setting the actor's z- coordinate. For testing 3D Midtex lines and 3D floors the proper position needs to be set first. - Fixed the autoaim fix from Jan 10. SVN r1358 (trunk)
This commit is contained in:
parent
51391f889c
commit
bbda4622e7
7 changed files with 37 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
|||
January 18, 2009 (Changes by Graf Zahl)
|
||||
- Added a CopyInfo function to FTexture that contains all code required to
|
||||
clone a texture. Used for creating warping textures.
|
||||
- Fixed: P_FindFloorCeiling should not be called before setting the actor's z-
|
||||
coordinate. For testing 3D Midtex lines and 3D floors the proper position
|
||||
needs to be set first.
|
||||
- Fixed the autoaim fix from Jan 10.
|
||||
|
||||
January 11, 2009 (Changes by Graf Zahl)
|
||||
- Added option to specify the amount of ammo to be given by a WeaponGiver.
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ struct userinfo_t
|
|||
fixed_t MoveBob, StillBob;
|
||||
int PlayerClass;
|
||||
|
||||
int GetAimDist() const { return (dmflags2 & DF2_NOAUTOAIM)? aimdist : 0; }
|
||||
int GetAimDist() const { return (dmflags2 & DF2_NOAUTOAIM)? 0 : aimdist; }
|
||||
};
|
||||
|
||||
FArchive &operator<< (FArchive &arc, userinfo_t &info);
|
||||
|
|
|
@ -558,7 +558,7 @@ void P_LineOpening_XFloors (FLineOpening &open, AActor * thing, const line_t *li
|
|||
fixed_t thingbot, thingtop;
|
||||
|
||||
thingbot = thing->z;
|
||||
thingtop = thingbot + thing->height;
|
||||
thingtop = thingbot + (thing->height==0? 1:thing->height);
|
||||
|
||||
extsector_t::xfloor *xf[2] = {&linedef->frontsector->e->XFloor, &linedef->backsector->e->XFloor};
|
||||
|
||||
|
@ -575,16 +575,14 @@ void P_LineOpening_XFloors (FLineOpening &open, AActor * thing, const line_t *li
|
|||
|
||||
highestfloorpic.SetInvalid();
|
||||
lowestceilingpic.SetInvalid();
|
||||
thingtop = thing->z + (thing->height==0? 1:thing->height);
|
||||
|
||||
for(int j=0;j<2;j++)
|
||||
{
|
||||
// Check for frontsector's 3D-floors
|
||||
for(unsigned i=0;i<xf[j]->ffloors.Size();i++)
|
||||
{
|
||||
F3DFloor *rover = xf[j]->ffloors[i];
|
||||
|
||||
if (!(rover->flags&FF_EXISTS)) continue;
|
||||
if (!(rover->flags & FF_EXISTS)) continue;
|
||||
if (!(rover->flags & FF_SOLID)) continue;
|
||||
|
||||
fixed_t ff_bottom=rover->bottom.plane->ZatPoint(x, y);
|
||||
|
@ -604,7 +602,7 @@ void P_LineOpening_XFloors (FLineOpening &open, AActor * thing, const line_t *li
|
|||
highestfloor = ff_top;
|
||||
highestfloorpic = *rover->top.texture;
|
||||
}
|
||||
if(ff_top > lowestfloor[j] && ff_top <= thing->z) lowestfloor[j] = ff_top;
|
||||
if(ff_top > lowestfloor[j] && ff_top <= thing->z + thing->MaxStepHeight) lowestfloor[j] = ff_top;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -782,7 +782,7 @@ FUNC(LS_Teleport_NewMap)
|
|||
|
||||
FUNC(LS_Teleport)
|
||||
// Teleport (tid, sectortag, bNoSourceFog)
|
||||
{
|
||||
{
|
||||
return EV_Teleport (arg0, arg1, ln, backSide, it, true, !arg2, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -3214,13 +3214,27 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
|||
if (G_SkillProperty(SKILLP_FastMonsters))
|
||||
actor->Speed = actor->GetClass()->Meta.GetMetaFixed(AMETA_FastSpeed, actor->Speed);
|
||||
|
||||
|
||||
// set subsector and/or block links
|
||||
actor->LinkToWorld (SpawningMapThing);
|
||||
|
||||
actor->dropoffz = // killough 11/98: for tracking dropoffs
|
||||
actor->floorz = actor->Sector->floorplane.ZatPoint (ix, iy);
|
||||
actor->ceilingz = actor->Sector->ceilingplane.ZatPoint (ix, iy);
|
||||
|
||||
// The z-coordinate needs to be set once before calling P_FindFloorCeiling
|
||||
// For FLOATRANDZ just use the floor here.
|
||||
if (iz == ONFLOORZ || iz == FLOATRANDZ)
|
||||
{
|
||||
actor->z = actor->floorz;
|
||||
}
|
||||
else if (iz == ONCEILINGZ)
|
||||
{
|
||||
actor->z = actor->ceilingz - actor->height;
|
||||
}
|
||||
|
||||
if (SpawningMapThing || !type->IsDescendantOf (RUNTIME_CLASS(APlayerPawn)))
|
||||
{
|
||||
actor->dropoffz = // killough 11/98: for tracking dropoffs
|
||||
actor->floorz = actor->Sector->floorplane.ZatPoint (ix, iy);
|
||||
actor->ceilingz = actor->Sector->ceilingplane.ZatPoint (ix, iy);
|
||||
actor->floorsector = actor->Sector;
|
||||
actor->floorpic = actor->floorsector->GetTexture(sector_t::floor);
|
||||
actor->ceilingsector = actor->Sector;
|
||||
|
@ -3236,9 +3250,6 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
|||
}
|
||||
else
|
||||
{
|
||||
actor->floorz = FIXED_MIN;
|
||||
actor->dropoffz = FIXED_MIN;
|
||||
actor->ceilingz = FIXED_MAX;
|
||||
actor->floorpic = actor->Sector->GetTexture(sector_t::floor);
|
||||
actor->floorsector = actor->Sector;
|
||||
actor->ceilingpic = actor->Sector->GetTexture(sector_t::ceiling);
|
||||
|
|
|
@ -219,6 +219,12 @@ protected:
|
|||
Span **CreateSpans (const BYTE *pixels) const;
|
||||
void FreeSpans (Span **spans) const;
|
||||
void CalcBitSize ();
|
||||
void CopyInfo(FTexture *other)
|
||||
{
|
||||
CopySize(other);
|
||||
bNoDecals = other->bNoDecals;
|
||||
Rotations = other->Rotations;
|
||||
}
|
||||
|
||||
static void FlipSquareBlock (BYTE *block, int x, int y);
|
||||
static void FlipSquareBlockRemap (BYTE *block, int x, int y, const BYTE *remap);
|
||||
|
|
|
@ -43,9 +43,7 @@
|
|||
FWarpTexture::FWarpTexture (FTexture *source)
|
||||
: GenTime (0), SourcePic (source), Pixels (0), Spans (0), Speed (1.f)
|
||||
{
|
||||
CopySize(source);
|
||||
bNoDecals = source->bNoDecals;
|
||||
Rotations = source->Rotations;
|
||||
CopyInfo(source);
|
||||
bWarped = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue