Commit graph

10964 commits

Author SHA1 Message Date
Christoph Oelckers
29195a913c - Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE.
- Added VSpeed DECORATE property so that an actor can be given an initial
  vertical speed.
- Removed the barrel check in P_DamageMobj. AActor::Die is doing the same
  operation unconditionally so this is redundant.
- Added A_BarrelDestroy to the list of DECORATE code pointers so that
  the same effect can be recreated for other items as well.
- Renamed A_BarrelRespawn to A_Respawn, changed it so that it works for
  monsters and added it to the list of DECORATE code pointers. Now Quake-style
  zombies should be possible. ;)
- Changed handling of MF4_RANDOMIZE so that it applies to all actors being
  spawned and not just projectiles.
- Converted Berserk and Megasphere to DECORATE.
- Fixed: HealThing should respect the stamina a player has and the Dehacked
  health compatibility flag if max is 0. To do that it calls P_GiveBody now.


SVN r373 (trunk)
2006-11-04 13:06:42 +00:00
Christoph Oelckers
c745c635db - Fixed: The Cacodemon had a FastSpeed definition even though it shouldn't.
- Fixed: FastSpeed was used unconditionally when defined.


SVN r372 (trunk)
2006-11-02 07:23:08 +00:00
Christoph Oelckers
a8ba2a99ea - Fixed: SetActorPitch with a 0-tid (i.e. affect the activator) set the angle
instead of the pitch.
- Fixed: The check for special death states in AActor::TakeSpecialDamage didn't
  work.


SVN r371 (trunk)
2006-10-31 21:49:45 +00:00
Christoph Oelckers
1b741775a4 Removed one unused variable.
SVN r370 (trunk)
2006-10-31 16:11:11 +00:00
Christoph Oelckers
0cf2ae0127 Forgot to save the last change before committing.
SVN r369 (trunk)
2006-10-31 15:24:22 +00:00
Christoph Oelckers
063c85b157 - Fixed: The global WeaponSection string was never freed. It has been replaced
with an FString now.
- Fixed: The music strings in the default level info were never freed and
  caused memory leaks when used repeatedly.
- Fixed: The intermusic string in the level info was never freed.
- Fixed: The default fire obituary should only be printed if the damage
  came from the environment. If it comes from a monster the monster specific
  obituary should be used instead.
- Added custom damage types from the floating point test release.
- Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage 
  type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also 
  be used by other actors so a more generalized approach is needed than hard
  coding it into the Pain Elemental.
- Converted a few of Doom's monsters to DECORATE because I couldn't test the
  first version of the custom state code with the corpses inheriting from them.
- Added custom states from last year's floating point test release and fixed
  some bugs I found in that code. Unfortunately it wasn't all salvageable
  and it was easier to recreate some parts from scratch.



SVN r368 (trunk)
2006-10-31 14:53:21 +00:00
Randy Heit
3b2c2efcb1 - Version bump to 2.1.7.
- Fixed: Placing a /* */ comment at the very end of a file without a
  terminating newline would not parse reliably.
- Added a NULL WallSpriteTile check to R_RenderDecal().


SVN r365 (trunk)
2006-10-31 00:47:05 +00:00
Christoph Oelckers
88ca8e630c - Changed parameter storage for states to use a separate member variable
instead of forcing it into misc1/misc2. Although this increases the EXE's
  size by 30k it has several advantages:
  * State parameters are no longer limited to 65535 for all states combined.
  * State parameters can be used with long durations.
  * Some special handling in the weapon state set functions can be removed.


SVN r364 (trunk)
2006-10-29 11:01:00 +00:00
Christoph Oelckers
b178bb2612 - Fixed: The MinotaurFriend's MF4_NOTARGETSWITCH was put on AMinotaurFX1.
SVN r363 (trunk)
2006-10-27 08:20:54 +00:00
Randy Heit
bcca366e8f - Removed A_JumpSet and merged its functionality with A_Jump by turning
A_Jump into a varargs function.
- Fixed: P_MorphPlayer() should check that the desired type is actually a
  PlayerPawn.
- Added an optional parameter to the morphme ccmd that specifies the player
  class to morph into.
- Changed the SetActorPitch, SetActorAngle, Thing_Spawn*, Thing_Projectile*,
  and Thing_Move functions so that TID 0 affects the activator.


SVN r362 (trunk)
2006-10-27 03:03:34 +00:00
Christoph Oelckers
753f280e04 - Moved the sector type translation for Doom format maps into a simple lump
in zdoom.pk3.
- Changed Line_SetIdentification so that the fifth arg is a high-byte for the line ID.


SVN r361 (trunk)
2006-10-25 16:21:08 +00:00
Randy Heit
2efba66558 - Added the A_JumpSet function for what seems to be a fairly common scenario.
It is like A_Jump, except it accepts up to 20 jump targets. The jump
  probability is still the first parameter and controls whether any jump is
  taken at all; use 256 if you always want to jump. If a jump is taken, then
  one of the jump targets will be chosen at random, with each target having
  an equal chance of being chosen.
- Fixed: The unfreeze ccmd was not multiplayer-safe. And I renamed it to thaw,
  since it has nothing to do with the freeze ccmd.


SVN r360 (trunk)
2006-10-24 02:32:12 +00:00
Christoph Oelckers
0d5e3cf97e - Added MF5_PIERCEARMOR flag that allows damaging objects that aren't
affected by armor.
- Added an unfreeze CCMD so that frozen players can be unfrozen for testing.
- Added special death states for projectiles hitting actors.
- Added ACS SetActorPitch/GetActorPitch functions.
- Added cameraheight property for actors.


SVN r359 (trunk)
2006-10-22 10:32:41 +00:00
Christoph Oelckers
fb5f4a132b - Fixed: The yellow color range contained gaps in its definition which
resulted in incorrect colors.
- Fixed: FFont::BuildTranslations didn't clamp the RGB color values. This
  can happen if some font colors overflow or underflow due to incomplete
  range specifications.


SVN r358 (trunk)
2006-10-21 09:01:45 +00:00
Randy Heit
dd5f01b91e - Fixed: ExpData::EvalConst() did not NULL the children pointers for binary
operators after deleting them, so ~ExpData() would try to delete them again
  later.


SVN r357 (trunk)
2006-10-21 04:38:57 +00:00
Randy Heit
ef1a5a115f - Added a new MapMarker actor. Instead of appearing in the 3D view, it appears
on the automap instead. If its first argument is zero, the map marker itself
  appears on the automap, otherwise it is drawn on top of any actor with a TID
  matching that argument. If the second argument is one, then the map marker
  will only be appear if the player has previously seen the sector it is one.
  You can use Thing_Activate and Thing_Deactivate on markers to turn them on
  and off. And if you subclass MapMarker with DECORATE, you can easily make
  your own custom markers.
- Fixed: Map markers could not be drawn partially off the map. They were
  drawn either fully or not at all.
- Fixed: Map markers appeared in the wrong place on a rotated overlay map if
  screenblocks < 10.


SVN r356 (trunk)
2006-10-20 04:04:04 +00:00
Randy Heit
35ca16ba4f - Added the MF2_PASSMOBJ for P_Thing_Spawn() from January 4, 2003, to
DLevelScript::DoSpawn().
- Changed VectorNormalize() (and VectorNormalize2) to use doubles for storing
  the vector lengths, fixing desyncs between GCC/VC++ games that happened
  because the two compilers produced slightly different results for some
  slopes. GCC kept them in registers, so they were never truncated to floats.
  VC++ stored them to memory and reloaded them in order to truncate them to
  the defined precision. Lesson learned: Floating point numbers in local
  variables should always be doubles to produce the best code with VC++ that
  has the best chance of matching GCC's default behavior.
- Removed netget and netsend function pointers. PacketGet and PacketSend are
  now called directly.
- Fixed: Watching a demo from the point of view of someone other than the
  first player could cause a crash when the demo ended.
- Removed invcount from the expression evaluator at Grubber's suggestion,
  because it doesn't work.
- Fixed: vid_nowidescreen should fire off setsizeneeded so that changes to it
  can happen immediately instead of at the next resolution change.


SVN r355 (trunk)
2006-10-20 01:58:26 +00:00
Randy Heit
7c1fbe7ee5 - Modified the way autosaves are done. Instead of setting gameaction to
ga_autosave, write DEM_CHECKAUTOSAVE to the net stream. When this is
  processed, it will check if it's okay to do an autosave. If it is, it writes
  DEM_DOAUTOSAVE to the net stream, which the sets gameaction to ga_autosave.
  Essentially, about half of the functionality was moved out of G_DoAutoSave()
  and into Net_DoCommand().
- Minor changes to OS detection: The os_WinNT enumeration has been renamed to
  os_WinNT4, since every new OS coming out of Microsoft these days is
  essentially NT. NT 5.2 and 6.0 are now properly identified as "Windows
  Server 2003" and "Windows Vista" respectively, and any unknown NT versions
  Microsoft introduces in the future will now be displayed as "Windows NT"
  instead of "Windows 2000" if the minor version is 0 and "Windows XP" if the
  minor version is non-0. Win32s detection has also been removed. Presumably
  if somebody is foolish enough to try to run this on Windows 3.x with Win32s,
  it won't even load due to missing DLLs.
- Fixed: Demos with NETD chunks should not set netgame to true unless they
  have more than one player. And since netdemo is ignored if netgame is
  false, it doesn't need to set that either.
- Fixed: FTexture::GetScaled* functions did not check for scale values of 0.


SVN r354 (trunk)
2006-10-19 20:20:56 +00:00
Christoph Oelckers
39d2ef0460 - Changed the rocket so that the FX_ROCKET flag is set in the actor
definition and not in BeginPlay.
- Changed the special explosion behavior of the rocket to a flag
  (MF5_DEHEXPLOSION) so that its effects can be used on other actors
  as well without having to inherit from the rocket.


SVN r353 (trunk)
2006-10-15 20:27:16 +00:00
Christoph Oelckers
92c3a89255 - Fixed: PrintAlias passed FString objects directly to Printf.
- Added bitwise not (~) operator to ACS.


SVN r352 (trunk)
2006-10-09 15:55:47 +00:00
Christoph Oelckers
3dabd38359 - Fixed: Hires texture replacements must call AddPatch if the texture
isn't defined yet in order to replace lumps that are not in the
  list of preinitialized graphics.
- Changed font initialization to occur after textures have been completely
  initialized. This is necessary so that the font characters can be
  replaced with hires versions.


SVN r351 (trunk)
2006-10-06 21:07:58 +00:00
Christoph Oelckers
6fe9c98b47 - Fixed: Hires texture replacements and auto-scaled flats require the
bWorldPanning flag. Also added some NULL pointer checks to the
  hires texture loading code.
- Added Sector_SetFloorScale2 and Sector_SetCeilingScale2 line specials.
  They are mostly the same as Sector_Set*Scale but take fixed point parameters.
  This makes them easier to use and more precise than the old ones which
  offered very small fractional precision.
- Changed Thing_Deactivate so that passing a tid of 0 deactivates the calling 
  actor.
- Added MeansOfDeath parameter to DamageThing.


SVN r350 (trunk)
2006-10-05 20:32:16 +00:00
Randy Heit
2c2261884c SVN r349 (trunk) 2006-10-05 03:30:44 +00:00
Christoph Oelckers
28ea15d8f4 - When exiting the level on a damaging floor the player could be in the pain
state and make its pain noise at the start of the next level.
- Fixed: The FPS counter obstructed the key display in Doom's fullscreen HUD.


SVN r348 (trunk)
2006-10-04 07:45:44 +00:00
Randy Heit
65bb04b7e8 - Fixed: V_BreakLines() failed to produce output for the final line if it was
only one character long.
- Fixed: When players respawned in multiplayer, scripts that started on their
  old body kept executing on that body instead of being transferred to the new
  one. I'm doing this with general pointer substitution now, so everything
  that pointed to the old body will use the new one; not sure if that's best,
  or if it should applied exclusively to scripts, though.
- Fixed: Hexen's delay ACS command actually waited one extra tic. Now if
  you're playing Hexen and an old-style ACS script delays it will wait one
  extra tic in ZDoom as well.
- Fixed: When G_FinishTravel() created a temporary player, P_SpawnPlayer()
  thought the old player actor was a voodoo doll and stopped its scripts
  and moved its inventory.


SVN r347 (trunk)
2006-10-03 03:14:28 +00:00
Randy Heit
b85806901d Version bumped to 2.1.6.
SVN r345 (trunk)
2006-10-01 21:50:02 +00:00
Randy Heit
c0bd4e54f4 - Fixed: player_t::GetSpawnClass() always returned the spawn flags for the
local player, so co-op games would spawn only the things relevant for the
  local player and not all the things relevant for all players.


SVN r344 (trunk)
2006-10-01 01:38:37 +00:00
Christoph Oelckers
fa2fc3f4d7 - Fixed: Default flags for APlayerPawn and APlayerChunk were not defined.
SVN r343 (trunk)
2006-09-30 22:28:38 +00:00
Christoph Oelckers
299380f990 Fixed missing break in PCD_GETPLAYERINFO
SVN r342 (trunk)
2006-09-30 08:35:09 +00:00
Christoph Oelckers
a3f39c3789 - Fixed: Monsters should never target friends, even if the friendliness
state has changed since the target has been acquired.
- Fixed: Multiplayer telefrag obituaries must be handled before weapon
  dependent obituary messages.


SVN r341 (trunk)
2006-09-28 07:37:19 +00:00
Randy Heit
6c3b569e66 - Fixed GCC compilation again.
- PClass::StaticInit() now sorts the class metadata so that operations that
  iterate over it (such as the "give all" cheat) are compiler-independant.


SVN r340 (trunk)
2006-09-27 04:56:18 +00:00
Christoph Oelckers
a4a23d1b25 - Fixed: ACustomInventory::CallStateChain couldn't be called recursively
so any item that was giving another CustomInventory item didn't work
  as intended.
- Fixed: CustomInventory items didn't process A_Jump... commands properly
  for non-players.


SVN r339 (trunk)
2006-09-25 07:48:52 +00:00
Christoph Oelckers
adf6579b37 - Fixed: Starting a new game didn't remove the deferred scripts.
SVN r337 (trunk)
2006-09-23 20:14:06 +00:00
Randy Heit
3deb4e631e - Fixed: FNodeBuilder::ShoveSegBehind needs to check that the result from
Heuristic is positive, not just non-zero.


SVN r336 (trunk)
2006-09-23 02:48:39 +00:00
Christoph Oelckers
bbfc149bd7 - Fixed: Summoned friendly monsters added to the total kill count.
SVN r334 (trunk)
2006-09-20 08:09:00 +00:00
Randy Heit
b132575533 - Added a dialog that gives the user the chance to fix things if the config
could not be saved for some reason.
- Added the writeini console command to write the config file, optionally
  specifying a specific file name for it.
- Fixed: "Multiplayer" demos that only had one player were not played back
  properly because the demo playback code only checked the number of players
  to determine if it should be played as a netdemo.


SVN r333 (trunk)
2006-09-20 02:00:19 +00:00
Randy Heit
8854f95152 - Removed m_fixed.cpp
- Fixed the GCC _DECLARE_TI macro to use the section name macro.

SVN r332 (trunk)
2006-09-20 00:08:22 +00:00
Randy Heit
419724dd02 - Assembly code is disabled when building with __APPLE__ defined, for now.
- If you aren't targeting x86, m_fixed.h only includes basicinlines.h now.
- Moved x64inlines.h into basicinlines.h.
- Replaced uses of __int64 with types from doomtype.h.
- The stop console command no longer ends single player games, just the demo
  that was being recorded.
- In C mode, the sc_man parser no longer allows multi-line string constants
  without using the \ character to preface the newline character. This makes
  it much easier to diagnose errors where you forget the closing quote of a
  string.
- Fixed: V_BreakLines() added the terminating '\0' to the last line of the
  input string.
- Added font as a parameter to V_BreakLines and removed its keepspace
  parameter, which was never passed as anything other than the default.


SVN r331 (trunk)
2006-09-19 23:25:51 +00:00
Christoph Oelckers
73032c2f3d - Fixed: Texture scale calculations for HIRESTEX were incorrect.
SVN r330 (trunk)
2006-09-17 15:45:27 +00:00
Christoph Oelckers
782b8a3b92 - Fixed: The sky scrolling calculations caused an integer multiplication overflow.
- Fixed: Voodoo dolls should not start ENTER scripts.
- Fixed: ActorDamage must not parse the enclosing parentheses as part of the 
  expression. That will produce an error if a flag set or clear command immediately
  follows.
- Fixed: P_DamageMobj ignored MF2_NODMGTHRUST if the damaging object had no
  owner.
- Added a 'font' parameter to A_Print.
- Changed A_CustomMeleeAttack to take one damage parameter only. Since expressions
  can be used this value is not used as a factor for a random value but as
  a direct damage value instead.
- Fixed: AActor::SetState must check whether a called action function resulted
  in the actor's destruction. A_Jump constructs to a 0-length terminating
  state will hang if this isn't checked.



SVN r329 (trunk)
2006-09-17 10:43:51 +00:00
Randy Heit
b951721c1b - Moved the vid_fps display to the upper-right of the screen.
- The stat display can now show multiple stats at once.


SVN r328 (trunk)
2006-09-14 03:06:09 +00:00
Randy Heit
76e94bde6b Added some Linux fixes that were needed after the last commit.
SVN r327 (trunk)
2006-09-14 00:17:10 +00:00
Randy Heit
c412b42703 - Fixed: cycle_t was still a DWORD and not a QWORD under GCC.
- The stat meters now return an FString instead of sprintfing into a fixed
  output buffer.
- NOASM is now automatically defined when compiling for a non-x86 target.
- Some changes have been made to the integral types in doomtype.h:
  - For consistancy with the other integral types, byte is no longer a
    synonym for BYTE.
  - Most uses of BOOL have been change to the standard C++ bool type. Those
    that weren't were changed to INTBOOL to indicate they may contain values
    other than 0 or 1 but are still used as a boolean.
  - Compiler-provided types with explicit bit sizes are now used. In
    particular, DWORD is no longer a long so it will work with both 64-bit
    Windows and Linux.
  - Since some files need to include Windows headers, uint32 is a synonym
    for the non-Windows version of DWORD.
- Removed d_textur.h. The pic_t struct it defined was used nowhere, and that
  was all it contained.


SVN r326 (trunk)
2006-09-14 00:02:31 +00:00
Christoph Oelckers
06630b0fee - Added support for scaled textures to DCanvas::DrawTexture.
- Changed deh.MaxHealth use to be consistent with other source ports.
- Added NULL pointer checks to APlayerPawn's state set functions. If these
  remove the player from the game a crash is the inevitable result.


SVN r325 (trunk)
2006-09-09 08:55:47 +00:00
Randy Heit
4999c3b4aa - Fixed: Weapons did not give you double ammo at baby and nightmare skills.
- Fixed: SetTexture() in p_setup.cpp assumed that all color values were
  six characters. Although this was the intended way to specify colors,
  earlier versions did no error checking, so other lengths worked too.
- Fixed: FPatchTexture waited until MakeTexture() to call CalcBitSize(),
  so the width and height bit sizes weren't available when using it as a
  source for a warp texture.
- Fixed: R_InitSkyMap() should only warn about two sky textures not being
  the same height when they are used as part of a double sky.
- Added a NULL state check in AActor::Tick() before advancing the current
  state. Note that this should not happen, so there's an assert there for
  the debug build as well as a regular check for the release build.


SVN r324 (trunk)
2006-09-09 01:14:13 +00:00
Randy Heit
05265c3213 - Version bump to 2.1.5.
- Fixed: P_LoadSegs() checked for invalid vertices too late.


SVN r320 (trunk)
2006-09-01 22:09:03 +00:00
Randy Heit
da32156d41 - Changed: Starting a new game or reloading an old one reset the chasecam.
SVN r319 (trunk)
2006-09-01 01:52:50 +00:00
Randy Heit
c87be34b08 - Removed the r: ACS print cast. You can do it yourself with s: and an array.
- Changed all the bool arguments to the ACS ReplaceTextures and SectorDamage
  commands with a single flags argument. SectorDamage also gained extended
  functionality: you can now make it hurt only players, only non-players, or
  both. Previously, hurting only non-players was not possible.
- Added the HUDMSG_COLORSTRING flag for ACS hudmessages. If you OR it in with
  the message type, the color will be treated as a string naming the color
  you want to use, so now you can use custom colors with hudmessages.


SVN r318 (trunk)
2006-09-01 01:08:27 +00:00
Randy Heit
a2fbb8c880 GCC fixes for recent code changes.
SVN r316 (trunk)
2006-08-31 01:30:22 +00:00
Randy Heit
b1e564d907 - Added the FNameNoInit class that is exactly like FName except it does not
initialize its index, so it can be used from inside Actors without
  overwriting the runtime default value.
- V_BreakLines() now returns an array of FStrings instead of char *'s.
- Added support for custom text colors in messages like this:
    print (s:"\c[Chartreuce]This text is in the color 'Bleargh'");
  This also obsoletes some of the functionality of the r: print specifier
  before it even saw a release version, because you can do this with the
  standard colors too:
    print (s:"\c[Green]Some text");
- Added two new decorate functionns: A_PlaySoundEx("sound_name", "channel"
  [, bLooping]) and A_StopSoundEx("channel"), where "channel" is "Auto",
  "Weapon", "Voice", "Item", "Body", "SoundSlot5", "SoundSlot6", or
  "SoundSlot7".
- Added a third parameter to S_IsActorPlayingSomething() to allow it to check
  if the actor is playing a specific sound.


SVN r315 (trunk)
2006-08-31 00:19:51 +00:00