Commit Graph

280 Commits

Author SHA1 Message Date
Christoph Oelckers 63bd2125f3 - Added global constants to DECORATE so that I can define meaningful flag
names for some DECORATE functions. Technically these will be constants 
  of the AActor class but that will make them accessible in all other actor 
  classes.


SVN r397 (trunk)
2006-11-29 16:20:22 +00:00
Christoph Oelckers a537d1a115 SVN r396 (trunk) 2006-11-29 11:14:40 +00:00
Christoph Oelckers 0ba809234e - Fixed: The StrifePlayer couldn't obtain his default inventory because
APlayerPawn::GiveDefaultInventory gave him some HexenArmor even though
  he doesn't need it.
- Added custom blood type properties to DECORATE.
- Converted Blood to DECORATE and made some minor changes to the code
  in preparation for custom blood types.
- Converted the bot helper things to DECORATE.
- Added damage type specific crash states.


SVN r395 (trunk)
2006-11-29 10:03:35 +00:00
Randy Heit 4467cd6563 - Started adding action function declarations to objects.
- Added integer constant declarations to objects.
- Added some new token-based functions to sc_man.cpp that know about keywords
  and record proper type information, so parsers don't need to treat
  everything as strings.
- Added a simple symbol table to PClass.


SVN r394 (trunk)
2006-11-29 04:51:16 +00:00
Christoph Oelckers 30885e6d86 - Changed: When playing a shareware game no external WADs are loaded at all,
not even zvox.wad or the skins directory.
- Minor improvement of Hexen's Demons: They now transfer the translation
  to the chunks they spawn so that they look correct if they are color
  translated. See Resurrection of Chaos for an example.
- Converted Key gizmos to DECORATE.
- Converted Heretic's Beast (Weredragon) to DECORATE.
- Added a randomness parameter to A_SpawnItemEx. This allows
  spawning objects with a random chance without the need to write
  complicated A_Jump constructs.
- Converted Heretic's Mummy to DECORATE.
- Converted Hexen's Demons to DECORATE.



SVN r393 (trunk)
2006-11-27 21:51:36 +00:00
Christoph Oelckers a90ba9deb6 - Converted Ettin and Centaur to DECORATE.
- Made the Ettin's and Centaur's howling sound an actor property.
- Added A_CustomComboAttack function to finally have something that can
  replace the old A_ComboAttack function.
- Added A_SpawnItemEx function that removes the problems with A_SpawnItem
  and which also should make most of the A_CustomMissile abuse unnecessary.
- Added A_QueueCorpse to the list of DECORATE code pointers.
- Made the size of Hexen's corpse queue configurable by CVAR
  (sv_corpsequeuesize.) Setting this CVAR to -1 will disable corpse 
  queuing completely so that even in Hexen all corpses will stay forever.


SVN r392 (trunk)
2006-11-27 00:01:30 +00:00
Christoph Oelckers d840d9b68a - Added random2 function to DECORATE's expression evaluator. This is to
better emulate some calculation of internal code pointers.
- Added named RNG support to DECORATE's expression evaluator. Just use
  random[name](min, max).


SVN r391 (trunk)
2006-11-26 12:13:12 +00:00
Randy Heit 04b80f8de5 - Reverted updaterevision.vcproj to r385 and added a note as a build event
explaining the need to use mt.exe 6.0 or newer. Here is the note:
  VERY IMPORTANT: You must copy the mt.exe from %VSINSTALLDIR%\Common7\Tools\bin
  on top of the version in %VSINSTALLDIR%\VC\bin or your computer may restart
  while building.
- Changed the ASecretTrigger::Activate() fix: There's no reason open scripts
  shouldn't be able to activate secret triggers; players just won't get
  credit for it in coop.
- Added a NULL actor check to R_SetupFrame().
- Fixed: The player sounds in DEHSUPP were defined incorrectly.


SVN r390 (trunk)
2006-11-26 01:30:34 +00:00
Christoph Oelckers beca482a68 - Fixed: SecretTriggers that were activated in an OPEN script caused a crash.
SVN r389 (trunk)
2006-11-26 00:09:17 +00:00
Christoph Oelckers 49422188f2 - Converted Heretic's Clink (Sabreclaw) to DECORATE.
- Added MissSound parameter to A_CustomMeleeAttack.
- Converted Heretic's Snake (Ophidian) to DECORATE.
- Added an option to A_CustomMissile to jump to the see state if
  the caller's target is dead.
- Fixed: A_ThrowGrenade didn't play the missile's spawn sound.
- Added MF_SPAWNSOUNDSOURCE flag so that Raven's missile spawning code 
  pointers can be recreated with DECORATE.
- Converted a_ravenambient.cpp to DECORATE.



SVN r388 (trunk)
2006-11-25 12:25:05 +00:00
Randy Heit 824fa1a557 - Fixed: The backpack didn't give extra ammo in baby and nightmare modes.
SVN r387 (trunk)
2006-11-25 04:47:42 +00:00
Randy Heit 4b7b95663e - Fixed: When P_SpawnPlayer() calls DObject::PointerSubstitution() to
redirect player pointers, it affects the bodyque too. That meant that in
  multiplayer games, once the bodyque filled up, anybody was in danger of
  being rudely destroyed the next time somebody respawned.


SVN r386 (trunk)
2006-11-25 04:26:04 +00:00
Randy Heit 86ed101522 - Added a manifest with a trustinfo section to updaterevision.exe so that
the build process can run uninterrupted under Vista.
- Fixed: DIRECT3DCREATE9FUNC needs WINAPI added to its prototype so that it
  works properly in release build, which defaults to __fastcall.


SVN r385 (trunk)
2006-11-23 02:16:43 +00:00
Randy Heit 48bb782b19 - Fixed: Polyobjects are serialized before players, which means that a call
to PO_MovePolyobj() from P_SerializePolyobjs() for a crushing polyobject
  that touches a player actor will not have a valid actor->player->mo chain
  for P_DamageMobj and crash if it happens to touch the player. Since the
  polyobject was presumably in a good spot when the game was saved, we can
  just skip this step entirely and let it take care of itself the next time
  it moves (by which time, the players will be valid).
- Fixed: When transitioning from fullscreen to windowed mode with D3DFB, the
  window kept the WS_EX_TOPMOST style.
- Slight correctness fix: When in fullscreen, the window should have WS_POPUP
  style.
- Added a NULL target check to P_SpawnMissileXYZ(), A_DemonAttack1(),
  A_DemonAttack2_1(), and A_DemonAttack2_2().


SVN r384 (trunk)
2006-11-21 05:43:34 +00:00
Randy Heit 93b18c3bfa SVN r383 (trunk) 2006-11-19 02:10:25 +00:00
Christoph Oelckers 1502215009 - Made AActor's xscale and yscale properties full precision fixed point
so now larger scales than 4 can be done.


SVN r381 (trunk)
2006-11-14 16:54:02 +00:00
Christoph Oelckers f6f15ba764 - Added a check to P_CheckMissileSpawn to decrease the monster counter
if it was called for spawning a monster with A_CustomMissile.
- Added a ML_BLOCK_PLAYERS line flag.


SVN r380 (trunk)
2006-11-10 12:13:37 +00:00
Christoph Oelckers e5bce37755 - Converted Heretic's and Hexen's players to DECORATE.
- Made Hexenarmor factors configurable by DECORATE.
- Added support for selecting the invulnerability mode per item as well.
- Made Invulnerability and Healing radius behavior selectable by player
  class instead of hard coding the special behavior to the Hexen classes.


SVN r379 (trunk)
2006-11-07 10:20:09 +00:00
Christoph Oelckers 80950553c6 - Converted the DoomPlayer to DECORATE.
- Extended all A_Jump commands to take labels as parameters in addition
  to offsets.


SVN r378 (trunk)
2006-11-05 21:46:28 +00:00
Christoph Oelckers 9c529b8aa4 - Removed the deprecation warnings for the state assignment commands
in DECORATE. While it is still recommended not to use them anymore
  they will continue to work with custom state support and existing 
  DECORATE code doesn't have to be changed. However, they will remain
  limited to the existing functionality, nothing more.


SVN r377 (trunk)
2006-11-05 15:49:54 +00:00
Christoph Oelckers 8c2f651bdb - Replaced the static string buffer in ProcessStates with an FString.
- After doing some tests with state label scopes I had to conclude that
  using '.' both for separating sub-state-labels and scope resolution 
  identifiers does not work reliably unless all actor class names were
  prohibited from being used as state labels.  Since that is undesirable
  the only solution is to change the scope resolution operator. Fortunately 
  no WADs so far have used it so implementing such a breaking change isn't 
  a major issue. Now it uses '::', like C++ for this purpose.
- Converted Revenant, Mancubus and Pain Elemental to DECORATE.


SVN r375 (trunk)
2006-11-04 22:26:04 +00:00
Christoph Oelckers 5e8323b426 - Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and
CommanderKeen to DECORATE.


SVN r374 (trunk)
2006-11-04 16:19:50 +00:00
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 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 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 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