gzdoom-last-svn/src/p_3dfloors.cpp

914 lines
27 KiB
C++
Raw Normal View History

/*
** p_3dfloor.cpp
**
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
** 3D-floor handling
**
**---------------------------------------------------------------------------
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
** Copyright 2005-2008 Christoph Oelckers
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions
** are met:
**
** 1. Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
** 3. The name of the author may not be used to endorse or promote products
** derived from this software without specific prior written permission.
- Added the following clause to all GL renderer related files (Skulltag devlopers, beware!): Full disclosure of the entire project's source code, except for third party libraries is mandartory. (NOTE: This clause is non-negotiable!) - Fixed: The alpha for 3D floors was always set to 0. Update to ZDoom r1056: - Changed: I_Error and I_FatalError now use ZDoom's internal string formatting code to process their messages. This was necessary to handle the %zu format option used in some memory allocation failure messages. - Fixed: The flat texture scaling action specials were completely broken. - The sound code now handles restarting looping sounds itself. As far as the rest of the game is concerned, these sounds will never stop once they have been started until they are explicitly stopped. If they are evicted from their channels, the sound code will restart them as soon as possible. This means that instead of this: if (!S_IsActorPlayingSomething(actor, CHAN_WEAPON, -1)) { S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM); } The following is now just as effective: S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM); There are also a couple of other ramifications presented by this change: * The full state of the sound system (sans music) is now stored in save games. Any sounds that were playing when you saved will still be playing when you load. (Try saving while Korax is making a speech in Hexen to hear it.) * Using snd_reset will also preserve any playing sounds. * Movie playback is disabled, probably forever. I did not want to update the MovieDisable/ResumeSound stuff for the new eviction tracking code. A properly updated movie player will use the VMR, which doesn't need these functions, since it would pipe the sound straight through the sound system like everything else, so I decided to dump them now, which leaves the movie player in a totally unworkable state. - Removed some unused constant definitions from sc_man.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@128 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-29 10:08:16 +00:00
** 4. Full disclosure of the entire project's source code, except for third
** party libraries is mandatory. (NOTE: This clause is non-negotiable!)
**
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**---------------------------------------------------------------------------
**
*/
#include "templates.h"
#include "p_local.h"
#include "p_lnspec.h"
#include "w_wad.h"
#include "sc_man.h"
#include "g_level.h"
#include "r_data/colormaps.h"
#ifdef _3DFLOORS
EXTERN_CVAR(Int, vid_renderer)
//==========================================================================
//
// 3D Floors
//
//==========================================================================
//==========================================================================
//
// Wrappers to access the colormap information
//
//==========================================================================
FDynamicColormap *F3DFloor::GetColormap()
{
// If there's no fog in either model or target sector this is easy and fast.
if ((target->ColorMap->Fade == 0 && model->ColorMap->Fade == 0) || (flags & FF_FADEWALLS))
{
return model->ColorMap;
}
else
{
// We must create a new colormap combining the properties we need
return GetSpecialLights(model->ColorMap->Color, target->ColorMap->Fade, model->ColorMap->Desaturate);
}
}
PalEntry F3DFloor::GetBlend()
{
// The model sector's fog is used as blend unless FF_FADEWALLS is set.
if (!(flags & FF_FADEWALLS) && target->ColorMap->Fade != model->ColorMap->Fade)
{
return model->ColorMap->Fade;
}
else
{
return 0;
}
}
void F3DFloor::UpdateColormap(FDynamicColormap *&map)
{
// If there's no fog in either model or target sector (or both have the same fog) this is easy and fast.
if ((target->ColorMap->Fade == 0 && model->ColorMap->Fade == 0) || (flags & FF_FADEWALLS) ||
target->ColorMap->Fade == model->ColorMap->Fade)
{
map = model->ColorMap;
}
else
{
// since rebuilding the map is not a cheap operation let's only do it if something really changed.
if (map->Color != model->ColorMap->Color || map->Fade != target->ColorMap->Fade ||
map->Desaturate != model->ColorMap->Desaturate)
{
map = GetSpecialLights(model->ColorMap->Color, target->ColorMap->Fade, model->ColorMap->Desaturate);
}
}
}
//==========================================================================
//
// Add one 3D floor to the sector
//
//==========================================================================
* Updated to ZDoom 4012: - Fixed: The resurrect cheat also needs to restore the player's radius. - Changed P_CheckPlayerSprites() so that it does not alter any actor data. It is now called by R_ProjectSprite() to modify the appropriate data right before it is needed for rendering.- Never set the player actor's scale to the skin's directly. Only do it indirectly through P_CheckPlayerSprite(). - Fixed: When P_Add3DFloor() adds the "inside" plane, it needs to copy the translucency flags from the original plane. - Added JLOSF_NOAUTOAIM flag for when you want to use A_JumpIfTargetInLOS in conjunction with something that never autoaims, such as a railgun. - Fixed: A_JumpIfTargetInLOS should use P_AimLineAttack() instead of P_BulletSlope(), because the latter intentionally checks to the sides of the aimed line. - Do not wake Oracle spectres that are dead. - Do not "wake" Oracle spectres that killed an Oracle. (Because if they killed it, they're obviously already awake. Also, we don't want them to end up targeting themselves.) - Fixed: Don't use the player skin in the cast call if the class being shown has been removed from the PlayerClasses array (and therefore does not have a valid default skin). - Do not double-scale player classes that use non-1.0 default scales. - P_DamageMobj() now returns the amount of damage actually done so that the bleed functions can perform based on the amount of damage actually taken after all modifications are done to it. However, if the damage is canceled away, blood will still spawn for the original damage amount rather than the modified amount. * Fixed decals not being lit correctly in the older lighting mode. * Fixed: 3D middle textures with a valid backsector need to be rendered as two-sided even if they lack the two-sided flag. (It works in ZDoom.) git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1500 b0f79afe-0144-0410-b225-9a4edf0717df
2013-01-03 00:03:11 +00:00
static void P_Add3DFloor(sector_t* sec, sector_t* sec2, line_t* master, int flags, int alpha)
{
F3DFloor* ffloor;
unsigned i;
if(!(flags & FF_THISINSIDE)) {
for(i = 0; i < sec2->e->XFloor.attached.Size(); i++) if(sec2->e->XFloor.attached[i] == sec) return;
sec2->e->XFloor.attached.Push(sec);
}
//Add the floor
ffloor = new F3DFloor;
ffloor->top.model = ffloor->bottom.model = ffloor->model = sec2;
ffloor->target = sec;
ffloor->ceilingclip = ffloor->floorclip = NULL;
ffloor->validcount = 0;
if (!(flags&FF_THINFLOOR))
{
ffloor->bottom.plane = &sec2->floorplane;
ffloor->bottom.texture = &sec2->planes[sector_t::floor].Texture;
ffloor->bottom.texheight = &sec2->planes[sector_t::floor].TexZ;
ffloor->bottom.isceiling = sector_t::floor;
}
else
{
ffloor->bottom.plane = &sec2->ceilingplane;
ffloor->bottom.texture = &sec2->planes[sector_t::ceiling].Texture;
ffloor->bottom.texheight = &sec2->planes[sector_t::ceiling].TexZ;
ffloor->bottom.isceiling = sector_t::ceiling;
}
if (!(flags&FF_FIX))
{
ffloor->top.plane = &sec2->ceilingplane;
ffloor->top.texture = &sec2->planes[sector_t::ceiling].Texture;
ffloor->top.texheight = &sec2->planes[sector_t::ceiling].TexZ;
ffloor->toplightlevel = &sec2->lightlevel;
ffloor->top.isceiling = sector_t::ceiling;
}
else // FF_FIX is a special case to patch rendering holes
{
ffloor->top.plane = &sec->floorplane;
ffloor->top.texture = &sec2->planes[sector_t::floor].Texture;
ffloor->top.texheight = &sec2->planes[sector_t::floor].TexZ;
ffloor->toplightlevel = &sec->lightlevel;
ffloor->top.isceiling = sector_t::floor;
ffloor->top.model = sec;
}
// Hacks for Vavoom's idiotic implementation
if (flags&FF_INVERTSECTOR)
{
// switch the planes
F3DFloor::planeref sp = ffloor->top;
ffloor->top=ffloor->bottom;
ffloor->bottom=sp;
if (flags&FF_SWIMMABLE)
{
// Vavoom floods the lower part if it is swimmable.
// fortunately this plane won't be rendered - otherwise this wouldn't work...
ffloor->bottom.plane=&sec->floorplane;
ffloor->bottom.model=sec;
ffloor->bottom.isceiling = sector_t::floor;
}
}
ffloor->flags = flags;
ffloor->master = master;
* Updated to ZDoom 4012: - Fixed: The resurrect cheat also needs to restore the player's radius. - Changed P_CheckPlayerSprites() so that it does not alter any actor data. It is now called by R_ProjectSprite() to modify the appropriate data right before it is needed for rendering.- Never set the player actor's scale to the skin's directly. Only do it indirectly through P_CheckPlayerSprite(). - Fixed: When P_Add3DFloor() adds the "inside" plane, it needs to copy the translucency flags from the original plane. - Added JLOSF_NOAUTOAIM flag for when you want to use A_JumpIfTargetInLOS in conjunction with something that never autoaims, such as a railgun. - Fixed: A_JumpIfTargetInLOS should use P_AimLineAttack() instead of P_BulletSlope(), because the latter intentionally checks to the sides of the aimed line. - Do not wake Oracle spectres that are dead. - Do not "wake" Oracle spectres that killed an Oracle. (Because if they killed it, they're obviously already awake. Also, we don't want them to end up targeting themselves.) - Fixed: Don't use the player skin in the cast call if the class being shown has been removed from the PlayerClasses array (and therefore does not have a valid default skin). - Do not double-scale player classes that use non-1.0 default scales. - P_DamageMobj() now returns the amount of damage actually done so that the bleed functions can perform based on the amount of damage actually taken after all modifications are done to it. However, if the damage is canceled away, blood will still spawn for the original damage amount rather than the modified amount. * Fixed decals not being lit correctly in the older lighting mode. * Fixed: 3D middle textures with a valid backsector need to be rendered as two-sided even if they lack the two-sided flag. (It works in ZDoom.) git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1500 b0f79afe-0144-0410-b225-9a4edf0717df
2013-01-03 00:03:11 +00:00
ffloor->alpha = alpha;
ffloor->top.vindex = ffloor->bottom.vindex = -1;
// The engine cannot handle sloped translucent floors. Sorry
if (ffloor->top.plane->a || ffloor->top.plane->b || ffloor->bottom.plane->a || ffloor->bottom.plane->b)
{
ffloor->alpha = FRACUNIT;
ffloor->flags &= ~FF_ADDITIVETRANS;
}
if(flags & FF_THISINSIDE) {
// switch the planes
F3DFloor::planeref sp = ffloor->top;
ffloor->top=ffloor->bottom;
ffloor->bottom=sp;
}
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
sec->e->XFloor.ffloors.Push(ffloor);
// kg3D - software renderer only hack
// this is really required because of ceilingclip and floorclip
* Updated to ZDoom 4012: - Fixed: The resurrect cheat also needs to restore the player's radius. - Changed P_CheckPlayerSprites() so that it does not alter any actor data. It is now called by R_ProjectSprite() to modify the appropriate data right before it is needed for rendering.- Never set the player actor's scale to the skin's directly. Only do it indirectly through P_CheckPlayerSprite(). - Fixed: When P_Add3DFloor() adds the "inside" plane, it needs to copy the translucency flags from the original plane. - Added JLOSF_NOAUTOAIM flag for when you want to use A_JumpIfTargetInLOS in conjunction with something that never autoaims, such as a railgun. - Fixed: A_JumpIfTargetInLOS should use P_AimLineAttack() instead of P_BulletSlope(), because the latter intentionally checks to the sides of the aimed line. - Do not wake Oracle spectres that are dead. - Do not "wake" Oracle spectres that killed an Oracle. (Because if they killed it, they're obviously already awake. Also, we don't want them to end up targeting themselves.) - Fixed: Don't use the player skin in the cast call if the class being shown has been removed from the PlayerClasses array (and therefore does not have a valid default skin). - Do not double-scale player classes that use non-1.0 default scales. - P_DamageMobj() now returns the amount of damage actually done so that the bleed functions can perform based on the amount of damage actually taken after all modifications are done to it. However, if the damage is canceled away, blood will still spawn for the original damage amount rather than the modified amount. * Fixed decals not being lit correctly in the older lighting mode. * Fixed: 3D middle textures with a valid backsector need to be rendered as two-sided even if they lack the two-sided flag. (It works in ZDoom.) git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1500 b0f79afe-0144-0410-b225-9a4edf0717df
2013-01-03 00:03:11 +00:00
if((vid_renderer == 0) && (flags & FF_BOTHPLANES))
{
P_Add3DFloor(sec, sec2, master, FF_EXISTS | FF_THISINSIDE | FF_RENDERPLANES | FF_NOSHADE | FF_SEETHROUGH | FF_SHOOTTHROUGH |
(flags & (FF_INVERTSECTOR | FF_TRANSLUCENT | FF_ADDITIVETRANS)), alpha);
}
}
//==========================================================================
//
// Creates all 3D floors defined by one linedef
//
//==========================================================================
* Updated to ZDoom 4012: - Fixed: The resurrect cheat also needs to restore the player's radius. - Changed P_CheckPlayerSprites() so that it does not alter any actor data. It is now called by R_ProjectSprite() to modify the appropriate data right before it is needed for rendering.- Never set the player actor's scale to the skin's directly. Only do it indirectly through P_CheckPlayerSprite(). - Fixed: When P_Add3DFloor() adds the "inside" plane, it needs to copy the translucency flags from the original plane. - Added JLOSF_NOAUTOAIM flag for when you want to use A_JumpIfTargetInLOS in conjunction with something that never autoaims, such as a railgun. - Fixed: A_JumpIfTargetInLOS should use P_AimLineAttack() instead of P_BulletSlope(), because the latter intentionally checks to the sides of the aimed line. - Do not wake Oracle spectres that are dead. - Do not "wake" Oracle spectres that killed an Oracle. (Because if they killed it, they're obviously already awake. Also, we don't want them to end up targeting themselves.) - Fixed: Don't use the player skin in the cast call if the class being shown has been removed from the PlayerClasses array (and therefore does not have a valid default skin). - Do not double-scale player classes that use non-1.0 default scales. - P_DamageMobj() now returns the amount of damage actually done so that the bleed functions can perform based on the amount of damage actually taken after all modifications are done to it. However, if the damage is canceled away, blood will still spawn for the original damage amount rather than the modified amount. * Fixed decals not being lit correctly in the older lighting mode. * Fixed: 3D middle textures with a valid backsector need to be rendered as two-sided even if they lack the two-sided flag. (It works in ZDoom.) git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1500 b0f79afe-0144-0410-b225-9a4edf0717df
2013-01-03 00:03:11 +00:00
static int P_Set3DFloor(line_t * line, int param, int param2, int alpha)
{
int s,i;
int flags;
int tag=line->args[0];
sector_t * sec = line->frontsector, * ss;
for (s=-1; (s = P_FindSectorFromTag(tag,s)) >= 0;)
{
ss=&sectors[s];
if (param==0)
{
flags=FF_EXISTS|FF_RENDERALL|FF_SOLID|FF_INVERTSECTOR;
for (i=0;i<sec->linecount;i++)
{
line_t * l=sec->lines[i];
alpha=255;
if (l->special==Sector_SetContents && l->frontsector==sec)
{
alpha=clamp<int>(l->args[1], 0, 100);
if (l->args[2] & 1) flags &= ~FF_SOLID;
if (l->args[2] & 2) flags |= FF_SEETHROUGH;
if (l->args[2] & 4) flags |= FF_SHOOTTHROUGH;
if (l->args[2] & 8) flags |= FF_ADDITIVETRANS;
if (alpha!=100) flags|=FF_TRANSLUCENT;//|FF_BOTHPLANES|FF_ALLSIDES;
if (l->args[0])
{
// Yes, Vavoom's 3D-floor definitions suck!
Update to ZDoom r1831: fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by yesterday's additions. Changed it so that the parser first checks for the presence of a '-' sign before deciding whether to use strtol or strtoul to convert the string into a number. - Added PinkSilver's A_LookEx fix. - added resources needed for MBF support. - removed unused score items from DECORATE file. - Fixed: Argument count for UsePuzzleItem was wrong. - Added a few things from Gez's experimental build: * MBF Dehacked emulation but removed the COMPATF_MBFDEHACKED flag because it wouldn't work and is more or less useless anyway. * MBF's dog (definition only, no sprites yet.) * User variables. There's an array of 10. They can be set and checked in both DECORATE and ACS. * Made the tag name changeable but eliminated the redundancy of having both the meta property and the individual actor's one. Having one is fully sufficient. TO BE FIXED: Names are case insensitive but this should better be case sensitive. Unfortunately there's currently nothing better than FName to store a string inside an actor without severely complicating matters. Also bumped savegame version to avoid problems with this change. * MBF grenade and bouncing code. * several compatibility options. * info CCMD to print extended actor information (not fully implemented yet) * summonmbf CCMD. * Beta BFG code pointer (but not the related missiles yet.) * PowerInvisibility enhancements. * ScoreItem with one significant change: Added a score variable that can be checked through ACS and DECORATE. The engine itself will do nothing with it. * Nailgun option for A_Explode. * A_PrintBold and A_Log. * A_SetSpecial. * Beta Lost Soul (added DoomEdNum 9037 to it) * A_Mushroom extensions * Vavoom compatible MAPINFO keynames. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@452 b0f79afe-0144-0410-b225-9a4edf0717df
2009-09-15 06:19:39 +00:00
// The content list changed in r1783 of Vavoom to be unified
// among all its supported games, so it has now ten different
// values instead of just five.
static DWORD vavoomcolors[]={VC_EMPTY,
VC_WATER, VC_LAVA, VC_NUKAGE, VC_SLIME, VC_HELLSLIME,
VC_BLOOD, VC_SLUDGE, VC_HAZARD, VC_BOOMWATER};
flags|=FF_SWIMMABLE|FF_BOTHPLANES|FF_ALLSIDES|FF_FLOOD;
Update to ZDoom r1831: fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by yesterday's additions. Changed it so that the parser first checks for the presence of a '-' sign before deciding whether to use strtol or strtoul to convert the string into a number. - Added PinkSilver's A_LookEx fix. - added resources needed for MBF support. - removed unused score items from DECORATE file. - Fixed: Argument count for UsePuzzleItem was wrong. - Added a few things from Gez's experimental build: * MBF Dehacked emulation but removed the COMPATF_MBFDEHACKED flag because it wouldn't work and is more or less useless anyway. * MBF's dog (definition only, no sprites yet.) * User variables. There's an array of 10. They can be set and checked in both DECORATE and ACS. * Made the tag name changeable but eliminated the redundancy of having both the meta property and the individual actor's one. Having one is fully sufficient. TO BE FIXED: Names are case insensitive but this should better be case sensitive. Unfortunately there's currently nothing better than FName to store a string inside an actor without severely complicating matters. Also bumped savegame version to avoid problems with this change. * MBF grenade and bouncing code. * several compatibility options. * info CCMD to print extended actor information (not fully implemented yet) * summonmbf CCMD. * Beta BFG code pointer (but not the related missiles yet.) * PowerInvisibility enhancements. * ScoreItem with one significant change: Added a score variable that can be checked through ACS and DECORATE. The engine itself will do nothing with it. * Nailgun option for A_Explode. * A_PrintBold and A_Log. * A_SetSpecial. * Beta Lost Soul (added DoomEdNum 9037 to it) * A_Mushroom extensions * Vavoom compatible MAPINFO keynames. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@452 b0f79afe-0144-0410-b225-9a4edf0717df
2009-09-15 06:19:39 +00:00
l->frontsector->ColorMap =
GetSpecialLights (l->frontsector->ColorMap->Color,
(unsigned int)(vavoomcolors[l->args[0]]&VC_COLORMASK),
(unsigned int)(vavoomcolors[l->args[0]]&VC_ALPHAMASK)>>24);
Update to ZDoom r1831: fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by yesterday's additions. Changed it so that the parser first checks for the presence of a '-' sign before deciding whether to use strtol or strtoul to convert the string into a number. - Added PinkSilver's A_LookEx fix. - added resources needed for MBF support. - removed unused score items from DECORATE file. - Fixed: Argument count for UsePuzzleItem was wrong. - Added a few things from Gez's experimental build: * MBF Dehacked emulation but removed the COMPATF_MBFDEHACKED flag because it wouldn't work and is more or less useless anyway. * MBF's dog (definition only, no sprites yet.) * User variables. There's an array of 10. They can be set and checked in both DECORATE and ACS. * Made the tag name changeable but eliminated the redundancy of having both the meta property and the individual actor's one. Having one is fully sufficient. TO BE FIXED: Names are case insensitive but this should better be case sensitive. Unfortunately there's currently nothing better than FName to store a string inside an actor without severely complicating matters. Also bumped savegame version to avoid problems with this change. * MBF grenade and bouncing code. * several compatibility options. * info CCMD to print extended actor information (not fully implemented yet) * summonmbf CCMD. * Beta BFG code pointer (but not the related missiles yet.) * PowerInvisibility enhancements. * ScoreItem with one significant change: Added a score variable that can be checked through ACS and DECORATE. The engine itself will do nothing with it. * Nailgun option for A_Explode. * A_PrintBold and A_Log. * A_SetSpecial. * Beta Lost Soul (added DoomEdNum 9037 to it) * A_Mushroom extensions * Vavoom compatible MAPINFO keynames. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@452 b0f79afe-0144-0410-b225-9a4edf0717df
2009-09-15 06:19:39 +00:00
// l->frontsector->ColorMap->Desaturate);
}
alpha=(alpha*255)/100;
break;
}
}
}
else if (param==4)
{
flags=FF_EXISTS|FF_RENDERPLANES|FF_INVERTPLANES|FF_NOSHADE|FF_FIX;
alpha=255;
}
else
{
static const int defflags[]= {0,
FF_SOLID,
FF_SWIMMABLE|FF_BOTHPLANES|FF_ALLSIDES|FF_SHOOTTHROUGH|FF_SEETHROUGH,
FF_SHOOTTHROUGH|FF_SEETHROUGH,
};
flags = defflags[param&3] | FF_EXISTS|FF_RENDERALL;
if (param&4) flags |= FF_ALLSIDES|FF_BOTHPLANES;
if (param&16) flags ^= FF_SEETHROUGH;
if (param&32) flags ^= FF_SHOOTTHROUGH;
if (param2&1) flags |= FF_NOSHADE;
if (param2&2) flags |= FF_DOUBLESHADOW;
if (param2&4) flags |= FF_FOG;
if (param2&8) flags |= FF_THINFLOOR;
if (param2&16) flags |= FF_UPPERTEXTURE;
if (param2&32) flags |= FF_LOWERTEXTURE;
if (param2&64) flags |= FF_ADDITIVETRANS|FF_TRANSLUCENT;
// if flooding is used the floor must be non-solid and is automatically made shootthrough and seethrough
if ((param2&128) && !(flags & FF_SOLID)) flags |= FF_FLOOD|FF_SEETHROUGH|FF_SHOOTTHROUGH;
if (param2&512) flags |= FF_FADEWALLS;
FTextureID tex = line->sidedef[0]->GetTexture(side_t::top);
- Added the following clause to all GL renderer related files (Skulltag devlopers, beware!): Full disclosure of the entire project's source code, except for third party libraries is mandartory. (NOTE: This clause is non-negotiable!) - Fixed: The alpha for 3D floors was always set to 0. Update to ZDoom r1056: - Changed: I_Error and I_FatalError now use ZDoom's internal string formatting code to process their messages. This was necessary to handle the %zu format option used in some memory allocation failure messages. - Fixed: The flat texture scaling action specials were completely broken. - The sound code now handles restarting looping sounds itself. As far as the rest of the game is concerned, these sounds will never stop once they have been started until they are explicitly stopped. If they are evicted from their channels, the sound code will restart them as soon as possible. This means that instead of this: if (!S_IsActorPlayingSomething(actor, CHAN_WEAPON, -1)) { S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM); } The following is now just as effective: S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM); There are also a couple of other ramifications presented by this change: * The full state of the sound system (sans music) is now stored in save games. Any sounds that were playing when you saved will still be playing when you load. (Try saving while Korax is making a speech in Hexen to hear it.) * Using snd_reset will also preserve any playing sounds. * Movie playback is disabled, probably forever. I did not want to update the MovieDisable/ResumeSound stuff for the new eviction tracking code. A properly updated movie player will use the VMR, which doesn't need these functions, since it would pipe the sound straight through the sound system like everything else, so I decided to dump them now, which leaves the movie player in a totally unworkable state. - Removed some unused constant definitions from sc_man.cpp. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@128 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-29 10:08:16 +00:00
if (!tex.Exists() && alpha<255)
{
Update to ZDoom r1052: - Fixed: Dead players didn't get the MF_CORPSE flag set. - Fixed: The internal definition of Floor_LowerToNearest had incorrect parameter settings. - Fixed: Heretic's ActivatedTimeBomb had the same spawn ID as the inventory item. - fixed: Heretic's mace did not have its spawn ID set. - For controls that are not bound, the customize controls menu now displays a black --- instead of ???. - Applied Gez's BossBrainPatch3. - Fixed: P_BulletSlope() did not return the linetarget. This effected the Sigil, A_JumpIfCloser, and A_JumpIfTargetInLOS. - Fixed all the new warnings tossed out by GCC 4.3. - Fixed: PickNext/PrevWeapon() did not check for NULL player actors. - Fixed compilation issues with GCC. - Removed special case for nobotnodes in MAPINFO. - Added support for ST's QUARTERGRAVITY flag. - Added a generalized version of Skulltag's A_CheckRailReload function. - Fixed: DrawImage didn't take 0 as a valid image index. - Added Gez's RandomSpawner submission with significant changes. - Added optional blocks for MAPINFO map definitions. ZDoom doesn't use this feature itself but it allows other ports based on ZDoom to implement their own sets of options without making such a MAPINFO unreadable by ZDoom. - Fixed: The mugshot would not reset on re-spawn. - Fixed: Picking up a weapon would sometimes not activate the grin. - Changed: Line_SetIdentification will ignore extended parameters when used in maps defined Hexen style in MAPINFO. - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound. - Fixed: UseType was not properly set for textures defined in TEXTURES. - Fixed: You couldn't set an offset for sprites defined in TEXTURES. - Added read barriers to all actor pointers within player_t except for mo, ReadyWeapon and PendingWeapon. - Added a read barrier to player_t::PrewmorphWeapon. - Fixed: After spawning a deathmatch player P_PlayerStartStomp must be called. - Fixed: SpawnThings must check if the players were spawned before calling P_PlayerStartStomp. - Fixed typo in flat scroll interpolation. - Changed FImageCollection to return translated texture indices so that animated icons can be done with it. - Changed FImageCollection to use a TArray to hold its data. - Fixed: SetChanHeadSettings did an assignment instead of comparing the channel ID witg CHAN_CEILING. - Changed sound sequence names for animated doors to FNames. - Automatically fixed: DCeiling didn't properly serialize its texture id. - Replaced integers as texture ID representation with a specific new type to track down all potentially incorrect uses and remaining WORDs used for texture IDs so that more than 32767 or 65535 textures can be defined. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@124 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-28 13:29:59 +00:00
alpha=clamp(-tex.GetIndex(), 0, 255);
}
if (alpha==0) flags&=~(FF_RENDERALL|FF_BOTHPLANES|FF_ALLSIDES);
else if (alpha!=255) flags|=FF_TRANSLUCENT;
}
P_Add3DFloor(ss, sec, line, flags, alpha);
}
// To be 100% safe this should be done even if the alpha by texture value isn't used.
if (!line->sidedef[0]->GetTexture(side_t::top).isValid())
line->sidedef[0]->SetTexture(side_t::top, FNullTextureID());
return 1;
}
//==========================================================================
//
// P_PlayerOnSpecial3DFloor
// Checks to see if a player is standing on or is inside a 3D floor (water)
// and applies any specials..
//
//==========================================================================
void P_PlayerOnSpecial3DFloor(player_t* player)
{
sector_t * sector = player->mo->Sector;
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
for(unsigned i=0;i<sector->e->XFloor.ffloors.Size();i++)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
F3DFloor* rover=sector->e->XFloor.ffloors[i];
if (!(rover->flags & FF_EXISTS)) continue;
if (rover->flags & FF_FIX) continue;
// Check the 3D floor's type...
if(rover->flags & FF_SOLID)
{
// Player must be on top of the floor to be affected...
if(player->mo->z != rover->top.plane->ZatPoint(player->mo->x, player->mo->y)) continue;
}
else
{
//Water and DEATH FOG!!! heh
if (player->mo->z > rover->top.plane->ZatPoint(player->mo->x, player->mo->y) ||
(player->mo->z + player->mo->height) < rover->bottom.plane->ZatPoint(player->mo->x, player->mo->y))
continue;
}
if (rover->model->special || rover->model->damage) P_PlayerInSpecialSector(player, rover->model);
break;
}
}
//==========================================================================
//
// P_CheckFor3DFloorHit
// Checks whether the player's feet touch a solid 3D floor in the sector
//
//==========================================================================
bool P_CheckFor3DFloorHit(AActor * mo)
{
sector_t * sector = mo->Sector;
if ((mo->player && (mo->player->cheats & CF_PREDICTING))) return false;
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
for(unsigned i=0;i<sector->e->XFloor.ffloors.Size();i++)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
F3DFloor* rover=sector->e->XFloor.ffloors[i];
if (!(rover->flags & FF_EXISTS)) continue;
if(rover->flags & FF_SOLID && rover->model->SecActTarget)
{
if(mo->floorz == rover->top.plane->ZatPoint(mo->x, mo->y))
{
rover->model->SecActTarget->TriggerAction (mo, SECSPAC_HitFloor);
return true;
}
}
}
return false;
}
//==========================================================================
//
// P_CheckFor3DCeilingHit
// Checks whether the player's head touches a solid 3D floor in the sector
//
//==========================================================================
bool P_CheckFor3DCeilingHit(AActor * mo)
{
sector_t * sector = mo->Sector;
if ((mo->player && (mo->player->cheats & CF_PREDICTING))) return false;
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
for(unsigned i=0;i<sector->e->XFloor.ffloors.Size();i++)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
F3DFloor* rover=sector->e->XFloor.ffloors[i];
if (!(rover->flags & FF_EXISTS)) continue;
if(rover->flags & FF_SOLID && rover->model->SecActTarget)
{
if(mo->ceilingz == rover->bottom.plane->ZatPoint(mo->x, mo->y))
{
rover->model->SecActTarget->TriggerAction (mo, SECSPAC_HitCeiling);
return true;
}
}
}
return false;
}
//==========================================================================
//
// P_Recalculate3DFloors
//
// This function sorts the ffloors by height and creates the lightlists
// that the given sector uses to light floors/ceilings/walls according to the 3D floors.
//
//==========================================================================
void P_Recalculate3DFloors(sector_t * sector)
{
F3DFloor * rover;
F3DFloor * pick;
unsigned pickindex;
F3DFloor * clipped=NULL;
fixed_t clipped_top;
fixed_t clipped_bottom=0;
fixed_t maxheight, minheight;
unsigned i, j;
lightlist_t newlight;
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
TArray<F3DFloor*> & ffloors=sector->e->XFloor.ffloors;
TArray<lightlist_t> & lightlist = sector->e->XFloor.lightlist;
// Sort the floors top to bottom for quicker access here and later
// Translucent and swimmable floors are split if they overlap with solid ones.
if (ffloors.Size()>1)
{
TArray<F3DFloor*> oldlist;
oldlist = ffloors;
ffloors.Clear();
// first delete the old dynamic stuff
for(i=0;i<oldlist.Size();i++)
{
F3DFloor * rover=oldlist[i];
if (rover->flags&FF_DYNAMIC)
{
delete rover;
oldlist.Delete(i);
i--;
continue;
}
if (rover->flags&FF_CLIPPED)
{
rover->flags&=~FF_CLIPPED;
rover->flags|=FF_EXISTS;
}
}
while (oldlist.Size())
{
pick=oldlist[0];
fixed_t height=pick->top.plane->ZatPoint(CenterSpot(sector));
// find highest starting ffloor - intersections are not supported!
pickindex=0;
for (j=1;j<oldlist.Size();j++)
{
fixed_t h2=oldlist[j]->top.plane->ZatPoint(CenterSpot(sector));
if (h2>height)
{
pick=oldlist[j];
pickindex=j;
height=h2;
}
}
oldlist.Delete(pickindex);
if (pick->flags & FF_THISINSIDE)
{
// These have the floor higher than the ceiling and cannot be processed
// by the clipping code below.
ffloors.Push(pick);
}
else if (pick->flags&(FF_SWIMMABLE|FF_TRANSLUCENT) && pick->flags&FF_EXISTS)
{
clipped=pick;
clipped_top=height;
clipped_bottom=pick->bottom.plane->ZatPoint(CenterSpot(sector));
ffloors.Push(pick);
}
else if (clipped && clipped_bottom<height)
{
// translucent floor above must be clipped to this one!
F3DFloor * dyn=new F3DFloor;
*dyn=*clipped;
clipped->flags|=FF_CLIPPED;
clipped->flags&=~FF_EXISTS;
dyn->flags|=FF_DYNAMIC;
dyn->bottom=pick->top;
ffloors.Push(dyn);
ffloors.Push(pick);
fixed_t pick_bottom=pick->bottom.plane->ZatPoint(CenterSpot(sector));
if (pick_bottom<=clipped_bottom)
{
clipped=NULL;
}
else
{
// the translucent part extends below the clipper
dyn=new F3DFloor;
*dyn=*clipped;
dyn->flags|=FF_DYNAMIC|FF_EXISTS;
dyn->top=pick->bottom;
ffloors.Push(dyn);
}
}
else
{
clipped=NULL;
ffloors.Push(pick);
}
}
}
// having the floors sorted makes this routine significantly simpler
// Only some overlapping cases with FF_DOUBLESHADOW might create anomalies
// but these are clearly undefined.
if(ffloors.Size())
{
lightlist.Resize(1);
lightlist[0].plane = sector->ceilingplane;
lightlist[0].p_lightlevel = &sector->lightlevel;
lightlist[0].caster = NULL;
lightlist[0].lightsource = NULL;
lightlist[0].extra_colormap = sector->ColorMap;
lightlist[0].blend = 0;
lightlist[0].flags = 0;
maxheight = sector->CenterCeiling();
minheight = sector->CenterFloor();
for(i = 0; i < ffloors.Size(); i++)
{
rover=ffloors[i];
if ( !(rover->flags & FF_EXISTS) || rover->flags & FF_NOSHADE )
continue;
fixed_t ff_top=rover->top.plane->ZatPoint(CenterSpot(sector));
if (ff_top < minheight) break; // reached the floor
if (ff_top < maxheight)
{
newlight.plane = *rover->top.plane;
newlight.p_lightlevel = rover->toplightlevel;
newlight.caster = rover;
newlight.lightsource = rover;
newlight.extra_colormap = rover->GetColormap();
newlight.blend = rover->GetBlend();
newlight.flags = rover->flags;
lightlist.Push(newlight);
}
else if (i==0)
{
fixed_t ff_bottom=rover->bottom.plane->ZatPoint(CenterSpot(sector));
if (ff_bottom<maxheight)
{
// this segment begins over the ceiling and extends beyond it
lightlist[0].p_lightlevel = rover->toplightlevel;
lightlist[0].caster = rover;
lightlist[0].lightsource = rover;
lightlist[0].extra_colormap = rover->GetColormap();
lightlist[0].blend = rover->GetBlend();
lightlist[0].flags = rover->flags;
}
}
if (rover->flags&FF_DOUBLESHADOW)
{
fixed_t ff_bottom=rover->bottom.plane->ZatPoint(CenterSpot(sector));
if(ff_bottom < maxheight && ff_bottom>minheight)
{
newlight.caster = rover;
newlight.plane = *rover->bottom.plane;
if (lightlist.Size()>1)
{
newlight.lightsource = lightlist[lightlist.Size()-2].lightsource;
newlight.p_lightlevel = lightlist[lightlist.Size()-2].p_lightlevel;
newlight.extra_colormap = lightlist[lightlist.Size()-2].extra_colormap;
newlight.blend = lightlist[lightlist.Size()-2].blend;
}
else
{
newlight.lightsource = NULL;
newlight.p_lightlevel = &sector->lightlevel;
newlight.extra_colormap = sector->ColorMap;
newlight.blend = 0;
}
newlight.flags = rover->flags;
lightlist.Push(newlight);
}
}
}
}
}
//==========================================================================
//
// recalculates 3D floors for all attached sectors
//
//==========================================================================
void P_RecalculateAttached3DFloors(sector_t * sec)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
extsector_t::xfloor &x = sec->e->XFloor;
for(unsigned int i=0; i<x.attached.Size(); i++)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
P_Recalculate3DFloors(x.attached[i]);
}
P_Recalculate3DFloors(sec);
}
//==========================================================================
//
// recalculates light lists for this sector
//
//==========================================================================
void P_RecalculateLights(sector_t *sector)
{
TArray<lightlist_t> &lightlist = sector->e->XFloor.lightlist;
for(unsigned i = 0; i < lightlist.Size(); i++)
{
lightlist_t *ll = &lightlist[i];
if (ll->lightsource != NULL)
{
ll->lightsource->UpdateColormap(ll->extra_colormap);
ll->blend = ll->lightsource->GetBlend();
}
else
{
ll->extra_colormap = sector->ColorMap;
ll->blend = 0;
}
}
}
//==========================================================================
//
// recalculates light lists for all attached sectors
//
//==========================================================================
void P_RecalculateAttachedLights(sector_t *sector)
{
extsector_t::xfloor &x = sector->e->XFloor;
for(unsigned int i=0; i<x.attached.Size(); i++)
{
P_RecalculateLights(x.attached[i]);
}
P_RecalculateLights(sector);
}
//==========================================================================
//
//
//
//==========================================================================
lightlist_t * P_GetPlaneLight(sector_t * sector, secplane_t * plane, bool underside)
{
unsigned i;
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
TArray<lightlist_t> &lightlist = sector->e->XFloor.lightlist;
fixed_t planeheight=plane->ZatPoint(CenterSpot(sector));
if(underside) planeheight--;
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
for(i = 1; i < lightlist.Size(); i++)
if (lightlist[i].plane.ZatPoint(CenterSpot(sector)) <= planeheight)
return &lightlist[i - 1];
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
return &lightlist[lightlist.Size() - 1];
}
//==========================================================================
//
// Extended P_LineOpening
//
//==========================================================================
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
void P_LineOpening_XFloors (FLineOpening &open, AActor * thing, const line_t *linedef,
fixed_t x, fixed_t y, fixed_t refx, fixed_t refy, bool restrict)
{
if(thing)
{
fixed_t thingbot, thingtop;
thingbot = thing->z;
thingtop = thingbot + (thing->height==0? 1:thing->height);
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
extsector_t::xfloor *xf[2] = {&linedef->frontsector->e->XFloor, &linedef->backsector->e->XFloor};
// Check for 3D-floors in the sector (mostly identical to what Legacy does here)
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
if(xf[0]->ffloors.Size() || xf[1]->ffloors.Size())
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
fixed_t lowestceiling = open.top;
fixed_t highestfloor = open.bottom;
- Added patch for Linux fixes. - Added new ZDoom specific UDMF sector properties to map parser. - Added class definitions for new interpolators that are better equipped to interact with the interpolated objects. - Separated interpolation code into its own file r_interpolate.cpp. - Added some simple customization options to the end game screens. - Fixed: Polyobject detection in the internal node builder did not work anymore due to some code rearrangement for UDMF map loading. To keep it compatible between all map formats the THINGS lump of binary format maps must be loaded before building the nodes. This also means that the spawning itself can be done in the same function for all map types (except Build) now. - Changed 'Smooth mouse movement' menu option from m_filter to smooth_mouse which is more what would be expected from this option. - Fixed: Weapons and ammo items that were modified by Dehacked gave full ammo when being dropped by monsters. To properly handle this the handling of spawning Dehacked modified pickups was changed to use the DECORATE replacement feature instead of hacking the spawn state of the original item and calling a spawn function from there. - 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. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@111 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-02 17:20:22 +00:00
fixed_t lowestfloor[2] = {
linedef->frontsector->floorplane.ZatPoint(x, y),
linedef->backsector->floorplane.ZatPoint(x, y) };
Update to ZDoom r1052: - Fixed: Dead players didn't get the MF_CORPSE flag set. - Fixed: The internal definition of Floor_LowerToNearest had incorrect parameter settings. - Fixed: Heretic's ActivatedTimeBomb had the same spawn ID as the inventory item. - fixed: Heretic's mace did not have its spawn ID set. - For controls that are not bound, the customize controls menu now displays a black --- instead of ???. - Applied Gez's BossBrainPatch3. - Fixed: P_BulletSlope() did not return the linetarget. This effected the Sigil, A_JumpIfCloser, and A_JumpIfTargetInLOS. - Fixed all the new warnings tossed out by GCC 4.3. - Fixed: PickNext/PrevWeapon() did not check for NULL player actors. - Fixed compilation issues with GCC. - Removed special case for nobotnodes in MAPINFO. - Added support for ST's QUARTERGRAVITY flag. - Added a generalized version of Skulltag's A_CheckRailReload function. - Fixed: DrawImage didn't take 0 as a valid image index. - Added Gez's RandomSpawner submission with significant changes. - Added optional blocks for MAPINFO map definitions. ZDoom doesn't use this feature itself but it allows other ports based on ZDoom to implement their own sets of options without making such a MAPINFO unreadable by ZDoom. - Fixed: The mugshot would not reset on re-spawn. - Fixed: Picking up a weapon would sometimes not activate the grin. - Changed: Line_SetIdentification will ignore extended parameters when used in maps defined Hexen style in MAPINFO. - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound. - Fixed: UseType was not properly set for textures defined in TEXTURES. - Fixed: You couldn't set an offset for sprites defined in TEXTURES. - Added read barriers to all actor pointers within player_t except for mo, ReadyWeapon and PendingWeapon. - Added a read barrier to player_t::PrewmorphWeapon. - Fixed: After spawning a deathmatch player P_PlayerStartStomp must be called. - Fixed: SpawnThings must check if the players were spawned before calling P_PlayerStartStomp. - Fixed typo in flat scroll interpolation. - Changed FImageCollection to return translated texture indices so that animated icons can be done with it. - Changed FImageCollection to use a TArray to hold its data. - Fixed: SetChanHeadSettings did an assignment instead of comparing the channel ID witg CHAN_CEILING. - Changed sound sequence names for animated doors to FNames. - Automatically fixed: DCeiling didn't properly serialize its texture id. - Replaced integers as texture ID representation with a specific new type to track down all potentially incorrect uses and remaining WORDs used for texture IDs so that more than 32767 or 65535 textures can be defined. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@124 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-28 13:29:59 +00:00
FTextureID highestfloorpic;
FTextureID lowestceilingpic;
Update to ZDoom r1052: - Fixed: Dead players didn't get the MF_CORPSE flag set. - Fixed: The internal definition of Floor_LowerToNearest had incorrect parameter settings. - Fixed: Heretic's ActivatedTimeBomb had the same spawn ID as the inventory item. - fixed: Heretic's mace did not have its spawn ID set. - For controls that are not bound, the customize controls menu now displays a black --- instead of ???. - Applied Gez's BossBrainPatch3. - Fixed: P_BulletSlope() did not return the linetarget. This effected the Sigil, A_JumpIfCloser, and A_JumpIfTargetInLOS. - Fixed all the new warnings tossed out by GCC 4.3. - Fixed: PickNext/PrevWeapon() did not check for NULL player actors. - Fixed compilation issues with GCC. - Removed special case for nobotnodes in MAPINFO. - Added support for ST's QUARTERGRAVITY flag. - Added a generalized version of Skulltag's A_CheckRailReload function. - Fixed: DrawImage didn't take 0 as a valid image index. - Added Gez's RandomSpawner submission with significant changes. - Added optional blocks for MAPINFO map definitions. ZDoom doesn't use this feature itself but it allows other ports based on ZDoom to implement their own sets of options without making such a MAPINFO unreadable by ZDoom. - Fixed: The mugshot would not reset on re-spawn. - Fixed: Picking up a weapon would sometimes not activate the grin. - Changed: Line_SetIdentification will ignore extended parameters when used in maps defined Hexen style in MAPINFO. - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound. - Fixed: UseType was not properly set for textures defined in TEXTURES. - Fixed: You couldn't set an offset for sprites defined in TEXTURES. - Added read barriers to all actor pointers within player_t except for mo, ReadyWeapon and PendingWeapon. - Added a read barrier to player_t::PrewmorphWeapon. - Fixed: After spawning a deathmatch player P_PlayerStartStomp must be called. - Fixed: SpawnThings must check if the players were spawned before calling P_PlayerStartStomp. - Fixed typo in flat scroll interpolation. - Changed FImageCollection to return translated texture indices so that animated icons can be done with it. - Changed FImageCollection to use a TArray to hold its data. - Fixed: SetChanHeadSettings did an assignment instead of comparing the channel ID witg CHAN_CEILING. - Changed sound sequence names for animated doors to FNames. - Automatically fixed: DCeiling didn't properly serialize its texture id. - Replaced integers as texture ID representation with a specific new type to track down all potentially incorrect uses and remaining WORDs used for texture IDs so that more than 32767 or 65535 textures can be defined. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@124 b0f79afe-0144-0410-b225-9a4edf0717df
2008-06-28 13:29:59 +00:00
highestfloorpic.SetInvalid();
lowestceilingpic.SetInvalid();
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
for(int j=0;j<2;j++)
{
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
for(unsigned i=0;i<xf[j]->ffloors.Size();i++)
{
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
F3DFloor *rover = xf[j]->ffloors[i];
if (!(rover->flags & FF_EXISTS)) continue;
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
if (!(rover->flags & FF_SOLID)) continue;
fixed_t ff_bottom=rover->bottom.plane->ZatPoint(x, y);
fixed_t ff_top=rover->top.plane->ZatPoint(x, y);
fixed_t delta1 = abs(thingbot - ((ff_bottom + ff_top) / 2));
fixed_t delta2 = abs(thingtop - ((ff_bottom + ff_top) / 2));
if(ff_bottom < lowestceiling && delta1 >= delta2)
{
lowestceiling = ff_bottom;
lowestceilingpic = *rover->bottom.texture;
}
if(ff_top > highestfloor && delta1 < delta2 && (!restrict || thing->z >= ff_top))
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
{
highestfloor = ff_top;
highestfloorpic = *rover->top.texture;
}
if(ff_top > lowestfloor[j] && ff_top <= thing->z + thing->MaxStepHeight) lowestfloor[j] = ff_top;
}
}
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
if(highestfloor > open.bottom)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
open.bottom = highestfloor;
open.floorpic = highestfloorpic;
}
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
if(lowestceiling < open.top)
{
Update to ZDoom r813, including: - Added copyright/license headers to a few files. - Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. - Fixed the TArray serializer declaration. (Thank you for your warnings, GCC! ;-) - Changed root sector marking so that it can happen incrementally. - Fixed: The TArray serializer needs to be declared as a friend of TArray in order to be able to access its fields. - Since there are no backwards compatibility issues due to savegame version bumping I closed all gaps in the level flag set. - Bumped min. Savegame version and Netgame version for 3dMidtex related changes. - Changed Jump and Crouch DMFlags into 3-way switches: 0: map default, 1: off, 2: on. Since I needed new bits the rest of the DMFlag bit values had to be changed as a result. - fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding actors without MF3_NOBLOCKMONST. - Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange' that can enable or disable switch range checking globally per map. - Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE. - Added a ML_CHECKSWITCHRANGE flag which allows checking whether the player can actually reach the switch he wants to use. - Made DActiveButton::EWhere global so that I can use it outside thr DActiveButton class. - Changed P_LineOpening to pass its result in a struct instead of global variables. - Added Eternity's 3DMIDTEX feature (no Eternity code used though.) It should be feature complete with the exception of the ML_BLOCKMONSTERS flag handling. That particular part of Eternity's implementation is sub-optimal because it hijacks an existing flag and doesn't seem to make much sense to me. Maybe I'll implement it as a separate flag later. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@62 b0f79afe-0144-0410-b225-9a4edf0717df
2008-03-19 11:19:03 +00:00
open.top = lowestceiling;
open.ceilingpic = lowestceilingpic;
}
- Fixed: Fog for flooding floor textures into gaps created by missing wall textures didn't work since a parameter changes necessitated by ZDoom's render style 'enhancement'. Update to ZDoom r940: SBarInfo Update #18: - Simplified the DrawGraphic function in sbarinfo_display.cpp - Added xOffset, yOffset, and alpha to every drawing function in sbarinfo_display.cpp. So Strife popups can be handeled better and allow for other effects (translucent bars?). I'm thinking about making a struct for these five (also x and y) arguments so that the argument lists don't become a mess. - Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to DrawGraphic. - DrawKeyBar wasn't using screen->DrawTexture. - Added a Fade transition for popups. It takes two args fade in rate and fade out rate. Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete and so on). - Added a translucency arg to statusbars. 1.0 = opaque and 0.0 = invisible. - Fixed: When an instrument's envelope runs out, it does not immediately ramp to zero. Rather, it lets the remainder of the sample finish playing. - Fixed: When playing a MIDI file with EMIDI track designations to turn a track off, any ticks that had only events on the disabled track would cause the delay for that track to be thrown away, and the following notes on enabled tracks would play too soon. This could be heard quite clearly in xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing of tracks 13 and 14 (EP1 Melody and EP1 Echo). - Fixed: DFlashFader did some operations in its destructor that had to be moved to its Destroy method. - Fixed: Dropped weapons from dying players should not double ammo. - Fixed: When note_on() is called and another copy of the same note is already playing on the channel, it should stop it with finish_note(), not kill_note(). This can be clearly heard in the final cymbal crashes of D_DM2TTL where TiMidity cuts them off because the final cymbals are played with a velocity of 1 before the preceding cymbals have finished. (I wonder if I should be setting the self_nonexclusive flag for GUS patches to disable even this behavior, though, since gf1note.c doesn't turn off duplicate notes.) - Changed envelope handling to hopefully match the GUS player's. The most egregious mistake TiMidity makes is to treat bit 6 as an envelope enable bit. This is not what it does; every sample has an envelope. Rather, this is a "no sampled release" flag. Also, despite fiddling with the PATCH_SUSTAIN flag during instrument loading, TiMidity never actually used it. Nor did it do anything at all with the PATCH_FAST_REL flag. - Fixed: wbstartstruct's lump name fields were only 8 characters long and not properly zero-terminated when all 8 characters were used. - Fixed: Local sound sequence definitions caused a crash because a proper NULL check was missing. - Added translucent blending modes to FMultipatchTexture (not tested yet!) - Also changed all true color texture creation functions to use proper alpha values instead of inverted ones. - Changed FRemapTable so that all palette entries must contain proper alpha values. - Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check. - Changed: The boss brain's explosions play weapons/rocklx which is an unlimited sound. This can become extremely loud. Replaced with a new sound which is just an alias to weapons/rocklx but has a limit of 4. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@98 b0f79afe-0144-0410-b225-9a4edf0717df
2008-04-25 10:00:54 +00:00
open.lowfloor = MIN(lowestfloor[0], lowestfloor[1]);
}
}
}
//==========================================================================
//
// Spawns 3D floors
//
//==========================================================================
void P_Spawn3DFloors (void)
{
static int flagvals[] = {128+512, 2+512, 512};
int i;
line_t * line;
for (i=0,line=lines;i<numlines;i++,line++)
{
switch(line->special)
{
case ExtraFloor_LightOnly:
// Note: I am spawning both this and ZDoom's ExtraLight data
// I don't want to mess with both at the same time during rendering
// so inserting this into the 3D-floor table as well seemed to be
// the best option.
//
// This does not yet handle case 0 properly!
if (line->args[1] < 0 || line->args[1] > 2) line->args[1] = 0;
P_Set3DFloor(line, 3, flagvals[line->args[1]], 0);
break;
case Sector_Set3DFloor:
// The flag high-byte/line id is only needed in Hexen format.
// UDMF can set both of these parameters without any restriction of the usable values.
// In Doom format the translators can take full integers for the tag and the line ID always is the same as the tag.
if (level.maptype == MAPTYPE_HEXEN)
{
if (line->args[1]&8)
{
line->id = line->args[4];
}
else
{
line->args[0]+=256*line->args[4];
line->args[4]=0;
}
}
P_Set3DFloor(line, line->args[1]&~8, line->args[2], line->args[3]);
break;
default:
continue;
}
line->special=0;
line->args[0] = line->args[1] = line->args[2] = line->args[3] = line->args[4] = 0;
}
// kg3D - do it in software
for (i = 0; i < numsectors; i++)
{
P_Recalculate3DFloors(&sectors[i]);
}
}
//==========================================================================
//
// Returns a 3D floorplane appropriate for the given coordinates
//
//==========================================================================
secplane_t P_FindFloorPlane(sector_t * sector, fixed_t x, fixed_t y, fixed_t z)
{
secplane_t retplane = sector->floorplane;
if (sector->e) // apparently this can be called when the data is already gone
{
for(unsigned int i=0;i<sector->e->XFloor.ffloors.Size();i++)
{
F3DFloor * rover= sector->e->XFloor.ffloors[i];
if(!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
if (rover->top.plane->ZatPoint(x, y) == z)
{
retplane = *rover->top.plane;
if (retplane.c<0) retplane.FlipVert();
break;
}
}
}
return retplane;
}
//==========================================================================
//
// Gives the index to an extra floor above or below the given location.
// -1 means normal floor or ceiling
//
//==========================================================================
int P_Find3DFloor(sector_t * sec, fixed_t x, fixed_t y, fixed_t z, bool above, bool floor, fixed_t &cmpz)
{
// If no sector given, find the one appropriate
if (sec == NULL)
sec = R_PointInSubsector(x, y)->sector;
// Above normal ceiling
cmpz = sec->ceilingplane.ZatPoint(x, y);
if (z >= cmpz)
return -1;
// Below normal floor
cmpz = sec->floorplane.ZatPoint(x, y);
if (z <= cmpz)
return -1;
// Looking through planes from top to bottom
for (int i = 0; i < (signed)sec->e->XFloor.ffloors.Size(); ++i)
{
F3DFloor *rover = sec->e->XFloor.ffloors[i];
// We are only interested in solid 3D floors here
if(!(rover->flags & FF_SOLID) || !(rover->flags & FF_EXISTS)) continue;
if (above)
{
// z is above that floor
if (floor && (z >= (cmpz = rover->top.plane->ZatPoint(x, y))))
return i - 1;
// z is above that ceiling
if (z >= (cmpz = rover->bottom.plane->ZatPoint(x, y)))
return i - 1;
}
else // below
{
// z is below that ceiling
if (!floor && (z <= (cmpz = rover->bottom.plane->ZatPoint(x, y))))
return i;
// z is below that floor
if (z <= (cmpz = rover->top.plane->ZatPoint(x, y)))
return i;
}
}
// Failsafe
return -1;
}
#endif