Commit Graph

109 Commits

Author SHA1 Message Date
arezey e40f3c7350 Merge branch 'master' of https://github.com/crimsondusk/zdoom 2015-04-12 02:16:34 +03:00
MajorCooke 1799ae91c9 - Allow teleport fogs to set the teleporting actors as their targets, so modders can create interactions between the two.
- Fixed: P_MoveThing had source and destination fog spawning backwards.
- Fixed a case where the NOTELEPORT flag would be ignored on A_Teleport.
- Added pointer selection to A_Teleport. Defaults to AAPTR_DEFAULT (calling actor). State jumps will only be done by the calling actor.
2015-04-07 11:14:02 -05:00
Christoph Oelckers b6a4511dd1 - move conversation ID definition to MAPINFO as well. Uses the newly added filter feature to handle the teaser differences. 2015-04-05 00:31:15 +02:00
Teemu Piippo ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Christoph Oelckers 2ec8e2c2ac - moved spawn ID definitions to MAPINFO as well and removed all 'Game' directives from DECORATE because editor and spawn numbers are the only thing that required them. 2015-04-04 00:39:09 +02:00
Randy Heit b5e4153c78 Merge branch 'master' into gonesolong
Conflicts:
	src/CMakeLists.txt
	src/b_think.cpp
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_clericstaff.cpp
	src/g_hexen/a_fighterplayer.cpp
	src/namedef.h
	src/p_enemy.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/p_teleport.cpp
	src/sc_man_tokens.h
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_function.cpp
	src/thingdef/thingdef_parse.cpp
	wadsrc/static/actors/actor.txt
	wadsrc/static/actors/constants.txt
	wadsrc/static/actors/shared/inventory.txt

- Added register reuse to VMFunctionBuilder for FxPick's code emitter.
- Note to self: Need to reimplement IsPointerEqual and CheckClass, which
  were added to thingdef_function.cpp over the past year, as this file no
  longer exists in this branch.
2014-12-21 21:15:11 -06:00
Randy Heit 2d87eb0ba2 Merge branch 'master' into gonesolong
Conflicts:
	src/CMakeLists.txt
	src/actor.h
	src/g_heretic/a_hereticmisc.cpp
	src/g_heretic/a_hereticweaps.cpp
	src/g_heretic/a_ironlich.cpp
	src/info.h
	src/namedef.h
	src/p_buildmap.cpp
	src/p_enemy.cpp
	src/p_map.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	zdoom.vcproj
2014-12-20 19:13:14 -06:00
MajorCooke 30acb72006 - Added per-actor teleport fog modifications.
- New properties include TeleFogSourceType and TeleFogDestType.
- TeleFogSourceType is the fog left behind where the actor teleported away from.
- TeleFogDestType is the fog the actor sees when it arrives at its destination.
- Added A_SetTeleFog(<oldpos>,<newpos>) -- oldpos sets TeleFogSourceType, newpos sets TeleFogDestType.
2014-12-17 16:11:07 -06:00
MajorCooke 94f08aa593 - Added: Boolean to specify if A_Raise functions should perform CopyFriendliness based upon who raised it. By default, this is false. 2014-11-27 15:12:33 -06:00
Christoph Oelckers c1a0ee9623 - fixed last commit. 2014-10-29 10:40:08 +01:00
Christoph Oelckers 978667143c - fixed: P_RemoveThing must not remove owned inventory items. 2014-10-29 08:54:14 +01:00
GitExl bb3d2fa535 Add CanRaiseActor ACS function. 2014-09-23 12:10:39 +02:00
Christoph Oelckers 93aa1ea2c4 fixed some issues with reviving monsters
- fixed: Thing_Raise didn't properly set the spawn health.
- fixed: Thing_Raise did not the CanRaise state flag.
- fixed: Reviving a monster must also reset the damage type.
- fixed: Thing_Raise reset the actor after calling the raise state, but it should be before, just as the Archvile code is doing.
- consolidated some common code of Thing_Raise and Archvile resurrection into AActor methods.
2014-05-05 11:24:20 +02:00
Christoph Oelckers 3e4678765b Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/thingdef/thingdef_codeptr.cpp
2013-08-18 12:18:59 +02:00
Christoph Oelckers f2c250d35d - flags7 variable added to AActor. 2013-08-12 20:09:21 +02:00
Randy Heit 459ad5abff - Updated scripting branch to latest version in trunk.
SVN r4337 (scripting)
2013-06-07 03:31:30 +00:00
Randy Heit 06445e8181 - Fixed: Used the wrong actor's radius in P_Thing_Projectile() to get the maxdist for P_CheckMissileSpawn().
SVN r4196 (trunk)
2013-03-21 22:21:54 +00:00
Randy Heit 2874d927b1 - Random spawners no longer move the missile forward when spawning them, because presumably
whatever spawned the random spawner already took care of this.
- Added a maxdist parameter to P_CheckMissileSpawn() to help ensure that it doesn't completely 
  move the spawned missile outside of its shooter (and potentially beyond a wall the shooter
  might happen to be standing next to).

SVN r4194 (trunk)
2013-03-21 03:06:04 +00:00
Randy Heit 955d929d5e - Ensure that only actor with positive SpawnIDs get added to the SpawnableThings map, so there will
be no conflicts with recently-added named arguments for spawnable things on UDMF maps.
- Change the SpawnableThings array into a map, so there is no longer any particular upper limit on an actor's SpawnID. Also fixes a possible exploit, since an actor's SpawnID was never checked to make sure it was within range.

SVN r3959 (trunk)
2012-11-09 23:53:58 +00:00
Randy Heit 3c54047b9f - Added Gez's "Using arg*str instead of SpawnID" patch, with modifications.
SVN r3958 (trunk)
2012-11-09 23:25:56 +00:00
Randy Heit e7efa1d802 - Update to latest version in trunk.
SVN r3890 (scripting)
2012-10-17 04:24:54 +00:00
Randy Heit a0f19fc788 - Fixed: When P_MoveThing() moves the current camera, it also needs to reset the view interpolation.
SVN r3874 (trunk)
2012-09-16 04:59:01 +00:00
Randy Heit 562cf04db2 - Update scripting branch to trunk.
SVN r3758 (scripting)
2012-07-14 03:04:41 +00:00
Christoph Oelckers df138fe4f9 - added a ClearCounters function to AActor that handles everything necessary to un-count an item that is not supposed to be counted but has some of the COUNT* flags set.
- merged all places where secrets are credited into one common function.
- added the Doom64 COUNTSECRET actor flag.
- fixed: AInventory::CreateCopy did not clear the COUNTITEM flag.
- fixed: Dropping an item did not increase the item count but the dropped item could still have the COUNTITEM flag. Now this flag gets cleared when the item gets picked up so that dropped items don't count a second time.

SVN r2826 (trunk)
2010-09-19 00:06:45 +00:00
Christoph Oelckers 9102200771 - added: Let the kill CCMD also kill replacements of the monster that is specified.
- add a GetReplacement method to PClass to clean up some really ugly code
- Who wrote the 'kill' CCMD? The way it checked if two classes were identical was horrendously overcomplicated.

SVN r2601 (trunk)
2010-08-26 20:59:15 +00:00
Randy Heit f88f601230 - Removed the third parameter from dumpclasses when it was restricted it to Actors, because
I have no idea what that was all about.
- Got rid of FActorInfo and merged it into a new PClassActor.

SVN r2240 (scripting)
2010-03-24 02:49:37 +00:00
Christoph Oelckers fa452ffd41 - My ActorMover fix from earlier today was causing problems with moving sectors
because it exposed a design flaw in the thinker system:
  Having every single actor default to the highest available statnum means that 
  nothing can be placed in a slot where it is guaranteed to be run after all actors 
  have ticked. But this is required for any thinker that moves an actor 
  (i.e. AActorMover and DSectorEffect.) With DSectorEffect it just went unnoticed 
  because they were added at the end of the list so almost nothing they moved was
  behind them in a thinker list. However, when an actor was spawned on a moving 
  floor it did not move smoothly. The default statnum is now 100 so that there's 
  sufficient slots above where such thinkers can be placed.


SVN r2060 (trunk)
2009-12-30 18:53:14 +00:00
Christoph Oelckers 26c33afafb - fixed: Movement performed by actor movers was not interpolated because
it happened outside the moved actor's Tick function. This got particularly
  obvious with moving skybox viewpoints (See Daedalus's MAP21 intro for a good
  example.)


SVN r2059 (trunk)
2009-12-30 12:20:47 +00:00
Christoph Oelckers 85c683e0c7 - Reintroduced Doom.exe's player_t::usedown variable so that respawning a
player does not immediately activate switches. oldbuttons was not usable
  for this. This also required that CopyPlayer preserves this info.
- Fixed: When restarting the music there was a NULL pointer check missing
  so it crashed when the game was started wi
- Fixed: If the Use key is used to respawn the player it must be cleared
  so that it doesn't trigger any subsequent actions after respawning.
- Fixed: Resurrecting a monster did not restore flags5 and flags6.
- Fixed: Projectiles which killed a non-monster were unable to determine
  what precisely they hit because MF_CORPSE is only valid for monsters.
  A new flag, MF6_KILLED that gets set for all objects that die, was added
  for this case.
- Added a generic A_Weave function that exposes all possible options of
  A_BishopMissileWeave and A_CStaffMissileSlither. These 2 functions are
  no longer needed from DECORATE and therefore deprecated.


SVN r2045 (trunk)
2009-12-25 11:09:56 +00:00
Randy Heit 173646971d - Add 'add' parameter to SetActorVelocity.
SVN r1810 (trunk)
2009-09-08 03:19:57 +00:00
Christoph Oelckers 93f6f1d701 - Added PinkSilver's SetActorVelocity code submission (with optimizations.)
SVN r1799 (trunk)
2009-09-06 08:27:18 +00:00
Christoph Oelckers 8e5b7373b8 - added submission for raising master/children/siblings.
- added submission for no decals on wall option.
- removed some useless code from SpawnMissile function.


SVN r1716 (trunk)
2009-07-13 22:07:18 +00:00
Christoph Oelckers 635d71e660 - Added code submissions for non-piercing railguns and new skill options.
SVN r1706 (trunk)
2009-07-04 18:17:44 +00:00
Randy Heit e4af82ae96 - Enough with this "momentum" garbage. What Doom calls "momentum" is really
velocity, and now it's known as such. The actor variables momx/momy/momz
  are now known as velx/vely/velz, and the ACS functions GetActorMomX/Y/Z
  are now known as GetActorVelX/Y/Z. For compatibility, momx/momy/momz will
  continue to work as aliases from DECORATE. The ACS functions, however,
  require you to use the new name, since they never saw an official release
  yet.


SVN r1689 (trunk)
2009-06-30 20:57:51 +00:00
Christoph Oelckers 4bcd3faef8 - moved all code related to global ACS variables to p_acs.cpp where it belongs.
- fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew.
- merged MAPINFO branch back into trunk.

SVN r1393 (trunk)
2009-02-03 19:11:43 +00:00
Randy Heit 48be3f7022 - Fixed: Thing_ProjectileIntercept broke slightly when converted to the new
vector math routines (almost two years ago!) because the original code
  multiplied down columns of the rotation matrix, but the new code multiplies
  across rows of the matrix instead. This is remedied by flipping the matrix
  across the x=y axis by reversing the sign of the sine value passed to the
  matrix constructor.


SVN r1324 (trunk)
2008-12-18 06:22:18 +00:00
Christoph Oelckers 153a2a4c2c - Fixed: G_DoPlayDemo did not free the demobuffer or the CVAR backups when it
failed to start the demo.
- Added a MF5_BRIGHT flag to always render an actor fullbright.
- Fixed: Calling Door_Animated with a non-zero tag created a new thinker
  for each two-sided line of the sector.
- Added Karate Chris's submission for making 'spray' a cheat.
- Added CO2's default parameter additions for several Doom code pointers
  submission.
- Added CO2's A_RemoveMaster/A_RemoveChildren submission.
- Added Blzut3's SBARINFO replacement for the Doom statusbar.
- Fixed: SBarInfo still displayed the wrong bar for height 0
- Added A_KillSiblings and A_DamageSiblings code pointers.
- added MaxAbsorb and MaxFullAbsorb properties for Armor.


SVN r1304 (trunk)
2008-12-06 10:22:37 +00:00
Christoph Oelckers 760f70d3f1 - Changed compilation for g_doom, g_heretic, g_hexen and g_strife folders
so that all files are included by a central one instead of compiling 
  each one separately. This speeds up the compilation process by 25%
  when doing a complete rebuild in Visual C.
- Cleaned up more header dependencies.

SVN r1226 (trunk)
2008-09-15 14:11:05 +00:00
Christoph Oelckers db5723997c - Cleaned up some include dependencies.
SVN r1224 (trunk)
2008-09-14 23:54:38 +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
Randy Heit 490742cf46 - Moved the implementation for the Thing_Damage special into another function
so that I can create the ACS function Thing_Damage2. It's exactly the same as
  Thing_Damage, except the damage type is specified by name. When I did this,
  I noticed that it didn't do anything useful for a TID of 0, so I made it
  affect the activator in that case.
- Added a new SetActorState ACS function:
    int SetActorState (int tid, str statename, optional bool exact);
  If tid is 0, it affects the script activator, otherwise it affects all the
  matching actors. Statename is the name of the state you want to put the
  actor in. The final parameter, exact, specifies whether or not partial
  state name matches are accepted. If you don't specify it or set it to
  false, if you try to do something like:
    SetActorState (0, "Foo.Bar");
  And the actor has a Foo state but no Foo.Bar state, it will enter the Foo
  state. If you set exact to true:
    SetActorState (0, "Foo.Bar", true);
  Then the actor must have a Foo.Bar state, or it will not change state at
  all, even if it has a Foo state.
  The return value for this function is the number of actors that successfully
  changed state. Note that you should refrain from using this function to
  enter special states such as Death, or unpredictable results could occur.


SVN r505 (trunk)
2007-03-23 22:26:14 +00:00
Randy Heit 560d4f8140 - Fixed: Thing_ProjectileAimed did not set the missile's speed correctly.
- The net start pane is now given focus when it is created, so it can
  receive keyboard input.
- Added playback of the "WeaponPickup" sound when a Hexen net game starts.
- Separated the different startup screens into classes for better
  modularization (which I should have done in the first place). (Sorry,
  have not done it for Linux yet, so that won't compile as-is.)


SVN r496 (trunk)
2007-03-06 01:33:18 +00:00
Randy Heit eef025dd4e - Fixed: When I converted the P_Thing_Projectile() code for target leading
to use the new vector routines, I had made dist calculate the squared
  length of the aim vector instead of the correct length.


SVN r494 (trunk)
2007-02-28 17:38:56 +00:00
Randy Heit 1ca9b88b11 - Fixed: When starting a new game from the menu while the fullscreen console
was open, the game was frozen before its initial setup tick until the
  console was closed. The most obvious result of this is that your view was
  stuck on the floor until the console closed.
- Fixed: Pressing ESC while editing your player name completely cleared the
  menus instead of simply canceling the name change.
- Fixed: The status bar still showed the rampage face if you held the fire
  button down while frozen.


SVN r493 (trunk)
2007-02-28 16:49:19 +00:00
Randy Heit 01cd91fd9e - Fixed: EV_Teleport() did not set players to their idle state, so if they
were running when the teleported, they would still be running afterward
  even though they weren't moving anywhere. Normally, P_XYMovement() does
  this when they stop due to friction.
- Fixed: AActor::TakeSpecialDamage() completely bypassed the standard rules
  for target switching on actors with MF5_NODAMAGE set.
- Changed the return values of the ACS spawn, spawnspot, and spawnspotfacing
  commands to be the total count of things spawned, rather than a pretty
  much useless reference to the actor spawned at the last map spot.
- Fixed: DLevelScript::DoSpawn() takes a byte angle, but DoSpawnSpotFacing()
  passed it a full-length angle.
- Fixed: When MF_SKULLFLY is removed because an actor slams into something,
  it was set to a see or spawn state, resetting its tic count and bypassing
  the effectiveness of the MF2_DORMANT flag. While I was at it, I decided
  dormant skulls shouldn't do slamming damage, either.
- Fixed: P_Thing_Spawn() returned success only if all thing instances were
  successfully spawned. As long as at least one thing was spawned, it should
  be considered a success.
- Fixed: Flipped single rotation sprites were only flipped every other 22.5
  degree interval.


SVN r484 (trunk)
2007-02-14 22:47:01 +00:00
Christoph Oelckers d0c910fca6 - added Grubber's submission for customizable gravity per actor.
- Fixed: A_Jump didn't work for weapons or CustomInventory items.



SVN r456 (trunk)
2007-01-20 14:27:44 +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 3c976ac02c - Converted the StrifePlayer to DECORATE. Even though it requires exporting
3 new code pointers without general use it was necessary to handle
  GiveDefaultInventory consistently for all players without the need to 
  subclass this function.
- Added a Player.RunHealth property to expose the StrifePlayer's behavior of
  not being able to run when its health is below 10.
- Changed APlayerPawn::GiveDefaultInventory so that it always adds a HexenArmor
  and a BasicArmor item to the inventory. If these items are not the first ones
  added to the inventory anything else that might absorb damage is not guaranteed 
  to work consistently because their function depends on the order in the inventory.
- Changed handling of APowerup's DoEffect so that it is called from the owner's
  Tick function, not the item's. This is so that the order of execution is
  determined by the order in the inventory. When done in the item's Tick function
  order depends on the global thinker table which can cause problems with the
  order in which conflicting powerups apply their effect. Now it is guaranteed
  that the item that was added to the inventory first applies its effect last.
- Fixed: Added checks for Speed==0 to A_Tracer and A_Tracer2 because this could
  cause a divide by zero.
- Fixed: P_MoveThing must also set the moved actor's previous position to
  prevent interpolation of the move.
- Fixed: APowerInvisibility and its subclasses need to constantly update
  the owner's translucency information in case of interference between different
  subclasses. Also changed Hexen's Cleric's invulnerability mode to disable
  the translucency effect if an invisibility powerup is active.


SVN r448 (trunk)
2007-01-12 15:24:10 +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 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 ecce60e8f9 SVN r258 (trunk) 2006-07-16 09:10:45 +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
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 e2179d5c2d Guess what. It's not 2005 anymore.
SVN r184 (trunk)
2006-06-11 01:37:00 +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 d878c2e7d6 - Backported the classnames-are-names changes from the FP code.
SVN r97 (trunk)
2006-05-10 02:40:43 +00:00
Christoph Oelckers da51ac7446 SVN r49 (trunk) 2006-04-16 13:29:50 +00:00
Christoph Oelckers e06ba32525 SVN r26 (trunk) 2006-04-11 08:36:23 +00:00
Randy Heit cf11cbdb30 Directory restructuring to make it easier to version projects that don't build zdoom.exe.
SVN r4 (trunk)
2006-02-24 04:48:15 +00:00