Fixed, Visual mode: fixed a crash when trying to render a Thing with translucent or additive renderstyle outside of any sector.

Fixed, Classic modes: 3d floor linedef indicators shown in Classic modes were not updated after finishing sector drawing.
Updated ZDoom ACC to git rev. f92fbb9.
Updated ZDoom_ACS.cfg.
This commit is contained in:
MaxED 2015-11-09 12:20:08 +00:00
parent ff40bdc588
commit afbcac3091
8 changed files with 323 additions and 304 deletions

View file

@ -1068,3 +1068,5 @@
#define WARPF_BOB 0x800
#define WARPF_MOVEPTR 0x1000
#define WARPF_USEPTR 0x2000
#define WARPF_COPYVELOCITY 0x4000
#define WARPF_COPYPITCH 0x8000

View file

@ -335,7 +335,7 @@ special
-89:ChangeActorRoll(2,3),
-90:GetActorRoll(1),
-91:QuakeEx(8,12),
-92:Warp(6,9),
-92:Warp(6,11),
// Zandronum's
-100:ResetMap(0),

View file

@ -129,7 +129,7 @@ keywords
Door_LockedRaise = "Door_LockedRaise(tag, speed, delay, lock, lighttag)";
Door_Open = "Door_Open(tag, speed, lighttag)";
Door_Raise = "Door_Raise(tag, speed, delay, lighttag)";
DropInventory = "void DropInventory(int tid, str itemtodrop)";
DropInventory = "void DropInventory(int tid, str itemtodrop)";
DropItem = "int DropItem(int tid, str item[, int dropamount = -1[, int chance = 256]])\nCauses actors with the matching tid to drop the specified item.\nIf tid is 0, the activator of the script is considered to be the dropper of the item.\nThis works in a similar way to the DropItem actor property.\nThe return value of the function is the number of dropped items.";
Elevator_LowerToNearest = "Elevator_LowerToNearest(tag, speed)";
Elevator_MoveToFloor = "Elevator_MoveToFloor(tag, speed)";
@ -975,240 +975,240 @@ constants
T_CHAINGUY;
T_CHAINSAW;
T_CHICKEN;
T_CLERICHOLY1;
T_CLERICHOLY2;
T_CLERICHOLY3;
T_CLERICSTAFF;
T_CLINK;
T_CLIP;
T_COMPUTERMAP;
T_CROSSBOW;
T_CROSSBOWMAINBLAST;
T_CROSSBOWMINIBLAST;
T_CROSSBOWPOWERBLAST;
T_CYBERDEMON;
T_DARKIMP;
T_DARKIMPFIREBALL;
T_DART;
T_DEATHBALL;
T_DEMON;
T_DEMON_MASH;
T_DEMON1;
T_DEMON2_MASH;
T_DIRT1;
T_DIRT2;
T_DIRT3;
T_DIRT4;
T_DIRT5;
T_DIRT6;
T_DOOMSPHERE;
T_DRAGONSKINBRACERS;
T_DRAIN;
T_DSPARILALONE;
T_DSPARILBLUESHOT;
T_DSPARILONSERPENT;
T_DSPARILTELEPORTDEST;
T_DSPARILWIZARDSPAWNER;
T_EMERALDKEY;
T_ETTIN;
T_ETTIN_MASH;
T_FALCONSHIELD;
T_FEATHER;
T_FIGHTERAXE;
T_FIGHTERHAMMER;
T_FIGHTERSWORD1;
T_FIGHTERSWORD2;
T_FIGHTERSWORD3;
T_FIREBALL1;
T_FIREGARGOYLE;
T_FIREKEY;
T_FLAME_LARGE;
T_FLAME_SMALL;
T_FLAMINGBARREL;
T_FLESH_DRIP1;
T_FLESH_DRIP2;
T_GAUNTLETS;
T_GREENARMOR;
T_GREENKEY;
T_GRENADE;
T_GRENADELAUNCHER;
T_GUTS;
T_HASTE;
T_HEALTHBONUS;
T_HEAVYMACEBALL;
T_HECTEBUS;
T_HEFTYBLASTERAMMO;
T_HEFTYCROSSBOWAMMO;
T_HEFTYMACEAMMO;
T_HEFTYPHOENIXRODAMMO;
T_HEFTYSKULLRODAMMO;
T_HEFTYWANDAMMO;
T_HELLKNIGHT;
T_HIGHJUMP;
T_HORNKEY;
T_ICEGOLEM;
T_ICESHARD;
T_IMP;
T_IMPFIREBALL;
T_IMPLEADER;
T_INFRAGOGGLES;
T_INFRATRACKER;
T_INVISIBILITY;
T_INVULNERABILITY;
T_IRONFEET;
T_IRONLICH;
T_IRONLICHBLUESHOT;
T_ITEMALLMAP;
T_ITEMBAGOFHOLDING;
T_ITEMBOOSTMANA;
T_ITEMBOOTS;
T_ITEMEGG;
T_ITEMFLECHETTE;
T_ITEMFLIGHT;
T_ITEMHEALTHFLASH;
T_ITEMHEALTHFLASK;
T_ITEMHEALTHFULL;
T_ITEMHEALTHPOTION;
T_ITEMINVISIBILITY;
T_ITEMINVULNERABILITY;
T_ITEMPORK;
T_ITEMREPULSION;
T_ITEMSUMMON;
T_ITEMTELEPORT;
T_ITEMTIMEBOMB;
T_ITEMTOME;
T_ITEMTORCH;
T_ITEMTPORTOTHER;
T_KNIGHT;
T_KNIGHTAXE;
T_KNIGHTBLOODAXE;
T_KNIGHTGHOST;
T_LIGHTAMP;
T_LOSTSOUL;
T_MACE;
T_MACEKEY;
T_MAGESHARDS;
T_MAGESTAFF1;
T_MAGESTAFF2;
T_MAGESTAFF3;
T_MANA1;
T_MANA2;
T_MANA3;
T_MANCUBUS;
T_MANCUBUSSHOT;
T_MAXARMORBONUS;
T_MAXHEALTHBONUS;
T_MEDKIT;
T_MEGASPHERE;
T_MESHARMOR;
T_METALKEY;
T_MINIGUN;
T_MORPHBLAST;
T_MUMMY;
T_MUMMYGHOST;
T_MUMMYHEAD;
T_MUMMYLEADER;
T_MUMMYLEADERGHOST;
T_NOGRAVITYMACEBALL;
T_NONE;
T_PAINELEMENTAL;
T_PERMLARGEFLAME;
T_PERMSMALLFLAME;
T_PHOENIXROD;
T_PHOENIXSHOT;
T_PISTOL;
T_PLASMABOLT;
T_PLASMAGUN;
T_PLATINUMHELM;
T_POD;
T_PODGENERATOR;
T_POISONDART;
T_POWERWANDBIGGERBLAST;
T_POWERWANDMINIBLAST;
T_PROSPERITY;
T_PUFF;
T_PUZZBOOK1;
T_PUZZBOOK2;
T_PUZZGEMBIG;
T_PUZZGEMBLUE1;
T_PUZZGEMBLUE2;
T_PUZZGEMGREEN1;
T_PUZZGEMGREEN2;
T_PUZZGEMRED;
T_PUZZSKULL;
T_RAGE;
T_RAILGUN;
T_RANDOMPOWERUP;
T_REDARMOR;
T_REDFLAG;
T_REDKEYCARD;
T_REDSKULLKEY;
T_REDTELEGLITTER;
T_REFLECTION;
T_REGENERATION;
T_RESISTANCE;
T_REVENANT;
T_RIPPER;
T_RIPPERBALL;
T_ROCK1;
T_ROCK2;
T_ROCK3;
T_ROCKET;
T_ROCKETAMMO;
T_ROCKETBOX;
T_ROCKETLAUNCHER;
T_RUSTYKEY;
T_SCRIPTEDMARINE;
T_SERPENTFIREBALL;
T_SERPENTKEY;
T_SHELLBOX;
T_SHELLS;
T_SHIELD1;
T_SHIELD2;
T_SHOTGUN;
T_SHOTGUY;
T_SILVERKEY;
T_SKULLROD;
T_SKULLRODBLAST;
T_SMALLMETALKEY;
T_SNAKE;
T_SNAKEPROJECTILE;
T_SNAKEPROJECTILEBIG;
T_SOULSPHERE;
T_SOUND_WATERFALL;
T_SOUND_WIND;
T_SPARK_DRIP;
T_SPECTRE;
T_SPIDERMASTERMIND;
T_SPREAD;
T_SSGGUY;
T_STAINEDGLASS0;
T_STAINEDGLASS1;
T_STAINEDGLASS2;
T_STAINEDGLASS3;
T_STAINEDGLASS4;
T_STAINEDGLASS5;
T_STAINEDGLASS6;
T_STAINEDGLASS7;
T_STAINEDGLASS8;
T_STAINEDGLASS9;
T_STEALTHARACHNOTRON;
T_STEALTHBARON;
T_STEALTHCACODEMON;
T_STEALTHCHAINGUY;
T_STEALTHIMP;
T_STEALTHKNIGHT;
T_STEALTHMANCUBUS;
T_STEALTHREVENANT;
T_STEALTHSERGEANT;
T_STEALTHSHOTGUY;
T_STEALTHVILE;
T_STEALTHZOMBIE;
T_STIMPACK;
T_STRENGTH;
T_SUPERSHOTGUN;
T_TEMPLARGEFLAME;
T_TEMPSMALLFLAME;
T_CLERICHOLY1;
T_CLERICHOLY2;
T_CLERICHOLY3;
T_CLERICSTAFF;
T_CLINK;
T_CLIP;
T_COMPUTERMAP;
T_CROSSBOW;
T_CROSSBOWMAINBLAST;
T_CROSSBOWMINIBLAST;
T_CROSSBOWPOWERBLAST;
T_CYBERDEMON;
T_DARKIMP;
T_DARKIMPFIREBALL;
T_DART;
T_DEATHBALL;
T_DEMON;
T_DEMON_MASH;
T_DEMON1;
T_DEMON2_MASH;
T_DIRT1;
T_DIRT2;
T_DIRT3;
T_DIRT4;
T_DIRT5;
T_DIRT6;
T_DOOMSPHERE;
T_DRAGONSKINBRACERS;
T_DRAIN;
T_DSPARILALONE;
T_DSPARILBLUESHOT;
T_DSPARILONSERPENT;
T_DSPARILTELEPORTDEST;
T_DSPARILWIZARDSPAWNER;
T_EMERALDKEY;
T_ETTIN;
T_ETTIN_MASH;
T_FALCONSHIELD;
T_FEATHER;
T_FIGHTERAXE;
T_FIGHTERHAMMER;
T_FIGHTERSWORD1;
T_FIGHTERSWORD2;
T_FIGHTERSWORD3;
T_FIREBALL1;
T_FIREGARGOYLE;
T_FIREKEY;
T_FLAME_LARGE;
T_FLAME_SMALL;
T_FLAMINGBARREL;
T_FLESH_DRIP1;
T_FLESH_DRIP2;
T_GAUNTLETS;
T_GREENARMOR;
T_GREENKEY;
T_GRENADE;
T_GRENADELAUNCHER;
T_GUTS;
T_HASTE;
T_HEALTHBONUS;
T_HEAVYMACEBALL;
T_HECTEBUS;
T_HEFTYBLASTERAMMO;
T_HEFTYCROSSBOWAMMO;
T_HEFTYMACEAMMO;
T_HEFTYPHOENIXRODAMMO;
T_HEFTYSKULLRODAMMO;
T_HEFTYWANDAMMO;
T_HELLKNIGHT;
T_HIGHJUMP;
T_HORNKEY;
T_ICEGOLEM;
T_ICESHARD;
T_IMP;
T_IMPFIREBALL;
T_IMPLEADER;
T_INFRAGOGGLES;
T_INFRATRACKER;
T_INVISIBILITY;
T_INVULNERABILITY;
T_IRONFEET;
T_IRONLICH;
T_IRONLICHBLUESHOT;
T_ITEMALLMAP;
T_ITEMBAGOFHOLDING;
T_ITEMBOOSTMANA;
T_ITEMBOOTS;
T_ITEMEGG;
T_ITEMFLECHETTE;
T_ITEMFLIGHT;
T_ITEMHEALTHFLASH;
T_ITEMHEALTHFLASK;
T_ITEMHEALTHFULL;
T_ITEMHEALTHPOTION;
T_ITEMINVISIBILITY;
T_ITEMINVULNERABILITY;
T_ITEMPORK;
T_ITEMREPULSION;
T_ITEMSUMMON;
T_ITEMTELEPORT;
T_ITEMTIMEBOMB;
T_ITEMTOME;
T_ITEMTORCH;
T_ITEMTPORTOTHER;
T_KNIGHT;
T_KNIGHTAXE;
T_KNIGHTBLOODAXE;
T_KNIGHTGHOST;
T_LIGHTAMP;
T_LOSTSOUL;
T_MACE;
T_MACEKEY;
T_MAGESHARDS;
T_MAGESTAFF1;
T_MAGESTAFF2;
T_MAGESTAFF3;
T_MANA1;
T_MANA2;
T_MANA3;
T_MANCUBUS;
T_MANCUBUSSHOT;
T_MAXARMORBONUS;
T_MAXHEALTHBONUS;
T_MEDKIT;
T_MEGASPHERE;
T_MESHARMOR;
T_METALKEY;
T_MINIGUN;
T_MORPHBLAST;
T_MUMMY;
T_MUMMYGHOST;
T_MUMMYHEAD;
T_MUMMYLEADER;
T_MUMMYLEADERGHOST;
T_NOGRAVITYMACEBALL;
T_NONE;
T_PAINELEMENTAL;
T_PERMLARGEFLAME;
T_PERMSMALLFLAME;
T_PHOENIXROD;
T_PHOENIXSHOT;
T_PISTOL;
T_PLASMABOLT;
T_PLASMAGUN;
T_PLATINUMHELM;
T_POD;
T_PODGENERATOR;
T_POISONDART;
T_POWERWANDBIGGERBLAST;
T_POWERWANDMINIBLAST;
T_PROSPERITY;
T_PUFF;
T_PUZZBOOK1;
T_PUZZBOOK2;
T_PUZZGEMBIG;
T_PUZZGEMBLUE1;
T_PUZZGEMBLUE2;
T_PUZZGEMGREEN1;
T_PUZZGEMGREEN2;
T_PUZZGEMRED;
T_PUZZSKULL;
T_RAGE;
T_RAILGUN;
T_RANDOMPOWERUP;
T_REDARMOR;
T_REDFLAG;
T_REDKEYCARD;
T_REDSKULLKEY;
T_REDTELEGLITTER;
T_REFLECTION;
T_REGENERATION;
T_RESISTANCE;
T_REVENANT;
T_RIPPER;
T_RIPPERBALL;
T_ROCK1;
T_ROCK2;
T_ROCK3;
T_ROCKET;
T_ROCKETAMMO;
T_ROCKETBOX;
T_ROCKETLAUNCHER;
T_RUSTYKEY;
T_SCRIPTEDMARINE;
T_SERPENTFIREBALL;
T_SERPENTKEY;
T_SHELLBOX;
T_SHELLS;
T_SHIELD1;
T_SHIELD2;
T_SHOTGUN;
T_SHOTGUY;
T_SILVERKEY;
T_SKULLROD;
T_SKULLRODBLAST;
T_SMALLMETALKEY;
T_SNAKE;
T_SNAKEPROJECTILE;
T_SNAKEPROJECTILEBIG;
T_SOULSPHERE;
T_SOUND_WATERFALL;
T_SOUND_WIND;
T_SPARK_DRIP;
T_SPECTRE;
T_SPIDERMASTERMIND;
T_SPREAD;
T_SSGGUY;
T_STAINEDGLASS0;
T_STAINEDGLASS1;
T_STAINEDGLASS2;
T_STAINEDGLASS3;
T_STAINEDGLASS4;
T_STAINEDGLASS5;
T_STAINEDGLASS6;
T_STAINEDGLASS7;
T_STAINEDGLASS8;
T_STAINEDGLASS9;
T_STEALTHARACHNOTRON;
T_STEALTHBARON;
T_STEALTHCACODEMON;
T_STEALTHCHAINGUY;
T_STEALTHIMP;
T_STEALTHKNIGHT;
T_STEALTHMANCUBUS;
T_STEALTHREVENANT;
T_STEALTHSERGEANT;
T_STEALTHSHOTGUY;
T_STEALTHVILE;
T_STEALTHZOMBIE;
T_STIMPACK;
T_STRENGTH;
T_SUPERSHOTGUN;
T_TEMPLARGEFLAME;
T_TEMPSMALLFLAME;
T_THRUSTSPIKEDOWN;
T_THRUSTSPIKEUP;
T_TIMEFREEZER;
@ -1246,20 +1246,22 @@ constants
TEXTURE_BOTTOM;
TEXTURE_MIDDLE;
TEXTURE_TOP;
WARPF_ABSOLUTEOFFSET;
WARPF_ABSOLUTEANGLE;
WARPF_USECALLERANGLE;
WARPF_NOCHECKPOSITION;
WARPF_INTERPOLATE;
WARPF_WARPINTERPOLATION;
WARPF_COPYINTERPOLATION;
WARPF_STOP;
WARPF_TOFLOOR;
WARPF_TESTONLY;
WARPF_ABSOLUTEPOSITION;
WARPF_BOB;
WARPF_MOVEPTR;
WARPF_USEPTR;
WARPF_ABSOLUTEOFFSET;
WARPF_ABSOLUTEANGLE;
WARPF_USECALLERANGLE;
WARPF_NOCHECKPOSITION;
WARPF_INTERPOLATE;
WARPF_WARPINTERPOLATION;
WARPF_COPYINTERPOLATION;
WARPF_STOP;
WARPF_TOFLOOR;
WARPF_TESTONLY;
WARPF_ABSOLUTEPOSITION;
WARPF_BOB;
WARPF_MOVEPTR;
WARPF_USEPTR;
WARPF_COPYVELOCITY;
WARPF_COPYPITCH;
TRUE;
YES;
}

View file

@ -272,6 +272,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
}

View file

@ -531,6 +531,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
}

View file

@ -148,6 +148,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
}

View file

@ -388,6 +388,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Update the used textures
General.Map.Data.UpdateUsedTextures();
//mxd
General.Map.Renderer2D.UpdateExtraFloorFlag();
// Map is changed
General.Map.IsChanged = true;
}

View file

@ -97,66 +97,72 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This builds the thing geometry. Returns false when nothing was created.
public bool Setup()
{
//mxd. Apply DECORATE/UDMF alpha/renderstyle overrides
string renderstyle = info.RenderStyle;
byte alpha = info.AlphaByte;
if(General.Map.UDMF)
// Find the sector in which the thing resides
Thing.DetermineSector(mode.BlockMap);
//mxd. If the thing is inside a sector, apply DECORATE/UDMF alpha/renderstyle overrides
byte alpha = 255;
if(Thing.Sector != null)
{
if(Thing.IsFlagSet("translucent"))
{
renderstyle = "translucent";
alpha = 64;
}
else if(Thing.IsFlagSet("invisible"))
{
renderstyle = "none";
alpha = 0;
}
else if(Thing.Fields.ContainsKey("renderstyle"))
{
renderstyle = Thing.Fields.GetValue("renderstyle", renderstyle);
string renderstyle = info.RenderStyle;
alpha = info.AlphaByte;
if(Thing.Fields.ContainsKey("alpha"))
alpha = (byte)(General.Clamp(Thing.Fields.GetValue("alpha", info.Alpha), 0f, 1f) * 255);
}
}
else if(General.Map.HEXEN)
{
if(Thing.IsFlagSet("2048"))
if(General.Map.UDMF)
{
renderstyle = "translucent";
alpha = 64;
if(Thing.IsFlagSet("translucent"))
{
renderstyle = "translucent";
alpha = 64;
}
else if(Thing.IsFlagSet("invisible"))
{
renderstyle = "none";
alpha = 0;
}
else if(Thing.Fields.ContainsKey("renderstyle"))
{
renderstyle = Thing.Fields.GetValue("renderstyle", renderstyle);
if(Thing.Fields.ContainsKey("alpha")) alpha = (byte)(General.Clamp(Thing.Fields.GetValue("alpha", info.Alpha), 0f, 1f) * 255);
}
}
else if(Thing.IsFlagSet("4096"))
else if(General.Map.HEXEN)
{
renderstyle = "none";
alpha = 0;
if(Thing.IsFlagSet("2048"))
{
renderstyle = "translucent";
alpha = 64;
}
else if(Thing.IsFlagSet("4096"))
{
renderstyle = "none";
alpha = 0;
}
}
}
// Set appropriate RenderPass
switch(renderstyle)
{
case "translucent":
case "subtract":
case "stencil":
RenderPass = RenderPass.Alpha;
break;
// Set appropriate RenderPass
switch(renderstyle)
{
case "translucent":
case "subtract":
case "stencil":
RenderPass = RenderPass.Alpha;
break;
case "add":
RenderPass = RenderPass.Additive;
break;
case "add":
RenderPass = RenderPass.Additive;
break;
case "none":
RenderPass = RenderPass.Mask;
alpha = 0;
break;
case "none":
RenderPass = RenderPass.Mask;
alpha = 0;
break;
// Many render styles are not supported yet...
default:
RenderPass = RenderPass.Mask;
alpha = 255;
break;
// Many render styles are not supported yet...
default:
RenderPass = RenderPass.Mask;
alpha = 255;
break;
}
}
// Don't bother when alpha is unchanged
@ -180,9 +186,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
sizeless = false;
}
// Find the sector in which the thing resides
Thing.DetermineSector(mode.BlockMap);
if(sprite != null)
{
Plane floor = new Plane(); //mxd