Commit Graph

251 Commits

Author SHA1 Message Date
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
Randy Heit b93dfcf3cf - Fixed: G_DoLoadLevel() has a for loop where it resets player cameras that incremented and checked the wrong variable.
SVN r4168 (trunk)
2013-02-27 03:13:55 +00:00
Randy Heit be0845acf1 - Moved all BorderNeedRefresh and SB_state updating code into separate functions that won't crash if screen is NULL.
SVN r4167 (trunk)
2013-02-27 03:10:25 +00:00
Randy Heit 0b9b6dda2e - Fixed: The changemap CCMD did not work for maps not defined by MAPINFO.
SVN r4131 (trunk)
2013-02-12 23:55:28 +00:00
Randy Heit e0a137b725 - Removed the netdemo flag, because it's redundant with (netgame && demoplayback).
SVN r4050 (trunk)
2013-01-26 03:28:54 +00:00
Randy Heit 4601954248 - Added CHANGELEVEL_PRERAISEWEAPON flag for use with ACS's ChangeLevel.
SVN r4014 (trunk)
2013-01-03 02:18:19 +00:00
Randy Heit 787c338871 - Added MAPINFO flag "SpawnWithWeaponRaised".
SVN r4013 (trunk)
2013-01-03 02:08:08 +00:00
Randy Heit c954fb5477 - Added the mapinfo flag ForgetState. This prevents a maps state from being remembered in a hub,
so when you return to it without leaving the hub, it will be as if you had never set foot in
  it. RememberState is provided to turn this flag off.

SVN r3846 (trunk)
2012-08-23 00:31:29 +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
Randy Heit 390fd5dd6c - Pass playernum as a parameter to P_SpawnPlayer(). Now P_SpawnMapThing() is the only thing
that uses the MapThing's type to determine the which player is spawning.

SVN r3748 (trunk)
2012-07-07 22:52:37 +00:00
Randy Heit 661e33f364 - Added the CCMD listsnapshots to show which maps have savedata stored.
SVN r3690 (trunk)
2012-06-16 04:05:31 +00:00
Randy Heit 77c663a9b8 - In conjunction with all the below changes, attempt to fix A_CheckSightOrRange and A_CheckSight
for multiplayer: They now always check through the eyes of every player. For players whose
  cameras are not players, they also check through the eyes of those cameras.
- Using spynext/spyprev to switch from a non-player to a player now writes a command to the
  network stream and lets Net_DoCommand() take care of it later. The logic here is that if
  a player is viewing from something that isn't another player, then every player needs to know
  about it for sync purposes. Consequently, when they stop viewing from a non-player and switch
  to a player, everybody needs to know about that too. But if they are viewing from a
  player, it doesn't matter which player it is, so they can spynext/spyprev all they want
  without letting the other players know about it (and without potentially breaking demos--due
  to the above-mentioned two codepointers--while doing it during demo playback).
- Replaced the instances of checking players[consoleplayer].camera for a valid pointer to
  ones that do it for every player.
- Fixed: Upon changing levels, all players but the consoleplayer would have their cameras NULLed.
- Fixed: player_t::FixPointers() needs to bypass the read barriers, or it won't be able to
  do substitutions of old objects that are pending deletion.

SVN r3448 (trunk)
2012-03-17 00:52:33 +00:00
Randy Heit 73c55b52f9 - Fixed: The check for CHANGELEVEL_KEEPFACING in G_FinishTravel() needed parentheses.
SVN r3444 (trunk)
2012-03-16 00:59:10 +00:00
Randy Heit 58f7e72d1b - Restored savegame compatibility that was removed in r3427.
SVN r3435 (trunk)
2012-03-13 02:43:24 +00:00
Christoph Oelckers e4880d162f - added Xaser's submission for accessing accuracy and stamina from DECORATE and ACS.
- added DECORATE properties for accuracy and stamina.
- Since these changes move properties from player_t to AActor all savegame compatibility code was removed and the min. savegame version bumped.


SVN r3427 (trunk)
2012-03-11 09:08:35 +00:00
Randy Heit 7279e2ad62 - Fixed: Player pitch limits were reset to 0 when changing levels and loading
saved games.



SVN r3332 (trunk)
2011-12-14 00:16:19 +00:00
Randy Heit 66f86add05 - Fixed: Starting in a sector with a musinfo thing would not trigger the thing.
SVN r3313 (trunk)
2011-11-07 00:31:17 +00:00