Commit Graph

71 Commits

Author SHA1 Message Date
Christoph Oelckers 6d0ef7a9da - added conversion macros to convert floating point angles to angle_t, using xs_Float.h, and replaced all occurences in the code with them (let's hope I found everything.)
Converting a floating point value that is out of range for a signed integer will result in 0x80000000 with SSE math, which is used exclusively for this purpose on modern Visual C++ compilers, so this cannot be used anywhere.
On ARM there's problems with float to unsigned int conversions.

xs_Float does not depend on these
2016-02-08 12:10:53 +01:00
Christoph Oelckers 8da6483223 - fixed some places where FStrings were incorrectly used.
- replace all implicit conversions from FString to const char * in the header files (so that it can be test compiled with the implicit type conversion turned off without throwing thousands of identical errors.)
2016-02-05 10:40:45 +01:00
Randy Heit b3b0886b64 Merge branch 'scripting'
Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_blastradius.cpp
	src/p_enemy.cpp
	src/p_enemy.h
	src/thingdef/thingdef.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
2016-02-04 15:17:22 -06:00
Christoph Oelckers afcd755c7a - changed autoaim menu option to a slider which allows a more precise control of the property.
- having a value of 5000 as the default for autoaim makes no sense, since this is an angle value that will always be clamped to [0..35]. So now 35 is both the default and the maximum.
2016-01-30 13:43:39 +01:00
Christoph Oelckers 7b6b473ec4 - some GCC fixed by Edward-san. 2015-04-29 11:28:04 +02: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 5de6b535ae - Removed unnecessary 'id' variable from AActor.
- Removed unused 'backpack' variable from player_t.
- Removed duplicate code from b_move.cpp.
- General cleanup.
2014-10-13 08:45:36 +01:00
Randy Heit e7f427aa60 Merge branch 'maint' 2014-02-24 19:26:50 -06:00
Randy Heit db4763b14a Delay skin setting on save load until player class is known.
- Fixed: Loading players from savegames set the skin before their current
  class was retrieved, so they could not validate their skins with the
  correct class.
2014-02-24 16:27:57 -06:00
Randy Heit 7052d4e14e Fixed: userinfo_t::SkinChanged() was unaware of player classes 2014-02-24 16:18:10 -06:00
Braden Obrzut efa9e0c3ee Merge branch 'maint' 2014-01-18 18:10:48 -05:00
Braden Obrzut 7af8b78b9f - Applied Chilly's patch to fix excessive name change notifications. 2014-01-18 15:18:35 -05:00
Christoph Oelckers 698495efc5 - fixed: missing return in playerinfo CCMD added. 2013-12-01 01:21:43 +01:00
Randy Heit 0cf68af7d2 Overload operator = for player_t
- This fixes crashes when quitting multiplayer games because the default
  byte-for-byte copy caused PredictionPlayerBackup and the console player
  to point to the exact same userinfo data and to both try and free it
  when they are deleted.
2013-09-18 21:14:44 -05:00
Randy Heit 9c86f1c220 Merge branch 'master' into scripting for plugged userinfo memory leak
Conflicts:
	src/d_player.h
	src/p_interaction.cpp
	src/thingdef/thingdef_codeptr.cpp
2013-07-23 21:01:13 -05:00
Christoph Oelckers 2d2498d1e2 - fixed: userinfo_t needs a destructor to delete its CVARs when it is destroyed. 2013-07-14 10:58:53 +02:00
Randy Heit e9425b356b - Fixed: Verbose user info strings were written with an extra backslash
character between the key and value.
2013-07-01 21:40:09 -05:00
Randy Heit 459ad5abff - Updated scripting branch to latest version in trunk.
SVN r4337 (scripting)
2013-06-07 03:31:30 +00:00
Randy Heit 167ee9e7fb - Added three new ACS functions:
* int GetUserCVar(int playernum, "cvarname")
  * bool SetCVar("cvarname", newvalue)
  * bool SetUserCVar(int playernum, "cvarname", newvalue)
  GetUserCVar is analogous to GetCVar, except it returns the value of a user cvar for a
  specific player. (All user cvars can be examined using the playerinfo console command.)
  SetCVar sets a cvar to a new value. If the cvar is floating point, then newvalue is treated
  as a fixed point number, otherwise it's treated as an integer. SetUserCVar is the same, but
  for a specific player's user cvar.

  SetCVar and SetUserCVar can only change cvars created via CVARINFO. They cannot alter built-in cvars.

  If you use GetCVar or SetCVar with a user cvar, they will act on the copy of the user cvar
  for the player who activated the script. e.g.
    GetCVar("gender")
  is the same as
    GetUserCVar(PlayerNumber(), "gender")

  If you get the value of a floating point cvar, it will be returned as a fixed point number.
  Otherwise, it will be returned as an integer.

SVN r4283 (trunk)
2013-05-25 19:08:05 +00:00
Randy Heit 4fa198244c - Renamed CVAR_NOSEND to CVAR_IGNORE to better reflect its intent.
- Separated CVAR_MODARCHIVE into CVAR_MOD|CVAR_ARCHIVE so that mod-defined cvars can still be
  identified when they aren't meant to be archived.

SVN r4281 (trunk)
2013-05-25 17:08:59 +00:00
Randy Heit 787b84ef91 - Added CVARINFO lump support. This is a lump for defining mod-specific cvars and takes entries
of the form:
    <scope> [noarchive] <type> <name> [= <defaultvalue>];
  Where <scope> is one of:
  * server: This cvar is shared by all players, and in network games, only select players can
    change it.
  * user: Each player has their own copy of this cvar, which they can change independently.
  To prevent the cvar from being written to the config file, add noarchive to its definition.
  <Type> is one of:
  * int: An integral value. Defaults to 0.
  * float: A value that can include a fraction. Defaults to 0.0.
  * color: A color value. Default to black ("00 00 00").
  * bool: A boolean value that can hold either true or false. Defaults to false.
  * string: A string value. It's not too useful for mods but is included for completeness. Defaults to "".
  <Name> is the cvar's name and must begin with a letter and may only include alphanumeric
  characters and the underscore character.
  If you wish a non-standard default add an = character after the cvar's name followed by the
  default value you want to use. Example:
    server int mymod_coolness = 10;
- Fixed: FStringCVar::SetGenericRepDefault() did not make a copy of the input string.

SVN r4280 (trunk)
2013-05-25 16:34:23 +00:00
Randy Heit 8af465189a - Fix broken loading of pre-r4253 savegames.
SVN r4272 (trunk)
2013-05-18 15:38:10 +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 ce39368796 - Fixed: Players using colorsets instead of custom colors overrode their team colors.
SVN r4169 (trunk)
2013-02-27 03:27:33 +00:00
Randy Heit efbaab3440 - Never set the player actor's scale to the skin's directly. Only do it indirectly through
P_CheckPlayerSprite().

SVN r4005 (trunk)
2013-01-02 02:26:22 +00:00
Randy Heit 562cf04db2 - Update scripting branch to trunk.
SVN r3758 (scripting)
2012-07-14 03:04:41 +00:00
Randy Heit c0bc7532ac - Fixed: If a player has the NOSKIN flag set, do not change their appearance to that of the
skin when spawning or changing the skin.

SVN r3560 (trunk)
2012-04-14 03:07:28 +00:00
Christoph Oelckers 6f824e5ec7 - fixed bot color issue, thanks to Gez's patch.
SVN r3495 (trunk)
2012-03-31 11:13:34 +00:00
Randy Heit fc6d3738bb - Fixed: D_WriteUserInfoStrings() mixed the colorset with the color for the verbose form.
SVN r3452 (trunk)
2012-03-18 01:45:57 +00:00
Christoph Oelckers 163301dcd5 - took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it.
SVN r3259 (trunk)
2011-07-06 14:20:54 +00:00
Christoph Oelckers 03177090c0 - removed some unnecessary r_ header #includes.
SVN r3257 (trunk)
2011-07-06 10:55:04 +00:00
Christoph Oelckers fbff5ca932 - moved r_interpolate.cpp and r_translate.cpp to r_data.
- merged r_jpeg.h into jpegtexture.cpp because that's the only place where it's ever used.


SVN r3255 (trunk)
2011-07-06 08:50:15 +00:00
Christoph Oelckers 0715b7dfc6 - cleaned up switch code and fixed several problems:
* savegames stored an index in the switch table and performed no validation when loading a savegame.
  * setting of a random switch animation duration was broken.
  * separated the 2 values stored in the Time variable into 2 separate variables.
  * defining a switch with one texture already belonging to another switch could leave broken definitions in the switch table.
- added function for serializing switch and door animation pointers.
- bumped min. savegame versions due to changes to DButtonThinker and removed all current savegame compatibility code.


SVN r3030 (trunk)
2010-12-12 15:43:35 +00:00
Randy Heit 99670b708c - Sync scripting branch with what was in trunk on Sunday. I believe that would be revision 2739.
SVN r2790 (scripting)
2010-09-16 03:14:32 +00:00
Randy Heit 87a7ff7b6d - Add blzut3's morphed status bar patch.
SVN r2283 (trunk)
2010-04-17 02:06:26 +00:00
Randy Heit 900324c205 - Move color sets into the PlayerPawn metadata.
SVN r2270 (scripting)
2010-04-04 17:06:04 +00:00
Randy Heit 42ac75e894 - Sync scriptbranch with trunk.
SVN r2269 (scripting)
2010-04-04 04:09:24 +00:00
Randy Heit 604b5ef673 - Removed the old meta data system. All meta data is now stored in subclasses of PClass. This
should simplify scripting, since it means that meta fields can be treated (mostly) the same as
  normal fields.

SVN r2242 (scripting)
2010-03-25 20:38:00 +00:00
Randy Heit e78fd195d8 - Added support for the original games' player translations, including Hexen's table-based ones.
SVN r2193 (trunk)
2010-03-06 02:51:23 +00:00
Christoph Oelckers 2fbcc13652 - Gez's latest cleanup patch.
SVN r1854 (trunk)
2009-09-17 20:54:07 +00:00
Christoph Oelckers 238d4c3fac - More things from Gez's experimental build:
* info CCMD to print extended actor information (not fully implemented yet)
  * summonmbf CCMD.
  * Beta BFG code pointer (but not the related missiles yet.)
  * PowerInvisibility enhancements.
  * ScoreItem with one significant change: Added a score variable that can be
    checked through ACS and DECORATE. The engine itself will do nothing with it.
  * Nailgun option for A_Explode.
  * A_PrintBold and A_Log.
  * A_SetSpecial.


SVN r1819 (trunk)
2009-09-14 19:44:14 +00:00
Christoph Oelckers 2c65d5b8f5 - fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.

SVN r1448 (trunk)
2009-02-25 22:10:06 +00:00
Randy Heit a7e40b56f6 - Fixed: Player names and chat macros that end with incomplete \c escapes now
have those escapes stripped before printing so that they do not merge with
  subsequent text.
- Moved default weapon slot assignments into the player classes.
  Weapon.SlotNumber is now used solely for mods that want to add new weapons
  without completely redoing the player's arsenal. Restored some config-based
  weapon slot customization, though slots are no longer automatically saved
  to the config and section names have changed slightly. However, unlike
  before, config slots are now the definitive word on slot assignments and
  cannot be overridden by any other files loaded.
- Fixed: Several weapons were missing a game filter from their definitions.
- Removed storage of weapon slots in the config so that weapon slots can
  be setup in the weapons themselves. Slots are still configurable, since
  they need to be for KEYCONF to work; any changes simply won't be saved
  when you quit.
- Removed limit on weapon slot sizes.


SVN r1428 (trunk)
2009-02-20 00:53:25 +00:00
Randy Heit b387752f2f - Applied latest TEAMINFO patch.
SVN r1400 (trunk)
2009-02-04 23:14:28 +00:00
Christoph Oelckers b4b76ed4e6 - fixed: Identification of Doom1 Freedoom IWAD did not work.
- fixed: UDMF did not initialize a sector's light colors.
- fixed implementation of DF2_NOAUTOAIM flag.


SVN r1356 (trunk)
2009-01-10 09:40:47 +00:00
Christoph Oelckers 8f686a5e02 - Added Karate Chris's new DMFlags submission.
SVN r1333 (trunk)
2008-12-28 09:49:15 +00:00
Christoph Oelckers f4c07c45ec - Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
  into misc1 with SF_BIGTIC anymore. 
- Changed sprite processing so that sprite names are converted to indices 
  during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the 
  internal property parser which is no longer needed.


SVN r1146 (trunk)
2008-08-10 14:19:47 +00:00
Randy Heit fb50df2c63 About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.

- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
  FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
  This is so that I can use a series of mysnprintf() calls and advance the
  pointer for each one. Once the pointer goes beyond the end of the buffer,
  the count will go negative, but since it's an unsigned type it will be
  seen as excessively huge instead. This should not be a problem, as there's
  no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
  buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
  FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
  name when given a Hexen map number. This was fine with the old scanner
  code, but only a happy coincidence prevents it from crashing with the new
  code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
  binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
  is probably broken until I get around to booting into Linux again. Niceties
  provided over the existing Makefiles they're replacing:
  * All command-line builds can use the same build system, rather than having
    a separate one for MinGW and another for Linux.
  * Microsoft's NMake tool is supported as a target.
  * Progress meters.
  * Parallel makes work from a fresh checkout without needing to be primed
    first with a single-threaded make.
  * Porting to other architectures should be simplified, whenever that day
    comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
  itself instead of generating an external makefile to do it, since I couldn't
  figure out how to generate a makefile with an external tool and include it
  with a CMake-generated makefile. Where makewad used a master list of files
  to generate the package file, zipdir just zips the entire contents of one or
  more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
  formatting can be entirely independant of the CRT.

SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
Randy Heit 1f8e471eba - Separated the skin scale values into separate X and Y values so that skins
automatically generated for different player classes can use both the
  scaling values that can be set for the actor.


SVN r947 (trunk)
2008-04-27 22:33:19 +00:00