Commit Graph

307 Commits

Author SHA1 Message Date
Christoph Oelckers c7ae4688a3 - replaced all direct access to vertex coordinates with wrapper functions.
So that code replacement can be done piece by piece and not all at once.
2016-03-29 10:07:06 +02:00
Christoph Oelckers 35bb686281 - floatification of sector_t::centerspot. 2016-03-26 09:38:58 +01:00
Christoph Oelckers f60eac8dc0 - floatified FMapThing, dropoffz and GetBobOffset 2016-03-23 12:21:52 +01:00
Christoph Oelckers f8cf4bcf3d - trimmed down the AActor Spawn interface and removed all non-float variants.
This still needs some cleanup in a few calling functions.
2016-03-23 10:42:41 +01:00
Christoph Oelckers 6b3c0ecbd3 - floatified viewheight variables and some related code. 2016-03-22 18:06:08 +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 1ff4bb419c - made AActor::gravity and FMapThing::gravity floats. 2016-03-21 00:51:19 +01:00
Christoph Oelckers 161d03231a - added custom math routines for reliability. 2016-03-11 15:45:47 +01:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers 047070d180 - made arbitrary portals passable.
This includes:

* allow one sided portal linedefs to be crossable when part of a polyobject. Due to the limitations, two-sided linedefs won't work here. For general use this is still not allowed because making them passable would require some crippling fudging.
* delay portal finalization until after polyobjects have been spawned.
* the camera interpolation also needs to handle angle differences.

The code is still not 100% complete - the most important thing that is still missing is proper handling of P_CheckPosition through arbitrary portals.
2016-02-27 18:07:39 +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 dc37f78566 - fixed: Old portal data must be deleted before loading a new level. 2016-02-20 02:22:09 +01:00
Christoph Oelckers 02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- Ĩontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +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 e88901f4b7 - added the EE-Extradata parser I wrote for GZDoom so I can use the Vaporware demo map for testing portal stuff. 2016-02-05 23:51:28 +01:00
Christoph Oelckers 94b7ef72ca - more cleanup on portal implementation:
- store portal data in a separate structure.
- store portal data in savegames because some of this will be changeable later.
- run a cleanup pass after all portals have been created to weed out broken ones.
- add a definition type that's compatible with Eternity Engine's line portal types.
- swapped arg[2] and arg[3] of Line_SetPortal, because the type is more significant than the alignment.
2016-02-05 23:15:56 +01:00
Christoph Oelckers 9eaefc3685 - initialize portals with all other static line specials instead of doing it separately in P_FinishLoadingLineDefs when the map isn't fully set up yet.
- replace all float use in portal.cpp with doubles.
2016-02-05 16:58:57 +01:00
Christoph Oelckers 6639984772 - removed Line_SetVisualPortal special. This will be folded into Line_SetPortal later 2016-02-05 14:24:20 +01:00
Braden Obrzut ba54d73e07 Merge branch 'portals2_visual' 2016-02-05 00:10:46 -05:00
Randy Heit 9744b9e0d9 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/dobject.h
	src/dobjgc.cpp
	src/p_local.h
	src/thingdef/thingdef_codeptr.cpp
2016-01-21 12:45:06 -06:00
Christoph Oelckers d347415aee - fixed some garbage collection issues with interpolations:
* FInterpolator depended on external references to prevent its content from getting GC'd.
* none of the pointers in the interpolation objects were declared to the GC.

The result of these issues was that changing anything about the life cycle of interpolation objects caused corrupted memory crashes when a level was changed.
2016-01-21 11:36:37 +01:00
Braden Obrzut b6cdcddf30 - Fixed: Static mirrors in hexen format maps were broken. 2016-01-18 10:30:56 -05:00
Braden Obrzut f3f77a1ba0 Merge branch 'master' into portals2_visual 2016-01-18 09:45:42 -05:00
Christoph Oelckers bf747075e8 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/g_hexen/a_clericstaff.cpp
	src/p_enemy.cpp
	src/p_interaction.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
2016-01-17 20:57:55 +01:00
Christoph Oelckers fbaab5044d Merge commit '38df0665e3a2018cf1d0028a36357df6c7e908e9' into scripting
Conflicts:
	src/d_dehacked.cpp
	src/decallib.cpp
	src/g_hexen/a_clericstaff.cpp
	src/p_interaction.cpp
	src/p_local.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
	wadsrc/static/actors/shared/inventory.txt
2016-01-17 19:50:34 +01:00
Christoph Oelckers 71c7f2b42c - added 'floorterrain' and 'ceilingterrain' sector properties for UDMF. These will take precedence over texture based terrain if used.
'ceilingterrain' is needed because the top of 3D-floors refers to the model sector's ceiling, so in order to give a 3D floor a terrain it must be assignable to the sector's ceiling.
Note that although it is basically the same property, its actual function bears no relevance to its use in Eternity.
2016-01-09 12:10:36 +01:00
Christoph Oelckers bd8513c063 - made sector_t::damageamount an int so that it can hold TELEFRAG_DAMAGE.
- marked all places where sector_t::special needs to be addressed for the damage overhaul.

NOTE: This commit will not compile!
2016-01-06 12:56:35 +01:00
Christoph Oelckers 6a63effa1f - fixed: A_CheckTerrain did not use the proper damage type for processing an instant death sector.
- moved sector secret information from sector_t::special and secretsector to two flag bits in sector_t::Flags.

This is to get rid of the bit masking madness in the floor/ceiling thinkers which need to preserve this bit when they change a sector's type.
2016-01-06 01:50:45 +01:00
Christoph Oelckers 9bfd676783 - allow setting the FloatbobPhase through UDMF. 2015-11-29 11:28:26 +01:00
alexey.lysiuk 27135d5c5d Fixed crash on loading map with corrupt linedefs and/or sectors
See http://forum.zdoom.org/viewtopic.php?t=49276
2015-10-18 16:28:42 +03:00
ZZYZX d0df4c1744 Upgraded the portal code to work with the new tagManager system. Was uncompilable 2015-06-07 21:27:20 +03:00
Christoph Oelckers 7ba577e1b0 Merge branch 'master' into scripting
Conflicts:
	src/g_heretic/a_hereticweaps.cpp
	src/thingdef/thingdef_codeptr.cpp
2015-06-07 09:43:54 +02:00
Christoph Oelckers 4444d3c0c5 - removed the _3DFLOOR #define because we really do not want to comment this out anymore, right? 2015-06-07 09:41:44 +02:00
ZZYZX 78ea00be59 Put line ID from args[1] for Hexen maps 2015-06-07 04:19:18 +03:00
ZZYZX cd39c4b8a6 Merged mirrors with portals; Render part of mirrors done, render part of portals needs further testing 2015-06-07 04:19:17 +03:00
Christoph Oelckers 1effaa4c8e Merge branch 'master' into scripting 2015-04-29 10:53:37 +02:00
Christoph Oelckers 7d90c65427 - mask out Strife mapthing flags when starting an original Hexen map. 2015-04-29 08:42:54 +02:00
Christoph Oelckers 2e0f999fea Merge branch 'master' into scripting
Conflicts:
	src/p_effect.cpp
	src/p_effect.h
	src/p_local.h
	src/p_map.cpp
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/actor.txt
	wadsrc/static/actors/shared/inventory.txt
	zdoom.vcproj
2015-04-28 14:45:13 +02:00
Christoph Oelckers 8447990889 Merge commit '2719ce86dc07c9f7b1ad6d61a9a49c974896abf2' into scripting
Conflicts:
	src/info.h
	src/thingdef/thingdef_codeptr.cpp

(until right before the main work for multiple tags.)
2015-04-28 13:32:50 +02:00
Christoph Oelckers ddced06be2 Merge commit '6e45c565a0bc8d05279b0b2458a3fb718ae0924c' into scripting
Conflicts:
	src/p_mobj.cpp

(This stops right before moving the conversation IDs into MAPINFO because that feature is quite conflict-heavy and will have to merged by itself.)
2015-04-28 12:59:20 +02:00
Christoph Oelckers 065c0a79cd Merge commit '4f7ec3ad891d556c0d3f680e209a120ed38e9cdb' into scripting
Conflicts:
	src/d_main.cpp
	src/info.cpp
	src/info.h
	src/p_acs.cpp
	src/p_interaction.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_properties.cpp

(scripting branch update part 5)
2015-04-28 12:48:33 +02:00
Christoph Oelckers 792cad89b3 Merge commit '3849cb86231ce24131a86e9c29795a8cf3706a3d' into scripting
Conflicts:
	src/g_hexen/a_clericstaff.cpp
	src/g_hexen/a_hexenspecialdecs.cpp
	src/p_acs.cpp
	src/p_enemy.cpp
	src/p_interaction.cpp
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_expression.cpp

(Scripting branch update part 4)
2015-04-28 11:59:33 +02:00
Christoph Oelckers d6e3fc0567 Merge commit 'fb9231a38db2025eb77bfd246f36d985cbbccd2e' into scripting
Conflicts:
	src/info.cpp
	src/thingdef/thingdef_expression.cpp
	wadsrc/static/actors/constants.txt

(Scripting branch update part 2)
2015-04-28 09:57:01 +02:00
Christoph Oelckers cad282142d - fixed some last issues with the tag manager. 2015-04-19 18:22:39 +02:00
Christoph Oelckers db61c1cb57 - allow multiple line IDs as well using the same method as for sector tags. 2015-04-19 17:51:34 +02:00
Christoph Oelckers b921157f57 - uncouple sector tag storage from the sector data to allow multiple tags per sector.
Tags are now handled by a tag manager class which stores sector/tag pairs. This way multiple entries can be added per sector.
Since UDMF does not have any arrays the additional tags are stored as a space separated string as 'MoreIDs'.
2015-04-19 12:33:27 +02:00
Christoph Oelckers 203f88ce6e - some sanitizing of sector tag/line id management:
* make setting the line ID with P_TranslateLineDef explicit because there's one FraggleScript function that needs to work around the changes caused by this. There's also some functions setting only a temporary linedef. These would inevitably cause problems if the underlying data gets changed.
* remove FS function 'ChangeTag'. Fortunately this was just some long forgotten test stuff that can be removed without affecting any maps, but the feature would cause some serious problems in a more complex system.

With these changes it is guaranteed that after map setup the tag/ids won't change anymore.
2015-04-15 20:10:27 +02:00
Christoph Oelckers 902593198b - wrapped all line ID accesss just like sector tags 2015-04-15 09:37:06 +02:00
Christoph Oelckers 2faf836aa1 - some minor rework of tag access interface after I realized that some stuff (e.g. Strife's scrolling sector special) need the primary tag to treated specially. 2015-04-14 18:48:19 +02:00
Christoph Oelckers 238046655c - wrapped all accesses to the sector tag into accessor functions, as preparation for allowing multiple tags per sector. 2015-04-14 18:32:14 +02:00
Christoph Oelckers 51591d10b0 - handle slope things through new definition tables as well. Since these get processed outside P_SpawnMapThing it required some restructuring so that the actual spawn data is present when slope things get processed.
- removed FMapThing::Serialize because it isn't used anywhere - it was rather broken anyway.
2015-04-04 10:25:01 +02:00
Christoph Oelckers 9e5bf38123 - handle all special mapthing items (player starts, polyobj spots) via the new MAPINFO method instead of hard coding them in the spawn function.
(Note: The buildmap loading code should be adjusted to the new functionality as well eventually.)
2015-04-03 21:17:10 +02:00
Randy Heit d84c85d40f Remove warnings warned by Clang 2015-03-08 17:21:15 -05:00
Randy Heit fd7ed2bc25 Undo most of ZzZombo's changes
- "If it ain't broke, don't fix it."
- Some of the changes were downright wrong and some were pointless, so undo
  everything that doesn't look like an actual improvement.
2015-02-08 20:44:18 -06:00
ZzZombo c4b742ebf0 - Part 2 of the sanity crusade. 2015-02-08 17:03:49 +08:00
Randy Heit b5e4153c78 Merge branch 'master' into gonesolong
Conflicts:
	src/CMakeLists.txt
	src/b_think.cpp
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_clericstaff.cpp
	src/g_hexen/a_fighterplayer.cpp
	src/namedef.h
	src/p_enemy.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/p_teleport.cpp
	src/sc_man_tokens.h
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_function.cpp
	src/thingdef/thingdef_parse.cpp
	wadsrc/static/actors/actor.txt
	wadsrc/static/actors/constants.txt
	wadsrc/static/actors/shared/inventory.txt

- Added register reuse to VMFunctionBuilder for FxPick's code emitter.
- Note to self: Need to reimplement IsPointerEqual and CheckClass, which
  were added to thingdef_function.cpp over the past year, as this file no
  longer exists in this branch.
2014-12-21 21:15:11 -06:00
Randy Heit 2d87eb0ba2 Merge branch 'master' into gonesolong
Conflicts:
	src/CMakeLists.txt
	src/actor.h
	src/g_heretic/a_hereticmisc.cpp
	src/g_heretic/a_hereticweaps.cpp
	src/g_heretic/a_ironlich.cpp
	src/info.h
	src/namedef.h
	src/p_buildmap.cpp
	src/p_enemy.cpp
	src/p_map.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	zdoom.vcproj
2014-12-20 19:13:14 -06:00
ChillyDoom ee977f94d7 - Moved bot thinking logic into DBot. 2014-11-14 16:54:56 +00:00
ChillyDoom c400dcf736 - Made DBot inherit from DObject. 2014-10-15 17:54:12 +01:00
Christoph Oelckers a2c81f1ca9 -fixed the file validity checks in MapData::GetChecksum.
They need to be done per lump, because MapData::Seek can alter the FileReader being used for a specific lump. Even worse, the FileReader will be NULL when the function as it was is called for a map inside a Zip-file.
2014-09-12 20:59:23 +02:00
Randy Heit 4cf468452c Remove slopetype from line_t.
- Recomputing it in the only two places where it's used is trivial, so
  it's basically a waste of space to precompute it.
2014-07-31 19:15:08 -05:00
Randy Heit 00854dd09e Don't reopen the reader for encrypted maps
- Fixed: Memory leak when loading Blood maps.
2014-07-29 20:42:17 -05:00
Christoph Oelckers e92032e8ff - fixed: The map setup code was still truncating texture names in several places. 2014-05-16 22:48:37 +02:00
Christoph Oelckers a375454474 - removed 8 character limit for map names. 2014-05-14 00:52:16 +02:00
Christoph Oelckers 24886b6734 - removed the last static character arrays from FLevelLocals. 2014-05-13 23:16:13 +02:00
alexey.lysiuk 1c50b5dd6f Fixed initialization of Hexen-style things
Recently added pitch and roll members were not initialized with zeroes when loading Hexen-style maps
At least, hitscan attack can be fired in random direction because of this
2014-04-20 13:37:59 +03:00
Gaerzi c54f5571ea Typo. 2014-04-15 17:24:01 +02:00
Gaerzi 6f2fd8edbf Hexen also needs to init 0 fields. 2014-04-15 17:22:56 +02:00
Gaerzi 8e3360453f Hexen too. 2014-04-15 17:18:55 +02:00
Gaerzi e5578934ad Init new non-0 fields for non-UDMF maps. 2014-04-15 17:16:33 +02:00
Christoph Oelckers ae49044f96 - let 'showloadtimes' measure UDMF parsing. 2013-12-19 17:59:58 +01:00
Christoph Oelckers 251cdacf26 Merge branch 'master' into scripting
Conflicts:
	src/g_shared/a_randomspawner.cpp
	src/g_strife/a_strifeweapons.cpp
	src/thingdef/thingdef_parse.cpp
	wadsrc/static/actors/constants.txt
2013-09-03 09:01:28 +02:00
Randy Heit b0371e1804 Don't abort when merely checking if a non-map is a map
- When P_OpenMapData() is called by P_CheckMapData(), we don't actually
  care if any required lumps are missing. This just means it isn't a valid
  map, so don't abort with I_Error().
2013-08-30 22:38:57 -05:00
Randy Heit 6aee7833d0 Use PField instead of PSymbolVariable for SetMapThingUserData() 2013-08-21 22:51:12 -05:00
Christoph Oelckers 3e4678765b Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/thingdef/thingdef_codeptr.cpp
2013-08-18 12:18:59 +02:00
Christoph Oelckers 0a258f95ea - added gravity property to UDMF things. Positive values are multiplied with the class's gravity property, negative values are used as their absolute. 2013-08-09 16:25:16 +02:00
Christoph Oelckers bba092cc0b Merge branch 'master' into scripting
Conflicts:
	src/d_player.h
	src/g_doom/a_archvile.cpp
	src/thingdef/thingdef.h
	src/thingdef/thingdef_properties.cpp
2013-08-09 13:03:28 +02:00
Braden Obrzut bb494292c6 - Fixed P_CheckMapData allowed non-map lump names to pass resulting in a crash when actually trying to load the map. 2013-08-08 23:47:58 -04:00
Randy Heit 459ad5abff - Updated scripting branch to latest version in trunk.
SVN r4337 (scripting)
2013-06-07 03:31:30 +00:00
Braden Obrzut 1d4fbc05a5 - Fixed: glbsp nodes in a wad file inside a pk3 would not be loaded.
- Fixed: Typo from r4270.

SVN r4273 (trunk)
2013-05-20 20:39:34 +00:00
Randy Heit e434ccc3f6 - Add support for user variables on things in UDMF maps. If you include an actor's user variable
in its UDMF thing definition, that user variable will be set to the desired value for that
  actor when the map is loaded.

SVN r4140 (trunk)
2013-02-17 00:23:58 +00:00
Randy Heit 7714a45e02 - Fixed: Because P_OpenMapData() now reopens the containing file for the map, P_LoadGLNodes() needs a new check for if the map came from a regular wad.
SVN r4136 (trunk)
2013-02-14 05:06:05 +00:00
Randy Heit afabf7e018 - Force node building for garrison.wad from The Master Levels so that the teleporter to the
red key won't leave you in the ground.

SVN r4071 (trunk)
2013-02-07 21:32:06 +00:00
Randy Heit 787c338871 - Added MAPINFO flag "SpawnWithWeaponRaised".
SVN r4013 (trunk)
2013-01-03 02:08:08 +00:00
Christoph Oelckers deff47ea18 - fixed: The map loader did not check for the new node formats.
SVN r3982 (trunk)
2012-12-07 07:40:41 +00:00
Randy Heit d77297e969 - Added support for loading ZGL3/XGL3 nodes.
- Added additional debug spew for the nodebuilder.
- Restore the nodebuilder's debug spew that was present in ZDBSP but not the internal version.
  Use the CRT's printf for this output to ensure that it is identical to ZDBSP's output for the
  same input.

SVN r3980 (trunk)
2012-12-07 06:16:07 +00:00
Christoph Oelckers 7aa4c55bfc - added Gez's patch to fix map checksum calculation.
SVN r3970 (trunk)
2012-11-19 00:43:45 +00:00
Braden Obrzut d393434d56 - Fixed: Broke UDMF in PK3 loader.
SVN r3905 (trunk)
2012-10-24 23:49:34 +00:00
Braden Obrzut b52c3238eb - Instead of implementing the wad code in three places, use the normal resource code for map loading and GL node loading.
SVN r3897 (trunk)
2012-10-22 01:28:11 +00:00
Randy Heit 0c8e4c37d9 - The complete FMapThing is overkill for storing player starts, so use a new minimal structure for them.
SVN r3750 (trunk)
2012-07-08 02:18:15 +00:00
Randy Heit 71601f91d1 - Added MAPINFO flag RandomPlayerStarts. In this mode, no voodoo dolls are spawned. Instead, all
player starts are added to a pool, and players spawn at a random spot.

SVN r3749 (trunk)
2012-07-08 01:43:47 +00:00
Christoph Oelckers 14730a89be - changed calculation of soundorg for triangular sectors. In many cases the center of the bounding box won't be inside the sector but on one of the outer lines so something different is needed
SVN r3517 (trunk)
2012-04-04 17:33:43 +00:00
Randy Heit cfd5b84535 - Replace >>MAPBLOCKSHIFT with GetSafeBlockX/GetSafeBlockY from Mocha Doom.
SVN r3486 (trunk)
2012-03-28 03:49:38 +00:00
Randy Heit ac0c1eb64b - Fixed: If the znodes were based on a map with more vertexes than the one it is being loaded
for, reject them.

SVN r3477 (trunk)
2012-03-23 23:04:32 +00:00
Randy Heit 2e9abe7408 - Fixed: When checking the REJECT contents one byte at a time, P_LoadReject() used rejectsize
instead of i as an index into rejectmatrix.

SVN r3456 (trunk)
2012-03-20 02:09:48 +00:00
Randy Heit 914ef44c59 - Fixed: In non-UDMF maps, projectile impact activation implies projectile cross activation as well.
SVN r3439 (trunk)
2012-03-15 22:57:00 +00:00
Randy Heit 58ed367280 - Fixed: If the first four bytes of the NODES lump are all zero, the nodes would not be loaded,
nor would they be generated.

SVN r3423 (trunk)
2012-03-11 03:25:04 +00:00
Randy Heit 472ac1b07c - Fixed: The nodebuilder is highly likely to renumber vertices, so we need to remember how the
original vertices map to the new ones until after vertex slopes are handled.

SVN r3380 (trunk)
2012-02-21 21:52:42 +00:00
Randy Heit 7714ee3ffd - Fix more errors found with static code analysis.
SVN r3288 (trunk)
2011-09-01 22:57:49 +00:00
Christoph Oelckers ba661308d4 - added GZDoom's option not to count monsters in E1M8-style end of level sectors, but controlled by a dmflag.
SVN r3267 (trunk)
2011-07-07 21:55:55 +00:00