2008-01-27 11:25:03 +00:00
|
|
|
// Emacs style mode select -*- C++ -*-
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Id:$
|
|
|
|
//
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
//
|
|
|
|
// This source is available for distribution and/or modification
|
|
|
|
// only under the terms of the DOOM Source Code License as
|
|
|
|
// published by id Software. All rights reserved.
|
|
|
|
//
|
|
|
|
// The source is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
// $Log:$
|
|
|
|
//
|
|
|
|
// DESCRIPTION:
|
|
|
|
// Implements special effects:
|
|
|
|
// Texture animation, height or lighting changes
|
|
|
|
// according to adjacent sectors, respective
|
|
|
|
// utility functions, etc.
|
|
|
|
// Line Tag handling. Line and Sector triggers.
|
|
|
|
// Implements donut linedef triggers
|
|
|
|
// Initializes and implements BOOM linedef triggers for
|
|
|
|
// Scrollers/Conveyors
|
|
|
|
// Friction
|
|
|
|
// Wind/Current
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "templates.h"
|
|
|
|
#include "doomdef.h"
|
|
|
|
#include "doomstat.h"
|
|
|
|
#include "gstrings.h"
|
|
|
|
|
|
|
|
#include "i_system.h"
|
|
|
|
#include "m_argv.h"
|
|
|
|
#include "m_random.h"
|
|
|
|
#include "m_bbox.h"
|
|
|
|
#include "w_wad.h"
|
|
|
|
|
|
|
|
#include "p_local.h"
|
|
|
|
#include "p_lnspec.h"
|
|
|
|
#include "p_terrain.h"
|
|
|
|
#include "p_acs.h"
|
2008-03-19 11:19:03 +00:00
|
|
|
#include "p_3dmidtex.h"
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
#include "g_game.h"
|
|
|
|
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "sc_man.h"
|
|
|
|
#include "gi.h"
|
|
|
|
#include "statnums.h"
|
2008-09-15 23:47:00 +00:00
|
|
|
#include "g_level.h"
|
2008-11-27 23:28:48 +00:00
|
|
|
#include "v_font.h"
|
2009-12-27 16:00:21 +00:00
|
|
|
#include "a_sharedglobal.h"
|
2011-07-06 18:59:20 +00:00
|
|
|
#include "farchive.h"
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
// State.
|
|
|
|
#include "r_state.h"
|
|
|
|
|
|
|
|
#include "c_console.h"
|
|
|
|
|
2011-07-06 15:39:10 +00:00
|
|
|
#include "r_data/r_interpolate.h"
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
static FRandom pr_playerinspecialsector ("PlayerInSpecialSector");
|
2009-12-28 17:16:58 +00:00
|
|
|
void P_SetupPortals();
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
// [GrafZahl] Make this message changable by the user! ;)
|
|
|
|
CVAR(String, secretmessage, "A Secret is revealed!", CVAR_ARCHIVE)
|
|
|
|
|
2008-06-08 09:24:55 +00:00
|
|
|
IMPLEMENT_POINTY_CLASS (DScroller)
|
|
|
|
DECLARE_POINTER (m_Interpolations[0])
|
|
|
|
DECLARE_POINTER (m_Interpolations[1])
|
|
|
|
DECLARE_POINTER (m_Interpolations[2])
|
|
|
|
END_POINTERS
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
IMPLEMENT_POINTY_CLASS (DPusher)
|
|
|
|
DECLARE_POINTER (m_Source)
|
|
|
|
END_POINTERS
|
|
|
|
|
2011-07-06 18:59:20 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DScroller::EScrollType &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DScroller::EScrollType)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
DScroller::DScroller ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void DScroller::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
|
|
|
arc << m_Type
|
|
|
|
<< m_dx << m_dy
|
|
|
|
<< m_Affectee
|
|
|
|
<< m_Control
|
|
|
|
<< m_LastHeight
|
|
|
|
<< m_vdx << m_vdy
|
2008-03-21 21:15:56 +00:00
|
|
|
<< m_Accel
|
2008-06-08 09:24:55 +00:00
|
|
|
<< m_Parts
|
|
|
|
<< m_Interpolations[0]
|
|
|
|
<< m_Interpolations[1]
|
|
|
|
<< m_Interpolations[2];
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DPusher::DPusher ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-07-06 18:59:20 +00:00
|
|
|
inline FArchive &operator<< (FArchive &arc, DPusher::EPusher &type)
|
|
|
|
{
|
|
|
|
BYTE val = (BYTE)type;
|
|
|
|
arc << val;
|
|
|
|
type = (DPusher::EPusher)val;
|
|
|
|
return arc;
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
void DPusher::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
|
|
|
arc << m_Type
|
|
|
|
<< m_Source
|
|
|
|
<< m_Xmag
|
|
|
|
<< m_Ymag
|
|
|
|
<< m_Magnitude
|
|
|
|
<< m_Radius
|
|
|
|
<< m_X
|
|
|
|
<< m_Y
|
|
|
|
<< m_Affectee;
|
|
|
|
}
|
|
|
|
|
|
|
|
// killough 3/7/98: Initialize generalized scrolling
|
|
|
|
static void P_SpawnScrollers();
|
|
|
|
static void P_SpawnFriction (); // phares 3/16/98
|
|
|
|
static void P_SpawnPushers (); // phares 3/20/98
|
|
|
|
|
|
|
|
|
|
|
|
// [RH] Check dmflags for noexit and respond accordingly
|
2008-02-14 13:07:19 +00:00
|
|
|
bool CheckIfExitIsGood (AActor *self, level_info_t *info)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-02-14 13:07:19 +00:00
|
|
|
cluster_info_t *cluster;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// The world can always exit itself.
|
|
|
|
if (self == NULL)
|
|
|
|
return true;
|
|
|
|
|
2008-12-28 13:27:13 +00:00
|
|
|
// We must kill all monsters to exit the level.
|
|
|
|
if ((dmflags2 & DF2_KILL_MONSTERS) && level.killed_monsters != level.total_monsters)
|
|
|
|
return false;
|
|
|
|
|
2008-02-14 13:07:19 +00:00
|
|
|
// Is this a deathmatch game and we're not allowed to exit?
|
2008-01-27 11:25:03 +00:00
|
|
|
if ((deathmatch || alwaysapplydmflags) && (dmflags & DF_NO_EXIT))
|
|
|
|
{
|
2009-08-07 19:34:42 +00:00
|
|
|
P_DamageMobj (self, self, self, TELEFRAG_DAMAGE, NAME_Exit);
|
2008-01-27 11:25:03 +00:00
|
|
|
return false;
|
|
|
|
}
|
2008-02-14 13:07:19 +00:00
|
|
|
// Is this a singleplayer game and the next map is part of the same hub and we're dead?
|
|
|
|
if (self->health <= 0 &&
|
|
|
|
!multiplayer &&
|
|
|
|
info != NULL &&
|
|
|
|
info->cluster == level.cluster &&
|
|
|
|
(cluster = FindClusterInfo(level.cluster)) != NULL &&
|
|
|
|
cluster->flags & CLUSTER_HUB)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
if (deathmatch)
|
|
|
|
{
|
|
|
|
Printf ("%s exited the level.\n", self->player->userinfo.netname);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// UTILITIES
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// RETURN NEXT SECTOR # THAT LINE TAG REFERS TO
|
|
|
|
//
|
|
|
|
|
|
|
|
// Find the next sector with a specified tag.
|
|
|
|
// Rewritten by Lee Killough to use chained hashing to improve speed
|
|
|
|
|
|
|
|
int P_FindSectorFromTag (int tag, int start)
|
|
|
|
{
|
|
|
|
start = start >= 0 ? sectors[start].nexttag :
|
|
|
|
sectors[(unsigned) tag % (unsigned) numsectors].firsttag;
|
|
|
|
while (start >= 0 && sectors[start].tag != tag)
|
|
|
|
start = sectors[start].nexttag;
|
|
|
|
return start;
|
|
|
|
}
|
|
|
|
|
|
|
|
// killough 4/16/98: Same thing, only for linedefs
|
|
|
|
|
|
|
|
int P_FindLineFromID (int id, int start)
|
|
|
|
{
|
|
|
|
start = start >= 0 ? lines[start].nextid :
|
|
|
|
lines[(unsigned) id % (unsigned) numlines].firstid;
|
|
|
|
while (start >= 0 && lines[start].id != id)
|
|
|
|
start = lines[start].nextid;
|
|
|
|
return start;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// P_ActivateLine
|
|
|
|
//
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
|
|
|
{
|
|
|
|
int lineActivation;
|
|
|
|
INTBOOL repeat;
|
|
|
|
INTBOOL buttonSuccess;
|
|
|
|
BYTE special;
|
|
|
|
|
|
|
|
if (!P_TestActivateLine (line, mo, side, activationType))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
lineActivation = line->activation;
|
2008-01-27 11:25:03 +00:00
|
|
|
repeat = line->flags & ML_REPEAT_SPECIAL;
|
|
|
|
buttonSuccess = false;
|
2011-02-13 20:26:04 +00:00
|
|
|
buttonSuccess = P_ExecuteSpecial(line->special,
|
|
|
|
line, mo, side == 1, line->args[0],
|
2008-01-27 11:25:03 +00:00
|
|
|
line->args[1], line->args[2],
|
|
|
|
line->args[3], line->args[4]);
|
|
|
|
|
|
|
|
special = line->special;
|
|
|
|
if (!repeat && buttonSuccess)
|
|
|
|
{ // clear the special on non-retriggerable lines
|
|
|
|
line->special = 0;
|
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
if (buttonSuccess)
|
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if (activationType == SPAC_Use || activationType == SPAC_Impact)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
P_ChangeSwitchTexture (line->sidedef[0], repeat, special);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// some old WADs use this method to create walls that change the texture when shot.
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
else if (activationType == SPAC_Impact && // only for shootable triggers
|
2009-02-05 00:06:30 +00:00
|
|
|
(level.flags2 & LEVEL2_DUMMYSWITCHES) && // this is only a compatibility setting for an old hack!
|
2008-01-27 11:25:03 +00:00
|
|
|
!repeat && // only non-repeatable triggers
|
|
|
|
(special<Generic_Floor || special>Generic_Crusher) && // not for Boom's generalized linedefs
|
|
|
|
special && // not for lines without a special
|
- Fixed: When walking on sloped 3D-floors, P_TryMove got the floor position from the
sector's actual floor instead from the 3D-floor.
- Fixed: Brightmaps were not disabled when fog was defined with a fadetable command in
MAPINFO.
Update to ZDoom r994:
- Fixed: The compatibility searches for teleport destinations did not work
properly when the teleporter had both a tid and a tag. Now, if a teleporter
has a tag these are skipped because they are only present for Hexen
compatibility.
- Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.)
- Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for
automatic fake contrast.
- Changed: Fake contrast now uses the WALLF_AUTOCONTRAST globally instead
of manipulating the sides' light values individually. This allows changing
the fake contrast at run time and also allows adding individual relative
lighting on top of it which is a planned UDMF feature.
- Fixed: ActorStencilColor() did not set the palette part of the actor's
fill color, so it would always produce black for STYLE_Shaded.
- Added volume reduction for stereo sounds played in 3D to obtain levels
closer to FMOD 3, which downmixed all stereo sounds to mono before
playing them in 3D. Also added experimental 3D spread for stereo sounds
so that you can actually hear them in stereo.
- Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
railing handling and shooting lines with a non-zero but unassigned tag.)
With UDMF such semantics have to be handled diffently.
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.
- Fixed: When R_DrawTiltedPlane() calculates the p vector, it can overflow
if the view is near the bounds of the fixed point coordinate system. This
happens because it rotates the view position around (0,0) according to
the current viewangle, so the resultant coordinate may be outside the
bounds of fixed point. All important math in this function is now done
entirely in floating point.
- Fixed: Slopes didn't draw right on 64-bit platforms.
- Fixed: With hardware 2D, the console and menu need not reimplement palette
flashes to ensure their visibility.
- Fixed: DFlashFader::Destroy() did not call its super method.
- Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.
- Since KDIZD is the only mapset I know of that used reverb, and it didn't
define any new ones of its own, I'm pre-emptively renaming the SNDEAX lump
to REVERBS to remove any possible misunderstanding that this is something
that requires EAX hardware support. (Ideally, it would have been REVERBDEF,
but that's 10 characters long.) The eaxedit console command has also been
renamed to reverbedit for the same reason.
- Fixed: The Palette part of FRemapTable was not initialized with alpha values
other than 0. I'm not sure if it would be better to fix this in the game
palette that it copies from or not, but right now, they get set
unconditionally to 255.
- Fixed: M_DrawSave() and M_DrawLoad() need to use GetScaledWidth(), in case
the texture is high-res.
- Replaced all instances of "flags +=" in sbarinfo_parser.cpp with "flags |="
so that using the same flag multiple times will not have unexpected results.
(sbarinfo update #21)
- Added: sigil image type to correctly draw the sigil's icon.
- Added: Strife inventory bar style. This is the only style that is radically
different from the others. First of all it changes the SELECTBO to be
INVCURS and draws it before the icons. Each box is changed to have a width
of 35 pixels instead of 31 pixels. And the INVCURS graphic is drawn at
(x-6, y-2).
- Added: whennnotzero flag to drawnumber which will cause it to draw nothing if
the value is 0.
- Fixed: New mugshot code would not leave the god state when it was supposed to
enter the rampage state.
- Fixed: The ouch state was mostly broken.
(SBarInfo Update #20)
- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second
ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status
bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
In addition the state change to and from god mode was not quite as responsive
as the original code.
- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as
intended will not work.
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
preserving whatever was underneath in the texture box previously.
- Fixed: s_sound.cpp had its own idea of whether or not sounds were paused
and did not entirely keep it in sync with the sound system's. This meant
that when starting a new game from the menu, all sounds were played as
menu sounds until you did something to pause the game, because s_sound.cpp
thought sounds were unpaused, while the FMOD system thought they were.
- I finally managed to test the translucency options for composite texture
definitions in HIRESTEX. The feature should be complete now.
- Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the
DECORATE convention.
- Added Snowkate709's A_CheckTargetInLOS addition.
- Added listmaps CCMD.
- Revised underwater effect now uses a lowpass filter in combination with an
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.
- Fixed: FBarShader::GetColumn() passed incorrect information to the software
renderer for horizontal bars.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@107 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-23 17:58:17 +00:00
|
|
|
line->args[0] == line->id && // Safety check: exclude edited UDMF linedefs or ones that don't map the tag to args[0]
|
|
|
|
line->args[0] && // only if there's a tag (which is stored in the first arg)
|
2008-01-27 11:25:03 +00:00
|
|
|
P_FindSectorFromTag (line->args[0], -1) == -1) // only if no sector is tagged to this linedef
|
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
P_ChangeSwitchTexture (line->sidedef[0], repeat, special);
|
2008-01-27 11:25:03 +00:00
|
|
|
line->special = 0;
|
|
|
|
}
|
|
|
|
// end of changed code
|
|
|
|
if (developer && buttonSuccess)
|
|
|
|
{
|
2010-09-23 07:58:51 +00:00
|
|
|
Printf ("Line special %d activated on line %i\n", special, int(line - lines));
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// P_TestActivateLine
|
|
|
|
//
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
int lineActivation = line->activation;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if (line->flags & ML_FIRSTSIDEONLY && side == 1)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
return false;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
|
|
|
|
if (lineActivation & SPAC_UseThrough)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
lineActivation |= SPAC_Use;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else if (line->special == Teleport &&
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
(lineActivation & SPAC_Cross) &&
|
|
|
|
activationType == SPAC_PCross &&
|
2008-01-27 11:25:03 +00:00
|
|
|
mo != NULL &&
|
|
|
|
mo->flags & MF_MISSILE)
|
|
|
|
{ // Let missiles use regular player teleports
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
lineActivation |= SPAC_PCross;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
// BOOM's generalized line types that allow monster use can actually be
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
// activated by anything except projectiles.
|
|
|
|
if (lineActivation & SPAC_AnyCross)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
lineActivation |= SPAC_Cross|SPAC_MCross;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
2010-04-25 08:22:26 +00:00
|
|
|
if (activationType ==SPAC_Use || activationType == SPAC_UseBack)
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
{
|
2009-10-30 11:18:39 +00:00
|
|
|
if (!P_CheckSwitchRange(mo, line, side))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
2008-03-19 11:19:03 +00:00
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if ((lineActivation & activationType) == 0)
|
2008-03-19 11:19:03 +00:00
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if (activationType == SPAC_Use && (lineActivation & SPAC_MUse) && !mo->player && mo->flags4 & MF4_CANUSEWALLS)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (activationType == SPAC_Push && (lineActivation & SPAC_MPush) && !mo->player && mo->flags2 & MF2_PUSHWALL)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
if (activationType != SPAC_MCross || lineActivation != SPAC_Cross)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2008-03-19 11:19:03 +00:00
|
|
|
}
|
2009-09-27 07:11:21 +00:00
|
|
|
if (activationType == SPAC_AnyCross && (lineActivation & activationType))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
if (mo && !mo->player &&
|
|
|
|
!(mo->flags & MF_MISSILE) &&
|
|
|
|
!(line->flags & ML_MONSTERSCANACTIVATE) &&
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
(activationType != SPAC_MCross || (!(lineActivation & SPAC_MCross))))
|
|
|
|
{
|
|
|
|
// [RH] monsters' ability to activate this line depends on its type
|
2008-01-27 11:25:03 +00:00
|
|
|
// In Hexen, only MCROSS lines could be activated by monsters. With
|
|
|
|
// lax activation checks, monsters can also activate certain lines
|
|
|
|
// even without them being marked as monster activate-able. This is
|
|
|
|
// the default for non-Hexen maps in Hexen format.
|
2009-02-05 00:06:30 +00:00
|
|
|
if (!(level.flags2 & LEVEL2_LAXMONSTERACTIVATION))
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if ((activationType == SPAC_Use || activationType == SPAC_Push)
|
2008-01-27 11:25:03 +00:00
|
|
|
&& (line->flags & ML_SECRET))
|
|
|
|
return false; // never open secret doors
|
|
|
|
|
|
|
|
bool noway = true;
|
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
switch (activationType)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
case SPAC_Use:
|
|
|
|
case SPAC_Push:
|
2008-01-27 11:25:03 +00:00
|
|
|
switch (line->special)
|
|
|
|
{
|
|
|
|
case Door_Raise:
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if (line->args[0] == 0 && line->args[1] < 64)
|
|
|
|
noway = false;
|
|
|
|
break;
|
2008-01-27 11:25:03 +00:00
|
|
|
case Teleport:
|
|
|
|
case Teleport_NoFog:
|
|
|
|
noway = false;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
case SPAC_MCross:
|
|
|
|
if (!(lineActivation & SPAC_MCross))
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
switch (line->special)
|
|
|
|
{
|
|
|
|
case Door_Raise:
|
|
|
|
if (line->args[1] >= 64)
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case Teleport:
|
|
|
|
case Teleport_NoFog:
|
|
|
|
case Teleport_Line:
|
|
|
|
case Plat_DownWaitUpStayLip:
|
|
|
|
case Plat_DownWaitUpStay:
|
2008-01-27 11:25:03 +00:00
|
|
|
noway = false;
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
else noway = false;
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
noway = false;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
return !noway;
|
|
|
|
}
|
- Fixed: The hitscan tracer had the current sector point to a temporary variable
when 3D floors were involved.
Update to ZDoom r965:
- Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.
- Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
UDMF can define up to 16 of each. Also separated easy/baby and
hard/nightmare and changed default MAPINFO definitions.
- Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixed: Need write barriers when modifying SequenceListHead.
- Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
respectively.
- Changed: Crosshair drawing uses the current player class's default health instead
of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
all user settable flags from MoreFlags into their own Flags variable.
- Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
may not be compatible with TiMidity++'s soundfont extensions.
- Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.
- Added support for quoted strings to the TiMidity config parser.
- Split off the slope creation code from p_Setup.cpp into its own file.
- Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
is not usable from Hexen or Doom format maps though but in preparation of
the UDMF format discussed here:
http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp
- Fixed: Warped textures didn't work anymore because the default speed was 0.
- Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@103 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-12 09:58:47 +00:00
|
|
|
if (activationType == SPAC_MCross && !(lineActivation & SPAC_MCross) &&
|
2008-01-27 11:25:03 +00:00
|
|
|
!(line->flags & ML_MONSTERSCANACTIVATE))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// P_PlayerInSpecialSector
|
|
|
|
// Called every tic frame
|
|
|
|
// that the player origin is in a special sector
|
|
|
|
//
|
|
|
|
void P_PlayerInSpecialSector (player_t *player, sector_t * sector)
|
|
|
|
{
|
|
|
|
if (sector == NULL)
|
|
|
|
{
|
|
|
|
// Falling, not all the way down yet?
|
|
|
|
sector = player->mo->Sector;
|
|
|
|
if (player->mo->z != sector->floorplane.ZatPoint (player->mo->x, player->mo->y)
|
|
|
|
&& !player->mo->waterlevel)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int special = sector->special & ~SECRET_MASK;
|
|
|
|
|
|
|
|
// Has hit ground.
|
|
|
|
AInventory *ironfeet;
|
|
|
|
|
|
|
|
// Allow subclasses. Better would be to implement it as armor and let that reduce
|
|
|
|
// the damage as part of the normal damage procedure. Unfortunately, I don't have
|
|
|
|
// different damage types yet, so that's not happening for now.
|
|
|
|
for (ironfeet = player->mo->Inventory; ironfeet != NULL; ironfeet = ironfeet->Inventory)
|
|
|
|
{
|
|
|
|
if (ironfeet->IsKindOf (RUNTIME_CLASS(APowerIronFeet)))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Normal DOOM special or BOOM specialized?
|
|
|
|
if (special >= dLight_Flicker && special <= 255)
|
|
|
|
{
|
|
|
|
switch (special)
|
|
|
|
{
|
|
|
|
case Sector_Heal:
|
|
|
|
// CoD's healing sector
|
|
|
|
if (!(level.time & 0x1f))
|
|
|
|
P_GiveBody (player->mo, 1);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Damage_InstantDeath:
|
|
|
|
// Strife's instant death sector
|
2008-03-01 09:53:54 +00:00
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 999, NAME_InstantDeath);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case dDamage_Hellslime:
|
|
|
|
// HELLSLIME DAMAGE
|
|
|
|
if (ironfeet == NULL && !(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 10, NAME_Slime);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dDamage_Nukage:
|
|
|
|
// NUKAGE DAMAGE
|
|
|
|
case sLight_Strobe_Hurt:
|
|
|
|
if (ironfeet == NULL && !(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 5, NAME_Slime);
|
|
|
|
break;
|
|
|
|
|
2010-04-26 11:42:28 +00:00
|
|
|
case hDamage_Sludge:
|
|
|
|
if (ironfeet == NULL && !(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 4, NAME_Slime);
|
|
|
|
break;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
case dDamage_SuperHellslime:
|
|
|
|
// SUPER HELLSLIME DAMAGE
|
|
|
|
case dLight_Strobe_Hurt:
|
|
|
|
// STROBE HURT
|
|
|
|
if (ironfeet == NULL || pr_playerinspecialsector() < 5)
|
|
|
|
{
|
|
|
|
if (!(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 20, NAME_Slime);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sDamage_Hellslime:
|
|
|
|
if (ironfeet == NULL)
|
|
|
|
player->hazardcount += 2;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sDamage_SuperHellslime:
|
|
|
|
if (ironfeet == NULL)
|
|
|
|
player->hazardcount += 4;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dDamage_End:
|
|
|
|
// EXIT SUPER DAMAGE! (for E1M8 finale)
|
|
|
|
player->cheats &= ~CF_GODMODE;
|
|
|
|
|
|
|
|
if (!(level.time & 0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 20, NAME_None);
|
|
|
|
|
|
|
|
if (player->health <= 10 && (!deathmatch || !(dmflags & DF_NO_EXIT)))
|
|
|
|
G_ExitLevel(0, false);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dDamage_LavaWimpy:
|
|
|
|
case dScroll_EastLavaDamage:
|
|
|
|
if (!(level.time & 15))
|
|
|
|
{
|
|
|
|
P_DamageMobj(player->mo, NULL, NULL, 5, NAME_Fire);
|
|
|
|
P_HitFloor(player->mo);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dDamage_LavaHefty:
|
|
|
|
if(!(level.time & 15))
|
|
|
|
{
|
|
|
|
P_DamageMobj(player->mo, NULL, NULL, 8, NAME_Fire);
|
|
|
|
P_HitFloor(player->mo);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
// [RH] Ignore unknown specials
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//jff 3/14/98 handle extended sector types for secrets and damage
|
|
|
|
switch (special & DAMAGE_MASK)
|
|
|
|
{
|
|
|
|
case 0x000: // no damage
|
|
|
|
break;
|
|
|
|
case 0x100: // 2/5 damage per 31 ticks
|
|
|
|
if (ironfeet == NULL && !(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 5, NAME_Fire);
|
|
|
|
break;
|
|
|
|
case 0x200: // 5/10 damage per 31 ticks
|
|
|
|
if (ironfeet == NULL && !(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 10, NAME_Slime);
|
|
|
|
break;
|
|
|
|
case 0x300: // 10/20 damage per 31 ticks
|
|
|
|
if (ironfeet == NULL
|
|
|
|
|| pr_playerinspecialsector() < 5) // take damage even with suit
|
|
|
|
{
|
|
|
|
if (!(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, 20, NAME_Slime);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// [RH] Apply any customizable damage
|
|
|
|
if (sector->damage)
|
|
|
|
{
|
|
|
|
if (sector->damage < 20)
|
|
|
|
{
|
|
|
|
if (ironfeet == NULL && !(level.time&0x1f))
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, sector->damage, MODtoDamageType (sector->mod));
|
|
|
|
}
|
|
|
|
else if (sector->damage < 50)
|
|
|
|
{
|
|
|
|
if ((ironfeet == NULL || (pr_playerinspecialsector()<5))
|
|
|
|
&& !(level.time&0x1f))
|
|
|
|
{
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, sector->damage, MODtoDamageType (sector->mod));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, sector->damage, MODtoDamageType (sector->mod));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sector->special & SECRET_MASK)
|
|
|
|
{
|
|
|
|
sector->special &= ~SECRET_MASK;
|
2010-09-19 08:00:43 +00:00
|
|
|
P_GiveSecret(player->mo, true, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// P_GiveSecret
|
|
|
|
//
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
void P_GiveSecret(AActor *actor, bool printmessage, bool playsound)
|
|
|
|
{
|
|
|
|
if (actor != NULL)
|
|
|
|
{
|
|
|
|
if (actor->player != NULL)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2010-09-19 08:00:43 +00:00
|
|
|
actor->player->secretcount++;
|
|
|
|
}
|
|
|
|
if (actor->CheckLocalView (consoleplayer))
|
|
|
|
{
|
|
|
|
if (printmessage) C_MidPrint (SmallFont, secretmessage);
|
|
|
|
if (playsound) S_Sound (CHAN_AUTO, "misc/secret", 1, ATTN_NORM);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
2010-09-19 08:00:43 +00:00
|
|
|
level.found_secrets++;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// P_PlayerOnSpecialFlat
|
|
|
|
//
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
void P_PlayerOnSpecialFlat (player_t *player, int floorType)
|
|
|
|
{
|
|
|
|
if (player->mo->z > player->mo->Sector->floorplane.ZatPoint (
|
|
|
|
player->mo->x, player->mo->y) &&
|
|
|
|
!player->mo->waterlevel)
|
|
|
|
{ // Player is not touching the floor
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (Terrains[floorType].DamageAmount &&
|
|
|
|
!(level.time & Terrains[floorType].DamageTimeMask))
|
|
|
|
{
|
2008-03-22 21:31:14 +00:00
|
|
|
AInventory *ironfeet = NULL;
|
|
|
|
|
|
|
|
if (Terrains[floorType].AllowProtection)
|
|
|
|
{
|
|
|
|
for (ironfeet = player->mo->Inventory; ironfeet != NULL; ironfeet = ironfeet->Inventory)
|
|
|
|
{
|
|
|
|
if (ironfeet->IsKindOf (RUNTIME_CLASS(APowerIronFeet)))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ironfeet == NULL)
|
|
|
|
{
|
|
|
|
P_DamageMobj (player->mo, NULL, NULL, Terrains[floorType].DamageAmount,
|
|
|
|
Terrains[floorType].DamageMOD);
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
if (Terrains[floorType].Splash != -1)
|
|
|
|
{
|
2008-06-15 17:17:31 +00:00
|
|
|
S_Sound (player->mo, CHAN_AUTO,
|
2008-01-27 11:25:03 +00:00
|
|
|
Splashes[Terrains[floorType].Splash].NormalSplashSound, 1,
|
|
|
|
ATTN_IDLE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// P_UpdateSpecials
|
|
|
|
// Animate planes, scroll walls, etc.
|
|
|
|
//
|
|
|
|
EXTERN_CVAR (Float, timelimit)
|
|
|
|
|
|
|
|
void P_UpdateSpecials ()
|
|
|
|
{
|
|
|
|
// LEVEL TIMER
|
|
|
|
if (deathmatch && timelimit)
|
|
|
|
{
|
|
|
|
if (level.maptime >= (int)(timelimit * TICRATE * 60))
|
|
|
|
{
|
|
|
|
Printf ("%s\n", GStrings("TXT_TIMELIMIT"));
|
|
|
|
G_ExitLevel(0, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// SPECIAL SPAWNING
|
|
|
|
//
|
|
|
|
|
|
|
|
CUSTOM_CVAR (Bool, forcewater, false, CVAR_ARCHIVE|CVAR_SERVERINFO)
|
|
|
|
{
|
|
|
|
if (gamestate == GS_LEVEL)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < numsectors; i++)
|
|
|
|
{
|
2009-05-23 10:24:33 +00:00
|
|
|
sector_t *hsec = sectors[i].GetHeightSec();
|
|
|
|
if (hsec &&
|
2008-01-27 11:25:03 +00:00
|
|
|
!(sectors[i].heightsec->MoreFlags & SECF_UNDERWATER))
|
|
|
|
{
|
|
|
|
if (self)
|
|
|
|
{
|
2009-05-23 10:24:33 +00:00
|
|
|
hsec->MoreFlags |= SECF_FORCEDUNDERWATER;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-05-23 10:24:33 +00:00
|
|
|
hsec->MoreFlags &= ~SECF_FORCEDUNDERWATER;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DLightTransfer : public DThinker
|
|
|
|
{
|
Update to ZDoom r1146 (warning: massive changes ahead!)
- Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
into misc1 with SF_BIGTIC anymore.
- Changed sprite processing so that sprite names are converted to indices
during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the
internal property parser which is no longer needed.
- Converted the Heresiarch to DECORATE.
- Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.
- Changed Windows to use the performance counter instead of rdtsc.
- Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
processors.
- Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with
DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
number.
- Added Gez's Freedoom detection patch.
- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
- Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
- Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
- Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.
- Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
the burning hand states to StrifePlayer where they really belong.
- Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.
- Fixed. The Firedemon was missing a game filter.
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.
- Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.
- Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.
- Added: fullscreenoffsets flag for status bars. This changes the coordinate
system to be relative to the top left corner of the screen. This is useful
for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
to determine the spacing. Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
- Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.
- Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.
- Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
meta-data strings.
- Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.
- Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.
- Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.
- Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
for replacement actors.
- Added more DECORATE conversions by Karate Chris.
- Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability
reasons.
- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
instead of requiring a separate SetPosition() call to do it.
- Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
|
|
|
DECLARE_CLASS (DLightTransfer, DThinker)
|
|
|
|
|
|
|
|
DLightTransfer() {}
|
2008-01-27 11:25:03 +00:00
|
|
|
public:
|
|
|
|
DLightTransfer (sector_t *srcSec, int target, bool copyFloor);
|
|
|
|
void Serialize (FArchive &arc);
|
|
|
|
void Tick ();
|
|
|
|
|
|
|
|
protected:
|
2011-06-12 09:08:10 +00:00
|
|
|
static void DoTransfer (int level, int target, bool floor);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
sector_t *Source;
|
|
|
|
int TargetTag;
|
|
|
|
bool CopyFloor;
|
2011-06-12 09:08:10 +00:00
|
|
|
short LastLight;
|
2008-01-27 11:25:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
IMPLEMENT_CLASS (DLightTransfer)
|
|
|
|
|
|
|
|
void DLightTransfer::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
2011-06-12 09:08:10 +00:00
|
|
|
if (SaveVersion < 3223)
|
|
|
|
{
|
|
|
|
BYTE bytelight;
|
|
|
|
arc << bytelight;
|
|
|
|
LastLight = bytelight;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
arc << LastLight;
|
|
|
|
}
|
|
|
|
arc << Source << TargetTag << CopyFloor;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DLightTransfer::DLightTransfer (sector_t *srcSec, int target, bool copyFloor)
|
|
|
|
{
|
|
|
|
int secnum;
|
|
|
|
|
|
|
|
Source = srcSec;
|
|
|
|
TargetTag = target;
|
|
|
|
CopyFloor = copyFloor;
|
|
|
|
DoTransfer (LastLight = srcSec->lightlevel, target, copyFloor);
|
|
|
|
|
|
|
|
if (copyFloor)
|
|
|
|
{
|
|
|
|
for (secnum = -1; (secnum = P_FindSectorFromTag (target, secnum)) >= 0; )
|
2009-09-17 18:18:06 +00:00
|
|
|
sectors[secnum].ChangeFlags(sector_t::floor, 0, PLANEF_ABSLIGHTING);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (secnum = -1; (secnum = P_FindSectorFromTag (target, secnum)) >= 0; )
|
2009-09-17 18:18:06 +00:00
|
|
|
sectors[secnum].ChangeFlags(sector_t::ceiling, 0, PLANEF_ABSLIGHTING);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
ChangeStatNum (STAT_LIGHTTRANSFER);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DLightTransfer::Tick ()
|
|
|
|
{
|
2011-06-12 09:08:10 +00:00
|
|
|
int light = Source->lightlevel;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
if (light != LastLight)
|
|
|
|
{
|
|
|
|
LastLight = light;
|
|
|
|
DoTransfer (light, TargetTag, CopyFloor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-12 09:08:10 +00:00
|
|
|
void DLightTransfer::DoTransfer (int level, int target, bool floor)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
int secnum;
|
|
|
|
|
|
|
|
if (floor)
|
|
|
|
{
|
|
|
|
for (secnum = -1; (secnum = P_FindSectorFromTag (target, secnum)) >= 0; )
|
2008-08-22 07:36:50 +00:00
|
|
|
sectors[secnum].SetPlaneLight(sector_t::floor, level);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (secnum = -1; (secnum = P_FindSectorFromTag (target, secnum)) >= 0; )
|
2008-08-22 07:36:50 +00:00
|
|
|
sectors[secnum].SetPlaneLight(sector_t::ceiling, level);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class DWallLightTransfer : public DThinker
|
|
|
|
{
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
WLF_SIDE1=1,
|
|
|
|
WLF_SIDE2=2,
|
|
|
|
WLF_NOFAKECONTRAST=4
|
|
|
|
};
|
|
|
|
|
Update to ZDoom r1146 (warning: massive changes ahead!)
- Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
into misc1 with SF_BIGTIC anymore.
- Changed sprite processing so that sprite names are converted to indices
during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the
internal property parser which is no longer needed.
- Converted the Heresiarch to DECORATE.
- Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.
- Changed Windows to use the performance counter instead of rdtsc.
- Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
processors.
- Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with
DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
number.
- Added Gez's Freedoom detection patch.
- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
- Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
- Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
- Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.
- Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
the burning hand states to StrifePlayer where they really belong.
- Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.
- Fixed. The Firedemon was missing a game filter.
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.
- Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.
- Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.
- Added: fullscreenoffsets flag for status bars. This changes the coordinate
system to be relative to the top left corner of the screen. This is useful
for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
to determine the spacing. Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
- Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.
- Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.
- Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
meta-data strings.
- Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.
- Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.
- Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.
- Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
for replacement actors.
- Added more DECORATE conversions by Karate Chris.
- Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability
reasons.
- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
instead of requiring a separate SetPosition() call to do it.
- Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
|
|
|
DECLARE_CLASS (DWallLightTransfer, DThinker)
|
|
|
|
DWallLightTransfer() {}
|
2008-01-27 11:25:03 +00:00
|
|
|
public:
|
|
|
|
DWallLightTransfer (sector_t *srcSec, int target, BYTE flags);
|
|
|
|
void Serialize (FArchive &arc);
|
|
|
|
void Tick ();
|
|
|
|
|
|
|
|
protected:
|
2011-06-12 09:08:10 +00:00
|
|
|
static void DoTransfer (short level, int target, BYTE flags);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
sector_t *Source;
|
|
|
|
int TargetID;
|
2011-06-12 09:08:10 +00:00
|
|
|
short LastLight;
|
|
|
|
BYTE Flags;
|
2008-01-27 11:25:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
IMPLEMENT_CLASS (DWallLightTransfer)
|
|
|
|
|
|
|
|
void DWallLightTransfer::Serialize (FArchive &arc)
|
|
|
|
{
|
|
|
|
Super::Serialize (arc);
|
2011-06-12 09:08:10 +00:00
|
|
|
if (SaveVersion < 3223)
|
|
|
|
{
|
|
|
|
BYTE bytelight;
|
|
|
|
arc << bytelight;
|
|
|
|
LastLight = bytelight;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
arc << LastLight;
|
|
|
|
}
|
|
|
|
arc << Source << TargetID << Flags;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DWallLightTransfer::DWallLightTransfer (sector_t *srcSec, int target, BYTE flags)
|
|
|
|
{
|
|
|
|
int linenum;
|
|
|
|
int wallflags;
|
|
|
|
|
|
|
|
Source = srcSec;
|
|
|
|
TargetID = target;
|
|
|
|
Flags = flags;
|
2011-06-12 09:08:10 +00:00
|
|
|
DoTransfer (LastLight = srcSec->GetLightLevel(), target, Flags);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2011-06-12 09:08:10 +00:00
|
|
|
if (!(flags & WLF_NOFAKECONTRAST))
|
|
|
|
{
|
|
|
|
wallflags = WALLF_ABSLIGHTING;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
wallflags = WALLF_ABSLIGHTING | WALLF_NOFAKECONTRAST;
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
for (linenum = -1; (linenum = P_FindLineFromID (target, linenum)) >= 0; )
|
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
if (flags & WLF_SIDE1 && lines[linenum].sidedef[0] != NULL)
|
- Fixed: When walking on sloped 3D-floors, P_TryMove got the floor position from the
sector's actual floor instead from the 3D-floor.
- Fixed: Brightmaps were not disabled when fog was defined with a fadetable command in
MAPINFO.
Update to ZDoom r994:
- Fixed: The compatibility searches for teleport destinations did not work
properly when the teleporter had both a tid and a tag. Now, if a teleporter
has a tag these are skipped because they are only present for Hexen
compatibility.
- Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.)
- Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for
automatic fake contrast.
- Changed: Fake contrast now uses the WALLF_AUTOCONTRAST globally instead
of manipulating the sides' light values individually. This allows changing
the fake contrast at run time and also allows adding individual relative
lighting on top of it which is a planned UDMF feature.
- Fixed: ActorStencilColor() did not set the palette part of the actor's
fill color, so it would always produce black for STYLE_Shaded.
- Added volume reduction for stereo sounds played in 3D to obtain levels
closer to FMOD 3, which downmixed all stereo sounds to mono before
playing them in 3D. Also added experimental 3D spread for stereo sounds
so that you can actually hear them in stereo.
- Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
railing handling and shooting lines with a non-zero but unassigned tag.)
With UDMF such semantics have to be handled diffently.
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.
- Fixed: When R_DrawTiltedPlane() calculates the p vector, it can overflow
if the view is near the bounds of the fixed point coordinate system. This
happens because it rotates the view position around (0,0) according to
the current viewangle, so the resultant coordinate may be outside the
bounds of fixed point. All important math in this function is now done
entirely in floating point.
- Fixed: Slopes didn't draw right on 64-bit platforms.
- Fixed: With hardware 2D, the console and menu need not reimplement palette
flashes to ensure their visibility.
- Fixed: DFlashFader::Destroy() did not call its super method.
- Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.
- Since KDIZD is the only mapset I know of that used reverb, and it didn't
define any new ones of its own, I'm pre-emptively renaming the SNDEAX lump
to REVERBS to remove any possible misunderstanding that this is something
that requires EAX hardware support. (Ideally, it would have been REVERBDEF,
but that's 10 characters long.) The eaxedit console command has also been
renamed to reverbedit for the same reason.
- Fixed: The Palette part of FRemapTable was not initialized with alpha values
other than 0. I'm not sure if it would be better to fix this in the game
palette that it copies from or not, but right now, they get set
unconditionally to 255.
- Fixed: M_DrawSave() and M_DrawLoad() need to use GetScaledWidth(), in case
the texture is high-res.
- Replaced all instances of "flags +=" in sbarinfo_parser.cpp with "flags |="
so that using the same flag multiple times will not have unexpected results.
(sbarinfo update #21)
- Added: sigil image type to correctly draw the sigil's icon.
- Added: Strife inventory bar style. This is the only style that is radically
different from the others. First of all it changes the SELECTBO to be
INVCURS and draws it before the icons. Each box is changed to have a width
of 35 pixels instead of 31 pixels. And the INVCURS graphic is drawn at
(x-6, y-2).
- Added: whennnotzero flag to drawnumber which will cause it to draw nothing if
the value is 0.
- Fixed: New mugshot code would not leave the god state when it was supposed to
enter the rampage state.
- Fixed: The ouch state was mostly broken.
(SBarInfo Update #20)
- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second
ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status
bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
In addition the state change to and from god mode was not quite as responsive
as the original code.
- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as
intended will not work.
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
preserving whatever was underneath in the texture box previously.
- Fixed: s_sound.cpp had its own idea of whether or not sounds were paused
and did not entirely keep it in sync with the sound system's. This meant
that when starting a new game from the menu, all sounds were played as
menu sounds until you did something to pause the game, because s_sound.cpp
thought sounds were unpaused, while the FMOD system thought they were.
- I finally managed to test the translucency options for composite texture
definitions in HIRESTEX. The feature should be complete now.
- Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the
DECORATE convention.
- Added Snowkate709's A_CheckTargetInLOS addition.
- Added listmaps CCMD.
- Revised underwater effect now uses a lowpass filter in combination with an
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.
- Fixed: FBarShader::GetColumn() passed incorrect information to the software
renderer for horizontal bars.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@107 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-23 17:58:17 +00:00
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
lines[linenum].sidedef[0]->Flags |= wallflags;
|
- Fixed: When walking on sloped 3D-floors, P_TryMove got the floor position from the
sector's actual floor instead from the 3D-floor.
- Fixed: Brightmaps were not disabled when fog was defined with a fadetable command in
MAPINFO.
Update to ZDoom r994:
- Fixed: The compatibility searches for teleport destinations did not work
properly when the teleporter had both a tid and a tag. Now, if a teleporter
has a tag these are skipped because they are only present for Hexen
compatibility.
- Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.)
- Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for
automatic fake contrast.
- Changed: Fake contrast now uses the WALLF_AUTOCONTRAST globally instead
of manipulating the sides' light values individually. This allows changing
the fake contrast at run time and also allows adding individual relative
lighting on top of it which is a planned UDMF feature.
- Fixed: ActorStencilColor() did not set the palette part of the actor's
fill color, so it would always produce black for STYLE_Shaded.
- Added volume reduction for stereo sounds played in 3D to obtain levels
closer to FMOD 3, which downmixed all stereo sounds to mono before
playing them in 3D. Also added experimental 3D spread for stereo sounds
so that you can actually hear them in stereo.
- Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
railing handling and shooting lines with a non-zero but unassigned tag.)
With UDMF such semantics have to be handled diffently.
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.
- Fixed: When R_DrawTiltedPlane() calculates the p vector, it can overflow
if the view is near the bounds of the fixed point coordinate system. This
happens because it rotates the view position around (0,0) according to
the current viewangle, so the resultant coordinate may be outside the
bounds of fixed point. All important math in this function is now done
entirely in floating point.
- Fixed: Slopes didn't draw right on 64-bit platforms.
- Fixed: With hardware 2D, the console and menu need not reimplement palette
flashes to ensure their visibility.
- Fixed: DFlashFader::Destroy() did not call its super method.
- Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.
- Since KDIZD is the only mapset I know of that used reverb, and it didn't
define any new ones of its own, I'm pre-emptively renaming the SNDEAX lump
to REVERBS to remove any possible misunderstanding that this is something
that requires EAX hardware support. (Ideally, it would have been REVERBDEF,
but that's 10 characters long.) The eaxedit console command has also been
renamed to reverbedit for the same reason.
- Fixed: The Palette part of FRemapTable was not initialized with alpha values
other than 0. I'm not sure if it would be better to fix this in the game
palette that it copies from or not, but right now, they get set
unconditionally to 255.
- Fixed: M_DrawSave() and M_DrawLoad() need to use GetScaledWidth(), in case
the texture is high-res.
- Replaced all instances of "flags +=" in sbarinfo_parser.cpp with "flags |="
so that using the same flag multiple times will not have unexpected results.
(sbarinfo update #21)
- Added: sigil image type to correctly draw the sigil's icon.
- Added: Strife inventory bar style. This is the only style that is radically
different from the others. First of all it changes the SELECTBO to be
INVCURS and draws it before the icons. Each box is changed to have a width
of 35 pixels instead of 31 pixels. And the INVCURS graphic is drawn at
(x-6, y-2).
- Added: whennnotzero flag to drawnumber which will cause it to draw nothing if
the value is 0.
- Fixed: New mugshot code would not leave the god state when it was supposed to
enter the rampage state.
- Fixed: The ouch state was mostly broken.
(SBarInfo Update #20)
- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second
ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status
bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
In addition the state change to and from god mode was not quite as responsive
as the original code.
- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as
intended will not work.
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
preserving whatever was underneath in the texture box previously.
- Fixed: s_sound.cpp had its own idea of whether or not sounds were paused
and did not entirely keep it in sync with the sound system's. This meant
that when starting a new game from the menu, all sounds were played as
menu sounds until you did something to pause the game, because s_sound.cpp
thought sounds were unpaused, while the FMOD system thought they were.
- I finally managed to test the translucency options for composite texture
definitions in HIRESTEX. The feature should be complete now.
- Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the
DECORATE convention.
- Added Snowkate709's A_CheckTargetInLOS addition.
- Added listmaps CCMD.
- Revised underwater effect now uses a lowpass filter in combination with an
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.
- Fixed: FBarShader::GetColumn() passed incorrect information to the software
renderer for horizontal bars.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@107 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-23 17:58:17 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2009-09-06 21:11:24 +00:00
|
|
|
if (flags & WLF_SIDE2 && lines[linenum].sidedef[1] != NULL)
|
- Fixed: When walking on sloped 3D-floors, P_TryMove got the floor position from the
sector's actual floor instead from the 3D-floor.
- Fixed: Brightmaps were not disabled when fog was defined with a fadetable command in
MAPINFO.
Update to ZDoom r994:
- Fixed: The compatibility searches for teleport destinations did not work
properly when the teleporter had both a tid and a tag. Now, if a teleporter
has a tag these are skipped because they are only present for Hexen
compatibility.
- Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.)
- Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for
automatic fake contrast.
- Changed: Fake contrast now uses the WALLF_AUTOCONTRAST globally instead
of manipulating the sides' light values individually. This allows changing
the fake contrast at run time and also allows adding individual relative
lighting on top of it which is a planned UDMF feature.
- Fixed: ActorStencilColor() did not set the palette part of the actor's
fill color, so it would always produce black for STYLE_Shaded.
- Added volume reduction for stereo sounds played in 3D to obtain levels
closer to FMOD 3, which downmixed all stereo sounds to mono before
playing them in 3D. Also added experimental 3D spread for stereo sounds
so that you can actually hear them in stereo.
- Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
railing handling and shooting lines with a non-zero but unassigned tag.)
With UDMF such semantics have to be handled diffently.
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.
- Fixed: When R_DrawTiltedPlane() calculates the p vector, it can overflow
if the view is near the bounds of the fixed point coordinate system. This
happens because it rotates the view position around (0,0) according to
the current viewangle, so the resultant coordinate may be outside the
bounds of fixed point. All important math in this function is now done
entirely in floating point.
- Fixed: Slopes didn't draw right on 64-bit platforms.
- Fixed: With hardware 2D, the console and menu need not reimplement palette
flashes to ensure their visibility.
- Fixed: DFlashFader::Destroy() did not call its super method.
- Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.
- Since KDIZD is the only mapset I know of that used reverb, and it didn't
define any new ones of its own, I'm pre-emptively renaming the SNDEAX lump
to REVERBS to remove any possible misunderstanding that this is something
that requires EAX hardware support. (Ideally, it would have been REVERBDEF,
but that's 10 characters long.) The eaxedit console command has also been
renamed to reverbedit for the same reason.
- Fixed: The Palette part of FRemapTable was not initialized with alpha values
other than 0. I'm not sure if it would be better to fix this in the game
palette that it copies from or not, but right now, they get set
unconditionally to 255.
- Fixed: M_DrawSave() and M_DrawLoad() need to use GetScaledWidth(), in case
the texture is high-res.
- Replaced all instances of "flags +=" in sbarinfo_parser.cpp with "flags |="
so that using the same flag multiple times will not have unexpected results.
(sbarinfo update #21)
- Added: sigil image type to correctly draw the sigil's icon.
- Added: Strife inventory bar style. This is the only style that is radically
different from the others. First of all it changes the SELECTBO to be
INVCURS and draws it before the icons. Each box is changed to have a width
of 35 pixels instead of 31 pixels. And the INVCURS graphic is drawn at
(x-6, y-2).
- Added: whennnotzero flag to drawnumber which will cause it to draw nothing if
the value is 0.
- Fixed: New mugshot code would not leave the god state when it was supposed to
enter the rampage state.
- Fixed: The ouch state was mostly broken.
(SBarInfo Update #20)
- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second
ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status
bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
In addition the state change to and from god mode was not quite as responsive
as the original code.
- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as
intended will not work.
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
preserving whatever was underneath in the texture box previously.
- Fixed: s_sound.cpp had its own idea of whether or not sounds were paused
and did not entirely keep it in sync with the sound system's. This meant
that when starting a new game from the menu, all sounds were played as
menu sounds until you did something to pause the game, because s_sound.cpp
thought sounds were unpaused, while the FMOD system thought they were.
- I finally managed to test the translucency options for composite texture
definitions in HIRESTEX. The feature should be complete now.
- Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the
DECORATE convention.
- Added Snowkate709's A_CheckTargetInLOS addition.
- Added listmaps CCMD.
- Revised underwater effect now uses a lowpass filter in combination with an
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.
- Fixed: FBarShader::GetColumn() passed incorrect information to the software
renderer for horizontal bars.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@107 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-23 17:58:17 +00:00
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
lines[linenum].sidedef[1]->Flags |= wallflags;
|
- Fixed: When walking on sloped 3D-floors, P_TryMove got the floor position from the
sector's actual floor instead from the 3D-floor.
- Fixed: Brightmaps were not disabled when fog was defined with a fadetable command in
MAPINFO.
Update to ZDoom r994:
- Fixed: The compatibility searches for teleport destinations did not work
properly when the teleporter had both a tid and a tag. Now, if a teleporter
has a tag these are skipped because they are only present for Hexen
compatibility.
- Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.)
- Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for
automatic fake contrast.
- Changed: Fake contrast now uses the WALLF_AUTOCONTRAST globally instead
of manipulating the sides' light values individually. This allows changing
the fake contrast at run time and also allows adding individual relative
lighting on top of it which is a planned UDMF feature.
- Fixed: ActorStencilColor() did not set the palette part of the actor's
fill color, so it would always produce black for STYLE_Shaded.
- Added volume reduction for stereo sounds played in 3D to obtain levels
closer to FMOD 3, which downmixed all stereo sounds to mono before
playing them in 3D. Also added experimental 3D spread for stereo sounds
so that you can actually hear them in stereo.
- Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
railing handling and shooting lines with a non-zero but unassigned tag.)
With UDMF such semantics have to be handled diffently.
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.
- Fixed: When R_DrawTiltedPlane() calculates the p vector, it can overflow
if the view is near the bounds of the fixed point coordinate system. This
happens because it rotates the view position around (0,0) according to
the current viewangle, so the resultant coordinate may be outside the
bounds of fixed point. All important math in this function is now done
entirely in floating point.
- Fixed: Slopes didn't draw right on 64-bit platforms.
- Fixed: With hardware 2D, the console and menu need not reimplement palette
flashes to ensure their visibility.
- Fixed: DFlashFader::Destroy() did not call its super method.
- Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.
- Since KDIZD is the only mapset I know of that used reverb, and it didn't
define any new ones of its own, I'm pre-emptively renaming the SNDEAX lump
to REVERBS to remove any possible misunderstanding that this is something
that requires EAX hardware support. (Ideally, it would have been REVERBDEF,
but that's 10 characters long.) The eaxedit console command has also been
renamed to reverbedit for the same reason.
- Fixed: The Palette part of FRemapTable was not initialized with alpha values
other than 0. I'm not sure if it would be better to fix this in the game
palette that it copies from or not, but right now, they get set
unconditionally to 255.
- Fixed: M_DrawSave() and M_DrawLoad() need to use GetScaledWidth(), in case
the texture is high-res.
- Replaced all instances of "flags +=" in sbarinfo_parser.cpp with "flags |="
so that using the same flag multiple times will not have unexpected results.
(sbarinfo update #21)
- Added: sigil image type to correctly draw the sigil's icon.
- Added: Strife inventory bar style. This is the only style that is radically
different from the others. First of all it changes the SELECTBO to be
INVCURS and draws it before the icons. Each box is changed to have a width
of 35 pixels instead of 31 pixels. And the INVCURS graphic is drawn at
(x-6, y-2).
- Added: whennnotzero flag to drawnumber which will cause it to draw nothing if
the value is 0.
- Fixed: New mugshot code would not leave the god state when it was supposed to
enter the rampage state.
- Fixed: The ouch state was mostly broken.
(SBarInfo Update #20)
- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second
ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status
bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
In addition the state change to and from god mode was not quite as responsive
as the original code.
- Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as
intended will not work.
- Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
preserving whatever was underneath in the texture box previously.
- Fixed: s_sound.cpp had its own idea of whether or not sounds were paused
and did not entirely keep it in sync with the sound system's. This meant
that when starting a new game from the menu, all sounds were played as
menu sounds until you did something to pause the game, because s_sound.cpp
thought sounds were unpaused, while the FMOD system thought they were.
- I finally managed to test the translucency options for composite texture
definitions in HIRESTEX. The feature should be complete now.
- Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the
DECORATE convention.
- Added Snowkate709's A_CheckTargetInLOS addition.
- Added listmaps CCMD.
- Revised underwater effect now uses a lowpass filter in combination with an
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.
- Fixed: FBarShader::GetColumn() passed incorrect information to the software
renderer for horizontal bars.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@107 b0f79afe-0144-0410-b225-9a4edf0717df
2008-05-23 17:58:17 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
ChangeStatNum(STAT_LIGHTTRANSFER);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DWallLightTransfer::Tick ()
|
|
|
|
{
|
2011-06-12 09:08:10 +00:00
|
|
|
short light = sector_t::ClampLight(Source->lightlevel);
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
if (light != LastLight)
|
|
|
|
{
|
|
|
|
LastLight = light;
|
|
|
|
DoTransfer (light, TargetID, Flags);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-12 09:08:10 +00:00
|
|
|
void DWallLightTransfer::DoTransfer (short lightlevel, int target, BYTE flags)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
int linenum;
|
|
|
|
|
|
|
|
for (linenum = -1; (linenum = P_FindLineFromID (target, linenum)) >= 0; )
|
|
|
|
{
|
2011-06-12 09:08:10 +00:00
|
|
|
line_t *line = &lines[linenum];
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2009-09-06 21:11:24 +00:00
|
|
|
if (flags & WLF_SIDE1 && line->sidedef[0] != NULL)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
line->sidedef[0]->SetLight(lightlevel);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
2009-09-06 21:11:24 +00:00
|
|
|
if (flags & WLF_SIDE2 && line->sidedef[1] != NULL)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2009-09-06 21:11:24 +00:00
|
|
|
line->sidedef[1]->SetLight(lightlevel);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-28 17:16:58 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Portals
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Upper stacks go in the top sector. Lower stacks go in the bottom sector.
|
|
|
|
|
|
|
|
static void SetupFloorPortal (AStackPoint *point)
|
|
|
|
{
|
|
|
|
NActorIterator it (NAME_LowerStackLookOnly, point->tid);
|
|
|
|
sector_t *Sector = point->Sector;
|
|
|
|
Sector->FloorSkyBox = static_cast<ASkyViewpoint*>(it.Next());
|
2010-12-10 12:51:08 +00:00
|
|
|
if (Sector->FloorSkyBox != NULL && Sector->FloorSkyBox->bAlways)
|
2009-12-28 17:16:58 +00:00
|
|
|
{
|
|
|
|
Sector->FloorSkyBox->Mate = point;
|
2010-11-08 07:24:25 +00:00
|
|
|
if (Sector->GetAlpha(sector_t::floor) == OPAQUE)
|
|
|
|
Sector->SetAlpha(sector_t::floor, Scale (point->args[0], OPAQUE, 255));
|
2009-12-28 17:16:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void SetupCeilingPortal (AStackPoint *point)
|
|
|
|
{
|
|
|
|
NActorIterator it (NAME_UpperStackLookOnly, point->tid);
|
|
|
|
sector_t *Sector = point->Sector;
|
|
|
|
Sector->CeilingSkyBox = static_cast<ASkyViewpoint*>(it.Next());
|
2010-12-10 12:51:08 +00:00
|
|
|
if (Sector->CeilingSkyBox != NULL && Sector->CeilingSkyBox->bAlways)
|
2009-12-28 17:16:58 +00:00
|
|
|
{
|
|
|
|
Sector->CeilingSkyBox->Mate = point;
|
2010-11-08 07:24:25 +00:00
|
|
|
if (Sector->GetAlpha(sector_t::ceiling) == OPAQUE)
|
|
|
|
Sector->SetAlpha(sector_t::ceiling, Scale (point->args[0], OPAQUE, 255));
|
2009-12-28 17:16:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-11-30 08:39:31 +00:00
|
|
|
static bool SpreadCeilingPortal(AStackPoint *pt, fixed_t alpha, sector_t *sector)
|
|
|
|
{
|
|
|
|
bool fail = false;
|
|
|
|
sector->validcount = validcount;
|
|
|
|
for(int i=0; i<sector->linecount; i++)
|
|
|
|
{
|
|
|
|
line_t *line = sector->lines[i];
|
|
|
|
sector_t *backsector = sector == line->frontsector? line->backsector : line->frontsector;
|
|
|
|
if (line->backsector == line->frontsector) continue;
|
|
|
|
if (backsector == NULL) { fail = true; continue; }
|
|
|
|
if (backsector->validcount == validcount) continue;
|
|
|
|
if (backsector->CeilingSkyBox == pt) continue;
|
|
|
|
|
|
|
|
// Check if the backside would map to the same visplane
|
|
|
|
if (backsector->CeilingSkyBox != NULL) { fail = true; continue; }
|
|
|
|
if (backsector->ceilingplane != sector->ceilingplane) { fail = true; continue; }
|
|
|
|
if (backsector->lightlevel != sector->lightlevel) { fail = true; continue; }
|
|
|
|
if (backsector->GetTexture(sector_t::ceiling) != sector->GetTexture(sector_t::ceiling)) { fail = true; continue; }
|
|
|
|
if (backsector->GetXOffset(sector_t::ceiling) != sector->GetXOffset(sector_t::ceiling)) { fail = true; continue; }
|
|
|
|
if (backsector->GetYOffset(sector_t::ceiling) != sector->GetYOffset(sector_t::ceiling)) { fail = true; continue; }
|
|
|
|
if (backsector->GetXScale(sector_t::ceiling) != sector->GetXScale(sector_t::ceiling)) { fail = true; continue; }
|
|
|
|
if (backsector->GetYScale(sector_t::ceiling) != sector->GetYScale(sector_t::ceiling)) { fail = true; continue; }
|
|
|
|
if (backsector->GetAngle(sector_t::ceiling) != sector->GetAngle(sector_t::ceiling)) { fail = true; continue; }
|
|
|
|
if (SpreadCeilingPortal(pt, alpha, backsector)) { fail = true; continue; }
|
|
|
|
}
|
|
|
|
if (!fail)
|
|
|
|
{
|
|
|
|
sector->CeilingSkyBox = pt;
|
|
|
|
sector->SetAlpha(sector_t::ceiling, alpha);
|
|
|
|
}
|
|
|
|
return fail;
|
|
|
|
}
|
|
|
|
|
2009-12-28 17:16:58 +00:00
|
|
|
void P_SetupPortals()
|
|
|
|
{
|
|
|
|
TThinkerIterator<AStackPoint> it;
|
|
|
|
AStackPoint *pt;
|
|
|
|
TArray<AStackPoint *> points;
|
|
|
|
|
|
|
|
while ((pt = it.Next()))
|
|
|
|
{
|
|
|
|
FName nm = pt->GetClass()->TypeName;
|
|
|
|
if (nm == NAME_UpperStackLookOnly)
|
|
|
|
{
|
|
|
|
SetupFloorPortal(pt);
|
|
|
|
}
|
|
|
|
else if (nm == NAME_LowerStackLookOnly)
|
|
|
|
{
|
|
|
|
SetupCeilingPortal(pt);
|
|
|
|
}
|
|
|
|
pt->special1 = 0;
|
|
|
|
points.Push(pt);
|
|
|
|
}
|
|
|
|
}
|
2009-12-28 07:14:43 +00:00
|
|
|
|
2010-11-08 07:24:25 +00:00
|
|
|
inline void SetPortal(sector_t *sector, int plane, AStackPoint *portal, fixed_t alpha)
|
2009-12-28 07:14:43 +00:00
|
|
|
{
|
2010-02-06 15:23:32 +00:00
|
|
|
// plane: 0=floor, 1=ceiling, 2=both
|
|
|
|
if (plane > 0)
|
2009-12-28 07:14:43 +00:00
|
|
|
{
|
2010-11-30 09:36:50 +00:00
|
|
|
if (sector->CeilingSkyBox == NULL || !sector->CeilingSkyBox->bAlways)
|
2010-11-08 07:24:25 +00:00
|
|
|
{
|
|
|
|
sector->CeilingSkyBox = portal;
|
|
|
|
if (sector->GetAlpha(sector_t::ceiling) == OPAQUE)
|
|
|
|
sector->SetAlpha(sector_t::ceiling, alpha);
|
|
|
|
}
|
2009-12-28 07:14:43 +00:00
|
|
|
}
|
2010-02-06 15:23:32 +00:00
|
|
|
if (plane == 2 || plane == 0)
|
2009-12-28 07:14:43 +00:00
|
|
|
{
|
2010-11-30 09:36:50 +00:00
|
|
|
if (sector->FloorSkyBox == NULL || !sector->FloorSkyBox->bAlways)
|
|
|
|
{
|
|
|
|
sector->FloorSkyBox = portal;
|
|
|
|
}
|
2010-11-08 07:24:25 +00:00
|
|
|
if (sector->GetAlpha(sector_t::floor) == OPAQUE)
|
|
|
|
sector->SetAlpha(sector_t::floor, alpha);
|
2009-12-28 07:14:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-02-06 15:23:32 +00:00
|
|
|
void P_SpawnPortal(line_t *line, int sectortag, int plane, int alpha)
|
2009-12-27 16:00:21 +00:00
|
|
|
{
|
|
|
|
for (int i=0;i<numlines;i++)
|
|
|
|
{
|
|
|
|
// We must look for the reference line with a linear search unless we want to waste the line ID for it
|
|
|
|
// which is not a good idea.
|
|
|
|
if (lines[i].special == Sector_SetPortal &&
|
|
|
|
lines[i].args[0] == sectortag &&
|
|
|
|
lines[i].args[1] == 0 &&
|
2010-02-06 15:23:32 +00:00
|
|
|
lines[i].args[2] == plane &&
|
2009-12-27 16:00:21 +00:00
|
|
|
lines[i].args[3] == 1)
|
|
|
|
{
|
|
|
|
fixed_t x1 = (line->v1->x + line->v2->x) >> 1;
|
|
|
|
fixed_t y1 = (line->v1->y + line->v2->y) >> 1;
|
|
|
|
fixed_t x2 = (lines[i].v1->x + lines[i].v2->x) >> 1;
|
|
|
|
fixed_t y2 = (lines[i].v1->y + lines[i].v2->y) >> 1;
|
2010-11-08 07:24:25 +00:00
|
|
|
fixed_t alpha = Scale (lines[i].args[4], OPAQUE, 255);
|
2009-12-27 16:00:21 +00:00
|
|
|
|
|
|
|
AStackPoint *anchor = Spawn<AStackPoint>(x1, y1, 0, NO_REPLACE);
|
|
|
|
AStackPoint *reference = Spawn<AStackPoint>(x2, y2, 0, NO_REPLACE);
|
|
|
|
|
|
|
|
reference->Mate = anchor;
|
|
|
|
anchor->Mate = reference;
|
|
|
|
|
|
|
|
// This is so that the renderer can distinguish these portals from
|
|
|
|
// the ones spawned with the '*StackLookOnly' things.
|
|
|
|
reference->flags |= MF_JUSTATTACKED;
|
|
|
|
anchor->flags |= MF_JUSTATTACKED;
|
|
|
|
|
|
|
|
for (int s=-1; (s = P_FindSectorFromTag(sectortag,s)) >= 0;)
|
|
|
|
{
|
2010-11-08 07:24:25 +00:00
|
|
|
SetPortal(§ors[s], plane, reference, alpha);
|
2009-12-28 07:14:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for (int j=0;j<numlines;j++)
|
|
|
|
{
|
|
|
|
// Check if this portal needs to be copied to other sectors
|
|
|
|
// This must be done here to ensure that it gets done only after the portal is set up
|
|
|
|
if (lines[i].special == Sector_SetPortal &&
|
|
|
|
lines[i].args[1] == 1 &&
|
2010-02-06 15:23:32 +00:00
|
|
|
lines[i].args[2] == plane &&
|
2009-12-28 07:14:43 +00:00
|
|
|
lines[i].args[3] == sectortag)
|
2009-12-27 16:00:21 +00:00
|
|
|
{
|
2009-12-28 07:14:43 +00:00
|
|
|
if (lines[i].args[0] == 0)
|
|
|
|
{
|
2010-11-08 07:24:25 +00:00
|
|
|
SetPortal(lines[i].frontsector, plane, reference, alpha);
|
2009-12-28 07:14:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
for (int s=-1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;)
|
|
|
|
{
|
2010-11-08 07:24:25 +00:00
|
|
|
SetPortal(§ors[s], plane, reference, alpha);
|
2009-12-28 07:14:43 +00:00
|
|
|
}
|
|
|
|
}
|
2009-12-27 16:00:21 +00:00
|
|
|
}
|
|
|
|
}
|
2009-12-28 07:14:43 +00:00
|
|
|
|
2009-12-27 16:00:21 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// P_SpawnSpecials
|
|
|
|
//
|
|
|
|
// After the map has been loaded, scan for specials that spawn thinkers
|
|
|
|
//
|
|
|
|
|
|
|
|
void P_SpawnSpecials (void)
|
|
|
|
{
|
|
|
|
sector_t *sector;
|
|
|
|
int i;
|
|
|
|
|
2009-12-28 17:16:58 +00:00
|
|
|
P_SetupPortals();
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// Init special SECTORs.
|
|
|
|
sector = sectors;
|
|
|
|
for (i = 0; i < numsectors; i++, sector++)
|
|
|
|
{
|
|
|
|
if (sector->special == 0)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// [RH] All secret sectors are marked with a BOOM-ish bitfield
|
|
|
|
if (sector->special & SECRET_MASK)
|
|
|
|
level.total_secrets++;
|
|
|
|
|
|
|
|
switch (sector->special & 0xff)
|
|
|
|
{
|
|
|
|
// [RH] Normal DOOM/Hexen specials. We clear off the special for lights
|
|
|
|
// here instead of inside the spawners.
|
|
|
|
|
|
|
|
case dLight_Flicker:
|
|
|
|
// FLICKERING LIGHTS
|
|
|
|
new DLightFlash (sector);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_StrobeFast:
|
|
|
|
// STROBE FAST
|
|
|
|
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_StrobeSlow:
|
|
|
|
// STROBE SLOW
|
|
|
|
new DStrobe (sector, STROBEBRIGHT, SLOWDARK, false);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_Strobe_Hurt:
|
|
|
|
case sLight_Strobe_Hurt:
|
|
|
|
// STROBE FAST/DEATH SLIME
|
|
|
|
new DStrobe (sector, STROBEBRIGHT, FASTDARK, false);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_Glow:
|
|
|
|
// GLOWING LIGHT
|
|
|
|
new DGlow (sector);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dSector_DoorCloseIn30:
|
|
|
|
// DOOR CLOSE IN 30 SECONDS
|
|
|
|
P_SpawnDoorCloseIn30 (sector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_StrobeSlowSync:
|
|
|
|
// SYNC STROBE SLOW
|
|
|
|
new DStrobe (sector, STROBEBRIGHT, SLOWDARK, true);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_StrobeFastSync:
|
|
|
|
// SYNC STROBE FAST
|
|
|
|
new DStrobe (sector, STROBEBRIGHT, FASTDARK, true);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dSector_DoorRaiseIn5Mins:
|
|
|
|
// DOOR RAISE IN 5 MINUTES
|
|
|
|
P_SpawnDoorRaiseIn5Mins (sector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dLight_FireFlicker:
|
|
|
|
// fire flickering
|
|
|
|
new DFireFlicker (sector);
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dFriction_Low:
|
|
|
|
sector->friction = FRICTION_LOW;
|
|
|
|
sector->movefactor = 0x269;
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
sector->special |= FRICTION_MASK;
|
|
|
|
break;
|
|
|
|
|
|
|
|
// [RH] Hexen-like phased lighting
|
|
|
|
case LightSequenceStart:
|
|
|
|
new DPhased (sector);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Light_Phased:
|
|
|
|
new DPhased (sector, 48, 63 - (sector->lightlevel & 63));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Sky2:
|
|
|
|
sector->sky = PL_SKYFLAT;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case dScroll_EastLavaDamage:
|
|
|
|
new DScroller (DScroller::sc_floor, (-FRACUNIT/2)<<3,
|
2008-09-15 23:47:00 +00:00
|
|
|
0, -1, int(sector-sectors), 0);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
2010-08-30 08:09:21 +00:00
|
|
|
case Sector_Hidden:
|
|
|
|
sector->MoreFlags |= SECF_HIDDEN;
|
|
|
|
sector->special &= 0xff00;
|
|
|
|
break;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
default:
|
|
|
|
if ((sector->special & 0xff) >= Scroll_North_Slow &&
|
|
|
|
(sector->special & 0xff) <= Scroll_SouthWest_Fast)
|
|
|
|
{ // Hexen scroll special
|
|
|
|
static const char hexenScrollies[24][2] =
|
|
|
|
{
|
|
|
|
{ 0, 1 }, { 0, 2 }, { 0, 4 },
|
|
|
|
{ -1, 0 }, { -2, 0 }, { -4, 0 },
|
|
|
|
{ 0, -1 }, { 0, -2 }, { 0, -4 },
|
|
|
|
{ 1, 0 }, { 2, 0 }, { 4, 0 },
|
|
|
|
{ 1, 1 }, { 2, 2 }, { 4, 4 },
|
|
|
|
{ -1, 1 }, { -2, 2 }, { -4, 4 },
|
|
|
|
{ -1, -1 }, { -2, -2 }, { -4, -4 },
|
|
|
|
{ 1, -1 }, { 2, -2 }, { 4, -4 }
|
|
|
|
};
|
|
|
|
|
|
|
|
int i = (sector->special & 0xff) - Scroll_North_Slow;
|
|
|
|
fixed_t dx = hexenScrollies[i][0] * (FRACUNIT/2);
|
|
|
|
fixed_t dy = hexenScrollies[i][1] * (FRACUNIT/2);
|
2008-09-15 23:47:00 +00:00
|
|
|
new DScroller (DScroller::sc_floor, dx, dy, -1, int(sector-sectors), 0);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
else if ((sector->special & 0xff) >= Carry_East5 &&
|
|
|
|
(sector->special & 0xff) <= Carry_East35)
|
|
|
|
{ // Heretic scroll special
|
|
|
|
// Only east scrollers also scroll the texture
|
|
|
|
new DScroller (DScroller::sc_floor,
|
|
|
|
(-FRACUNIT/2)<<((sector->special & 0xff) - Carry_East5),
|
2008-09-15 23:47:00 +00:00
|
|
|
0, -1, int(sector-sectors), 0);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Init other misc stuff
|
|
|
|
|
|
|
|
P_SpawnScrollers(); // killough 3/7/98: Add generalized scrollers
|
|
|
|
P_SpawnFriction(); // phares 3/12/98: New friction model using linedefs
|
|
|
|
P_SpawnPushers(); // phares 3/20/98: New pusher model using linedefs
|
|
|
|
|
2009-09-14 07:26:58 +00:00
|
|
|
for (i = 0; i < numlines; i++)
|
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
switch (lines[i].special)
|
|
|
|
{
|
|
|
|
int s;
|
|
|
|
sector_t *sec;
|
|
|
|
|
|
|
|
// killough 3/7/98:
|
|
|
|
// support for drawn heights coming from different sector
|
|
|
|
case Transfer_Heights:
|
2009-09-06 21:11:24 +00:00
|
|
|
sec = lines[i].frontsector;
|
2008-01-27 11:25:03 +00:00
|
|
|
if (lines[i].args[1] & 2)
|
|
|
|
{
|
|
|
|
sec->MoreFlags |= SECF_FAKEFLOORONLY;
|
|
|
|
}
|
|
|
|
if (lines[i].args[1] & 4)
|
|
|
|
{
|
|
|
|
sec->MoreFlags |= SECF_CLIPFAKEPLANES;
|
|
|
|
}
|
|
|
|
if (lines[i].args[1] & 8)
|
|
|
|
{
|
|
|
|
sec->MoreFlags |= SECF_UNDERWATER;
|
|
|
|
}
|
|
|
|
else if (forcewater)
|
|
|
|
{
|
|
|
|
sec->MoreFlags |= SECF_FORCEDUNDERWATER;
|
|
|
|
}
|
|
|
|
if (lines[i].args[1] & 16)
|
|
|
|
{
|
|
|
|
sec->MoreFlags |= SECF_IGNOREHEIGHTSEC;
|
|
|
|
}
|
|
|
|
if (lines[i].args[1] & 32)
|
|
|
|
{
|
|
|
|
sec->MoreFlags |= SECF_NOFAKELIGHT;
|
|
|
|
}
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;)
|
|
|
|
{
|
|
|
|
sectors[s].heightsec = sec;
|
2008-03-22 14:50:30 +00:00
|
|
|
sec->e->FakeFloor.Sectors.Push(§ors[s]);
|
2009-05-23 10:24:33 +00:00
|
|
|
sectors[s].AdjustFloorClip();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
// killough 3/16/98: Add support for setting
|
|
|
|
// floor lighting independently (e.g. lava)
|
|
|
|
case Transfer_FloorLight:
|
2009-09-06 21:11:24 +00:00
|
|
|
new DLightTransfer (lines[i].frontsector, lines[i].args[0], true);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
// killough 4/11/98: Add support for setting
|
|
|
|
// ceiling lighting independently
|
|
|
|
case Transfer_CeilingLight:
|
2009-09-06 21:11:24 +00:00
|
|
|
new DLightTransfer (lines[i].frontsector, lines[i].args[0], false);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
// [Graf Zahl] Add support for setting lighting
|
|
|
|
// per wall independently
|
|
|
|
case Transfer_WallLight:
|
2009-09-06 21:11:24 +00:00
|
|
|
new DWallLightTransfer (lines[i].frontsector, lines[i].args[0], lines[i].args[1]);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
2008-03-19 11:19:03 +00:00
|
|
|
case Sector_Attach3dMidtex:
|
|
|
|
P_Attach3dMidtexLinesToSector(lines[i].frontsector, lines[i].args[0], lines[i].args[1], !!lines[i].args[2]);
|
|
|
|
break;
|
|
|
|
|
2008-03-20 21:19:20 +00:00
|
|
|
case Sector_SetLink:
|
|
|
|
if (lines[i].args[0] == 0)
|
|
|
|
{
|
|
|
|
P_AddSectorLinks(lines[i].frontsector, lines[i].args[1], lines[i].args[2], lines[i].args[3]);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2009-12-27 16:00:21 +00:00
|
|
|
case Sector_SetPortal:
|
|
|
|
// arg 0 = sector tag
|
2010-02-06 15:23:32 +00:00
|
|
|
// arg 1 = type
|
|
|
|
// - 0: normal (handled here)
|
|
|
|
// - 1: copy (handled by the portal they copy)
|
|
|
|
// - 2: EE-style skybox (handled by the camera object)
|
|
|
|
// other values reserved for later use
|
|
|
|
// arg 2 = 0:floor, 1:ceiling, 2:both
|
2009-12-27 16:00:21 +00:00
|
|
|
// arg 3 = 0: anchor, 1: reference line
|
|
|
|
// arg 4 = for the anchor only: alpha
|
|
|
|
if (lines[i].args[1] == 0 && lines[i].args[3] == 0)
|
|
|
|
{
|
|
|
|
P_SpawnPortal(&lines[i], lines[i].args[0], lines[i].args[2], lines[i].args[4]);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// [RH] ZDoom Static_Init settings
|
|
|
|
case Static_Init:
|
|
|
|
switch (lines[i].args[1])
|
|
|
|
{
|
|
|
|
case Init_Gravity:
|
|
|
|
{
|
|
|
|
float grav = ((float)P_AproxDistance (lines[i].dx, lines[i].dy)) / (FRACUNIT * 100.0f);
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;)
|
|
|
|
sectors[s].gravity = grav;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
//case Init_Color:
|
|
|
|
// handled in P_LoadSideDefs2()
|
|
|
|
|
|
|
|
case Init_Damage:
|
|
|
|
{
|
|
|
|
int damage = P_AproxDistance (lines[i].dx, lines[i].dy) >> FRACBITS;
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;)
|
|
|
|
{
|
|
|
|
sectors[s].damage = damage;
|
|
|
|
sectors[s].mod = 0;//MOD_UNKNOWN;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2008-03-20 21:19:20 +00:00
|
|
|
case Init_SectorLink:
|
|
|
|
if (lines[i].args[3] == 0)
|
|
|
|
P_AddSectorLinksByID(lines[i].frontsector, lines[i].args[0], lines[i].args[2]);
|
|
|
|
break;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// killough 10/98:
|
|
|
|
//
|
|
|
|
// Support for sky textures being transferred from sidedefs.
|
|
|
|
// Allows scrolling and other effects (but if scrolling is
|
|
|
|
// used, then the same sector tag needs to be used for the
|
|
|
|
// sky sector, the sky-transfer linedef, and the scroll-effect
|
|
|
|
// linedef). Still requires user to use F_SKY1 for the floor
|
|
|
|
// or ceiling texture, to distinguish floor and ceiling sky.
|
|
|
|
|
|
|
|
case Init_TransferSky:
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;)
|
|
|
|
sectors[s].sky = (i+1) | PL_SKYFLAT;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2009-09-14 07:26:58 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
// [RH] Start running any open scripts on this map
|
|
|
|
FBehavior::StaticStartTypedScripts (SCRIPT_Open, NULL, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
// killough 2/28/98:
|
|
|
|
//
|
|
|
|
// This function, with the help of r_plane.c and r_bsp.c, supports generalized
|
|
|
|
// scrolling floors and walls, with optional mobj-carrying properties, e.g.
|
|
|
|
// conveyor belts, rivers, etc. A linedef with a special type affects all
|
|
|
|
// tagged sectors the same way, by creating scrolling and/or object-carrying
|
|
|
|
// properties. Multiple linedefs may be used on the same sector and are
|
|
|
|
// cumulative, although the special case of scrolling a floor and carrying
|
|
|
|
// things on it, requires only one linedef. The linedef's direction determines
|
|
|
|
// the scrolling direction, and the linedef's length determines the scrolling
|
|
|
|
// speed. This was designed so that an edge around the sector could be used to
|
|
|
|
// control the direction of the sector's scrolling, which is usually what is
|
|
|
|
// desired.
|
|
|
|
//
|
|
|
|
// Process the active scrollers.
|
|
|
|
//
|
|
|
|
// This is the main scrolling code
|
|
|
|
// killough 3/7/98
|
|
|
|
|
|
|
|
void DScroller::Tick ()
|
|
|
|
{
|
|
|
|
fixed_t dx = m_dx, dy = m_dy;
|
|
|
|
|
|
|
|
if (m_Control != -1)
|
|
|
|
{ // compute scroll amounts based on a sector's height changes
|
|
|
|
fixed_t height = sectors[m_Control].CenterFloor () +
|
|
|
|
sectors[m_Control].CenterCeiling ();
|
|
|
|
fixed_t delta = height - m_LastHeight;
|
|
|
|
m_LastHeight = height;
|
|
|
|
dx = FixedMul(dx, delta);
|
|
|
|
dy = FixedMul(dy, delta);
|
|
|
|
}
|
|
|
|
|
|
|
|
// killough 3/14/98: Add acceleration
|
|
|
|
if (m_Accel)
|
|
|
|
{
|
|
|
|
m_vdx = dx += m_vdx;
|
|
|
|
m_vdy = dy += m_vdy;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!(dx | dy)) // no-op if both (x,y) offsets are 0
|
|
|
|
return;
|
|
|
|
|
|
|
|
switch (m_Type)
|
|
|
|
{
|
|
|
|
case sc_side: // killough 3/7/98: Scroll wall texture
|
2008-03-21 21:15:56 +00:00
|
|
|
if (m_Parts & scw_top)
|
|
|
|
{
|
|
|
|
sides[m_Affectee].AddTextureXOffset(side_t::top, dx);
|
|
|
|
sides[m_Affectee].AddTextureYOffset(side_t::top, dy);
|
|
|
|
}
|
2009-09-06 18:30:07 +00:00
|
|
|
if (m_Parts & scw_mid && (sides[m_Affectee].linedef->backsector == NULL ||
|
|
|
|
!(sides[m_Affectee].linedef->flags&ML_3DMIDTEX)))
|
2008-03-21 21:15:56 +00:00
|
|
|
{
|
|
|
|
sides[m_Affectee].AddTextureXOffset(side_t::mid, dx);
|
|
|
|
sides[m_Affectee].AddTextureYOffset(side_t::mid, dy);
|
|
|
|
}
|
|
|
|
if (m_Parts & scw_bottom)
|
|
|
|
{
|
|
|
|
sides[m_Affectee].AddTextureXOffset(side_t::bottom, dx);
|
|
|
|
sides[m_Affectee].AddTextureYOffset(side_t::bottom, dy);
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sc_floor: // killough 3/7/98: Scroll floor texture
|
2008-06-14 15:37:17 +00:00
|
|
|
sectors[m_Affectee].AddXOffset(sector_t::floor, dx);
|
|
|
|
sectors[m_Affectee].AddYOffset(sector_t::floor, dy);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sc_ceiling: // killough 3/7/98: Scroll ceiling texture
|
2008-06-14 15:37:17 +00:00
|
|
|
sectors[m_Affectee].AddXOffset(sector_t::ceiling, dx);
|
|
|
|
sectors[m_Affectee].AddYOffset(sector_t::ceiling, dy);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
// [RH] Don't actually carry anything here. That happens later.
|
|
|
|
case sc_carry:
|
|
|
|
level.Scrolls[m_Affectee].ScrollX += dx;
|
|
|
|
level.Scrolls[m_Affectee].ScrollY += dy;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sc_carry_ceiling: // to be added later
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// Add_Scroller()
|
|
|
|
//
|
|
|
|
// Add a generalized scroller to the thinker list.
|
|
|
|
//
|
|
|
|
// type: the enumerated type of scrolling: floor, ceiling, floor carrier,
|
|
|
|
// wall, floor carrier & scroller
|
|
|
|
//
|
|
|
|
// (dx,dy): the direction and speed of the scrolling or its acceleration
|
|
|
|
//
|
|
|
|
// control: the sector whose heights control this scroller's effect
|
|
|
|
// remotely, or -1 if no control sector
|
|
|
|
//
|
|
|
|
// affectee: the index of the affected object (sector or sidedef)
|
|
|
|
//
|
|
|
|
// accel: non-zero if this is an accelerative effect
|
|
|
|
//
|
|
|
|
|
|
|
|
DScroller::DScroller (EScrollType type, fixed_t dx, fixed_t dy,
|
2008-03-21 21:15:56 +00:00
|
|
|
int control, int affectee, int accel, int scrollpos)
|
2008-01-27 11:25:03 +00:00
|
|
|
: DThinker (STAT_SCROLLER)
|
|
|
|
{
|
|
|
|
m_Type = type;
|
|
|
|
m_dx = dx;
|
|
|
|
m_dy = dy;
|
|
|
|
m_Accel = accel;
|
2008-03-21 21:15:56 +00:00
|
|
|
m_Parts = scrollpos;
|
2008-01-27 11:25:03 +00:00
|
|
|
m_vdx = m_vdy = 0;
|
|
|
|
if ((m_Control = control) != -1)
|
|
|
|
m_LastHeight =
|
|
|
|
sectors[control].CenterFloor () + sectors[control].CenterCeiling ();
|
|
|
|
m_Affectee = affectee;
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[0] = m_Interpolations[1] = m_Interpolations[2] = NULL;
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
|
|
|
case sc_carry:
|
|
|
|
level.AddScroller (this, affectee);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case sc_side:
|
|
|
|
sides[affectee].Flags |= WALLF_NOAUTODECALS;
|
2008-03-21 21:15:56 +00:00
|
|
|
if (m_Parts & scw_top)
|
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[0] = sides[m_Affectee].SetInterpolation(side_t::top);
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
2009-09-06 18:30:07 +00:00
|
|
|
if (m_Parts & scw_mid && (sides[m_Affectee].linedef->backsector == NULL ||
|
|
|
|
!(sides[m_Affectee].linedef->flags&ML_3DMIDTEX)))
|
2008-03-21 21:15:56 +00:00
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[1] = sides[m_Affectee].SetInterpolation(side_t::mid);
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
|
|
|
if (m_Parts & scw_bottom)
|
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[2] = sides[m_Affectee].SetInterpolation(side_t::bottom);
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sc_floor:
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[0] = sectors[affectee].SetInterpolation(sector_t::FloorScroll, false);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case sc_ceiling:
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[0] = sectors[affectee].SetInterpolation(sector_t::CeilingScroll, false);
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-08 09:24:55 +00:00
|
|
|
void DScroller::Destroy ()
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
for(int i=0;i<3;i++)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
if (m_Interpolations[i] != NULL)
|
2008-03-21 21:15:56 +00:00
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[i]->DelRef();
|
|
|
|
m_Interpolations[i] = NULL;
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
2008-06-08 09:24:55 +00:00
|
|
|
Super::Destroy();
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Adds wall scroller. Scroll amount is rotated with respect to wall's
|
|
|
|
// linedef first, so that scrolling towards the wall in a perpendicular
|
|
|
|
// direction is translated into vertical motion, while scrolling along
|
|
|
|
// the wall in a parallel direction is translated into horizontal motion.
|
|
|
|
//
|
|
|
|
// killough 5/25/98: cleaned up arithmetic to avoid drift due to roundoff
|
|
|
|
|
|
|
|
DScroller::DScroller (fixed_t dx, fixed_t dy, const line_t *l,
|
2008-03-21 21:15:56 +00:00
|
|
|
int control, int accel, int scrollpos)
|
2008-01-27 11:25:03 +00:00
|
|
|
: DThinker (STAT_SCROLLER)
|
|
|
|
{
|
|
|
|
fixed_t x = abs(l->dx), y = abs(l->dy), d;
|
|
|
|
if (y > x)
|
|
|
|
d = x, x = y, y = d;
|
|
|
|
d = FixedDiv (x, finesine[(tantoangle[FixedDiv(y,x) >> DBITS] + ANG90)
|
|
|
|
>> ANGLETOFINESHIFT]);
|
|
|
|
x = -FixedDiv (FixedMul(dy, l->dy) + FixedMul(dx, l->dx), d);
|
|
|
|
y = -FixedDiv (FixedMul(dx, l->dy) - FixedMul(dy, l->dx), d);
|
|
|
|
|
|
|
|
m_Type = sc_side;
|
|
|
|
m_dx = x;
|
|
|
|
m_dy = y;
|
|
|
|
m_vdx = m_vdy = 0;
|
|
|
|
m_Accel = accel;
|
2008-03-21 21:15:56 +00:00
|
|
|
m_Parts = scrollpos;
|
2008-01-27 11:25:03 +00:00
|
|
|
if ((m_Control = control) != -1)
|
|
|
|
m_LastHeight = sectors[control].CenterFloor() + sectors[control].CenterCeiling();
|
2009-09-06 21:11:24 +00:00
|
|
|
m_Affectee = int(l->sidedef[0] - sides);
|
2008-01-27 11:25:03 +00:00
|
|
|
sides[m_Affectee].Flags |= WALLF_NOAUTODECALS;
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[0] = m_Interpolations[1] = m_Interpolations[2] = NULL;
|
2008-01-27 11:25:03 +00:00
|
|
|
|
2008-03-21 21:15:56 +00:00
|
|
|
if (m_Parts & scw_top)
|
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[0] = sides[m_Affectee].SetInterpolation(side_t::top);
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
2009-09-06 18:30:07 +00:00
|
|
|
if (m_Parts & scw_mid && (sides[m_Affectee].linedef->backsector == NULL ||
|
|
|
|
!(sides[m_Affectee].linedef->flags&ML_3DMIDTEX)))
|
2008-03-21 21:15:56 +00:00
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[1] = sides[m_Affectee].SetInterpolation(side_t::mid);
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
|
|
|
if (m_Parts & scw_bottom)
|
|
|
|
{
|
2008-06-08 09:24:55 +00:00
|
|
|
m_Interpolations[2] = sides[m_Affectee].SetInterpolation(side_t::bottom);
|
2008-03-21 21:15:56 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Amount (dx,dy) vector linedef is shifted right to get scroll amount
|
|
|
|
#define SCROLL_SHIFT 5
|
2009-09-14 07:26:58 +00:00
|
|
|
#define SCROLLTYPE(i) (((i) <= 0) || ((i) & ~7) ? 7 : (i))
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
// Initialize the scrollers
|
|
|
|
static void P_SpawnScrollers(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
line_t *l = lines;
|
2010-04-16 15:31:06 +00:00
|
|
|
TArray<int> copyscrollers;
|
|
|
|
|
|
|
|
for (i = 0; i < numlines; i++)
|
|
|
|
{
|
|
|
|
if (lines[i].special == Sector_CopyScroller)
|
|
|
|
{
|
|
|
|
// don't allow copying the scroller if the sector has the same tag as it would just duplicate it.
|
|
|
|
if (lines[i].args[0] != lines[i].frontsector->tag)
|
|
|
|
{
|
|
|
|
copyscrollers.Push(i);
|
|
|
|
}
|
|
|
|
lines[i].special = 0;
|
|
|
|
}
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
|
|
|
|
for (i = 0; i < numlines; i++, l++)
|
|
|
|
{
|
|
|
|
fixed_t dx; // direction and speed of scrolling
|
|
|
|
fixed_t dy;
|
|
|
|
int control = -1, accel = 0; // no control sector or acceleration
|
|
|
|
int special = l->special;
|
|
|
|
|
2009-09-14 07:26:58 +00:00
|
|
|
// Check for undefined parameters that are non-zero and output messages for them.
|
|
|
|
// We don't report for specials we don't understand.
|
|
|
|
if (special != 0)
|
|
|
|
{
|
|
|
|
int max = LineSpecialsInfo[special] != NULL ? LineSpecialsInfo[special]->map_args : countof(l->args);
|
2009-11-08 06:53:15 +00:00
|
|
|
for (unsigned arg = max; arg < countof(l->args); ++arg)
|
2009-09-14 07:26:58 +00:00
|
|
|
{
|
|
|
|
if (l->args[arg] != 0)
|
|
|
|
{
|
2009-11-08 06:53:15 +00:00
|
|
|
Printf("Line %d (type %d:%s), arg %u is %d (should be 0)\n",
|
2009-09-14 07:26:58 +00:00
|
|
|
i, special, LineSpecialsInfo[special]->name, arg+1, l->args[arg]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
// killough 3/7/98: Types 245-249 are same as 250-254 except that the
|
|
|
|
// first side's sector's heights cause scrolling when they change, and
|
|
|
|
// this linedef controls the direction and speed of the scrolling. The
|
|
|
|
// most complicated linedef since donuts, but powerful :)
|
|
|
|
//
|
|
|
|
// killough 3/15/98: Add acceleration. Types 214-218 are the same but
|
|
|
|
// are accelerative.
|
|
|
|
|
|
|
|
// [RH] Assume that it's a scroller and zero the line's special.
|
|
|
|
l->special = 0;
|
|
|
|
|
|
|
|
dx = dy = 0; // Shut up, GCC
|
|
|
|
|
|
|
|
if (special == Scroll_Ceiling ||
|
|
|
|
special == Scroll_Floor ||
|
|
|
|
special == Scroll_Texture_Model)
|
|
|
|
{
|
|
|
|
if (l->args[1] & 3)
|
|
|
|
{
|
|
|
|
// if 1, then displacement
|
|
|
|
// if 2, then accelerative (also if 3)
|
2009-09-06 21:11:24 +00:00
|
|
|
control = int(l->sidedef[0]->sector - sectors);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (l->args[1] & 2)
|
|
|
|
accel = 1;
|
|
|
|
}
|
|
|
|
if (special == Scroll_Texture_Model ||
|
|
|
|
l->args[1] & 4)
|
|
|
|
{
|
|
|
|
// The line housing the special controls the
|
|
|
|
// direction and speed of scrolling.
|
|
|
|
dx = l->dx >> SCROLL_SHIFT;
|
|
|
|
dy = l->dy >> SCROLL_SHIFT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// The speed and direction are parameters to the special.
|
|
|
|
dx = (l->args[3] - 128) * (FRACUNIT / 32);
|
|
|
|
dy = (l->args[4] - 128) * (FRACUNIT / 32);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (special)
|
|
|
|
{
|
|
|
|
register int s;
|
|
|
|
|
|
|
|
case Scroll_Ceiling:
|
|
|
|
for (s=-1; (s = P_FindSectorFromTag (l->args[0],s)) >= 0;)
|
2010-04-16 15:31:06 +00:00
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_ceiling, -dx, dy, control, s, accel);
|
2010-04-16 15:31:06 +00:00
|
|
|
}
|
|
|
|
for(unsigned j = 0;j < copyscrollers.Size(); j++)
|
|
|
|
{
|
|
|
|
line_t *line = &lines[copyscrollers[j]];
|
|
|
|
|
|
|
|
if (line->args[0] == l->args[0] && (line->args[1] & 1))
|
|
|
|
{
|
|
|
|
new DScroller (DScroller::sc_ceiling, -dx, dy, control, int(line->frontsector-sectors), accel);
|
|
|
|
}
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Floor:
|
|
|
|
if (l->args[2] != 1)
|
|
|
|
{ // scroll the floor texture
|
|
|
|
for (s=-1; (s = P_FindSectorFromTag (l->args[0],s)) >= 0;)
|
2010-04-16 15:31:06 +00:00
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_floor, -dx, dy, control, s, accel);
|
2010-04-16 15:31:06 +00:00
|
|
|
}
|
|
|
|
for(unsigned j = 0;j < copyscrollers.Size(); j++)
|
|
|
|
{
|
|
|
|
line_t *line = &lines[copyscrollers[j]];
|
|
|
|
|
|
|
|
if (line->args[0] == l->args[0] && (line->args[1] & 2))
|
|
|
|
{
|
|
|
|
new DScroller (DScroller::sc_floor, -dx, dy, control, int(line->frontsector-sectors), accel);
|
|
|
|
}
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (l->args[2] > 0)
|
|
|
|
{ // carry objects on the floor
|
|
|
|
for (s=-1; (s = P_FindSectorFromTag (l->args[0],s)) >= 0;)
|
2010-04-16 15:31:06 +00:00
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_carry, dx, dy, control, s, accel);
|
2010-04-16 15:31:06 +00:00
|
|
|
}
|
|
|
|
for(unsigned j = 0;j < copyscrollers.Size(); j++)
|
|
|
|
{
|
|
|
|
line_t *line = &lines[copyscrollers[j]];
|
|
|
|
|
|
|
|
if (line->args[0] == l->args[0] && (line->args[1] & 4))
|
|
|
|
{
|
|
|
|
new DScroller (DScroller::sc_carry, dx, dy, control, int(line->frontsector-sectors), accel);
|
|
|
|
}
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
// killough 3/1/98: scroll wall according to linedef
|
|
|
|
// (same direction and speed as scrolling floors)
|
|
|
|
case Scroll_Texture_Model:
|
|
|
|
for (s=-1; (s = P_FindLineFromID (l->args[0],s)) >= 0;)
|
|
|
|
if (s != i)
|
|
|
|
new DScroller (dx, dy, lines+s, control, accel);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Texture_Offsets:
|
|
|
|
// killough 3/2/98: scroll according to sidedef offsets
|
2009-09-06 21:11:24 +00:00
|
|
|
s = int(lines[i].sidedef[0] - sides);
|
2008-03-21 21:15:56 +00:00
|
|
|
new DScroller (DScroller::sc_side, -sides[s].GetTextureXOffset(side_t::mid),
|
|
|
|
sides[s].GetTextureYOffset(side_t::mid), -1, s, accel, SCROLLTYPE(l->args[0]));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Texture_Left:
|
2009-09-06 21:11:24 +00:00
|
|
|
s = int(lines[i].sidedef[0] - sides);
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_side, l->args[0] * (FRACUNIT/64), 0,
|
2009-09-06 21:11:24 +00:00
|
|
|
-1, s, accel, SCROLLTYPE(l->args[1]));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Texture_Right:
|
2009-09-06 21:11:24 +00:00
|
|
|
s = int(lines[i].sidedef[0] - sides);
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_side, l->args[0] * (-FRACUNIT/64), 0,
|
2009-09-06 21:11:24 +00:00
|
|
|
-1, s, accel, SCROLLTYPE(l->args[1]));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Texture_Up:
|
2009-09-06 21:11:24 +00:00
|
|
|
s = int(lines[i].sidedef[0] - sides);
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_side, 0, l->args[0] * (FRACUNIT/64),
|
2009-09-06 21:11:24 +00:00
|
|
|
-1, s, accel, SCROLLTYPE(l->args[1]));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Texture_Down:
|
2009-09-06 21:11:24 +00:00
|
|
|
s = int(lines[i].sidedef[0] - sides);
|
2008-01-27 11:25:03 +00:00
|
|
|
new DScroller (DScroller::sc_side, 0, l->args[0] * (-FRACUNIT/64),
|
2009-09-06 21:11:24 +00:00
|
|
|
-1, s, accel, SCROLLTYPE(l->args[1]));
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Scroll_Texture_Both:
|
2009-09-06 21:11:24 +00:00
|
|
|
s = int(lines[i].sidedef[0] - sides);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (l->args[0] == 0) {
|
|
|
|
dx = (l->args[1] - l->args[2]) * (FRACUNIT/64);
|
|
|
|
dy = (l->args[4] - l->args[3]) * (FRACUNIT/64);
|
2009-09-06 21:11:24 +00:00
|
|
|
new DScroller (DScroller::sc_side, dx, dy, -1, s, accel);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
// [RH] It wasn't a scroller after all, so restore the special.
|
|
|
|
l->special = special;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// killough 3/7/98 -- end generalized scroll effects
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// FRICTION EFFECTS
|
|
|
|
//
|
|
|
|
// phares 3/12/98: Start of friction effects
|
|
|
|
|
|
|
|
// As the player moves, friction is applied by decreasing the x and y
|
Update to ZDoom r1705:
- ZDoom now disables the input method editor, since it has no east-Asian
support, and having it open a composition window when you're only expecting
a single keypress is not so good.
- Fixed: Setting intermissioncounter to false in gameinfo drew all the stats
at once, instead of revealing them one line at a time.
- Fixed: The border definition in MAPINFO's gameinfo block used extra braces.
- Added A_SetCrosshair.
- Added A_WeaponBob.
- Dropped the Hexen player classes' JumpZ down to 9, since the original value
now works as it originally did.
- MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
from being thrusted while taking damage. (Non-players were already
unthrusted.)
- A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.
- Added Gez's PowerInvisibility changes.
- Fixed: clearflags did not clear flags6.
- Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity.
- Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
continue to work as aliases from DECORATE. The ACS functions, however,
require you to use the new name, since they never saw an official release
yet.
- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
crashed after giving you the warning.
- Fixed some improper preprocessor lines in autostart/autozend.cpp.
- Added XInput support. For the benefit of people compiling with MinGW,
the CMakeLists.txt checks for xinput.h and disables it if it cannot
be found. (And much to my surprise, I accidentally discovered that if you
have the DirectX SDK installed, those headers actually do work with GCC,
though they add a few extra warnings.)
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
|
|
|
// velocity values on each tic. By varying the percentage of decrease,
|
2008-01-27 11:25:03 +00:00
|
|
|
// we can simulate muddy or icy conditions. In mud, the player slows
|
|
|
|
// down faster. In ice, the player slows down more slowly.
|
|
|
|
//
|
|
|
|
// The amount of friction change is controlled by the length of a linedef
|
|
|
|
// with type 223. A length < 100 gives you mud. A length > 100 gives you ice.
|
|
|
|
//
|
|
|
|
// Also, each sector where these effects are to take place is given a
|
|
|
|
// new special type _______. Changing the type value at runtime allows
|
|
|
|
// these effects to be turned on or off.
|
|
|
|
//
|
|
|
|
// Sector boundaries present problems. The player should experience these
|
|
|
|
// friction changes only when his feet are touching the sector floor. At
|
|
|
|
// sector boundaries where floor height changes, the player can find
|
|
|
|
// himself still 'in' one sector, but with his feet at the floor level
|
|
|
|
// of the next sector (steps up or down). To handle this, Thinkers are used
|
|
|
|
// in icy/muddy sectors. These thinkers examine each object that is touching
|
|
|
|
// their sectors, looking for players whose feet are at the same level as
|
|
|
|
// their floors. Players satisfying this condition are given new friction
|
|
|
|
// values that are applied by the player movement code later.
|
|
|
|
|
|
|
|
//
|
|
|
|
// killough 8/28/98:
|
|
|
|
//
|
|
|
|
// Completely redid code, which did not need thinkers, and which put a heavy
|
|
|
|
// drag on CPU. Friction is now a property of sectors, NOT objects inside
|
|
|
|
// them. All objects, not just players, are affected by it, if they touch
|
|
|
|
// the sector's floor. Code simpler and faster, only calling on friction
|
|
|
|
// calculations when an object needs friction considered, instead of doing
|
|
|
|
// friction calculations on every sector during every tic.
|
|
|
|
//
|
|
|
|
// Although this -might- ruin Boom demo sync involving friction, it's the only
|
|
|
|
// way, short of code explosion, to fix the original design bug. Fixing the
|
|
|
|
// design bug in Boom's original friction code, while maintaining demo sync
|
|
|
|
// under every conceivable circumstance, would double or triple code size, and
|
|
|
|
// would require maintenance of buggy legacy code which is only useful for old
|
|
|
|
// demos. Doom demos, which are more important IMO, are not affected by this
|
|
|
|
// change.
|
|
|
|
//
|
|
|
|
// [RH] On the other hand, since I've given up on trying to maintain demo
|
|
|
|
// sync between versions, these considerations aren't a big deal to me.
|
|
|
|
//
|
|
|
|
/////////////////////////////
|
|
|
|
//
|
|
|
|
// Initialize the sectors where friction is increased or decreased
|
|
|
|
|
|
|
|
static void P_SpawnFriction(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
line_t *l = lines;
|
|
|
|
|
|
|
|
for (i = 0 ; i < numlines ; i++,l++)
|
|
|
|
{
|
|
|
|
if (l->special == Sector_SetFriction)
|
|
|
|
{
|
|
|
|
int length;
|
|
|
|
|
|
|
|
if (l->args[1])
|
|
|
|
{ // [RH] Allow setting friction amount from parameter
|
|
|
|
length = l->args[1] <= 200 ? l->args[1] : 200;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
length = P_AproxDistance(l->dx,l->dy)>>FRACBITS;
|
|
|
|
}
|
|
|
|
|
|
|
|
P_SetSectorFriction (l->args[0], length, false);
|
|
|
|
l->special = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void P_SetSectorFriction (int tag, int amount, bool alterFlag)
|
|
|
|
{
|
|
|
|
int s;
|
|
|
|
fixed_t friction, movefactor;
|
|
|
|
|
|
|
|
// An amount of 100 should result in a friction of
|
|
|
|
// ORIG_FRICTION (0xE800)
|
|
|
|
friction = (0x1EB8*amount)/0x80 + 0xD001;
|
|
|
|
|
|
|
|
// killough 8/28/98: prevent odd situations
|
|
|
|
if (friction > FRACUNIT)
|
|
|
|
friction = FRACUNIT;
|
|
|
|
if (friction < 0)
|
|
|
|
friction = 0;
|
|
|
|
|
|
|
|
// The following check might seem odd. At the time of movement,
|
|
|
|
// the move distance is multiplied by 'friction/0x10000', so a
|
|
|
|
// higher friction value actually means 'less friction'.
|
|
|
|
|
Update to ZDoom r1705:
- ZDoom now disables the input method editor, since it has no east-Asian
support, and having it open a composition window when you're only expecting
a single keypress is not so good.
- Fixed: Setting intermissioncounter to false in gameinfo drew all the stats
at once, instead of revealing them one line at a time.
- Fixed: The border definition in MAPINFO's gameinfo block used extra braces.
- Added A_SetCrosshair.
- Added A_WeaponBob.
- Dropped the Hexen player classes' JumpZ down to 9, since the original value
now works as it originally did.
- MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
from being thrusted while taking damage. (Non-players were already
unthrusted.)
- A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.
- Added Gez's PowerInvisibility changes.
- Fixed: clearflags did not clear flags6.
- Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity.
- Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
continue to work as aliases from DECORATE. The ACS functions, however,
require you to use the new name, since they never saw an official release
yet.
- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
crashed after giving you the warning.
- Fixed some improper preprocessor lines in autostart/autozend.cpp.
- Added XInput support. For the benefit of people compiling with MinGW,
the CMakeLists.txt checks for xinput.h and disables it if it cannot
be found. (And much to my surprise, I accidentally discovered that if you
have the DirectX SDK installed, those headers actually do work with GCC,
though they add a few extra warnings.)
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
|
|
|
// [RH] Twiddled these values so that velocity on ice (with
|
2008-01-27 11:25:03 +00:00
|
|
|
// friction 0xf900) is the same as in Heretic/Hexen.
|
|
|
|
if (friction >= ORIG_FRICTION) // ice
|
|
|
|
// movefactor = ((0x10092 - friction)*(0x70))/0x158;
|
|
|
|
movefactor = ((0x10092 - friction) * 1024) / 4352 + 568;
|
|
|
|
else
|
|
|
|
movefactor = ((friction - 0xDB34)*(0xA))/0x80;
|
|
|
|
|
|
|
|
// killough 8/28/98: prevent odd situations
|
|
|
|
if (movefactor < 32)
|
|
|
|
movefactor = 32;
|
|
|
|
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag (tag,s)) >= 0; )
|
|
|
|
{
|
|
|
|
// killough 8/28/98:
|
|
|
|
//
|
|
|
|
// Instead of spawning thinkers, which are slow and expensive,
|
|
|
|
// modify the sector's own friction values. Friction should be
|
|
|
|
// a property of sectors, not objects which reside inside them.
|
|
|
|
// Original code scanned every object in every friction sector
|
|
|
|
// on every tic, adjusting its friction, putting unnecessary
|
|
|
|
// drag on CPU. New code adjusts friction of sector only once
|
|
|
|
// at level startup, and then uses this friction value.
|
|
|
|
|
|
|
|
sectors[s].friction = friction;
|
|
|
|
sectors[s].movefactor = movefactor;
|
|
|
|
if (alterFlag)
|
|
|
|
{
|
|
|
|
// When used inside a script, the sectors' friction flags
|
|
|
|
// can be enabled and disabled at will.
|
|
|
|
if (friction == ORIG_FRICTION)
|
|
|
|
{
|
|
|
|
sectors[s].special &= ~FRICTION_MASK;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
sectors[s].special |= FRICTION_MASK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// phares 3/12/98: End of friction effects
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// PUSH/PULL EFFECT
|
|
|
|
//
|
|
|
|
// phares 3/20/98: Start of push/pull effects
|
|
|
|
//
|
|
|
|
// This is where push/pull effects are applied to objects in the sectors.
|
|
|
|
//
|
|
|
|
// There are four kinds of push effects
|
|
|
|
//
|
|
|
|
// 1) Pushing Away
|
|
|
|
//
|
|
|
|
// Pushes you away from a point source defined by the location of an
|
|
|
|
// MT_PUSH Thing. The force decreases linearly with distance from the
|
|
|
|
// source. This force crosses sector boundaries and is felt w/in a circle
|
|
|
|
// whose center is at the MT_PUSH. The force is felt only if the point
|
|
|
|
// MT_PUSH can see the target object.
|
|
|
|
//
|
|
|
|
// 2) Pulling toward
|
|
|
|
//
|
|
|
|
// Same as Pushing Away except you're pulled toward an MT_PULL point
|
|
|
|
// source. This force crosses sector boundaries and is felt w/in a circle
|
|
|
|
// whose center is at the MT_PULL. The force is felt only if the point
|
|
|
|
// MT_PULL can see the target object.
|
|
|
|
//
|
|
|
|
// 3) Wind
|
|
|
|
//
|
|
|
|
// Pushes you in a constant direction. Full force above ground, half
|
|
|
|
// force on the ground, nothing if you're below it (water).
|
|
|
|
//
|
|
|
|
// 4) Current
|
|
|
|
//
|
|
|
|
// Pushes you in a constant direction. No force above ground, full
|
|
|
|
// force if on the ground or below it (water).
|
|
|
|
//
|
|
|
|
// The magnitude of the force is controlled by the length of a controlling
|
|
|
|
// linedef. The force vector for types 3 & 4 is determined by the angle
|
|
|
|
// of the linedef, and is constant.
|
|
|
|
//
|
|
|
|
// For each sector where these effects occur, the sector special type has
|
|
|
|
// to have the PUSH_MASK bit set. If this bit is turned off by a switch
|
|
|
|
// at run-time, the effect will not occur. The controlling sector for
|
|
|
|
// types 1 & 2 is the sector containing the MT_PUSH/MT_PULL Thing.
|
|
|
|
|
|
|
|
|
|
|
|
#define PUSH_FACTOR 7
|
|
|
|
|
|
|
|
/////////////////////////////
|
|
|
|
//
|
|
|
|
// Add a push thinker to the thinker list
|
|
|
|
|
|
|
|
DPusher::DPusher (DPusher::EPusher type, line_t *l, int magnitude, int angle,
|
|
|
|
AActor *source, int affectee)
|
|
|
|
{
|
|
|
|
m_Source = source;
|
|
|
|
m_Type = type;
|
|
|
|
if (l)
|
|
|
|
{
|
|
|
|
m_Xmag = l->dx>>FRACBITS;
|
|
|
|
m_Ymag = l->dy>>FRACBITS;
|
|
|
|
m_Magnitude = P_AproxDistance (m_Xmag, m_Ymag);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // [RH] Allow setting magnitude and angle with parameters
|
|
|
|
ChangeValues (magnitude, angle);
|
|
|
|
}
|
|
|
|
if (source) // point source exist?
|
|
|
|
{
|
|
|
|
m_Radius = (m_Magnitude) << (FRACBITS+1); // where force goes to zero
|
|
|
|
m_X = m_Source->x;
|
|
|
|
m_Y = m_Source->y;
|
|
|
|
}
|
|
|
|
m_Affectee = affectee;
|
|
|
|
}
|
|
|
|
|
2010-09-19 08:00:43 +00:00
|
|
|
int DPusher::CheckForSectorMatch (EPusher type, int tag)
|
|
|
|
{
|
|
|
|
if (m_Type == type && sectors[m_Affectee].tag == tag)
|
|
|
|
return m_Affectee;
|
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-27 11:25:03 +00:00
|
|
|
/////////////////////////////
|
|
|
|
//
|
|
|
|
// T_Pusher looks for all objects that are inside the radius of
|
|
|
|
// the effect.
|
|
|
|
//
|
|
|
|
void DPusher::Tick ()
|
|
|
|
{
|
|
|
|
sector_t *sec;
|
|
|
|
AActor *thing;
|
|
|
|
msecnode_t *node;
|
|
|
|
int xspeed,yspeed;
|
|
|
|
int ht;
|
|
|
|
|
|
|
|
if (!var_pushers)
|
|
|
|
return;
|
|
|
|
|
|
|
|
sec = sectors + m_Affectee;
|
|
|
|
|
|
|
|
// Be sure the special sector type is still turned on. If so, proceed.
|
|
|
|
// Else, bail out; the sector type has been changed on us.
|
|
|
|
|
|
|
|
if (!(sec->special & PUSH_MASK))
|
|
|
|
return;
|
|
|
|
|
|
|
|
// For constant pushers (wind/current) there are 3 situations:
|
|
|
|
//
|
|
|
|
// 1) Affected Thing is above the floor.
|
|
|
|
//
|
|
|
|
// Apply the full force if wind, no force if current.
|
|
|
|
//
|
|
|
|
// 2) Affected Thing is on the ground.
|
|
|
|
//
|
|
|
|
// Apply half force if wind, full force if current.
|
|
|
|
//
|
|
|
|
// 3) Affected Thing is below the ground (underwater effect).
|
|
|
|
//
|
|
|
|
// Apply no force if wind, full force if current.
|
|
|
|
//
|
|
|
|
// Apply the effect to clipped players only for now.
|
|
|
|
//
|
|
|
|
// In Phase II, you can apply these effects to Things other than players.
|
|
|
|
// [RH] No Phase II, but it works with anything having MF2_WINDTHRUST now.
|
|
|
|
|
|
|
|
if (m_Type == p_push)
|
|
|
|
{
|
|
|
|
// Seek out all pushable things within the force radius of this
|
|
|
|
// point pusher. Crosses sectors, so use blockmap.
|
|
|
|
|
2008-04-08 22:32:52 +00:00
|
|
|
FBlockThingsIterator it(FBoundingBox(m_X, m_Y, m_Radius));
|
|
|
|
AActor *thing;
|
|
|
|
|
|
|
|
while ((thing = it.Next()))
|
|
|
|
{
|
2009-09-15 06:19:39 +00:00
|
|
|
// Normal ZDoom is based only on the WINDTHRUST flag, with the noclip cheat as an exemption.
|
|
|
|
bool pusharound = ((thing->flags2 & MF2_WINDTHRUST) && !(thing->flags & MF_NOCLIP));
|
|
|
|
|
|
|
|
// MBF allows any sentient or shootable thing to be affected, but players with a fly cheat aren't.
|
|
|
|
if (compatflags & COMPATF_MBFMONSTERMOVE)
|
|
|
|
{
|
|
|
|
pusharound = ((pusharound || (thing->IsSentient()) || (thing->flags & MF_SHOOTABLE)) // Add categories here
|
|
|
|
&& (!(thing->player && (thing->flags & (MF_NOGRAVITY))))); // Exclude flying players here
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((pusharound) )
|
2008-04-08 22:32:52 +00:00
|
|
|
{
|
|
|
|
int sx = m_X;
|
|
|
|
int sy = m_Y;
|
|
|
|
int dist = P_AproxDistance (thing->x - sx,thing->y - sy);
|
|
|
|
int speed = (m_Magnitude - ((dist>>FRACBITS)>>1))<<(FRACBITS-PUSH_FACTOR-1);
|
|
|
|
|
|
|
|
// If speed <= 0, you're outside the effective radius. You also have
|
|
|
|
// to be able to see the push/pull source point.
|
|
|
|
|
2010-03-27 07:46:42 +00:00
|
|
|
if ((speed > 0) && (P_CheckSight (thing, m_Source, SF_IGNOREVISIBILITY)))
|
2008-04-08 22:32:52 +00:00
|
|
|
{
|
|
|
|
angle_t pushangle = R_PointToAngle2 (thing->x, thing->y, sx, sy);
|
Update to ZDoom r1146 (warning: massive changes ahead!)
- Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
into misc1 with SF_BIGTIC anymore.
- Changed sprite processing so that sprite names are converted to indices
during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the
internal property parser which is no longer needed.
- Converted the Heresiarch to DECORATE.
- Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.
- Changed Windows to use the performance counter instead of rdtsc.
- Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
processors.
- Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with
DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
number.
- Added Gez's Freedoom detection patch.
- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
- Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
- Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
- Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.
- Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
the burning hand states to StrifePlayer where they really belong.
- Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.
- Fixed. The Firedemon was missing a game filter.
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.
- Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.
- Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.
- Added: fullscreenoffsets flag for status bars. This changes the coordinate
system to be relative to the top left corner of the screen. This is useful
for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
to determine the spacing. Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
- Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.
- Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.
- Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
meta-data strings.
- Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.
- Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.
- Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.
- Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
for replacement actors.
- Added more DECORATE conversions by Karate Chris.
- Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability
reasons.
- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
instead of requiring a separate SetPosition() call to do it.
- Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
|
|
|
if (m_Source->GetClass()->TypeName == NAME_PointPusher)
|
2008-04-08 22:32:52 +00:00
|
|
|
pushangle += ANG180; // away
|
|
|
|
pushangle >>= ANGLETOFINESHIFT;
|
Update to ZDoom r1705:
- ZDoom now disables the input method editor, since it has no east-Asian
support, and having it open a composition window when you're only expecting
a single keypress is not so good.
- Fixed: Setting intermissioncounter to false in gameinfo drew all the stats
at once, instead of revealing them one line at a time.
- Fixed: The border definition in MAPINFO's gameinfo block used extra braces.
- Added A_SetCrosshair.
- Added A_WeaponBob.
- Dropped the Hexen player classes' JumpZ down to 9, since the original value
now works as it originally did.
- MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
from being thrusted while taking damage. (Non-players were already
unthrusted.)
- A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.
- Added Gez's PowerInvisibility changes.
- Fixed: clearflags did not clear flags6.
- Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity.
- Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
continue to work as aliases from DECORATE. The ACS functions, however,
require you to use the new name, since they never saw an official release
yet.
- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
crashed after giving you the warning.
- Fixed some improper preprocessor lines in autostart/autozend.cpp.
- Added XInput support. For the benefit of people compiling with MinGW,
the CMakeLists.txt checks for xinput.h and disables it if it cannot
be found. (And much to my surprise, I accidentally discovered that if you
have the DirectX SDK installed, those headers actually do work with GCC,
though they add a few extra warnings.)
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
|
|
|
thing->velx += FixedMul (speed, finecosine[pushangle]);
|
|
|
|
thing->vely += FixedMul (speed, finesine[pushangle]);
|
2008-04-08 22:32:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// constant pushers p_wind and p_current
|
|
|
|
|
|
|
|
node = sec->touching_thinglist; // things touching this sector
|
|
|
|
for ( ; node ; node = node->m_snext)
|
|
|
|
{
|
|
|
|
thing = node->m_thing;
|
|
|
|
if (!(thing->flags2 & MF2_WINDTHRUST) || (thing->flags & MF_NOCLIP))
|
|
|
|
continue;
|
2009-05-23 10:24:33 +00:00
|
|
|
|
|
|
|
sector_t *hsec = sec->GetHeightSec();
|
2008-01-27 11:25:03 +00:00
|
|
|
if (m_Type == p_wind)
|
|
|
|
{
|
2009-05-23 10:24:33 +00:00
|
|
|
if (hsec == NULL)
|
2008-01-27 11:25:03 +00:00
|
|
|
{ // NOT special water sector
|
|
|
|
if (thing->z > thing->floorz) // above ground
|
|
|
|
{
|
|
|
|
xspeed = m_Xmag; // full force
|
|
|
|
yspeed = m_Ymag;
|
|
|
|
}
|
|
|
|
else // on ground
|
|
|
|
{
|
|
|
|
xspeed = (m_Xmag)>>1; // half force
|
|
|
|
yspeed = (m_Ymag)>>1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // special water sector
|
|
|
|
{
|
2009-05-23 10:24:33 +00:00
|
|
|
ht = hsec->floorplane.ZatPoint (thing->x, thing->y);
|
2008-01-27 11:25:03 +00:00
|
|
|
if (thing->z > ht) // above ground
|
|
|
|
{
|
|
|
|
xspeed = m_Xmag; // full force
|
|
|
|
yspeed = m_Ymag;
|
|
|
|
}
|
|
|
|
else if (thing->player->viewz < ht) // underwater
|
|
|
|
{
|
|
|
|
xspeed = yspeed = 0; // no force
|
|
|
|
}
|
|
|
|
else // wading in water
|
|
|
|
{
|
|
|
|
xspeed = (m_Xmag)>>1; // half force
|
|
|
|
yspeed = (m_Ymag)>>1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // p_current
|
|
|
|
{
|
|
|
|
const secplane_t *floor;
|
|
|
|
|
2009-05-23 10:24:33 +00:00
|
|
|
if (hsec == NULL)
|
2008-01-27 11:25:03 +00:00
|
|
|
{ // NOT special water sector
|
|
|
|
floor = &sec->floorplane;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // special water sector
|
2009-05-23 10:24:33 +00:00
|
|
|
floor = &hsec->floorplane;
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
if (thing->z > floor->ZatPoint (thing->x, thing->y))
|
|
|
|
{ // above ground
|
|
|
|
xspeed = yspeed = 0; // no force
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // on ground/underwater
|
|
|
|
xspeed = m_Xmag; // full force
|
|
|
|
yspeed = m_Ymag;
|
|
|
|
}
|
|
|
|
}
|
Update to ZDoom r1705:
- ZDoom now disables the input method editor, since it has no east-Asian
support, and having it open a composition window when you're only expecting
a single keypress is not so good.
- Fixed: Setting intermissioncounter to false in gameinfo drew all the stats
at once, instead of revealing them one line at a time.
- Fixed: The border definition in MAPINFO's gameinfo block used extra braces.
- Added A_SetCrosshair.
- Added A_WeaponBob.
- Dropped the Hexen player classes' JumpZ down to 9, since the original value
now works as it originally did.
- MF2_NODMGTHRUST now works with players, too. (Previously, it was only for
missiles.) Also added PPF_NOTHRUSTWHILEINVUL to prevent invulnerable players
from being thrusted while taking damage. (Non-players were already
unthrusted.)
- A_ZoomFactor now scales turning with the FOV by default. ZOOM_NOSCALETURNING
will leave it unaltered.
- Added Gez's PowerInvisibility changes.
- Fixed: clearflags did not clear flags6.
- Added A_SetAngle, A_SetPitch, A_ScaleVelocity, and A_ChangeVelocity.
- Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
continue to work as aliases from DECORATE. The ACS functions, however,
require you to use the new name, since they never saw an official release
yet.
- Added A_ZoomFactor. This lets weapons scale their player's FOV. Each weapon
maintains its own FOV scale independent from any other weapons the player
may have.
- Fixed: When parsing DECORATE functions that were not exported, the parser
crashed after giving you the warning.
- Fixed some improper preprocessor lines in autostart/autozend.cpp.
- Added XInput support. For the benefit of people compiling with MinGW,
the CMakeLists.txt checks for xinput.h and disables it if it cannot
be found. (And much to my surprise, I accidentally discovered that if you
have the DirectX SDK installed, those headers actually do work with GCC,
though they add a few extra warnings.)
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@376 b0f79afe-0144-0410-b225-9a4edf0717df
2009-07-04 08:28:50 +00:00
|
|
|
thing->velx += xspeed<<(FRACBITS-PUSH_FACTOR);
|
|
|
|
thing->vely += yspeed<<(FRACBITS-PUSH_FACTOR);
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/////////////////////////////
|
|
|
|
//
|
|
|
|
// P_GetPushThing() returns a pointer to an MT_PUSH or MT_PULL thing,
|
|
|
|
// NULL otherwise.
|
|
|
|
|
|
|
|
AActor *P_GetPushThing (int s)
|
|
|
|
{
|
|
|
|
AActor* thing;
|
|
|
|
sector_t* sec;
|
|
|
|
|
|
|
|
sec = sectors + s;
|
|
|
|
thing = sec->thinglist;
|
|
|
|
|
|
|
|
while (thing &&
|
Update to ZDoom r1146 (warning: massive changes ahead!)
- Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
into misc1 with SF_BIGTIC anymore.
- Changed sprite processing so that sprite names are converted to indices
during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the
internal property parser which is no longer needed.
- Converted the Heresiarch to DECORATE.
- Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.
- Changed Windows to use the performance counter instead of rdtsc.
- Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
processors.
- Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with
DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
number.
- Added Gez's Freedoom detection patch.
- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
- Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
- Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
- Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.
- Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
the burning hand states to StrifePlayer where they really belong.
- Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.
- Fixed. The Firedemon was missing a game filter.
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.
- Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.
- Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.
- Added: fullscreenoffsets flag for status bars. This changes the coordinate
system to be relative to the top left corner of the screen. This is useful
for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
to determine the spacing. Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
- Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.
- Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.
- Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
meta-data strings.
- Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.
- Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.
- Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.
- Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
for replacement actors.
- Added more DECORATE conversions by Karate Chris.
- Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability
reasons.
- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
instead of requiring a separate SetPosition() call to do it.
- Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
|
|
|
thing->GetClass()->TypeName != NAME_PointPusher &&
|
|
|
|
thing->GetClass()->TypeName != NAME_PointPuller)
|
2008-01-27 11:25:03 +00:00
|
|
|
{
|
|
|
|
thing = thing->snext;
|
|
|
|
}
|
|
|
|
return thing;
|
|
|
|
}
|
|
|
|
|
|
|
|
/////////////////////////////
|
|
|
|
//
|
|
|
|
// Initialize the sectors where pushers are present
|
|
|
|
//
|
|
|
|
|
|
|
|
static void P_SpawnPushers ()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
line_t *l = lines;
|
|
|
|
register int s;
|
|
|
|
|
|
|
|
for (i = 0; i < numlines; i++, l++)
|
|
|
|
{
|
|
|
|
switch (l->special)
|
|
|
|
{
|
|
|
|
case Sector_SetWind: // wind
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag (l->args[0],s)) >= 0 ; )
|
|
|
|
new DPusher (DPusher::p_wind, l->args[3] ? l : NULL, l->args[1], l->args[2], NULL, s);
|
2010-01-30 14:54:56 +00:00
|
|
|
l->special = 0;
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Sector_SetCurrent: // current
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag (l->args[0],s)) >= 0 ; )
|
|
|
|
new DPusher (DPusher::p_current, l->args[3] ? l : NULL, l->args[1], l->args[2], NULL, s);
|
2010-01-30 14:54:56 +00:00
|
|
|
l->special = 0;
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PointPush_SetForce: // push/pull
|
|
|
|
if (l->args[0]) { // [RH] Find thing by sector
|
|
|
|
for (s = -1; (s = P_FindSectorFromTag (l->args[0], s)) >= 0 ; )
|
|
|
|
{
|
|
|
|
AActor *thing = P_GetPushThing (s);
|
|
|
|
if (thing) { // No MT_P* means no effect
|
|
|
|
// [RH] Allow narrowing it down by tid
|
|
|
|
if (!l->args[1] || l->args[1] == thing->tid)
|
|
|
|
new DPusher (DPusher::p_push, l->args[3] ? l : NULL, l->args[2],
|
|
|
|
0, thing, s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else { // [RH] Find thing by tid
|
|
|
|
AActor *thing;
|
|
|
|
FActorIterator iterator (l->args[1]);
|
|
|
|
|
|
|
|
while ( (thing = iterator.Next ()) )
|
|
|
|
{
|
Update to ZDoom r1146 (warning: massive changes ahead!)
- Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
into misc1 with SF_BIGTIC anymore.
- Changed sprite processing so that sprite names are converted to indices
during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the
internal property parser which is no longer needed.
- Converted the Heresiarch to DECORATE.
- Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.
- Changed Windows to use the performance counter instead of rdtsc.
- Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
processors.
- Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with
DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
number.
- Added Gez's Freedoom detection patch.
- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
- Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
- Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
- Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.
- Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
the burning hand states to StrifePlayer where they really belong.
- Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.
- Fixed. The Firedemon was missing a game filter.
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.
- Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.
- Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.
- Added: fullscreenoffsets flag for status bars. This changes the coordinate
system to be relative to the top left corner of the screen. This is useful
for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
to determine the spacing. Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
- Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.
- Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.
- Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
meta-data strings.
- Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.
- Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.
- Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.
- Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
for replacement actors.
- Added more DECORATE conversions by Karate Chris.
- Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability
reasons.
- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
instead of requiring a separate SetPosition() call to do it.
- Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
|
|
|
if (thing->GetClass()->TypeName == NAME_PointPusher ||
|
|
|
|
thing->GetClass()->TypeName == NAME_PointPuller)
|
|
|
|
{
|
2008-01-27 11:25:03 +00:00
|
|
|
new DPusher (DPusher::p_push, l->args[3] ? l : NULL, l->args[2],
|
2008-09-15 23:47:00 +00:00
|
|
|
0, thing, int(thing->Sector - sectors));
|
Update to ZDoom r1146 (warning: massive changes ahead!)
- Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
into misc1 with SF_BIGTIC anymore.
- Changed sprite processing so that sprite names are converted to indices
during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the
internal property parser which is no longer needed.
- Converted the Heresiarch to DECORATE.
- Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.
- Changed Windows to use the performance counter instead of rdtsc.
- Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
processors.
- Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with
DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
number.
- Added Gez's Freedoom detection patch.
- SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
* Added: Offset parameter to drawkeybar to allow two key bars with
different keys.
* Added: Multi-row/column keybar parameters. Spacing can also be auto.
These defualt to left to right/top to bottom but can be switched.
* Added: Drawshadow flag to drawnumber. This will draw a solid color and
translucent number under the normal number.
* Added: hexenarmor to drawimage. This takes a parameter for a hexen
armor type and will fade the image like the hexen status bar.
* Added: centerbottom offset to draw(switchable)image.
* Added: translucent flag to drawinventorybar.
* Fixed: Accidentally removed flag from DrawTexture that allowed negative
coordinates to work with fullscreenoffsets. Hopefully this is the last
major bug in the fullscreenoffsets system.
- Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
modifying code for maximum performance. The additional registers do allow
for further optimization over the x86 version by allowing all four pixels
to be in flight at the same time. The end result is that AMD64 ASM is about
2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
(For further comparison, AMD64 C and x86 C are practically the same for
this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
most likely candidate, but it's not used enough at this point to bother.
Also, this may or may not work with Linux at the moment, since it doesn't
have the eh_handler metadata. Win64 is easier, since I just need to
structure the function prologue and epilogue properly and use some
assembler directives/macros to automatically generate the metadata. And
that brings up another point: You need YASM to assemble the AMD64 code,
because NASM doesn't support the Win64 metadata directives.
- Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
- Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.
- Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
- Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.
- Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
VC++ still throws around unneccessary register moves. GCC seems to be
pretty close to optimal, requiring only about 2 cycles/color. They're
both faster than my hand-written MMX routine, so I don't need to feel
bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
instructions, and unrolled it once, shaving off about 80 cycles from the
time required to blend 256 palette entries. Why? Because I tried writing
a C version of the routine using compiler intrinsics and was appalled by
all the extra movq's VC++ added to the code. GCC was better, but still
generated extra instructions. I only wanted a C version because I can't
use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
of a pain. (It's a pain because Linux and Windows have different calling
conventions, and you need to maintain extra metadata for functions.) So,
the assembly version stays and the C version stays out.
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
the burning hand states to StrifePlayer where they really belong.
- Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.
- Fixed. The Firedemon was missing a game filter.
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.
- Removed all the pixel doubling r_detail modes, since the one platform they
were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
only for AMD processors, so we must not use it on other architectures, or
we end up overwriting the L1 cache line size with 0 or some other number
we don't actually understand.
- The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.
- Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.
- Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.
- Added: fullscreenoffsets flag for status bars. This changes the coordinate
system to be relative to the top left corner of the screen. This is useful
for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
to determine the spacing. Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.
- Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.
- Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.
- Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
meta-data strings.
- Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.
- Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.
- Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.
- Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
for replacement actors.
- Added more DECORATE conversions by Karate Chris.
- Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability
reasons.
- Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
instead of requiring a separate SetPosition() call to do it.
- Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.
git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@151 b0f79afe-0144-0410-b225-9a4edf0717df
2008-08-10 15:12:58 +00:00
|
|
|
}
|
2008-01-27 11:25:03 +00:00
|
|
|
}
|
|
|
|
}
|
2010-01-30 14:54:56 +00:00
|
|
|
l->special = 0;
|
2008-01-27 11:25:03 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// phares 3/20/98: End of Pusher effects
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
void sector_t::AdjustFloorClip () const
|
|
|
|
{
|
|
|
|
msecnode_t *node;
|
|
|
|
|
|
|
|
for (node = touching_thinglist; node; node = node->m_snext)
|
|
|
|
{
|
|
|
|
if (node->m_thing->flags2 & MF2_FLOORCLIP)
|
|
|
|
{
|
|
|
|
node->m_thing->AdjustFloorClip();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|