Commit Graph

91 Commits

Author SHA1 Message Date
Christoph Oelckers 29380f70b3 - Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
  same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
  object's position.


SVN r1014 (trunk)
2008-06-02 16:56:53 +00:00
Christoph Oelckers ab6b5e337e - Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
  railing handling and shooting lines with a non-zero but unassigned tag.)
  With UDMF such semantics have to be handled diffently. 
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.


SVN r987 (trunk)
2008-05-22 19:35:38 +00:00
Christoph Oelckers 7949f6d35f - Fixed coordinate checks for objects on 3DMidtex lines.
SVN r978 (trunk)
2008-05-17 17:57:50 +00:00
Christoph Oelckers 6dbdcf5f60 - Changed: For actors not being spawned on the floor P_FindFloorCeiling should
be used to prevent them from dropping through 3DMIDTEX textures.
- Fixed: AMageStaffFX2::IsOkayToAttack overwrote the projectile's angle variable. 

SVN r970 (trunk)
2008-05-14 07:45:40 +00:00
Christoph Oelckers 99f55e8b8f - Added Skulltag's PUFFGETSOWNER flag.
SVN r967 (trunk)
2008-05-12 22:52:13 +00:00
Christoph Oelckers 9a410f864f - Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
  is not usable from Hexen or Doom format maps though but in preparation of
  the UDMF format discussed here:
  http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
  255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp 

SVN r954 (trunk)
2008-05-02 10:55:48 +00:00
Christoph Oelckers 48d8881065 - Fixed: FBlockThingsIterator didn't set the current block coordinates if
they were outside the blockmap. This could cause extreme delays if an
  iteration started outside the valid boundaries.
- added nextmap and nextsecret CCMDs.


SVN r924 (trunk)
2008-04-19 00:55:55 +00:00
Christoph Oelckers 99b2fab410 - Added submission for ACS CheckPlayerCamera ACS function.
- Removed FRadiusThingsIterator after discovering that VC++ misoptimized
  it in P_CheckPosition. Now FBlockThingsIterator is used with the distance
  check being done manually. 

SVN r914 (trunk)
2008-04-15 10:04:41 +00:00
Christoph Oelckers 3f497fe8e5 - Eliminated some more global variables (onmobj, DoRipping, LastRipped,
MissileActor, bulletpitch and linetarget.) 

SVN r899 (trunk)
2008-04-10 14:38:43 +00:00
Christoph Oelckers a390ea6a61 - Replaced P_PathTraverse with an FPathTraverse class, rewrote all code using
P_PathTraverse and got rid of a lot of global variables in the process. 

SVN r898 (trunk)
2008-04-09 18:35:21 +00:00
Christoph Oelckers 894b663877 - Eliminated all use of global variables used as output for P_CheckPosition
and P_TryMove. Moved BlockingLine and BlockingMobj into AActor because 
  the global variables can be easily overwritten with certain DECORATE 
  constructs.


SVN r894 (trunk)
2008-04-08 20:52:49 +00:00
Christoph Oelckers 17816dcadd - Changed: P_TeleportMove now always sets BlockingLine to NULL and
P_FindFloorCeiling doesn't set it at all. The way it was set in 
  PIT_FindFloorCeiling didn't look correct.
- Changed P_FindFloorCeiling so that it doesn't need global variables 
  anymore. I also moved the code to set the calling actor's information
  into this function because that's all it is used for. This also fixes
  another bug:
- AInventory::BecomePickup called P_FindFloorCeiling to get
  proper position values for the item but never set the item's information
  to the return value of this call.


SVN r891 (trunk)
2008-04-08 10:47:28 +00:00
Christoph Oelckers 0b26377624 - Removed PT_EARLYOUT from P_PathTraverse because it wasn't used anywhere.
- Rewrote BlockThingsIterator code not to use callbacks anymore.


SVN r888 (trunk)
2008-04-07 21:14:28 +00:00
Christoph Oelckers ebd17de30a - Fixed: PIT_FindFloorCeiling required tmx and tmy to be set but
P_FindFloorCeiling never did that.
- Merged Check_Sides and PIT_CrossLine into A_PainShootSkull.
- Replaced P_BlockLinesIterator with FBlockLinesIterator in all places it was
  used. This also allowed to remove all the global variable saving in
  P_CreateSecNodeList.
- Added a new FBlockLinesIterator class that doesn't need a callback
  function because debugging the previous bug proved to be a bit annoying
  because it involved a P_BlockLinesIterator loop.
- Fixed: The MBF code to move monsters away from dropoffs did not work as 
  intended due to some random decisions in P_DoNewChaseDir. When in the
  avoiding dropoff mode these are ignored now. This should cure the problem
  that monsters hanging over a dropoff tended to drop down. 

SVN r887 (trunk)
2008-04-06 17:33:43 +00:00
Christoph Oelckers cb1bd7739e - Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
  (MELEERANGE) and didn't set the puff to its melee state if the range
  was different. Even worse, it checked a global variable for this so
  the behavior was undefined when P_SpawnPuff was called from anywhere
  else but P_LineAttack. To reduce the amount of parameters I combined
  this information with the hitthing and temporary parameters into one
  flags parameter. Also changed P_LineAttack so that it gets passed
  an additional parameter that specifies whether the attack is a melee
  attack or not and set this to true in all calls that are to be considered
  melee attacks. I couldn't use the damage type because A_CustomPunch
  and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET 
  and FX_GRENADE.


SVN r879 (trunk)
2008-04-04 14:31:20 +00:00
Randy Heit 776d89428d - Changed D3DFB to explicitly request double buffering instead of assuming
that the drivers will treat a BackBufferCount of 0 as a request for
  double buffering.
- Fixed: Unsetting a cvar did not remove it from the list of tab
  completions.
- Added "" as a synonym for "nullimage" in SBARINFO.
- Fixed: MAKESAVESIG's stringifier in version.h did not work as expected.
  It stringified the passed macro name, not the value of the macro.
- Moved DCajunMaster off the DObject hierarchy.
- Changed DCajunMaster::getspawned into a TArray of FStrings. It was
  mysteriously being left pointing to uninitialized memory during the
  final GC at exit and crashing.
- Fixed: The code that removed hexdd.wad from the list of IWADs when
  hexen.wad was not present did not work.


SVN r861 (trunk)
2008-03-28 00:38:17 +00:00
Christoph Oelckers 997533e0c8 - Fixed: DCajunMaster::End was missing a write barrier for getspawned. The
same problem in D_DoomMain.
- Made bglobal a pointer because it was causing problems with the garbage 
  collector.


SVN r859 (trunk)
2008-03-27 22:37:13 +00:00
Christoph Oelckers 1e81eb0fee - Added Thomas's submissions for decal assignment to puffs and NOINFIGHTING flag.
SVN r847 (trunk)
2008-03-24 22:06:26 +00:00
Christoph Oelckers 60ad26b231 - Added: Sector movement that causes deep water to change its height now
will trigger associated sector actions and adjust the actor's water level.


SVN r836 (trunk)
2008-03-22 12:17:52 +00:00
Christoph Oelckers 7c87465d35 - VC++ doesn't seem to like the TArray serializer so I added a workaround
to be able to save the 3dMidtex attachment info.
- Fixed: The TArray serializer needs to be declared as a friend of TArray
  in order to be able to access its fields.
- Since there are no backwards compatibility issues due to savegame version
  bumping I closed all gaps in the level flag set.
- Bumped min. Savegame version and Netgame version for 3dMidtex related
  changes.
- Changed Jump and Crouch DMFlags into 3-way switches:
  0: map default, 1: off, 2: on. Since I needed new bits the rest of
  the DMFlag bit values had to be changed as a result.
- fixed: PTR_SlideTraverse didn't check ML_BLOCKMONSTERS for sliding
  actors without MF3_NOBLOCKMONST.
- Added MAPINFO commands 'checkswitchrange' and 'nocheckswitchrange'
  that can enable or disable switch range checking globally per map.
- Changed ML_3DMIDTEX to force ML_CHECKSWITCHRANGE.
- Added a ML_CHECKSWITCHRANGE flag which allows checking whether the 
  player can actually reach the switch he wants to use.
- Made DActiveButton::EWhere global so that I can use it outside thr
  DActiveButton class.

March 17, 2008 (Changes by Graf Zahl)
- Changed P_LineOpening to pass its result in a struct instead of global
  variables.
- Added Eternity's 3DMIDTEX feature (no Eternity code used though.)
  It should be feature complete with the exception of the ML_BLOCKMONSTERS
  flag handling. That particular part of Eternity's implementation is
  sub-optimal because it hijacks an existing flag and doesn't seem to make
  much sense to me. Maybe I'll implement it as a separate flag later.


SVN r810 (trunk)
2008-03-18 18:18:18 +00:00
Randy Heit 3c6c60c730 - Fixed: The only time bestslideline is ever NULL is before it ever gets set.
That means my P_BounceWall() "fix" from March 6 wasn't really a working fix.


SVN r807 (trunk)
2008-03-16 01:32:54 +00:00
Randy Heit ce811319a7 - Fixed: If an object is flagged for euthanization while it's in the gray
list, it should just be ignored during the propagation stage.
- After sleeping on it and realizing what was really going in, I generalized
  the inventory fix from the 13th: The actor is flagged by Destroy(), then it
  is later inserted into the thinker list by DThinker::SerializeAll(). So
  rather than unlinking the skipped player from their inventory, just make
  sure any flagged thinkers aren't inserted into a list.
- Fixed: FCanvasTextureInfo::Viewpoint needed a read barrier, and the whole
  list should serve as a root.
- Reimplemented SPC playback as a custom codec for FMOD.
- Removed spc_frequency, because snes_spc only supports the SPC's native
  frequency of 32000 Hz.


SVN r806 (trunk)
2008-03-16 00:54:53 +00:00
Randy Heit a5004f8827 - Fixed: If P_BounceWall() can't find a wall when it does its trace, but it
was entered because a line blocked the projectile, then it should still use
  that blocking line for the bounce.


SVN r788 (trunk)
2008-03-07 01:29:26 +00:00
Randy Heit ef99d9c057 - Fixed: PTR_BounceTraverse only checked for projectiles that were too
high to pass through two-sided lines, but not ones that were too low.
- Fixed: SBARINFO couldn't detect the extreme death damage type for the
  player face animation.


SVN r782 (trunk)
2008-03-04 00:56:22 +00:00
Christoph Oelckers 5589f6b7a1 - fixed: A_CountdownArg used 0 based indices although all uses of it assumed
it is 1-based.
- added MF5_DONTRIP flag.
- added CheckActorFloorTexture, CheckActorCeilingTexture and
  GetActorLightLevel ACS functions.
- added IF_ADDITIVETIME flag to create powerups that add their duration
  to the one of the currently active item of the same type.
- fixed: bouncecount wasn't decreased when bouncing on walls.
- Added MF5_ALWAYSRESPAWN and MF5_NEVERRESPAWN flags that selectively
  enable or disable monster respawning regardless of skill setting.
- Prettified deprecated flag handling.


SVN r780 (trunk)
2008-03-01 16:59:17 +00:00
Randy Heit e8e7cebe18 - Fixed: Turning off follow mode with automap rotating enabled did not
function in an easy-to-understand manner.
- Fixed: D_AddWildFile() blindly assumed that all matches were files.
- Added back the dead player check to CheckIfExitIsGood(), but now it
  applies only if the next map is part of the same hub. Otherwise, you can
  still exit the map while dead.
- Removed the SpawnedPuff global variable and made it a return value from 
  P_LineAttack().
- Fixed: P_SpawnPuff() played sounds for temporary puffs.


SVN r739 (trunk)
2008-02-12 05:54:03 +00:00
Randy Heit 6af5665575 - Fixed: Morphed pig and chicken players made normal human *usefail sounds.
- G_DoSaveGame() now receives the filename and description from its arguments
  rather than global variables, so autosaves and manual saves can be done
  in close proximity to each other without overwriting the parameters for
  one of them.
- Fixed potential buffer overrun in G_SaveGame() and added a check so that
  you can't interfere with saves that are still pending.
- Fixed: P_LineAttack() creates temporary puffs to get damage types, but this
  had the side effect of creating particles for the puff.
- Fixed: The Heretic status bar tried to use the graphic "SELECTBOX" for the
  inventory selector. The correct name is "SELECTBO".
- Fixed: Using allowrespawn for a single-player map would fire off enter
  scripts instead of respawn script because the player wasn't assigned the
  state PST_REBORN.
- Fixed: P_CheckMissileSpawn() now passes the BlockingMobj to
  P_ExplodeMissile() so that it can select the appropriate death state.
- Added the manifest to MinGW-compiled builds of updaterevision so you can
  build under Vista with MinGW without needing administrative privileges.
  (But I still want to know why Vista thinks it needs elevated privileges
  without a manifest telling it otherwise.)
- Using four 0xFF bytes for the final note of an IMF song should signal the
  end of the song.


SVN r733 (trunk)
2008-02-05 23:32:49 +00:00
Christoph Oelckers 78164aab40 - Added support for AttackZOffset to P_RailAttack.
- Fixed: ParseDrawTextureTags read DTA_RenderStyle as ERenderStyle, not FRenderStyle.


SVN r726 (trunk)
2008-01-30 18:45:15 +00:00
Randy Heit 4c9d633a94 - Fixed: P_RailAttack() crashed if you didn't specify a puff for a rail.
- Decided that allowing arbitrary alpha values for color remaps isn't so hot.
  Changed it back the way it was.


SVN r716 (trunk)
2008-01-27 04:53:55 +00:00
Christoph Oelckers 58816f5d09 - Added Karate Chris's patch for teamplay MAPINFO option.
- Added Karate Chris's patch for custom damage color per player class.
- Added Karate Chris's patch for respawnlimit skill property.
- Added Karate Chris's patch for Strife quit messages.
- Fixed: P_RailAttack ignored the puff's damage type.


SVN r714 (trunk)
2008-01-26 16:42:16 +00:00
Christoph Oelckers a5265c4ec5 - defined a constant for the crosshair menu entry's index to get a direct
reference out of the function code.
- Fixed: The BrainExplosions should not perform any collision detection. To
  achieve this their Damage value must be set to 0 when being spawned.
- Added a safety check to savegame versioning so that an invalid revision
  (reported as 0) will be handled without breaking savegame compatibility.


SVN r689 (trunk)
2008-01-10 11:02:07 +00:00
Randy Heit 2d4b679fcb - Fixed: P_BounceWall() cannot assume that BlockingLine is the line the actor
should bounce off of. Since the order lines in a blockmap cell are checked
  for collision is essentially undefined, there could be another line closer to
  the actor that it should bounce off of instead.

SVN r678 (trunk)
2008-01-08 03:21:01 +00:00
Christoph Oelckers 0535d15df3 - Split off the entire translation code from r_draw.cpp into r_translate.cpp.
- Moved the common code of ACS and DECORATE translation generation into the
  FRemapTable class.
- Fixed: The DECORATE translation code was not changed for the new data structures.
- Expanded range of ACS and DECORATE translations to 65535. 
- Fixed: R_CopyTranslation was not altered for the new functionality.
  I removed the function and replaced the one use with a simple assignment.


SVN r644 (trunk)
2007-12-26 16:06:03 +00:00
Christoph Oelckers faa9cc4302 - added a P_PointInSector function and replaced all calls to retrieve an
actor's sector in the game engine code with it. This way there's a clear
  distinction between renderer-specific and game-specific calls.


SVN r638 (trunk)
2007-12-25 10:07:58 +00:00
Randy Heit 1b55520a8b - Fixed: Heretic's mace never respawned in deathmatch games.
- Fixed: At resolutions taller than 600 pixels or so, tall sky textures were
  drawn a row too low. This was quite visible on Hexen MAP06.
- Fixed: P_CheckSlopeWalk() must return false if floorsector != sector, or
  the actor will be yanked down to the floorsector by P_TryMove().
- Fixed: ClearActorInventory, GiveActorInventory, and TakeActorInventory
  only affected the first actor with the given TID.
- Fixed: The color boxes for the colorpicker menu items were drawn a little
  too low.

SVN r603 (trunk)
2007-12-18 03:25:19 +00:00
Randy Heit f618134f15 - Fixed: The MAPINFO flags that control jumping, crouching, and freelook,
rather than overriding the dmflags values, actually overwrote the dmflags
  values, so they would continue to be in effect on later maps that didn't
  explicitly specify them.


SVN r595 (trunk)
2007-12-11 04:03:40 +00:00
Christoph Oelckers ba61c60d52 - Fixed: When the DONTMOVE flag for A_Chase was used, movecount was not decreased
resulting in missile attacks not working.
- Fixed: Hitscan attacks used the puff's position to calculate the trajectory for
  weapon kickback.


SVN r568 (trunk)
2007-11-19 08:13:23 +00:00
Christoph Oelckers 621fe2ed98 - Changed PowerFlight so that Hexen's infiniteness is not controlled by being
in a hub but by a level flag instead.
- Fixed: Floor and ceiling huggers must set themselves to floor and ceiling each
  time they move.
- Added a LEVEL_NOMONSTERS flag so that G_ChangeLevel doesn't have to mess with
  the dmflags CVAR to start the level without monsters.


SVN r563 (trunk)
2007-11-08 09:22:06 +00:00
Christoph Oelckers b15767c26f - Fixed: The pointer cleanup code must also check a sector's sky box pointers.
- Fixed: Right after teleporting P_SlideMove could cause player movement.
  Added a check for reactiontime to prevent that.
- Fixed: PainChances and Damagefactors were never freed.
- Added option to A_Chase that prevents the monster from moving.
- Fixed: The stained glass shards were missing the HEXENBOUNCE flag.
- Added some NULL pointer checks to AActor::GiveAmmo.
- Fixed: The FSwordMissile was missing the special damage handling that
  reduces damage when hitting a player.

SVN r555 (trunk)
2007-10-29 20:27:40 +00:00
Christoph Oelckers 3b477d7022 - Fixed: POwered up weapons with a different ready state than their base
weapon didn't change back when the powerup expired.
- Fixed: The powered up version of Heretic's Gauntlets missed the proper
  state assignments for Ready, Lower and Raise.
- Fixed: The Strife player was missing its pain state.
- Fixed: Revenant missiles couldn't home in on targets with a height lower than
  40.
- Fixed: The code which checked for hitscan traces hitting actors from above
  and below must test whether the calculated hit position is actually inside 
  the actor being checked. If it crosses the top/bottom plane outside the
  bounding box there can't be a hit.
- Changed: State labels in code pointer calls must now be enclosed in quotation marks.
  This was done to ensure compatibility with parsers that will parse these as
  identifier-aware script code later.


SVN r554 (trunk)
2007-10-19 08:49:02 +00:00
Christoph Oelckers 87383a32c6 - Fixed: Resurrecting a player must set mo->special1 to 0 because it is used
as a counter by the Hexen fighter's fist weapon.
- Fixed: The Wraithwerge's spirits shouldn't attack friends.
- Fixed: The Heresiarch's balls must not adjust their z-position after the
  Heresiarch dies.
- Added damage type specific pain chances and an MF5_NOPAIN flag that can be used
  to suppress entering the pain state altogether.
- Changed font initialization so that you can define replacements for the default
  fonts in FONTDEFS.
- Removed the 'add a bot' menu option since bots are beyond repair and therefore
  mostly useless.
- Fixed: Hitscan attacks must always spawn a puff so that it and its properties
  can be used as damage inflictor.


SVN r534 (trunk)
2007-05-26 10:50:32 +00:00
Christoph Oelckers f4dcfad331 - Copied railgun sound fix from Skulltag.
- Made infighting a level flag. The old method still exists but the level flags
  will take precedence if set.



SVN r532 (trunk)
2007-05-20 11:08:36 +00:00
Christoph Oelckers a6a5821f04 - Added a compatibility option to restore the original behavior of the Invisibility
powerup.
- Changed: Weapons are no longer checked for the EXTREMEDEATH and NOEXTREMEDEATH flags.
  For all damage related actions it will always be the projectile (or puff for hitscan
  attacks) that is treated as the damage inflictor.
- Fixed: Hexen's fourth weapons made extreme death depend on the weapon the player
  is holding, not the projectile that did the kill. The WIF_EXTREME_DEATH flag
  no longer exists as a result.
- Expanded PowerSpeed so that subclasses can be derived that alter the speed factor.
- Added an MF5_USESPECIAL flag that allows using things to execute their specials.
- added MF4_FORCERADIUSDMG flag so that exploding items can be created which
  are able to hurt boss monsters.
- moved ML_BLOCK_PLAYERS to the value 0x4000 to bring it in line with Skulltag's 
  implementation.


SVN r530 (trunk)
2007-05-12 11:14:09 +00:00
Randy Heit 72643bece6 - Changed P_SpawnPlayerMissile() to use the same height calculation as
P_(Aim)LineAttack().
- Added an AttackZOffset to PlayerPawn. This is the offset from the
  center of the player at which their attacks are fired and scales
  according to their crouched height.
- Changed the version of P_SpawnPlayerMissile() that takes coordinates
  to use that location as an offset from the standard attack location
  rather than as an explicit attack location.


SVN r498 (trunk)
2007-03-07 17:31:40 +00:00
Randy Heit 7c2fc08f35 - Added two new MAPINFO flags to control what actor activates impact lines:
* MissileShootersActivateImpactLines - the current behavior.
    * MissilesActivateImpactLines - the original Hexen behavior.


SVN r477 (trunk)
2007-02-04 02:12:54 +00:00
Randy Heit 47c401f4ec - Replaced the vector math routines with the ones I developed for the FP code.
SVN r454 (trunk)
2007-01-19 02:00:39 +00:00
Christoph Oelckers 558a18cf5c - Added new flag MF5_NOBLOODDECALS that prevents bleeding actors from spawning
blood decals.


SVN r424 (trunk)
2006-12-24 12:51:24 +00:00
Christoph Oelckers 9b0b199bb5 - Fixed: Commander Keen's death sequence had one state duplicated.
- Fixed: Due to the changes for custom states the internal weapons shouldn't
  define a holdatk state unless it differs from the attack state.
- Fixed: The bot code tried to spawn ACajunBodyNode instead of CajunBodyNode.
- Changed: MF2_BLASTED doesn't work well for players so I had to take it out
  of A_BlastRadius.
- Fixed: When MF2_BLASTED was cleared MF2_SLIDE got cleared as well, no matter
  whether it was set by default or not. Now the MF2_SLIDE check checks both
  flags and the BlastRadius code doesn't set MF2_SLIDE anymore.


SVN r422 (trunk)
2006-12-23 12:12:06 +00:00
Christoph Oelckers e9c68df94e - Fixed: The smartaim logic was incorrect. Also added another mode: Autoaim only
at monsters.


SVN r415 (trunk)
2006-12-16 16:34:39 +00:00
Christoph Oelckers 638526946b - Merged the fallingdamage setting into one menu item and added Strife damage to it.
- Moved deathmatch options into their own category in the gameplay options menu.
- Added the sv_smartaim code from GZDoom which tries to avoid autoaiming
  at friendlies or shootable decorations if there are monsters that can be shot.
- Added: SetThingSpecial treats a tid of 0 as the activator.


SVN r412 (trunk)
2006-12-16 11:49:48 +00:00