mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 00:41:19 +00:00
Update to ZDoom r1358:
- 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. - Added option to specify the amount of ammo to be given by a WeaponGiver. - fixed: Identification of Doom1 Freedoom IWAD did not work. - fixed: UDMF did not initialize a sector's light colors. - fixed implementation of DF2_NOAUTOAIM flag. - fixed: Parsing of color strings with 6 characters and spaces did not work. - fixed: State labels must be evaluated for the state's owner, not the calling actor. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@294 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
2b882c132b
commit
b2ae48bb67
24 changed files with 155 additions and 103 deletions
|
@ -1,3 +1,52 @@
|
|||
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.
|
||||
|
||||
January 10, 2009 (Changes by Graf Zahl)
|
||||
- fixed: Identification of Doom1 Freedoom IWAD did not work.
|
||||
- fixed: UDMF did not initialize a sector's light colors.
|
||||
- fixed implementation of DF2_NOAUTOAIM flag.
|
||||
|
||||
January 7, 2009 (Changes by Graf Zahl)
|
||||
- copied some 3D floor fixes from GZDoom.
|
||||
- fixed: Crushing polyobject did incomplete checks for blocked moves.
|
||||
|
||||
January 5, 2009 (Changes by Graf Zahl)
|
||||
- fixed: Parsing of color strings with 6 characters and spaces did not work.
|
||||
- fixed: State labels must be evaluated for the state's owner, not the calling actor.
|
||||
|
||||
January 4, 2009 (Changes by Graf Zahl)
|
||||
- Fixed: For map spawns any change to an actor's floor z-coordinate must be
|
||||
delayed until after its z-coordinate has been set. That means that for
|
||||
map spawns AActor::StaticSpawn may not call P_FindFloorCeiling for such
|
||||
actors.
|
||||
- added GZDoom's 3D floor physics code. This is not active yet so anything
|
||||
compiled from this code won't have any support for it!
|
||||
- Used new functionality to avoid moving the puff around in SpawnDeepSplash.
|
||||
- Fixed: P_RailAttack used the shooting actor or a default puff for some splash
|
||||
related actions. It should use the puff type passed to it as a parameter instead.
|
||||
- Changed splash handling in P_LineAttack to use the actual hit position to
|
||||
spawn the splash and not the puff's spawn position which is offset a little.
|
||||
- made some precision related changes to P_HitWater. The precise hit coordinate
|
||||
can now be passed as parameters.
|
||||
|
||||
January 3, 2009 (Changes by Graf Zahl)
|
||||
- Made spawning of floor- and ceiling huggers a little more intelligent.
|
||||
- Fixed: 'None' was no longer recognized as a NULL class name by the
|
||||
DECORATE parser.
|
||||
|
||||
January 1, 2009 (Changes by Graf Zahl)
|
||||
- Added 'ininventory item, amount' option to SBARINFO to check for a minimum
|
||||
amount instead of mere presence in the inventory.
|
||||
- Fixed: Door lock messages were overwritten by remote messages.
|
||||
|
||||
January 1, 2009 (Changes by Graf Zahl)
|
||||
- Fixed: SBARINFO used GetSpecies instead of GetClass to check weapon types.
|
||||
- Added a few missing NULL pointer checks to SBARINFO code.
|
||||
|
|
|
@ -479,19 +479,6 @@ CUSTOM_CVAR (Int, dmflags2, 0, CVAR_SERVERINFO)
|
|||
if (p->cheats & CF_CHASECAM)
|
||||
cht_DoCheat (p, CHT_CHASECAM);
|
||||
}
|
||||
|
||||
// Change our autoaim settings if need be.
|
||||
if (dmflags2 & DF2_NOAUTOAIM)
|
||||
{
|
||||
// Save our aimdist and set aimdist to 0.
|
||||
p->userinfo.savedaimdist = p->userinfo.aimdist;
|
||||
p->userinfo.aimdist = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Restore our aimdist.
|
||||
p->userinfo.aimdist = p->userinfo.savedaimdist;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1634,18 +1621,15 @@ static EIWADType ScanIWAD (const char *iwad)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (lumpsfound[Check_FreeDoom])
|
||||
{
|
||||
return IWAD_FreeDoom1;
|
||||
}
|
||||
for (i = Check_e2m1; i < NUM_CHECKLUMPS; i++)
|
||||
{
|
||||
if (!lumpsfound[i])
|
||||
{
|
||||
if (lumpsfound[Check_FreeDoom])
|
||||
{
|
||||
return IWAD_FreeDoom1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return IWAD_DoomShareware;
|
||||
}
|
||||
return IWAD_DoomShareware;
|
||||
}
|
||||
}
|
||||
if (i == NUM_CHECKLUMPS)
|
||||
|
|
|
@ -370,17 +370,11 @@ void D_SetupUserInfo ()
|
|||
}
|
||||
if (autoaim > 35.f || autoaim < 0.f)
|
||||
{
|
||||
if (dmflags & DF2_NOAUTOAIM)
|
||||
coninfo->savedaimdist = ANGLE_1*35;
|
||||
else
|
||||
coninfo->aimdist = ANGLE_1*35;
|
||||
coninfo->aimdist = ANGLE_1*35;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dmflags & DF2_NOAUTOAIM)
|
||||
coninfo->savedaimdist = abs ((int)(autoaim * (float)ANGLE_1));
|
||||
else
|
||||
coninfo->aimdist = abs ((int)(autoaim * (float)ANGLE_1));
|
||||
coninfo->aimdist = abs ((int)(autoaim * (float)ANGLE_1));
|
||||
}
|
||||
coninfo->color = color;
|
||||
coninfo->skin = R_FindSkin (skin, 0);
|
||||
|
@ -690,16 +684,10 @@ void D_ReadUserInfoStrings (int i, BYTE **stream, bool update)
|
|||
angles = atof (value);
|
||||
if (angles > 35.f || angles < 0.f)
|
||||
{
|
||||
if (dmflags & DF2_NOAUTOAIM)
|
||||
info->savedaimdist = ANGLE_1*35;
|
||||
else
|
||||
info->aimdist = ANGLE_1*35;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dmflags & DF2_NOAUTOAIM)
|
||||
info->savedaimdist = abs ((int)(angles * (float)ANGLE_1));
|
||||
else
|
||||
info->aimdist = abs ((int)(angles * (float)ANGLE_1));
|
||||
}
|
||||
}
|
||||
|
@ -816,8 +804,11 @@ FArchive &operator<< (FArchive &arc, userinfo_t &info)
|
|||
arc.Read (&info.netname, sizeof(info.netname));
|
||||
}
|
||||
arc << info.team << info.aimdist << info.color << info.skin << info.gender << info.neverswitch;
|
||||
if (SaveVersion >= 1333) arc << info.savedaimdist;
|
||||
else info.savedaimdist = info.aimdist;
|
||||
if (SaveVersion >= 1333 && SaveVersion <= 1355)
|
||||
{
|
||||
int savedaimdist;
|
||||
arc << savedaimdist;
|
||||
}
|
||||
return arc;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// is buffered within the player data struct,
|
||||
// as commands per game tick.
|
||||
#include "d_ticcmd.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
#include "a_artifacts.h"
|
||||
|
||||
|
@ -197,7 +198,6 @@ struct userinfo_t
|
|||
{
|
||||
char netname[MAXPLAYERNAME+1];
|
||||
BYTE team;
|
||||
int savedaimdist;
|
||||
int aimdist;
|
||||
int color;
|
||||
int skin;
|
||||
|
@ -205,6 +205,8 @@ struct userinfo_t
|
|||
bool neverswitch;
|
||||
fixed_t MoveBob, StillBob;
|
||||
int PlayerClass;
|
||||
|
||||
int GetAimDist() const { return (dmflags2 & DF2_NOAUTOAIM)? 0 : aimdist; }
|
||||
};
|
||||
|
||||
FArchive &operator<< (FArchive &arc, userinfo_t &info);
|
||||
|
|
|
@ -72,7 +72,7 @@ struct PSymbolVariable : public PSymbol
|
|||
// parameters passed.
|
||||
struct FState;
|
||||
struct StateCallData;
|
||||
typedef void (*actionf_p)(AActor *self, FState *state, int parameters, StateCallData *statecall);
|
||||
typedef void (*actionf_p)(AActor *self, AActor *stateowner, FState *state, int parameters, StateCallData *statecall);
|
||||
|
||||
struct PSymbolActionFunction : public PSymbol
|
||||
{
|
||||
|
|
|
@ -452,9 +452,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBFG)
|
|||
{
|
||||
return;
|
||||
}
|
||||
// [RH] bfg can be forced to not use freeaim
|
||||
angle_t storedpitch = self->pitch;
|
||||
int storedaimdist = player->userinfo.aimdist;
|
||||
|
||||
AWeapon *weapon = self->player->ReadyWeapon;
|
||||
if (weapon != NULL)
|
||||
|
@ -463,14 +460,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBFG)
|
|||
return;
|
||||
}
|
||||
|
||||
if (dmflags2 & DF2_NO_FREEAIMBFG)
|
||||
{
|
||||
self->pitch = 0;
|
||||
player->userinfo.aimdist = ANGLE_1*35;
|
||||
}
|
||||
P_SpawnPlayerMissile (self, PClass::FindClass("BFGBall"));
|
||||
self->pitch = storedpitch;
|
||||
player->userinfo.aimdist = storedaimdist;
|
||||
P_SpawnPlayerMissile (self, 0, 0, 0, PClass::FindClass("BFGBall"), self->angle, NULL, NULL, !!(dmflags2 & DF2_NO_FREEAIMBFG));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -2907,12 +2907,10 @@ void G_SerializeLevel (FArchive &arc, bool hubLoad)
|
|||
P_SerializeSounds (arc);
|
||||
|
||||
STAT_SAVE(arc, hubLoad);
|
||||
#ifdef _3DFLOORS
|
||||
if (arc.IsLoading()) for(i=0;i<numsectors;i++)
|
||||
{
|
||||
P_Recalculate3DFloors(§ors[i]);
|
||||
}
|
||||
#endif
|
||||
if (arc.IsLoading()) for(i=0;i<numsectors;i++)
|
||||
{
|
||||
P_Recalculate3DFloors(§ors[i]);
|
||||
}
|
||||
gl_RecreateAllAttachedLights();
|
||||
}
|
||||
|
||||
|
|
|
@ -607,6 +607,8 @@ bool AWeaponGiver::TryPickup(AActor *&toucher)
|
|||
if (weap != NULL)
|
||||
{
|
||||
weap->ItemFlags &= ~IF_ALWAYSPICKUP; // use the flag of this item only.
|
||||
if (weap->AmmoGive1 >= 0) weap->AmmoGive1 = AmmoGive1;
|
||||
if (weap->AmmoGive2 >= 0) weap->AmmoGive2 = AmmoGive2;
|
||||
bool res = weap->CallTryPickup(toucher);
|
||||
if (!res) weap->Destroy();
|
||||
else GoAwayAndDie();
|
||||
|
|
|
@ -104,11 +104,11 @@ struct FState
|
|||
if (setdefaultparams) ParameterIndex = 0;
|
||||
}
|
||||
}
|
||||
inline bool CallAction(AActor *self, StateCallData *statecall = NULL)
|
||||
inline bool CallAction(AActor *self, AActor *stateowner, StateCallData *statecall = NULL)
|
||||
{
|
||||
if (ActionFunc != NULL)
|
||||
{
|
||||
ActionFunc(self, this, ParameterIndex-1, statecall);
|
||||
ActionFunc(self, stateowner, this, ParameterIndex-1, statecall);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -5372,7 +5372,7 @@ int DLevelScript::RunScript ()
|
|||
switch (STACK(1))
|
||||
{
|
||||
case PLAYERINFO_TEAM: STACK(2) = userinfo->team; break;
|
||||
case PLAYERINFO_AIMDIST: STACK(2) = userinfo->aimdist; break;
|
||||
case PLAYERINFO_AIMDIST: STACK(2) = userinfo->GetAimDist(); break;
|
||||
case PLAYERINFO_COLOR: STACK(2) = userinfo->color; break;
|
||||
case PLAYERINFO_GENDER: STACK(2) = userinfo->gender; break;
|
||||
case PLAYERINFO_NEVERSWITCH: STACK(2) = userinfo->neverswitch; break;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ AActor *P_SpawnMissileZAimed (AActor *source, fixed_t z, AActor *dest, const PCl
|
|||
AActor *P_SpawnPlayerMissile (AActor* source, const PClass *type);
|
||||
AActor *P_SpawnPlayerMissile (AActor *source, const PClass *type, angle_t angle);
|
||||
AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, const PClass *type, angle_t angle,
|
||||
AActor **pLineTarget = NULL, AActor **MissileActor = NULL);
|
||||
AActor **pLineTarget = NULL, AActor **MissileActor = NULL, bool nofreeaim = false);
|
||||
|
||||
void P_CheckFakeFloorTriggers (AActor *mo, fixed_t oldz, bool oldz_has_viewheight=false);
|
||||
|
||||
|
|
|
@ -2920,7 +2920,7 @@ fixed_t P_AimLineAttack (AActor *t1, angle_t angle, fixed_t distance, AActor **p
|
|||
// vrange of 0 degrees, because then toppitch and bottompitch will
|
||||
// be equal, and PTR_AimTraverse will never find anything to shoot at
|
||||
// if it crosses a line.
|
||||
vrange = clamp (t1->player->userinfo.aimdist, ANGLE_1/2, ANGLE_1*35);
|
||||
vrange = clamp (t1->player->userinfo.GetAimDist(), ANGLE_1/2, ANGLE_1*35);
|
||||
}
|
||||
}
|
||||
aim.toppitch = t1->pitch - vrange;
|
||||
|
|
|
@ -521,7 +521,7 @@ bool AActor::SetState (FState *newstate)
|
|||
}
|
||||
}
|
||||
|
||||
if (newstate->CallAction(this))
|
||||
if (newstate->CallAction(this, this))
|
||||
{
|
||||
// Check whether the called action function resulted in destroying the actor
|
||||
if (ObjectFlags & OF_EuthanizeMe)
|
||||
|
@ -3217,13 +3217,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;
|
||||
|
@ -3239,9 +3253,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);
|
||||
|
@ -4812,24 +4823,27 @@ AActor *P_SpawnPlayerMissile (AActor *source, const PClass *type, angle_t angle)
|
|||
}
|
||||
|
||||
AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z,
|
||||
const PClass *type, angle_t angle, AActor **pLineTarget, AActor **pMissileActor)
|
||||
const PClass *type, angle_t angle, AActor **pLineTarget, AActor **pMissileActor,
|
||||
bool nofreeaim)
|
||||
{
|
||||
static const int angdiff[3] = { -1<<26, 1<<26, 0 };
|
||||
int i;
|
||||
angle_t an;
|
||||
angle_t pitch;
|
||||
AActor *linetarget;
|
||||
int vrange = nofreeaim? ANGLE_1*35 : 0;
|
||||
|
||||
// see which target is to be aimed at
|
||||
i = 2;
|
||||
do
|
||||
{
|
||||
an = angle + angdiff[i];
|
||||
pitch = P_AimLineAttack (source, an, 16*64*FRACUNIT, &linetarget);
|
||||
pitch = P_AimLineAttack (source, an, 16*64*FRACUNIT, &linetarget, vrange);
|
||||
|
||||
if (source->player != NULL &&
|
||||
!nofreeaim &&
|
||||
level.IsFreelookAllowed() &&
|
||||
source->player->userinfo.aimdist <= ANGLE_1/2)
|
||||
source->player->userinfo.GetAimDist() <= ANGLE_1/2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void P_SetPsprite (player_t *player, int position, FState *state)
|
|||
|
||||
if (player->mo != NULL)
|
||||
{
|
||||
if (state->CallAction(player->mo))
|
||||
if (state->CallAction(player->mo, player->ReadyWeapon))
|
||||
{
|
||||
if (!psp->state)
|
||||
{
|
||||
|
@ -648,7 +648,7 @@ angle_t P_BulletSlope (AActor *mo, AActor **pLineTarget)
|
|||
|
||||
if (mo->player != NULL &&
|
||||
level.IsFreelookAllowed() &&
|
||||
mo->player->userinfo.aimdist <= ANGLE_1/2)
|
||||
mo->player->userinfo.GetAimDist() <= ANGLE_1/2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -950,19 +950,36 @@ struct UDMFParser
|
|||
sec->ceilingplane.c = -FRACUNIT;
|
||||
sec->ceilingplane.ic = -FRACUNIT;
|
||||
|
||||
// [RH] Sectors default to white light with the default fade.
|
||||
// If they are outside (have a sky ceiling), they use the outside fog.
|
||||
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
|
||||
if (lightcolor == -1 && fadecolor == -1 && desaturation == -1)
|
||||
{
|
||||
if (fogMap == NULL)
|
||||
fogMap = GetSpecialLights (PalEntry (255,255,255), level.outsidefog, 0);
|
||||
sec->ColorMap = fogMap;
|
||||
// [RH] Sectors default to white light with the default fade.
|
||||
// If they are outside (have a sky ceiling), they use the outside fog.
|
||||
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
|
||||
{
|
||||
if (fogMap == NULL)
|
||||
fogMap = GetSpecialLights (PalEntry (255,255,255), level.outsidefog, 0);
|
||||
sec->ColorMap = fogMap;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (normMap == NULL)
|
||||
normMap = GetSpecialLights (PalEntry (255,255,255), level.fadeto, NormalLight.Desaturate);
|
||||
sec->ColorMap = normMap;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (normMap == NULL)
|
||||
normMap = GetSpecialLights (PalEntry (255,255,255), level.fadeto, NormalLight.Desaturate);
|
||||
sec->ColorMap = normMap;
|
||||
if (lightcolor == -1) lightcolor = PalEntry(255,255,255);
|
||||
if (fadecolor == -1)
|
||||
{
|
||||
if (level.outsidefog != 0xff000000 && (sec->GetTexture(sector_t::ceiling) == skyflatnum || (sec->special&0xff) == Sector_Outside))
|
||||
fadecolor = level.outsidefog;
|
||||
else
|
||||
fadecolor = level.fadeto;
|
||||
}
|
||||
if (desaturation == -1) desaturation = NormalLight.Desaturate;
|
||||
|
||||
sec->ColorMap = GetSpecialLights (lightcolor, fadecolor, desaturation);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "1355"
|
||||
#define ZD_SVN_REVISION_NUMBER 1355
|
||||
#define ZD_SVN_REVISION_STRING "1357"
|
||||
#define ZD_SVN_REVISION_NUMBER 1357
|
||||
|
|
|
@ -220,6 +220,13 @@ 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;
|
||||
gl_info = other->gl_info;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -351,26 +351,26 @@ struct StateCallData
|
|||
|
||||
// Macros to handle action functions. These are here so that I don't have to
|
||||
// change every single use in case the parameters change.
|
||||
#define DECLARE_ACTION(name) void AF_##name(AActor *self, FState *, int, StateCallData *);
|
||||
#define DECLARE_ACTION(name) void AF_##name(AActor *self, AActor *stateowner, FState *, int, StateCallData *);
|
||||
|
||||
// This distinction is here so that CALL_ACTION produces errors when trying to
|
||||
// access a function that requires parameters.
|
||||
#define DEFINE_ACTION_FUNCTION(cls, name) \
|
||||
void AF_##name (AActor *self, FState *, int, StateCallData *); \
|
||||
void AF_##name (AActor *self, AActor *stateowner, FState *, int, StateCallData *); \
|
||||
static AFuncDesc info_##cls##_##name = { #name, AF_##name }; \
|
||||
MSVC_ASEG AFuncDesc *infoptr_##cls##_##name GCC_ASEG = &info_##cls##_##name; \
|
||||
void AF_##name (AActor *self, FState *, int, StateCallData *statecall)
|
||||
void AF_##name (AActor *self, AActor *stateowner, FState *, int, StateCallData *statecall)
|
||||
|
||||
#define DEFINE_ACTION_FUNCTION_PARAMS(cls, name) \
|
||||
void AFP_##name (AActor *self, FState *CallingState, int ParameterIndex, StateCallData *statecall); \
|
||||
void AFP_##name (AActor *self, AActor *stateowner, FState *CallingState, int ParameterIndex, StateCallData *statecall); \
|
||||
static AFuncDesc info_##cls##_##name = { #name, AFP_##name }; \
|
||||
MSVC_ASEG AFuncDesc *infoptr_##cls##_##name GCC_ASEG = &info_##cls##_##name; \
|
||||
void AFP_##name (AActor *self, FState *CallingState, int ParameterIndex, StateCallData *statecall)
|
||||
void AFP_##name (AActor *self, AActor *stateowner, FState *CallingState, int ParameterIndex, StateCallData *statecall)
|
||||
|
||||
#define DECLARE_PARAMINFO AActor *self, FState *CallingState, int ParameterIndex, StateCallData *statecall
|
||||
#define PUSH_PARAMINFO self, CallingState, ParameterIndex, statecall
|
||||
#define DECLARE_PARAMINFO AActor *self, AActor *stateowner, FState *CallingState, int ParameterIndex, StateCallData *statecall
|
||||
#define PUSH_PARAMINFO self, stateowner, CallingState, ParameterIndex, statecall
|
||||
|
||||
#define CALL_ACTION(name,self) AF_##name(self, NULL, 0, NULL)
|
||||
#define CALL_ACTION(name,self) AF_##name(self, self, NULL, 0, NULL)
|
||||
|
||||
|
||||
int EvalExpressionI (DWORD x, AActor *self);
|
||||
|
@ -395,7 +395,7 @@ FName EvalExpressionName (DWORD x, AActor *self);
|
|||
#define ACTION_PARAM_CLASS(var,i) \
|
||||
const PClass *var = EvalExpressionClass(ParameterIndex+i, self);
|
||||
#define ACTION_PARAM_STATE(var,i) \
|
||||
FState *var = EvalExpressionState(ParameterIndex+i, self);
|
||||
FState *var = EvalExpressionState(ParameterIndex+i, stateowner);
|
||||
#define ACTION_PARAM_COLOR(var,i) \
|
||||
PalEntry var = EvalExpressionCol(ParameterIndex+i, self);
|
||||
#define ACTION_PARAM_SOUND(var,i) \
|
||||
|
|
|
@ -103,7 +103,7 @@ bool ACustomInventory::CallStateChain (AActor *actor, FState * State)
|
|||
// Assume success. The code pointer will set this to false if necessary
|
||||
StateCall.State = State;
|
||||
StateCall.Result = true;
|
||||
if (State->CallAction(actor, &StateCall))
|
||||
if (State->CallAction(actor, this, &StateCall))
|
||||
{
|
||||
// collect all the results. Even one successful call signifies overall success.
|
||||
result |= StateCall.Result;
|
||||
|
|
|
@ -2611,7 +2611,7 @@ FxExpression *FxMultiNameState::Resolve(FCompileContext &ctx)
|
|||
CHECKRESOLVED();
|
||||
if (names[0] == NAME_None)
|
||||
{
|
||||
scope = ctx.cls;
|
||||
scope = NULL;
|
||||
}
|
||||
else if (names[0] == NAME_Super)
|
||||
{
|
||||
|
|
|
@ -465,9 +465,11 @@ int V_GetColorFromString (const DWORD *palette, const char *cstr)
|
|||
c[1] = (color & 0xff00) >> 8;
|
||||
c[2] = (color & 0xff);
|
||||
}
|
||||
else goto normal;
|
||||
}
|
||||
else
|
||||
{
|
||||
normal:
|
||||
// Treat it as a space-delemited hexadecimal string
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue