Commit Graph

100 Commits

Author SHA1 Message Date
Christoph Oelckers 67f6f28b55 - fixed: When finding the highest floor plane on a given side of a linedef, the necessary tests may not depend on the actual highest floor, which may originate from the other side of the line and cause valid planes that are between the currently set plane and the actual highest floor to be skipped. 2017-02-15 13:14:59 +01:00
Christoph Oelckers f9712460f3 - fixed: 3D floors could be set for untagged sectors. 2017-02-07 00:31:01 +01:00
Christoph Oelckers 6d28aa3541 - do not use strtol for parsing critical values that can get large.
This function will truncate everything that is larger than LONG_MAX or smaller than LONG_MIN to fit into a long variable, but longs are 32 bit on Windows and 64 bit elsewhere, so to ensure consistency and the ability to parse larger values better use strtoll which does not truncate 32 bit values.
2017-02-01 11:19:55 +01:00
Christoph Oelckers ee22a9371b - use Doom64 colors on sectors and linedefs. 2017-01-28 20:44:46 +01:00
Christoph Oelckers 1400f401e7 - fixed use of multiple sector actions in the same sector.
The entire setup was quite broken with each item using its own activation result and the ones of the subsequent items in the list as the return value.
This rendered the STANDSTILL check in the main function totally unpredictable because the value it depended on could come from any item in the list.
Changed it so that the main dispatcher function is part of sector_t and does the stepping through the list iteratively instead of letting each item recursively call its successor and let this function decide for each item alone whether it should be removed.
The broken setup also had the effect that any MusicChanger would trigger all following SecActEnter specials right on msp start.
2017-01-13 01:34:43 +01:00
Christoph Oelckers cd7986b1b1 - refactored global sides array to be more VM friendly.
- moved FLevelLocals to its own header to resolve some circular include conflicts.
2017-01-08 18:46:17 +01:00
Christoph Oelckers 71d1138376 - refactored the global lines array into a more VM friendly form, moved it to FLevelLocals and exported it to ZScript.
- disabled the Build map loader after finding out that it has been completely broken and nonfunctional for a long time. Since this has no real value it will probably removed entirely in an upcoming commit.
2017-01-08 14:39:16 +01:00
Christoph Oelckers c02281a439 - refactored the global sectors array into a more VM friendly type and moved it into FLevelLocals. 2017-01-07 19:32:24 +01:00
Christoph Oelckers 1a16f664e4 - added a TStaticArray class that allows safe access to resizable static data (like the sectors, linedefs, etc.) for the VM.
- used this to replace the line list in Sector because that gets already used and implemented proper bounds checks for this type of array.
2017-01-02 21:40:52 +01:00
Christoph Oelckers d8ab0b40dc Merge branch 'master' of https://github.com/rheit/zdoom 2016-08-03 12:17:55 +02:00
Christoph Oelckers 95c3464973 - properly handle 3D floors with inverted planes in the list sorter. 2016-08-03 12:17:22 +02:00
Christoph Oelckers 15480feb96 Merge branch 'master' of https://github.com/rheit/zdoom 2016-04-27 13:47:56 +02:00
Christoph Oelckers fab38d092b - fixed: P_LineOpening could miss a 3D floor if an actor was centered right against its side.
- restored the original 3D floor code to retrieve the current floor in P_CheckPosition. The portal aware version was a bit too strict and could place the actor on the wrong side when moving at high speeds.
2016-04-27 02:13:35 +02:00
Christoph Oelckers 20d3a72307 Merge branch 'master' of https://github.com/rheit/zdoom 2016-04-22 09:15:37 +02:00
Christoph Oelckers 27cc3d6289 - fixed: ACS's GetActorLightLevel didn't check 3D floors. 2016-04-21 11:17:28 +02:00
Christoph Oelckers 9c6e7753d8 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/p_spec.cpp
#	src/r_bsp.cpp
#	src/r_defs.h
2016-04-20 19:56:07 +02:00
Christoph Oelckers 3532dd9ea1 - fixed coordinate correctness issues with P_CheckFor3DFloor/CeilingHit. 2016-04-20 13:28:19 +02:00
Christoph Oelckers 251172c7f0 Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/r_data/r_interpolate.cpp
2016-03-30 18:24:22 +02:00
Christoph Oelckers 77f2530236 - floatified the sector plane movers and removed some of the ZatPoint conversion cruft. 2016-03-30 09:41:46 +02:00
Christoph Oelckers e4d68e17fd Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt 2016-03-29 16:14:06 +02:00
Christoph Oelckers ff0b371582 - made the linedef deltas private and only accessible through access functions.
Now everything should be in place to remove the fixed point math from the rest of the play code.
2016-03-29 16:13:16 +02:00
Christoph Oelckers 37e6429cf3 Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/r_data/r_interpolate.cpp
2016-03-29 13:12:15 +02:00
Christoph Oelckers 25f5e8449a - replaced all direct access to sector plane coefficients with wrapper functions. 2016-03-29 12:40:41 +02:00
Christoph Oelckers ae14268989 Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/r_utility.cpp
2016-03-29 10:09:03 +02:00
Christoph Oelckers dabed04d2a - floatification of p_3dfloors, p_3dmidtex and p_acs.cpp plus some leftovers.
- removed all references to Doom specific headers from xs_Float.h and cmath.h.
2016-03-26 12:36:15 +01:00
Christoph Oelckers 35bb686281 - floatification of sector_t::centerspot. 2016-03-26 09:38:58 +01:00
Christoph Oelckers 30b57fd7b0 - floatification of G_CheckSpot and a few other things. 2016-03-26 09:28:00 +01:00
Christoph Oelckers fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +01:00
Christoph Oelckers 19b85f806e Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/actor.h
2016-03-22 12:44:40 +01:00
Christoph Oelckers a652c061f6 - converted g_strife to full floating point use, except the floor height changing stuff in A_LightGoesOut. 2016-03-22 12:42:27 +01:00
Christoph Oelckers 4e60ea0252 - made AActor::alpha a floating point value
- replaced some uses of FRACUNIT with OPAQUE when it was about translucency.
- simplified some overly complicated translucency multiplications in the SBARINFO code.
2016-03-21 12:18:46 +01:00
Christoph Oelckers 48afdd7dcb Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/CMakeLists.txt
#	src/actor.h
2016-03-21 01:34:39 +01:00
Christoph Oelckers cff8e51811 - converted AActor::height to double. 2016-03-20 20:55:06 +01:00
Christoph Oelckers 8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +01:00
Christoph Oelckers ec58e70078 - replaced ceilingz with a floating point variable, also in FCheckPosition. 2016-03-20 13:32:53 +01:00
Christoph Oelckers 51b05d331d - replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed.

Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
2016-03-20 00:54:18 +01:00
Christoph Oelckers a96d6ab072 Merge remote-tracking branch 'remotes/zdoom/master'
# Conflicts:
#	src/g_level.cpp
#	src/p_3dfloors.cpp
#	src/p_lnspec.cpp
#	src/p_saveg.cpp
#	src/p_spec.cpp
#	src/r_bsp.cpp
#	src/r_data/r_interpolate.cpp
#	src/r_data/r_translate.cpp
#	src/r_data/sprites.cpp
#	src/r_defs.h
#	src/r_sky.h
#	src/stats.h
#	src/textures/texturemanager.cpp
#	src/textures/textures.h
#	src/version.h
#	src/win32/fb_d3d9.cpp
#	src/win32/hardware.cpp
#	src/win32/i_system.cpp
#	wadsrc/static/actors/doom/doomarmor.txt
#	wadsrc/static/compatibility.txt
#	wadsrc/static/language.enu
#	wadsrc/static/mapinfo/common.txt
#	wadsrc/static/menudef.txt
#	wadsrc/static/xlat/eternity.txt
2016-03-01 18:50:45 +01:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers 954f03e531 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/actor.h
2016-02-25 01:40:36 +01:00
Christoph Oelckers 58d3b04590 - fixed some places in p_pillar.cpp where sector plane z's were calculated at (0, 0) which could cause overflows if the actual plane is too far away from the origin.
- renamed sector_t::soundorg in centerspot, changed the type to a fixedvec2 and removed the CenterSpot #define.

Since this thing was used in lots of places that have nothing to do with sound the name made no sense. Having it as a fixed_t array also made it clumsy to use and the CenterSpot #define used a potentially dangerous type cast.
2016-02-24 14:49:59 +01:00
Christoph Oelckers e107d8ff48 Merge remote-tracking branch 'remotes/zdoom/master'
# Conflicts:
#	src/portal.h
#	src/r_defs.h
2016-02-22 16:06:31 +01:00
Christoph Oelckers ed2b107bc9 - fixed: P_LineOpening_XFloors set some floor-related info in the ceiling case so that it never reached the point where it is needed.
- fixed: FMultiBlockLinesIterator/FMultiBlockThingsIterator need to treat radius=-1 as 'use default from actor.'
2016-02-22 15:51:18 +01:00
Christoph Oelckers 98c7fabb89 - untested partial refactoring of P_CheckPosition.
(This is just a safety commit before doing some more extensive behind-the-scenes refactoring.)

Notable changes here:

 * use the same logic for determining whether a 3D floor is 'below' or 'above' the actor as all the other functions.
 * removed the broken code which tried to detect whether an actor was touching a steep slope. Better use P_LineOpening to find the correct planes and store the results.
 * improved detection whether the slopes on both sides of a plane are identical, using the same data as for steep slope detection.
2016-02-22 12:05:37 +01:00
Christoph Oelckers d876a95152 - set floor and ceiling sector when it comes from a 3D floor.
There's code in p_mobj.cpp which needs this to pick the correct plane.
2016-02-20 02:22:09 +01:00
Christoph Oelckers 56202c49f1 Merge branch 'master' of c:\programming\doom-dev\zdoom
# Conflicts:
#	.gitignore
2016-02-16 21:02:13 +01:00
Christoph Oelckers 6adb069506 - rewrote p_local.h so that it doesn't pull in the entire bunch of headers.
This was to resolve some circular dependencies with the portal code.
The most notable changees:

 * FTextureID was moved from textures.h to doomtype.h because it is frequently needed in files that don't want to do anything with actual textures.
 * split off the parts from p_maputl into a separate header.
 * consolidated all blockmap related data into p_blockmap.h
 * split off the polyobject parts into po_man.h
2016-02-15 02:14:34 +01:00
Christoph Oelckers 993a840630 - bring formatting in line with GZDoom's version of this function. 2016-02-14 12:33:47 +01:00
Christoph Oelckers d037493ffe - fixed handling of FF_FADEWALLS on 3D floors. The problems with the old method became quite obvious in the demo map after the light list bug got fixed. 2016-01-29 17:13:14 +01:00
Christoph Oelckers d0b194563a Merge branch 'master' of https://github.com/rheit/zdoom
Conflicts:
	src/p_3dfloors.cpp
2016-01-29 16:36:24 +01:00
Christoph Oelckers f8d5430c06 - fixed: When changing 'noclip2' some minor lateral velocity should be set to ensure that all internal variables contain proper values. 2016-01-29 11:11:10 +01:00