Commit graph

15365 commits

Author SHA1 Message Date
Magnus Norddahl
8429fc8124 - fix missing type check when using Push or Insert for typed arrays 2018-11-14 10:08:04 +01:00
Christoph Oelckers
a6b44b02b7 - fixed incompletely initialized secplanes in sprite splitting code.
The recent optimization of the shader setup needs the negiC value properly set.
2018-11-13 20:36:23 +01:00
Major Cooke
55f17fa90c Changed A_RaiseActor to just RaiseActor. 2018-11-13 19:01:56 +01:00
Major Cooke
f47210df4e Fixed inconsistency.
- P_Thing_Raise returned true while P_Thing_CanRaise returned false for the condition of having no raise state. P_Thing_Raise now returns false.
2018-11-13 19:01:56 +01:00
Major Cooke
71d2b39d92 Added A_RaiseActor(Actor other, int flags = 0) 2018-11-13 19:01:56 +01:00
Major Cooke
b553be153d Added CanResurrect(Actor other, bool passive)
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-13 19:01:56 +01:00
Kevin Caccamo
9520a3c640 Fix swapped horizontal/vertical scale
The UDMF specs for things had the descriptions for horizontal and vertical scale swapped.
2018-11-12 23:09:59 +01:00
Christoph Oelckers
33f2f9f34e - fixed: ZScript's finalization code used the last parsed lump for of one translation unit as reference, not the base lump.
This resulted in incorrect messages but also could produce some more subtle errors.
2018-11-12 00:22:50 +01:00
Christoph Oelckers
ca2defa6a2 - added ZScript export for side_t::SetSpecialColor. 2018-11-12 00:13:14 +01:00
Christoph Oelckers
65a6866a1b - fixed typo in ceiling render hack code. 2018-11-11 22:22:29 +01:00
Christoph Oelckers
59790302ec - fixed rendering of lower untextured linedef parts. 2018-11-11 22:17:44 +01:00
Christoph Oelckers
a0a2230b92 - removed test code that was accidentally left in. 2018-11-11 21:50:33 +01:00
Christoph Oelckers
f2dcff4386 - more options for Doom 64 style gradients on walls:
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.

The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.
2018-11-11 16:04:36 +01:00
Player701
d37192c1e8 - Fixed: Decal generator should be taken from the current weapon instance instead of the default instance. 2018-11-11 15:07:57 +01:00
Christoph Oelckers
d3aa9c6af1 - do not abort on unclosed sections.
Apparently they can indeed happen with broken map setups like isolated linedefs somewhere in the wild (see Strife MAP08.)
Although they are a problem for triangulation, this isn't what sections get used for currently so it's of no real concern.
In case this is needed later their work data gets marked as 'bad' for the time being.
2018-11-11 10:08:13 +01:00
Christoph Oelckers
094afdfd5f - fixed: It may happen that a degenerate subsector ends up without any section or sector. Try to assign the best fit in such a case so that the relevant pointers are not null. 2018-11-11 09:33:40 +01:00
Christoph Oelckers
c946edd9bf - instead of copying the sector planes to GLWall, just store pointers to the front and back sector for later use.
Until now this wasn't doable because these could have come from hw_FakeFlat which only were local copies on the stack.
With the recent change these faked sectors live long enough so that they can be passed around here.
2018-11-10 23:19:08 +01:00
alexey.lysiuk
67e012e445 - fixed compilation on POSIX-like platforms
src/p_udmf.cpp:2052:6: error: no matching member function for call to 'OpenMem'
src/sc_man.h:24:7: note: candidate function not viable: expects an l-value for 2nd argument
src/sc_man.h:23:7: note: candidate function not viable: requires 3 arguments, but 2 were provided
src/resourcefiles/file_directory.cpp:198:32: error: use of undeclared identifier 'Filename'; did you mean 'FileName'?
2018-11-10 22:32:09 +02:00
Christoph Oelckers
a90655b295 - cache the results of hw_FakeFlat for the remainder of the current scene instead of storing this in local variables.
An exception is made for the sprite drawer which needs to call this in the worker thread on some occasions for as-yet unprocessed sectors.
This case may not alter the cache to avoid having to add thread synchronization to it.

The main reason for this change is that pointers to such manipulated sectors can now be considered static in the renderer.
Due to them being short lived local buffers it was not possible to carry them along with the render data for information retrieval.
2018-11-10 20:07:00 +01:00
Major Cooke
9a7f570b19 Added DMG_NO_ENHANCE for DamageMobj.
- Disables PowerDamage's effect, similar to DMG_NO_PROTECT disabling PowerProtect.
2018-11-10 16:18:33 +01:00
Christoph Oelckers
191f2d9d76 - use TArray and FString in resource file management. 2018-11-10 14:19:55 +01:00
Christoph Oelckers
4d06c17a44 - a few more buffers converted. 2018-11-10 14:18:34 +01:00
Christoph Oelckers
6894912f44 - use TArray for most buffers in p_glnodes.cpp. 2018-11-10 14:15:39 +01:00
Christoph Oelckers
3448749de6 - replaced a few temporary allocations with TArray and added a few convenience loader functions for this.
Amazingly with today's optimizers this creates code which is just as good as doing it all manually with the added benefit of being safer.
2018-11-10 11:56:18 +01:00
Christoph Oelckers
602ea8f723 - made some minor changes to TArray after finding out that "new int()" is not the same as "new int".
With parentheses this initializes to 0 which created needless initialization code in a few places.
2018-11-10 10:43:35 +01:00
Christoph Oelckers
cfe51f0c30 - hole filling subsectors must also be explicitly triangulated for the automap because they may be non-convex. 2018-11-10 08:04:03 +01:00
Christoph Oelckers
0caabbe355 - clear spechit before leaving P_CheckPosition.
Otherwise this may contain residual data from the last call.
One can only hope that this doesn't cause other side effects - this entire code is one horrendous mess of bad ideas.
2018-11-09 19:06:54 +01:00
Christoph Oelckers
f6af50fc74 - restored portal code that shouldn't have been deleted. 2018-11-08 20:39:44 +01:00
Major Cooke
cdd60b1431 Changed IsPointInMap to use P_PointOnDivlineSide. 2018-11-08 14:50:04 +01:00
alexey.lysiuk
ed72843dec - fixed undefined behavior when grouping sections
The current group should not be accessed by reference because its container can be reallocated during iteration

https://forum.zdoom.org/viewtopic.php?t=62487
2018-11-07 23:04:42 +02:00
Major Cooke
9ff7f338fd Added IsPointInMap(Vector3 p).
- Checks if a point is inside the map geometry or not.
2018-11-07 15:16:45 -05:00
Christoph Oelckers
4eecaada67 - added copyright header to p_destructible.cpp 2018-11-07 19:27:35 +01:00
Christoph Oelckers
bfffe6df3e - fixed typo with RNG name. 2018-11-07 19:20:42 +01:00
Christoph Oelckers
9661c3b53c - moved hw_Sections to r_data, because this is an essential component of the dynamic light system now so it is needed for all renderers. 2018-11-07 00:53:44 +01:00
Christoph Oelckers
bad2a7c49b - silenced debug message in standard mode. 2018-11-07 00:43:11 +01:00
ZZYZX
a276ebfb08 Exported destructible geometry to ZScript 2018-11-07 00:12:37 +01:00
ZZYZX
ed3355acc6 Explode bouncing projectiles if hit damageable geometry 2018-11-07 00:12:37 +01:00
ZZYZX
d85e5afdfb Destructible geometry - minor fixes and 3D floor support 2018-11-07 00:12:37 +01:00
Christoph Oelckers
752a64c840 - fixed typo in sight checking code. 2018-11-07 00:12:03 +01:00
Christoph Oelckers
c28f001cb2 Merge branch 'sections' 2018-11-06 23:50:16 +01:00
Christoph Oelckers
f2e593f8bf - disabled the hack for fixing the original design of the portal in KDiZD's Z1M1.
This portal got fixed in a later re-release of KDiZD and no other portal needs this runtime fix to my knowledge.
The main problem here is that this runtime fix requires some manipulation of the render data that does not work anymore.

Should other maps need this fix as well they are probably best served with a compatibility entry.
2018-11-06 21:41:16 +01:00
Christoph Oelckers
085bf0d33f - fixed Transfer_Heights and 3D floors. 2018-11-06 20:53:45 +01:00
Christoph Oelckers
ddc75f7ba5 - made the common render hacks functional again as separate render items. 2018-11-06 20:31:44 +01:00
Christoph Oelckers
a6e77ae094 Refactored the render hack storage so that it can be decoupled from the regular GLFlat render items.
Having these in there makes it impossible to change render techniques so these are better done as separate items.
2018-11-06 18:20:59 +01:00
Christoph Oelckers
aee47d23bd - fixed validcount for real and added a side check for intra-section sides to light code. 2018-11-06 11:53:03 +01:00
Christoph Oelckers
df52a71475 - fixed validcount. 2018-11-06 01:01:59 +01:00
Christoph Oelckers
87973ff504 - added handling for intra-sector lines to lighting code. 2018-11-06 00:47:43 +01:00
Christoph Oelckers
ba66c0c889 - changed dynamic light traversal to use sections instead of the subsectors.
This is mostly complete, except for handling intra-section sidedefs.
2018-11-06 00:13:23 +01:00
Christoph Oelckers
9ddca3c3a9 - removed the subsector light lists as a preparation step to move over the light traversal code to use sections instead of subsectors. 2018-11-05 22:35:24 +01:00
Christoph Oelckers
375dd7e28f - the sections are now being used as the smallest element to draw flat planes.
This also removes one piece of code that was used to cope with the missing clip planes on old ATI cards, so support for those will most likely have to be dropped in the near future.
2018-11-05 22:14:18 +01:00