Commit Graph

267 Commits

Author SHA1 Message Date
Christoph Oelckers 289cdfbefd - made AActor::floorclip a double. 2016-03-20 23:42:27 +01:00
Christoph Oelckers 8362c6a856 - conversion of floorz to double. 2016-03-20 19:52:35 +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 671291227e - first stage of converting actor angles to float complete
Patched up everything so that it compiles without errors again. This only addresses code related to some compile error. A large portion of the angle code still uses angle_t and converts back and forth.
2016-03-16 12:41:26 +01:00
Christoph Oelckers 651817fad7 - made AActor::velx/y/z and player_t::velx/y fixedvec's.
(This commit is 95% search & replace with only a few places where velz was used as a local variable changed.)
2016-03-12 14:11:43 +01:00
Randy Heit 76489e7638 More gracefully handle travelling to a map without matching player starts
- First, don't crash when travelling to a map in a hub that doesn't have
  any player starts that match the position given to Teleport_NewMap (or
  equivalent).
- Seconed, move the player to the location they were at when the left the
  level. At least that way, they shouldn't be in random geometry or off
  the map entirely.
2016-03-08 21:51:12 -06:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers e11da06e69 - some preparations for actor interpolation through wall portals. 2016-02-25 00:41:31 +01:00
Christoph Oelckers 51da78ba29 - added a compatibility option to allow multiple exits to be triggered.
This is required by Daedalus's travel tubes which contain a faulty script with some leftover debug code.
2016-02-24 10:35:29 +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 0a0a2c4a41 - removed a warning. 2016-01-30 12:59:15 +01:00
Edward Richardson 40d90ba325 Game still needs to abort if no starts exist at all 2016-01-30 22:26:47 +13:00
Edward Richardson c1e362ee83 Added level transition spawning for missing starts
- Additional player bodies are spawned for any absent starts in co-op.
- Removed now-redundant bot start limitation
2016-01-30 22:02:27 +13:00
Christoph Oelckers 57ab1387f2 - yet more refactoring.
Note about A_SkelMissile: The direct change of the missile's position was changed to use SetOrigin. If this is later supposed to be portal-aware, such direct coordinate changes are a no-go to ensure that everything is properly maintained.
2016-01-18 18:52:24 +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
alexey.lysiuk 20bf4d6c8e Fixed crash on finishgame CCMD in non-game modes
http://forum.zdoom.org/viewtopic.php?t=49943
2015-11-21 17:43:49 +02:00
Edward Richardson 9aabc85281 Fixed loading default map saves
- Just like normal maps, default map stores an FString as a map name.
2015-09-05 17:13:54 +12:00
Christoph Oelckers 19d15d7fc8 - fixed: Levels could be exited multiple times, triggering special exit actions for each one. 2015-07-15 09:25:04 +02:00
Randy Heit 8d501fdb9f Fix some issues with changing player viewheight at runtime
- Viewheight change was delayed: Viewheight must be copied to player
  structure as well as the PlayerPawn. Not sure if should actually use
  deltaviewheight to spread the change out over a few tics instead of
  being instant.
- Viewheight not preserved when travelling: player->viewheight must be
  restored from pawn->ViewHeight, because the temporary player set it back
  to the default viewheight.
2015-04-22 23:22:27 -05:00
Randy Heit 3463b87876 Fixed: MUSINFO was not multiplayer-aware
- Move MUSINFO change request out of FLevelLocals and into player_t. This
  allows the MusicChanger actors to change music for each player
  independantly. This is similar to PrBoom+, which switches depending on
  the displayplayer. The difference being, we don't actually track the
  music other players are listening to. (Which might not be a bad idea to
  implement at some point.)
- Moved a few fields in player_t for better packing.
2015-03-26 23:19:05 -05:00
Randy Heit c7842a8de8 Fix not-Windows 2015-02-24 20:13:03 -06:00
Randy Heit e4a041cb4c When changing maps, print map name in console in lower case 2015-02-24 20:12:08 -06:00
Christoph Oelckers 337682934c - fixed: CF_FLY cannot be part of the player_t structure and be tracked properly. It needs to be part of the actor itself that has MF2_FLY set so it got moved to flags7.
- removed some fudging code that tried to work around the shortcomings of CF_FLY but was ultimately causing more problems than it solved.
2015-02-10 23:40:53 +01:00
ZzZombo 322742d4b1 - Fixed various instances of unused variables, accessing arrays out of bounds, initialization of non-primitive members in constructor's body, dead code, passing parameters by value instead of reference, usage of uninitialized variables, as reported by cppcheck. 2015-02-07 23:35:23 +08:00
Christoph Oelckers 4f383e5aa7 - Nash's force fake contrast submission. 2014-12-26 13:43:49 +01:00
ChillyDoom ee977f94d7 - Moved bot thinking logic into DBot. 2014-11-14 16:54:56 +00:00
Edward Richardson eceb37aa64 Added recordmap for recording demos from console
recordmap <filename> <map name>
Starts a new game from the specified map recording to the specified
filename
2014-11-01 17:47:29 +13:00
Edward Richardson 82ac6c999e Destroy old player mobjs when starting new games 2014-10-26 04:14:52 +13:00
Christoph Oelckers aa338a4dc6 - fixed: G_FinishTravel must synchronize the CF_FLY flag with MF2_FLY. 2014-10-25 01:00:40 +02:00
Christoph Oelckers 2ada3fe00e - remove debug stuff. 2014-09-13 11:40:06 +02:00
Christoph Oelckers 50a8297201 - fixed: G_ChangeLevel must resolve warptrans map links before getting the next level's levelinfo. 2014-09-13 11:00:25 +02:00
Christoph Oelckers 1e82d72349 - fixed: G_FinishTravel must clear the MF2_BLASTED flag off the player pawn because this flag will result in damage from contact with other objects in the map. 2014-09-13 09:56:21 +02:00
Christoph Oelckers a21f01bc5f - added jpalomo's submission to make freelook a 3-state setting, like crouch and jump. This required moving around the flags a bit so demo compatibility had to be bumped. It may also require adjustment for launchers that can set the dmflags. 2014-07-26 10:15:07 +02:00
Christoph Oelckers 8ec95dc58e - fixed a few places in the savegame code where map names were still truncated to 8 characters. 2014-05-20 10:14:44 +02:00
Christoph Oelckers ff7913ace8 - fixed: When a level gets loaded the renderer's sky variables need to be set. 2014-05-17 09:46:58 +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
Christoph Oelckers ebd6c18bef - missed one texture name field in level_info_t. 2014-05-13 15:32:54 +02:00
Christoph Oelckers e718a72b4d fixed: skies should be loaded into the FLevelLocals struct not into the global variables of the renderer. 2014-05-13 11:53:08 +02:00
Christoph Oelckers 65e8563cf4 replaced all character arrays for lump/texture names in the level_info_t and FLevelLocals structures with FStrings as first preparation for allowing long texture names. 2014-05-13 11:33:59 +02:00
Edward Richardson 6183f8125f Don't change RNG in demos incase they are static 2014-05-03 03:01:49 +12:00
Edward Richardson d6af8dc352 Added static RNGseed control 2014-05-03 03:01:40 +12:00
Edward Richardson 9dad8bdbbe Clear old camera from previous level
The sound code could accidentally reference an old invalid camera during
level spawn
2014-03-13 18:27:39 +13:00
Edoardo Prezioso 1fb757f6f1 - Fixed useless 'array != NULL' check.
- 'notranslate != NULL' is completely useless, because 'notranslate' is an array, hence removed.
- I interpreted 'SbarInfoScript != NULL' as a typo, since 1)in the next expression inside the condition there's a dereference to 'SBarInfoScript[SCRIPT_CUSTOM]' and 2)'SBarInfoScript[SCRIPT_CUSTOM]' is checked against 'NULL', in line 352, and then dereferenced when introducing 'cstype'.
2014-03-01 22:27:40 +01: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
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
Christoph Oelckers db562142f0 - Fix c++11 literal suffix warnings / patch by Edward-san. 2013-07-22 22:25:44 +02:00
Randy Heit 0eb72156ed I hope I don't regret doing this so close before I want to do a release, since it's a pretty
major change to ACS's workings. However, I had an epiphany yesterday and just had to do this, since it seems like too big a deal to hold off until a later release:
- Dynamically generated strings returned via strparam and get(user)cvar now last as long as they
  need to. They do not disappear at the end of each tic. You can now safely store them in
  variables and hold on to them indefinitely. In addition, strings from libraries no longer
  require you to load the exact same libraries in the exact same order. You can even store a
  library's string in a world variable and retrieve it on another map that doesn't load the
  library at all, and it will still be the correct string.
- ACS library IDs now only get 12 bits instead of 16 so that each string table can hold up
  to about a million strings instead of just 65536. This shouldn't be a problem, although it
  means that save games that had strings with the larger IDs stored in variables are no
  longer compatible. Since many saves don't involve libraries at all, and even many that do 
  are not actually affected, I'm not bumping the min save version. The worst that can happen
  is that you get no text at all where some was expected.

SVN r4295 (trunk)
2013-05-30 02:22:47 +00:00
Randy Heit 2668988870 - Switched to a genericly extensible representation for userinfo.
- Fixed: The playerinfo CCMD did not range check the player number.

SVN r4253 (trunk)
2013-05-12 18:27:03 +00:00
Randy Heit 92d54ca0fc - Instead of setting the default skybox in every sector without an explicit skybox set, set it
once in the level struct and then use that for sectors with a NULL skybox. This fixes zpack's
  E2M3 so that when it removes its sector stacks, you will get the default skybox in their
  place, since stacked sectors and skyboxes use the same pointers in a sector.

SVN r4224 (trunk)
2013-04-21 02:22:37 +00:00