Commit Graph

64 Commits

Author SHA1 Message Date
MajorCooke e2d874e343 Applied _mental_'s suggestion 2015-10-04 12:37:49 -05:00
MajorCooke af9478f818 - Added Warp properties RadiusOffset and Pitch.
- RadiusOffset is a multiplier of the target actor's radius added onto the offsets x and y.
- Pitch is added to the warping actor's current pitch, provided WARPF_USEPITCH is supplied.
- Fixed WARPF_TOFLOOR not working as intended.
2015-10-03 17:28:54 -05:00
MajorCooke ebf515f8c7 - Fixed unneeded dual call to SetOrigin. 2015-08-25 20:18:06 -05:00
MajorCooke 87cc3f77f9 - Removed WARPF_ADDHEIGHT. 2015-08-10 16:05:44 -05:00
MajorCooke 54af1e379e - Removed WARPF_MULHEIGHT. Enable its ability by default.
- WARPF_ADDHEIGHT will simply change HeightOffset from multiplying to adding by default.
2015-08-10 15:03:29 -05:00
MajorCooke 7e661dfe57 - Clean up. 2015-08-10 12:41:40 -05:00
MajorCooke 9cf8a2a26c - Missed a spot. 2015-08-10 12:20:42 -05:00
MajorCooke ad14caa800 - Added A_Warp heightoffset property. Only has an effect by two flags.
- WARPF_ADDHEIGHT adds the pointed actor's height to heightoffset, and adds to the pointed actor's z position.
- WARPF_MULHEIGHT multiplies the pointed actor's height by heightoffset, and adds to the pointed actor's z position. Overridden by ADDHEIGHT.
2015-08-10 11:19:54 -05:00
Christoph Oelckers 701fc374f7 - consolidated A_Warp and ACS Warp code into a subfunction. 2015-07-31 08:40:33 +02:00
Christoph Oelckers 84351419a3 Merge branch 'master' of https://github.com/crimsondusk/zdoom
Conflicts:
	src/actor.h
2015-04-30 10:03:50 +02:00
coelckers c2e91293d2 Merge pull request #310 from MajorCooke/telefogfix
- Allow teleport fogs to set the teleporting actors as their targets, so...
2015-04-30 09:02:10 +02:00
Christoph Oelckers a54404074a - fixed: IDs that map to nothing must be removed from the spawn/conversation ID maps. 2015-04-23 20:09:12 +02:00
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
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 f2c250d35d - flags7 variable added to AActor. 2013-08-12 20:09:21 +02: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 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
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
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