Commit Graph

238 Commits

Author SHA1 Message Date
Christoph Oelckers effa46975e - Fixed: The pickup message for Hexen's fighter's axe was assigned to the
AxePuff, not the weapon itself.
- Fixed: P_RunEffects used the consoleplayer's camera without checking its
  validity.
- Fixed: CopyFriendliness needs to copy target to LastHeard as well in order
  to make newly spawned monsters chase their spawner's target.


SVN r278 (trunk)
2006-08-01 22:11:49 +00:00
Christoph Oelckers 5ac0789e6e - Added a type check to Spawn(actorname,...) to allow it to print a
meaningful message instead of the nondescript 
  'Tried to spawn a class-less actor'.
- Converted AGlassJunk to DECORATE and made the spawn function a little
  more flexible so that replacing the shard is easier.
- Converted ABloodSplatter to DECORATE.
- Removed A_Jiggle because it never worked properly.
- Changed DECORATE parser to allow commas between arguments for multi-
  argument properties. For all newly added properties this format will
  become mandatory but for backwards compatibility it is optional for
  old ones.
- Added a check for negative indices to TAutoGrowArray::SetVal to prevent
  passing an index of -1 from crashing the game.
- Fixed: Morphing must clear the weapon's flash sprite.
- Fixed: Resurrecting a morphed player caused a crash.
- Fixed: Random sounds that recursively refer to themselves caused a stack
  overflow. Now they print a warning and get ignored.


SVN r277 (trunk)
2006-07-31 10:22:53 +00:00
Christoph Oelckers f94cdaf782 - Added Grubber's GetPlayerInfo ACS function.
SVN r276 (trunk)
2006-07-30 22:56:20 +00:00
Christoph Oelckers d6bc07c3b1 - Fixed: Starting a game without skill menu always started the first episode.
- Changed A_AlertMonsters so that it can be placed directly in a weapon state.
- Fixed: Frozen corpses of stealth monsters were invisible.
- Added: Calling Radius_Quake with a tid of 0 now uses the activator
  as the quake's center.


SVN r275 (trunk)
2006-07-30 08:31:26 +00:00
Christoph Oelckers 3f90f1655c - Used the new explosion handling to clean up the old style projectile
definitions. The SimpleProjectile class is gone and it uses the meta
  data and A_ExplodeParms instead now.
- Removed the deprecation warnings for explosion parameters again because 
  the new system is fully inheritable and therefore useful.
- Changed the explosion properties into meta data and adjusted A_ExplodeParams
  to use these when called without any parameters. Also removed all special
  parsing for A_Explode so now this function can be called with expressions
  like any other function.
- Changed DECORATE parsing so that functions with completely optional 
  parameter lists don't create an empty list when called without parameters.

SVN r274 (trunk)
2006-07-29 10:47:14 +00:00
Randy Heit 06681ec72d - Version bump to 2.1.4.
- Fixed: Friendlies would not turn to face you when you engaged them in
  conversation, nor would they reliably return to their original facing when
  you stopped talking to them.
- Added deprecation warnings for the DontHurtShooter, ExplosionRadius, and
  ExplosionDamage actor "properties." They were considered deprecated before;
  now this is explicitly stated when they are used. The problem with them is
  that they are not really properties and do not behave like other properties
  and cannot be inherited, because they are really just an alternate way of
  specifying parameters for A_Explode. (Anything that currently prints a
  deprecation warning will be removed completely in 2.2.0, which will be the
  version where custom state labels make their debut.)


SVN r272 (trunk)
2006-07-29 01:26:24 +00:00
Christoph Oelckers f203219d24 - Changed player sprite translation for the menu so that it uses a regular
translation table instead of a local custom buffer.
- Fixed: ResetBaggage must set MeleeDamage to 0.


SVN r271 (trunk)
2006-07-26 09:50:17 +00:00
Randy Heit 35d79553b2 - Made SafeReadMemory() in i_crash.cpp more readable.
SVN r270 (trunk)
2006-07-21 22:36:39 +00:00
Randy Heit f7a8653196 - Here's something MinGW users will probably like: i_crash.cpp no longer needs
dbghelp.h if you compile with GCC.


SVN r269 (trunk)
2006-07-21 22:28:54 +00:00
Randy Heit 361f855de0 - Added some simple translucency map analysis for BOOM maps to more
intelligently pick the value to use for TranslucentLine's second argument.
- Added a queryiwad_key cvar to control which key can force the IWAD selection
  to appear. It can be either "shift" or "control". Any other value will
  disable its functionality.
- Fixed: A_SkullPop() and A_FreezeDeathChunks() did not transfer the player's
  inventory to the new dismembered head "player".


SVN r268 (trunk)
2006-07-20 05:13:39 +00:00
Randy Heit 6d389c6b7d - Fixed: C_midPrint() needs a NULL status bar check.
SVN r267 (trunk)
2006-07-19 16:00:44 +00:00
Christoph Oelckers b1989b4d34 - Fixed: PClass::CreateDerivedClass forgot to NULL FActorInfo::Replacee.
SVN r266 (trunk)
2006-07-18 23:09:11 +00:00
Christoph Oelckers c32b9df059 - Fixed: S_ClearSoundData cleared PlayerClasses instead of PlayerClassLookups.
SVN r262 (trunk)
2006-07-16 23:03:39 +00:00
Christoph Oelckers 1ff4d09bed - Added NecroMage's submission for bitwise/shift assignment operators for ACS.
SVN r261 (trunk)
2006-07-16 20:13:24 +00:00
Christoph Oelckers e5a26c75fa - Added replacement handling to A_BossDeath.
SVN r260 (trunk)
2006-07-16 15:00:10 +00:00
Christoph Oelckers 93cd78ebfb - Fixed: The check for no skill menu was incorrect when a custom player
class menu was present so instead of starting the game specific skill menu
  it always started Hexen's.
- Fixed: When a non-player tried to play a player sound it tried to access 
  the actor object as an APlayerPawn.
- Changed PlayAttacking2 to always use the melee state instead of different
  implementations per player and hard coding it to MissileState+1. Also
  changed PlayAttacking for the HereticPlayer to use the same animation as
  PlayAttacking2. Now the special handling for Heretic in the FireWeapon
  functions can be removed.

For R258:

- Fixed: PlayerStartItem created a duplicate of the item's class name before
  converting it into an FName.
- Removed game check for Doom from P_BloodSplatter. The BloodSplatter actor
  is compatible with all games now so the explicit handling is no longer needed.
- Moved replacement handling back into AActor::StaticSpawn but controlled
  by a (mandatory) parameter. Also added replacement to most other
  instances in the game where non-inventory items are spawned. Replacement is safe 
  nearly everywhere except for inventory related spawns.
- Fixed: Due to the player class inclusion A_NoBlocking never called
  NoBlockingSet for monsters.
- Changed: Sounds can be specified by full path now in SNDINFO and S_SKIN.


SVN r259 (trunk)
2006-07-16 10:23:14 +00:00
Christoph Oelckers ecce60e8f9 SVN r258 (trunk) 2006-07-16 09:10:45 +00:00
Randy Heit 5e37e4a0b8 - Fixed: Makefile.mgw was mysteriously missing some targets. After fixing that,
I also removed some of GCC's warnings.


SVN r255 (trunk)
2006-07-16 01:25:29 +00:00
Christoph Oelckers 1c3153690a - Fixed: Any kill in multiplayer games that could not be credited to a player
didn't count at all - not even toward the global level statistics.
- ...and removed it again. It was not an accident. The only reason the PowerupGiver
  had its own RespawnTics was to account for the pickup flash delay. 
  But that is better handled by checking the flag and adding the additional 30 
  tics in AInventory::Hide because then it affects all items that have one - 
  and only those. The AT_GAME_SET function didn't work anyway because it was
  called after parsing DECORATE.


SVN r253 (trunk)
2006-07-14 08:04:17 +00:00
Randy Heit 3113037229 - Restored the PowerupGiver AT_GAME_SET function. I assume its removal was an
accident from merging in Grubber's custom player classes.


SVN r252 (trunk)
2006-07-14 00:33:11 +00:00
Christoph Oelckers bada3bf462 - Removed the game filter check from addplayerclass. If a player class is added
here the game filter is irrelevant and there's nothing that should prevent
  the HereticPlayer being added to a Hexen game, for example.
- Changed: The addplayerclass CCMD was far too paranoid and needlessly aborted
  the game for any error being encountered. Since an empty player class list
  is checked for elsewhere outputting the messages to the console is sufficient.


SVN r251 (trunk)
2006-07-13 10:24:54 +00:00
Christoph Oelckers 31c749058b - Generalized Hexen's class-based spawning to be a property of the player class
so now it is available in all games.
- Replaced the call to A_FlameSnd in the HereticPlayer's burn death sequence
  with A_FireScream and defined *burndeath for Heretic.
- Added Grubber's custom player class support.


SVN r250 (trunk)
2006-07-13 10:17:56 +00:00
Randy Heit 38a073626f - Changed decorate replacement to be opt-in instead of opt-out. This allows for
greater flexibility in what can be replaced (replaced actors need not be ancestors
  of actors that replace them) at the expense of not having universal actor
  replacement. Instances where replacements work:
   - Line specials that spawn things (Thing_Spawn and related)
   - ACS spawning commands (SpawnSpot and the like)
   - Spawning mapthings at level load time in P_SpawnMapThing()
   - Spawning items off of dead dudes in P_DropItem()
   - The A_SpawnItem decorate function
   - The summon and summonfriend console commands
   - ThingCount will count both original actors and their replacements as the same
     things.
  TBD: Should the ACS inventory functions use replacements too, or not?


SVN r249 (trunk)
2006-07-13 03:34:50 +00:00
Randy Heit 56427d1b1c - Fixed: The game would crash after informing you of a duplicate class registration
because PClass::CreateDerivedClass() did not initialize everything before calling
  InsertIntoHash().
- Fixed: Forcefully removing a weapon from a player's inventory would not reset
  the player's refire counter.
- Fixed: FreeKeySections() was called before M_SaveDefaults() during shutdown,
  so all custom keys would go to a "(null)" section instead of their intended
  section.


SVN r248 (trunk)
2006-07-13 02:08:39 +00:00
Randy Heit 18af8a57cf - Restored the previous level flag values to avoid needlessly breaking some
savegames at this point in time.
- Fixed: R_ClearPlanes() did not clear skybox planes for a full clear.
- Streamlined zip file loading by delaying the processing of the local file
  header until it is actually needed.


SVN r247 (trunk)
2006-07-12 03:35:55 +00:00
Christoph Oelckers 5d1563b0e4 - Changed the additive scrollers option into a compatibility flag so that it can
be changed from the menu.


SVN r245 (trunk)
2006-07-11 08:27:05 +00:00
Randy Heit 0b3730392c - Fixed closed doors between the front sector's floor and ceiling the right way.
I was just missing a non-null texture check.
- Removed references to texturewidthmask. What was that?


SVN r244 (trunk)
2006-07-11 04:48:10 +00:00
Christoph Oelckers 133a035c76 - Fixed: The earthquake code needs to check whether a quake's spot is still valid.
Super Sonic Doom crashed due to this.
- Fixed: G_DoAutosave could divide by 0 if autosavecount was 0.


SVN r243 (trunk)
2006-07-11 00:20:45 +00:00
Christoph Oelckers a9470f8642 - Fixed: The calls to DCanvas::Dim in c_console.cpp were missing some type casts.
- Fixed: CCMD(dir) passes FStrings directly to Printf.

For R241:

- Fixed: The defaultbind command still treated the bindings as char pointers and
  as a result didn't work.
- Added SpawnSpotFacing ACS function which is the same as SpawnSpot but it uses
  the map spot's angle.
- Added ThingCountName ACS function which is the same as ThingCount but it takes
  an actor's type name instead of a spawn ID.


SVN r242 (trunk)
2006-07-09 21:50:16 +00:00
Christoph Oelckers dd3c0d82f7 SVN r241 (trunk) 2006-07-09 20:15:38 +00:00
Randy Heit d027aafb4c - Fixed: If the sector behind a seg was closed, but it was closed between the
ceiling and floor of the front sector, the renderer did not add it to the
  solid clip list.
- Blends created with the ACS fade commands now degrade to transparent overlays
  when the console is visible, just as they do for the menu.


SVN r240 (trunk)
2006-07-09 20:04:05 +00:00
Christoph Oelckers 5541dc69f1 - Fixed: Specifying 'strifefallingdamage' in MAPINFO cleared all other flags.
- Fixed: maxstepheight and maxdropoffheight were stored as ints instead of 
  fixed_t's by the DECORATE parser.


SVN r239 (trunk)
2006-07-08 20:17:52 +00:00
Randy Heit 6695e255ce - Added actor replacement for DECORATE. This works at a higher level than
using duplicate DoomEdNums and will affect all attempts to spawn the
  replaced actor. However, because this happens for all spawns and not just
  at map load, the replacing actor must be compatible with the replaced
  actor, which means that an actor can only serve as a replacement for one
  of its baseclasses. For example, if you want to use a modified imp, you can
  use this DECORATE:
      actor MyImp : DoomImp replaces DoompImp
      {
          // Put changed properties here
      }
- New: The IWAD dialog now remembers the last IWAD you picked and
  automatically highlights it the next time you run the game. This also
  applies if you check "Don't ask me this again": The IWAD selected will be
  the one that gets automatically loaded, not the one located first. (Using
  the -iwad parameter will not change the default IWAD.) In addition, you
  can now bring the dialog up even if you disable it by holding down SHIFT
  during startup.
- Changed ExtractFilePath() and ExtractFileBase() to return FStrings instead
  of writing to a provided output buffer. ExtractFileBase() can also
  optionally keep the file's extension in the result.
- Removed the -heapsize parameter entirely. The informational message should
  no longer be needed.
- Removed -maxdemo parameter. There's no point to having it around since
  the demo buffer grows automatically.


SVN r238 (trunk)
2006-07-08 02:17:35 +00:00
Christoph Oelckers 43c1ec4a74 - Fixed: Changed initialization of Weapon.Kickback so that it is only done
for direct descendants of AWeapon and not for every weapon being defined.
- Changed parsing of actor names back to not use C-mode. This change breaks
  any definition that contain periods in their name and apparently there's
  more than anyone could expect. Also altered the parser to manually check
  for colons inside the parsed string so that placing spaces around them
  is no longer necessary.
- Fixed: Weapons could be picked up for ammo even if they gave none.
- Fixed: A_Beacon was missing a NULL pointer check for the beacon's owner.
- Fixed: The status bar tried to access CPlayer->camera without checking
  its validity. In spy mode there is a possibility that it is NULL.

SVN r237 (trunk)
2006-07-03 09:07:56 +00:00
Christoph Oelckers 9e6d5c8fd9 - Fixed: G_NewInit destroyed the players' userinfo data.
- Changed the special radius damage handling for the barrel and boss brain
  into an actor flag.
- Added A_RadiusThrust code pointer for DECORATE and adjusted the radius 
  attack functions accordingly.


SVN r236 (trunk)
2006-07-02 21:58:10 +00:00
Randy Heit 0398ddcc76 - Changed the earthquake view shaking so that it works for anything and not
just players.


SVN r235 (trunk)
2006-07-01 00:21:36 +00:00
Christoph Oelckers 207c84e3dd - Fixed: In multiplayer games, when trying to change targets, A_Chase forgot
to check whether the new target was the same as the old one and treated 
  this case as a real target change.


SVN r234 (trunk)
2006-07-01 00:15:06 +00:00
Randy Heit 9fdcb553aa - Added some hackery at the start of MouseRead_Win32() that prevents it from
yanking the mouse around if they keys haven't been read yet to combat the
  same situation that causes the keyboard to return DIERR_NOTACQUIRED in
  KeyRead(): The window is sort of in focus and sort of not. User.dll
  considers it to be focused and it's drawn as such, but another focused
  window is on top of it, and DirectInput doesn't see it as focused.
- Fixed: KeyRead() should handle DIERR_NOTACQUIRED errors the same way it
  handles DIERR_INPUTLOST errors. This can happen if our window had the
  focus stolen away from it before we tried to acquire the keyboard in
  DI_Init2(). Strangely, MouseRead_DI() already did this.
- When a stack overflow occurs, report.txt now only includes the first and
  last 16KB of the stack to make it more manageable.
- Limited StreamEditBinary() to the first 64KB of the file to keep it from
  taking too long on large dumps.
- And now I know why gathering crash information in the same process that
  crashed can be bad: Stack overflows. You get one spare page to play with
  when the stack overflows. MiniDumpWriteDump() needs more than that and
  causes an access violation when it runs out of leftover stack, silently
  terminating the application. Windows XP x64 offers SetThreadStackGuarantee()
  to increase this, but that isn't available on anything older, including
  32-bit XP. To get around this, a new thread is created to write the mini
  dump when the stack overflows.
- Changed A_Burnination() to be closer to Strife's.
- Fixed: When playing back demos, DoAddBot() can be called without an
  associated call to SpawnBot(). So if the bot can't spawn, botnum can
  go negative, which will cause problems later in DCajunMaster::Main()
  when it sees that wanted_botnum (0) is higher than botnum (-1).
- Fixed: Stopping demo recording in multiplayer games should not abruptly
  drop the recorder out of the game without notifying the other players.
  In fact, there's no reason why it should drop them out of multiplayer at
  all.
- Fixed: Earthquakes were unreliable in multiplayer games because
  P_PredictPlayer() did not preserve the player's xviewshift.
- Fixed: PlayerIsGone() needs to stop any scripts that belong to the player
  who left, in addition to executing disconnect scripts.
- Fixed: APlayerPawn::AddInventory() should also check for a NULL player->mo
  in case the player left but somebody still has a reference to their actor.
- Fixed: DDrawFB::PaintToWindow() should simulate proper unlocking behavior
  and set Buffer to NULL.
- Improved feedback for network game initialization with the console ticker.
- Moved i_net.cpp and i_net.h out of sdl/ and win32/ and into the main source
  directory. They are identical, so keeping two copies of them is bad.
- Fixed: (At least with Creative's driver's,) EAX settings are global and not
  per-application. So if you play a multiplayer ZDoom game on one computer
  (or even another EAX-using application), ZDoom needs to restore the
  environment when it regains focus.
- Maybe fixed: (See http://forum.zdoom.org/potato.php?t=10689) Apparently,
  PacketGet can receive ECONNRESET from nodes that aren't in the game. It
  should be safe to just ignore these packets.
- Fixed: PlayerIsGone() should set the gone player's camera to NULL in case
  the player who left was player 0. This is because if a remaining player
  receives a "recoverable" error, they will become player 0. Once that happens,
  they game will try to update sounds through their camera and crash in
  FMODSoundRenderer::UpdateListener() because the zones array is now NULL.
  G_NewInit() should also clear all the player structures.


SVN r233 (trunk)
2006-06-30 02:13:26 +00:00
Christoph Oelckers 38b0230253 - Added a 'default' setting to all color selection menu items that leaves
the font untranslated.
- Fixed: Heretic's monsters were missing the MF2_MCROSS flag.


SVN r232 (trunk)
2006-06-29 14:21:56 +00:00
Christoph Oelckers 81ee5b4942 - Fixed: Bouncing projectiles should not bounce off horizon lines. Now they
vanish instead.
- Changed masses of ice chunks and glass shards to make small splashes


SVN r231 (trunk)
2006-06-28 11:14:20 +00:00
Christoph Oelckers 7ff576adf4 - Fixed: P_UndoPlayerMorph didn't properly transfer the inventory. It just
copied the pointer instead of using ObtainInventory.


SVN r230 (trunk)
2006-06-27 23:49:45 +00:00
Randy Heit 3b39092412 - Moved the version resource into the "compile-time directives" section of
the resource script so that Developer Studio won't replace the version macros
  in it with their literal values. Now updating version.h is guaranteed to be
  enough to bump the version everywhere it's used.


SVN r225 (trunk)
2006-06-25 01:16:18 +00:00
Christoph Oelckers 7266c1e929 - Fixed: PIT_CheckThing checked AActor::tid instead of TidToHate to determine
whether a monster of the same species can be hurt.
- Added new ice chunk sprites submitted by Enjay.

SVN r223 (trunk)
2006-06-24 23:58:01 +00:00
Christoph Oelckers 3c3a9dd8f8 - Deleted the programmer death script from strifehelp.acs because it is no
longer used.
- Fixed: strifehelp.acs and the PUMPUPS cheat need to give 10 UpgradeStaminas
  because that item is using Inventory::Amount now.


SVN r220 (trunk)
2006-06-24 08:03:15 +00:00
Randy Heit 27ff97f16e - Changed the archive format for crash reports from tar.gz to zip.
- Went back to a single process model for crash reporting. It appears there
  are some machines that don't like having another process collect the
  information and report it. I still feel that having another process do
  it _should_ be more reliable, because that process can execute in a known
  good state. Ah well. I haven't yet seen anything that left the main process
  in a totally unrecoverable state, so it's probably okay. Unlike before, this
  single-process version is still GCC-compatible.


SVN r217 (trunk)
2006-06-24 03:47:17 +00:00
Christoph Oelckers 1faa6d57a4 - Fixed: The resurrect cheat didn't reset the player's damage type so
if he died by being frozen the blue blend didn't disappear.

SVN r216 (trunk)
2006-06-23 16:20:41 +00:00
Christoph Oelckers 27c00bcb95 - Fixed: FWarpTexture::MakeTexture must be declared virtual so that
the FWarp2Texture version of it can be called.

SVN r215 (trunk)
2006-06-23 08:20:08 +00:00
Christoph Oelckers 550d687bcf - Fixed: The check to prevent items from being given to dead players
didn't work properly. It has to be done in the cheat code, not in
  APlayerPawn::AddInventory.
- Fixed: The medikit and stimpack used a MaxAmount of 100 so that
  stamina upgrades were ineffective.

SVN r214 (trunk)
2006-06-22 20:52:49 +00:00
Christoph Oelckers a0c912ef2d - Fixed: Jumping and crouching at the same time created jerky results.
Now jumping takes precedence and you can't crouch while pressing the
  jump key (which causes an uncrouch.)

SVN r213 (trunk)
2006-06-22 09:36:48 +00:00
Randy Heit e6268bf0a2 - Fixed: DF_NO_COOP_WEAPON_SPAWN was handled backwardly.
SVN r212 (trunk)
2006-06-22 02:19:43 +00:00
Randy Heit 9eb0aa1a02 - Fixed: G_InitLevelLocals() needs to OR in the crouching bits, otherwise it
discards the jumping bits.
- ProcessActor() now sets C mode before retrieving the actor's name.
- Fixed: The new SC_GetString() scanner accepted slashes at the end of tokens
  when not in C mode, even if they were the start of a comment. Now if you
  want a slash at the end, you must quote it.


SVN r211 (trunk)
2006-06-21 23:22:17 +00:00
Christoph Oelckers 729e3b346d - Fixed: Decal actors with an invalid decal texture caused a crash.
SVN r210 (trunk)
2006-06-21 20:45:19 +00:00
Christoph Oelckers e7f21912a5 Fixed: Player could crouch while dead.
SVN r209 (trunk)
2006-06-21 17:59:34 +00:00
Christoph Oelckers 14765bf64b - Fixed: The sidedef loader could allocate insufficient memory if a map
contained unused sidedefs.
- Fixed: Color control sequences were written to the log file. Since any
  entered console command contains such a sequence it was quite noticable.

SVN r208 (trunk)
2006-06-21 15:40:42 +00:00
Christoph Oelckers f356e356a0 - Fixed: The obituary code didn't use the attacker's name for kills caused
by other players.

SVN r207 (trunk)
2006-06-21 12:10:36 +00:00
Christoph Oelckers e2ac4c1168 - Fixed: PIT_StompThing never checked for COMPATF_NO_PASSMOBJ.
- Fixed: COMPATF_TRACE returned true for all two-sided lines, not just for
  those with the same sector on both sides.

SVN r206 (trunk)
2006-06-21 11:47:27 +00:00
Randy Heit 19dad144e1 - Added grubber's thingdef_exp.cpp. I might not use it later, but I can still
use it now.
- Fixed sc_man_scanner.re for negative numbers in C mode.


SVN r201 (trunk)
2006-06-20 21:21:52 +00:00
Randy Heit c54f2f66fc - Unlimited the monster pain sounds in Hexen after playing as the Cleric a
while and killing centaurs with the flechette.
- Fixed: Moving to an old level in a hub caused the old player's inventory to
  spawn owned by the current player (but still hanging off the old player), so
  the game would hang when trying to delete it.
- Modified re2c so that it doesn't add a date to the file it generates. Thus,
  if it regenerates a file during a full rebuild, SVN won't see it as a change.
  Also updated it to 0.10.5.
- Fixed: SC_GetString() did not properly terminate sc_String when the last
  token in the file had no white space after it. Since I could not actually
  find the problem (it works fine in debug mode and I saw no logic errors),
  I decided to take this opportunity to reimplement it using an re2c-generated
  scanner. Now it's 1.6x faster than before and correctness is easier to
  verify.
- Fixed: FMODSoundRenderer::Shutdown() also needs to reset NumChannels.
- Added back the Manifest to zdoom.rc for non-VC8 Windows compilers.
- Fixed MinGW compilation again. Now it uses the same method as Makefile.linux
  to find all the source files so that it doesn't need to be manually updated
  each time source files are added or removed.
- Added the SVN revision number to the version string. A new tool is used to
  obtain this information from the svnversion command and write it into a
  header file. If you don't have the svn command line tools installed or didn't
  check it out from the repository, you can still build. I added some rules for
  this to Makefile.linux, and I assume they work because they do for
  Makefile.mingw.
- Fixed: MIDISong2 did not delete MusHeader in its destructor.


SVN r200 (trunk)
2006-06-20 20:30:39 +00:00
Christoph Oelckers cf7d8ab43b - Removed the unused sfx_ variables for the chainsaw sounds.
- Fixed map name checks in idclev, hxvisit, for +map and the titlemap.
- Changed handling of Zips so that the patches/, graphics/, sounds/ and
  music/ subdirectories no longer are placed in the global namespace. Instead
  new namespaces are defined. These namespaces aren't merged, however and 
  searching in them either returns a lump inside it or one from the global
  namespace when it doesn't come from a Zip file. Proper order of files is
  still observed though. As a result proper use of the directories inside Zips 
  is strictly enforced now so that for example anything used as a patch must be 
  in the patches/ directory and won't be found anywhere else.


SVN r199 (trunk)
2006-06-19 15:31:10 +00:00
Christoph Oelckers a42f98af15 - Added another set of ACS inventory functions which take a tid for the actor
and aren't limited to the script's activator.
- Added GetSectorLightLevel(tag), GetActorCeilingZ(tid) and
  SetActorPosition(tid, x, y, z, fog) ACS functions.
- Fixed: First initialization of camera textures should not mark the rendered
  lines as mapped.

SVN r198 (trunk)
2006-06-18 15:49:00 +00:00
Randy Heit c87e2252ed - Finally implemented code to keep some or all of your inventory intact when
respawning in coop. Now the new inventory code should finally be complete. :-)
- Fixed: PROP_Inventory_PickupMessage was improperly defined for non-VC++
  compilation.


SVN r197 (trunk)
2006-06-18 04:10:47 +00:00
Christoph Oelckers 1bd6ac028b - Converted a_doomhealth.cpp to DECORATE.
- Added a PickupMessage property to the internal actor parser, replaced
  most of the virtual PickupMessages with it and placed the code that
  reads the metadata into AInventory::PickupMessage. Now the
  PickupMessage method is truly virtual and I can do:
   Added a Health.LowMessage property to define double message items like
   Doom's medikit in DECORATE.
- Since defining Mana3 as an ammo type and then overriding the TryPickup
  method means that this item defeats all ammo checks in the game it might
  as well be defined as a CustomInventory item. At least this fixes the
  amount given in easy and very hard skills.
- Converted all ammo items to DECORATE.
- Changed internal property setting of ammo types and sister weapons
  to use fuglyname as for DECORATE definitions. This allows to export
  the ammo definitions into DECORATE definitions without doing it for
  the weapons themselves.
- Replaced obituary methods with actor properties.
- Fixed: The secret map check didn't work for maps inside Zips.



SVN r196 (trunk)
2006-06-17 20:29:41 +00:00
Christoph Oelckers 9338c7360b - Fixed: The secret map check didn't work for maps inside Zips.
SVN r195 (trunk)
2006-06-17 07:46:02 +00:00
Randy Heit d99f5b4b99 SVN r191 (trunk) 2006-06-15 03:31:19 +00:00
Randy Heit 6e198e034b - Removed my "backwards compatibility fix" for APROP_Speed. It turns out that
in all the public versions where monster speed is not fixed point, you
  couldn't modify the monster's speed due to a bug in P_Move() anyway. So
  there's nothing to be backward compatible with.


SVN r190 (trunk)
2006-06-14 23:22:14 +00:00
Christoph Oelckers fd79fac52c - Fixed: Saving on maps that don't contain a MAPINFO definition didn't work.
- Fixed: The Zip loader loaded all WADs inside a Zip into the lump directory.
  This is only supposed to be done for WADs in the root directory.
- Complete restructuring of the map loading code. Previously the only way
  to put maps into Zips was to load them as embedded WADs which caused
  some problems, most importantly that the map's file name was irrelevant
  and the internal map label was used instead. With the new code there
  is now a properly defined way to add maps to Zips:
  * Maps are placed in a subdirectory called 'maps'.
  * Maps are stored as WADs that contain all map related lumps.
  * The first lump in the map's WAD directory must be the map label.
  * All lumps not belonging to the first map are ignored.
  * The map's file name determines the name the map is identified with. 
    For maps stored this way the internal map label is ignored so with this 
    method renaming maps is as easy as renaming a file and it is no longer 
    necessary to manipulate the map label.
  With the new code it is also possible to load external maps without
  adding them to the WAD list. Type 'open mapfile.wad' in the console
  to start such a map.
  The new code also performs stricter lump name checks to prevent accidental
  loading of non-map data.


SVN r188 (trunk)
2006-06-14 15:56:56 +00:00
Randy Heit 2a0216cf6f - Fixed: In the past, ZDoom worked like Doom and used integral values for
monster speeds. Now it uses fixed point so that an actor's speed property
  can always be considered is always fixed point. So DoSetActorProperty()
  should scale very slow speeds, just like dehacked's PatchThing() has done
  for some time now.


SVN r187 (trunk)
2006-06-14 03:57:58 +00:00
Christoph Oelckers 37ab80b566 - Changed UpgradeStamina to use AInventory's Amount and MaxAmount to
control the amount of upgrade and the maximum that can be reached.

SVN r186 (trunk)
2006-06-12 20:54:39 +00:00
Christoph Oelckers bb5a44fc90 - Fixed: The skin loader assumed that all skin textures are in Doom patch
format. Now it calls FTexture::CreateTexture to do proper checks.
- Removed the PickupSound method from FakeInventory and changed it so that
  it uses AInventory::PickupSound to store its custom pickup sound.
- Removed the PickupMessage method from FakeInventory. This can be handled
  by the standard pickup message code now that it uses the meta data for the
  message.
- Fixed: The maximum indices for StrifeTypes were inconsistent. Now the
  allowed range is 0-1000 in all situations.
- Fixed: Setting a local SNDINFO for a map deleted all skin based sounds.
- Added a crouchsprite property to the skin info.
- Fixed: Crouching sprites must be checked each frame, not just each tic.
- Added an srand call to D_DoomMain in order to randomize the values returned
  by rand which is being used to shuffle the playlist.


SVN r185 (trunk)
2006-06-11 11:28:48 +00:00
Randy Heit 5859aa7194 - Fixed: Information added with addkeysection and addmenukey was never freed.
- Fixed: A classic decorate FakeInventory's PickupText was never freed.
- Fixed: Colored lights were never freed.
- Fixed: When a dehacked patch was applied, the dehacked StateMap was never
  freed.
- Removed termdone checks around atterm(S_ClearSoundData) and
  atterm(S_Shutdown) because atterm() already checks for duplicates.
- Fixed: S_ClearSoundData() should unload all sounds before it clears S_sfx.
- Fixed: AltSoundRenderer::LoadSound() didn't check if the sound had already
  been loaded and lost the old sound data if it had been.
- Fixed: FinishDehPatch() needlessly duplicated the new DehackedPickup's name.
- Fixed: PatchStrings() allocated a private string and never freed it.


SVN r183 (trunk)
2006-06-11 01:06:19 +00:00
Christoph Oelckers 9655ee9843 - Changed music name handling in MAPINFO so that music can be specified by
full path of a file in a Zip.
- Fixed: intermusic in MAPINFO was limited to WAD lumps and couldn't handle 
  external data.

ACS:

- Fixed: Global and World array symbols didn't initialize their array information.


SVN r182 (trunk)
2006-06-09 08:19:46 +00:00
Randy Heit c808041337 - Fixed: Trying to play a 0-length song from a wad inside a zip caused a crash.
SVN r181 (trunk)
2006-06-09 00:26:07 +00:00
Christoph Oelckers 6b821afa64 SVN r179 (trunk) 2006-06-07 20:53:40 +00:00
Randy Heit 7a601515df - ClassifyLine now chooses either SSE2 or regular x87 math depending on whether
or not SSE2 is available at runtime. Since most of the time is spent in
  ClassifyLine, using SSE2 in just this one function helps the most.
- Nodebuilding is a little faster if we inline PointOnSide.
- Changed FEventTree into a regular binary tree, since there just aren't enough
  nodes inserted into it to make a red-black tree worthwhile.
- Added more checks at the start of ClassifyLine so that it has a better chance
  of avoiding the more complicated checking, and it seems to have paid off with
  a reasonably modest performance boost.
- Added a "vertex map" for ZDBSP's vertex selection. (Think BLOCKMAP for
  vertices instead of lines.) On large maps, this can result in a very
  significant speed up. (In one particular map, ZDBSP had previously
  spent 40% of its time just scanning through all the vertices in the
  map. Now the time it spends finding vertices is immeasurable.) On small maps,
  this won't make much of a difference, because the number of vertices to search
  was so small to begin with.


SVN r173 (trunk)
2006-06-06 21:39:08 +00:00
Christoph Oelckers 15681d0588 - Added a StartConversation special that allows automatic activation of Strife
dialogs.
- Added Thing_Raise special that allows Arch-Vile like resurrections from scripts
  or DECORATE states.
- Added a RadiusDamageFactor property for actors. This replaces the hard coded
  factor of 0.25 for Hexen's players.
- Added new SpawnProjectile function to ACS. It's the same as Thing_Projectile2
  but the projectile is specified by name, not spawn ID.
- Added MAPINFO option to set the compatibility flags. If this is done these
  explicit settings will take precedence over the compatflags CVAR.

SVN r164 (trunk)
2006-06-03 12:30:11 +00:00
Randy Heit 4325fb8993 - Merged in recent ZDBSP fixes:
- Added code to explicitly handle outputting overlapping segs when
   building GL nodes with ZDBSP, removing the check that discarded
   them early on.
 - AddIntersection() should convert to doubles before subtracting the vertex
   from the node, not after, to avoid integer overflow. (See cah.wad, MAP12
   and MAP13.) A simpler dot product will also suffice for distance calculation.
 - Splitters that come too close to a vertex should be avoided. (See cata.wad.)
 - Red-Black Tree implementation was broken and colored every node red.
 - Moved most of the code for outputting degenerate GL subsectors into another
   function.


SVN r160 (trunk)
2006-06-01 01:43:16 +00:00
Christoph Oelckers fd1a239c66 SVN r158 (trunk) 2006-06-01 00:05:03 +00:00
Randy Heit 12b066ef2e - Fixed: When building GL nodes for Deathkings MAP42, one polyobject had one
of its segs thrown away, so the map could not start. This was because the
  nodebuilder assumed all subsectors would be 2D and could not handle the
  case where a degenerate 1D subsector is created. In this case, that happens
  because that map has three polyobjects in the middle of the void, so the only
  way to assign them to a subsector is to use a 1D subsector.


SVN r153 (trunk)
2006-05-29 03:27:32 +00:00
Christoph Oelckers fb31db860d - Fixed: Monsters couldn't hurt other monsters of the same species if they
were supposed to hate them.
- Since I was editing the file anyway I added checks for Heretic's and Strife's
  damaging floor types to DCajunMaster::IsDangerous.
- Added a NULL pointer check to DCajunMaster::TurnToAng because a crash log
  indicated that this can happen.
- Fixed: Strife's energy pod contains 20 units when dropped by monsters.
  To achieve this I added an Ammo.DropAmount property because there are
  no other means to control this from inside a conversation script.

SVN r151 (trunk)
2006-05-28 14:54:01 +00:00
Christoph Oelckers 96f6cfd18a SVN r148 (trunk) 2006-05-27 10:27:51 +00:00
Randy Heit 67da924a02 - Changed makewad's zip routines so that it simply stores files that cannot be
compressed smaller instead of using deflate anyway. Saves 133 bytes currently.


SVN r147 (trunk)
2006-05-27 02:17:30 +00:00
Christoph Oelckers 5abd6b972c SVN r146 (trunk) 2006-05-26 08:19:39 +00:00
Randy Heit 90b5130db0 - Fixed: The C code in AltSoundRenderer::CopyAndClip() did not shift the sample
data enough (2 bits instead of 8), so it was super loud and aliased.
- Fixes for GCC 4.1: Several type-punned pointer warnings, but more
  importantly, declaring a friend function inside a class body is no longer
  enough to declare that function globally; you must declare it again outside
  the class.
- Upgraded FArchive::SerializePointer so that it can store 32-bit indices.
- ACS printing pcodes now build their string in an FSttring instead of a fixed
  sized buffer on the stack.


SVN r145 (trunk)
2006-05-26 04:38:22 +00:00
Randy Heit 43abfba723 - Modified ccdv-win32 to show "Generating X" messages when running lemon and
re2c instead of "Linking X".
- Updated lemon and re2c to the latest versions and ported dehsupp to use them
  for code generation. (Xlatcc is next.)
- Added function level linking for Makefile.mingw.


SVN r144 (trunk)
2006-05-25 04:32:20 +00:00
Randy Heit f50b284fda SVN r142 (trunk) 2006-05-24 15:31:21 +00:00
Christoph Oelckers 283d5971fe - Fixed: A_SpawnItem performed an integer multiplication with fixed point
values to calculate the spawn position.
- Fixed: A_SpawnItem tried to set the spawned actor's angle before checking
  the validity of the returned pointer.

SVN r141 (trunk)
2006-05-24 13:11:30 +00:00
Randy Heit 2ff618e474 SVN r140 (trunk) 2006-05-24 00:22:15 +00:00
Randy Heit cb18719d05 - Fixed: The new sound pausing on menu open interrupted Strife conversations.
- Did some very preliminary support for x64 compiling.
- Now I see why makewad is using the __fastcall calling convention by default:
  Because the release zlib is built with it as well.
- Fixed: Conversion from 'const char *' to 'char *' in DEM_SAVEGAME case in
  Net_DoCommand().
- Updated the project files for Visual C++ 2005.


SVN r138 (trunk)
2006-05-23 04:25:49 +00:00
Randy Heit ade6319a3c - Fixed: The new Thing_ChangeTID check would infinite loop if an actor
scheduled for destruction was encountered.

SVN r137 (trunk)
2006-05-22 22:02:13 +00:00
Christoph Oelckers 7f2ac35dce - Fixed: Thing_ChangeTid must check whether the actor whose tid is about to
be changed is scheduled for destruction.
- Fixed: G_FinishTravel added the player to the hash chain twice.
- Fixed: The animations for Doom's E3 intermission used incorrect patch names.
- Added a check for MF_NOLIFTDROP to PIT_CeilingRaise because the overlapping 
  bridges in 007LTSD got moved by this function.

SVN r136 (trunk)
2006-05-22 09:53:09 +00:00
Randy Heit df799ade24 - Fixed GCC 4 warnings in FNodeBuilder::CreateSubsectorsForReal().
- Changed f_finale.cpp/atkstates[] into a static variable, since its
  anonymous type prevents it from being accessed from other files anyway.
- Fixed: The behavior of the eventtail advancement in d_net.cpp/CheckAbort()
  was compiler-dependant.
- Fixed warnings GCC 4 threw up while compiling re2c and lemon.
- Removed __cdecl from makewad.c again. This is already defined as a builtin
  for MinGW, and redefining it produces a warning. (Why is main explicitly
  declared __cdecl anyway?)
- Fixed building ccdv-win32 with GCC 4. GCC 4 creates a memcpy call, which
  won't work because it doesn't get linked with the standard C library.


SVN r135 (trunk)
2006-05-22 01:34:07 +00:00
Randy Heit 62b7dd3efc - Fixed default.cbd and Makefile.mingw for current code state.
- New: Pausing the game (through any means, not just the pause key) now pauses
  sound effects as well as music. "PauseMusicInMenus" has been added as a
  MAPINFO flag to also pause the music when a menu or the console are open.


SVN r134 (trunk)
2006-05-21 02:10:16 +00:00
Christoph Oelckers f8bdceab38 - Fixed: The automap code had the check for rotation reversed.
- Changed type PClass::FreeIndices to TArray<unsigned int> because that's
  the type of the indices.
- Fixed: makewad.c needs __cdecl for non-Windows builds.
- Fixed: FinishThingdef didn't check whether the WeaponClass pointer in
  AWeaponPiece was a valid name.



SVN r133 (trunk)
2006-05-20 09:16:08 +00:00
Randy Heit 2b91f31d86 - Fixed: FloorAndCeiling_Raise/Lower did not work with slopes because they
used ZatPointDist instead of PointToDist to calculate the destination
  distance for the plane equation.
- Fixed: Sky scroll positions could "jump" once they wrapped past position
  32767. An fmod now keeps them within range of the sky textures' real widths.

SVN r132 (trunk)
2006-05-20 01:34:31 +00:00
Christoph Oelckers 3431564b02 - Increased the StrifeTypes array to 999 entries so that custom WADs have
more flexibility.



SVN r131 (trunk)
2006-05-19 21:31:25 +00:00
Randy Heit cf63f2c28e - Added a check against rw_havelow in the "sky hack" part of R_NewWall().
This prevents the front ceiling from being moved up if there has been no
  texture defined to draw on the wall. This makes various parts of The
  Darkest Hour render properly again while still allowing the crosses in
  heroes2.wad and lamasery.wad to render correctly.

SVN r130 (trunk)
2006-05-19 06:22:36 +00:00
Randy Heit 93c5753270 - Added a NULL sector check to P_CheckFakeFloorTrigger() because there was
a crash report indicating that an actor being pushed up by a moving floor
  had a NULL sector. Since this field should be valid for every actor, the
  debug build gets an assert here, and the release build just returns without
  doing anything.
- Fixed: Camera textures were not rendered properly when the underlying
  canvas's pitch and width were different (which, really, only happens if
  you use ridiculously large camera textures).
- Fixed: FCanvasTextureInfo's were never freed.
- Fixed: MAPINFO special action structures were not freed.
- Fixed: FSingleLumpFont::LoadFON2() never freed its widths2 array.


SVN r129 (trunk)
2006-05-19 05:14:37 +00:00
Christoph Oelckers 1971f97fd6 - Fixed: In case the path to strife1.wad didn't contain any '/' an
incorrect path was created for voices.wad.
- Fixed: The code building the path for Strife's voices.wad called the
  wrong FString constructor.
- Fixed: LS_Thing_SetGoal set MF5_CHASEGOAL in flags, not flags5.

SVN r128 (trunk)
2006-05-18 15:03:35 +00:00
Randy Heit a39f5bb8f7 - Fixed: M_NotifyNewSave() needlessly created a copy of the filename.
- Fixed: Any touching_sectorlists for actors unlinked in G_StartTravel() were
  lost forever.
- Fixed: DLightningThinker::Serialize() did not delete the old
  LightningLightLevels array when loading from an archive.
- Fixed: Although I moved the correct polyobject freeing code into
  P_FreeLevelData(), I left the old wrong code there too, which just deleted
  the array without deleting anything hanging off of it.


SVN r127 (trunk)
2006-05-18 04:25:26 +00:00
Randy Heit ba01f00d7c SVN r126 (trunk) 2006-05-18 01:43:19 +00:00