Commit Graph

208 Commits

Author SHA1 Message Date
Randy Heit d84c85d40f Remove warnings warned by Clang 2015-03-08 17:21:15 -05:00
Christoph Oelckers 337682934c - fixed: CF_FLY cannot be part of the player_t structure and be tracked properly. It needs to be part of the actor itself that has MF2_FLY set so it got moved to flags7.
- removed some fudging code that tried to work around the shortcomings of CF_FLY but was ultimately causing more problems than it solved.
2015-02-10 23:40:53 +01:00
nashmuhandes 2b12db153b New functions to manipulate an actor's roll.
- DECORATE functions: A_SetRoll code pointer.
- DECORATE expressions: "roll" variable.
- ACS functions: SetActorRoll, GetActorRoll.
2015-01-05 17:51:32 +08:00
MajorCooke 4ddfd0f46a - Added 3 new properties and 3 functions to control them.
- Rippers will rip through anything with an equivalent ripper level, or if their level is between or on the min and max ranges.
- If no min or max is defined, it simply checks if the monster's ripper level is lower than the missiles.
- Functions: A_SetRipperLevel(int level), A_SetRipMin(int min), A_SetRipMax(int max)
- Properties: RipperLevel, RipLevelMin, and RipLevelMax.
- RipperLevel: Applicable to monsters and projectiles.
- RipLevelMin and RipLevelMax are only useful on monsters.
- By default, all are 0.
2014-12-30 19:59:31 -06:00
MajorCooke 93ca8502dd - Rewrote a bunch of things for stability. 2014-12-17 21:47:00 -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
Christoph Oelckers 6afe9cc048 Merge branch 'hitpointer2' of https://github.com/MajorCooke/zdoom
Conflicts:
	src/actor.h
	src/thingdef/thingdef_data.cpp
2014-12-10 11:48:32 +01:00
MajorCooke 533ae95933 - Added three missile impact pointer changing flags.
- HITTARGET, HITMASTER, and HITTRACER.
- A missile that dies hitting an actor will set this impacted actor as the new target/master/tracer, depending on specifications.
2014-12-09 12:30:14 -06:00
MajorCooke e5340ad637 - Splitting the pull request in half.
- Added THRUREFLECT, MIRRORREFLECT, and AIMREFLECT. All require REFLECTIVE to work.
- THRUREFLECT prevents missiles from changing course if reflected, and takes precedence over all reflective flags.
- MIRRORREFLECT causes missiles to perform a direct 180 turn-around.
- AIMREFLECT turns the missile back to the original shooter, and does not slow the missile down.
2014-12-09 12:09:36 -06:00
Edward Richardson 99b2cfa147 Added APROP_DamageMultiply
- Used with Set/GetActorProperty, adds a generic multiplier for damage a
source deals.
2014-11-20 18:57:40 +13:00
MajorCooke b54b18c8c5 -Added: CAUSEPAIN. Actors which deal damage (even if 0) while having this flag can cause other actors to trigger pain chances.
-Fixed: ALLOWPAIN should not trigger pain states if the damage is 0, but still allow for infighting to occur.
-Fixed: an unneeded logic call was processing damage modification when it was 0 to begin with.
2014-11-12 14:08:26 -06:00
MajorCooke 2e085b2318 - Added ALLOWPAIN flag.
Monsters with this flag can enter pain states, regardless of
invulnerability or damage absorption.
- Fixed: god2 cheat wasn't being considered for drowning and thrusting.
2014-11-01 00:00:29 -05:00
Christoph Oelckers 6073adbeef - renamed FULLMASS to DONTTHRUST. 2014-10-28 08:40:34 +01:00
MajorCooke f802d7a44c - Added +FULLMASS.
Actors will be excluded from damage/radius thrusting of all sorts by
explosions or damage of any kind. They will also never deal impact
damage to other enemies, nor will they damage themselves from being too
close to a wall.
2014-10-27 21:35:55 -05:00
Christoph Oelckers d4c50b1662 - fixed: AActor::IsTeammate must consider monsters friendly to a specific player as members of the same team as the owning player. Such monsters cannot be made members of a designated team, though, because their association needs to change if the player changes teams. 2014-10-25 14:59:30 +02:00
MajorCooke d1dc6fd59a - Added: BUDDHA and FOILBUDDHA.
- Fixed: mugshot didn't take the god2 cheat into account.
2014-10-25 09:39:00 +02:00
Christoph Oelckers 5ac7e4fc38 - added HARMFRIENDS flag. 2014-10-25 00:30:36 +02:00
ChillyDoom 5de6b535ae - Removed unnecessary 'id' variable from AActor.
- Removed unused 'backpack' variable from player_t.
- Removed duplicate code from b_move.cpp.
- General cleanup.
2014-10-13 08:45:36 +01:00
Christoph Oelckers ee6e87d94b - use a separate counter from AActor::special1 to count weapon use with some Hexen weapons. special1 is used for some other purposes as well, and when using a separate counter it can be reset to 0 when changing weapons, preventing counting errors. 2014-09-13 12:38:16 +02:00
Randy Heit ea7ba9dba3 Add per-actor friction
- This is multiplied by the sector's friction.
- This is intentionally not serialized yet, while awaiting feedback.
2014-07-28 23:15:50 -05:00
Christoph Oelckers 6d4eb7f62d - changed handling of DF_NO_COOP_WEAPON_SPAWN dmflag so that weapons are not determined by class type but by a newly added flag WEAPONSPAWN, to allow CustomInventory replacements to act like weapons when being spawned. 2014-07-27 10:07:37 +02:00
Christoph Oelckers 2223c12938 - added new ChangeActorAngle/ChangeActorPitch ACS functions because the new required 'interpolate' parameter cannot be added to the existing SetActorAngle/SetActorPitch functions without breaking old scripts. 2014-05-08 09:43:58 +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
Gaerzi 83182b703d Added slow monsters, the inverse of fast monsters
This is a skill setting only, no "always slow" or "never slow" actor
flags, and no DM flags.
2014-04-15 21:01:49 +02:00
Gaerzi 4cac599b88 Less flags, more generic properties 2014-04-11 00:58:59 +02:00
Randy Heit 1f723c10ae Add CF_INTERPVIEW for players.
- Added CF_INTERPVIEW flag for players. A_SetPitch/A_SetAngle and the
  similar ACS APROPs set this when changing an angle. This forces the
  renderer to interpolate the view angles instead of updating with the
  latest mouse positions. The effect lasts one tick.
2013-10-09 21:50:24 -05:00
Randy Heit e021fba5e1 Improve NoDelay reliability.
- Instead of tying NoDelay behavior to OF_JustSpawned, use a new actor
  flag, MF7_HANDLENODELAY. This only gets cleared once it has actually
  been checked by Tick(). This is necessary because freeze mode delays the
  initial run of Tick() past the initial spawn, so OF_JustSpawned will no
  longer be set when it does the initial tick.
- Delay NoDelay processing if an actor is spawned dormant. Actors spawned
  dormant have Deactivate() called before they tick, so MF7_HANDLENODELAY
  will remain set as long as an actor is dormant. This allows the NoDelay
  handling to occur as expected once it is activated.
2013-09-17 20:44:13 -05:00
Christoph Oelckers 7a87e08107 - added MF7_ALWAYSTELEFRAG flag that causes an actor to be telefragged by everything that teleports into the same place. 2013-08-13 21:01:14 +02:00
Christoph Oelckers be1a00c537 Merge branch 'maint' 2013-08-12 20:42:21 +02:00
Christoph Oelckers e14590d8ce - moved NOTELESTOMP to flags7. When committing I was accidentally on maint instead of master and in master flags6 was already full. 2013-08-12 20:41:33 +02:00
Christoph Oelckers 44a1b94ad9 - added MF6_NOTELESTOMP flag that prevents an actor from telefragging under all possible circumstances. 2013-08-12 20:23:54 +02:00
Christoph Oelckers f2c250d35d - flags7 variable added to AActor. 2013-08-12 20:09:21 +02:00
Christoph Oelckers 25ec3fb8fe - added MF6_RELATIVETOFLOOR flag. 2013-08-10 09:32:55 +02:00
Christoph Oelckers 211d293002 - added MF6_NOTONAUTOMAP flag to exclude things from being shown with the scanner powerup. The IDDT cheat will not be affected by this. 2013-08-10 08:53:37 +02:00
Christoph Oelckers a78ad3188b - added MF5_NOFORWARDFALL flag to prevent attacks from making its victim fall forward randomly. 2013-08-09 20:20:23 +02:00
Christoph Oelckers 394f21f71e - fixed: Draining health from a victim must check for damage reduction before awarding the health to the player. This affected Heretic's gauntlets, A_Saw and A_CustomPunch.
- added a DONTDRAIN flag that prevents the above attacks from draining any health at all.
2013-06-24 16:42:43 +02:00
Randy Heit 40f7abb8e9 - Added bounce states. Set the BOUNCE_UseBounceState flag to use them (+USEBOUNCESTATE via
DECORATE). Then you can use:
  * Bounce
  * Bounce.Floor
  * Bounce.Ceiling
  * Bounce.Wall
  * Bounce.Actor
  * Bounce.Actor.Creature
  Partial matches work just like Pain states, so if an actor bounces off a floor and you don't
  have a Bounce.Floor state, but you do have a Bounce state, it will use the Bounce state.
  Conversely, if you only have a Bounce.Floor state but no Bounce state, then the actor will
  only enter the Bounce.Floor state when it bounces on a floor; bouncing off anything else will
  not cause it to change state.

SVN r4250 (trunk)
2013-05-04 22:52:37 +00:00
Randy Heit a5d770b433 - Dropped items with the DONTGIB flag set will no longer be destroyed by crushers.
SVN r4215 (trunk)
2013-04-16 17:55:17 +00:00
Randy Heit 625482aaeb - Added actors' BounceSound, WallBounceSound, and CrushPainSound to preloading.
- Moved marking of actor sounds for precaching into a virtual Actor function.

SVN r3838 (trunk)
2012-08-22 23:17:49 +00:00
Randy Heit a505352da3 - Added noclip2 cheat. This is similar to noclip, except it also adds nogravity and the ability to fly through 3D floors.
SVN r3832 (trunk)
2012-08-22 21:31:48 +00:00
Randy Heit 8c465df44e - Added ACS function IsTIDUsed(tid): It returns whether any actors using the given TID exist. This
is more efficient than ThingCount(tid, T_NONE), because it only needs to check for one actor
  with the TID and not all of them. It also makes no distinction between dead things and live
  things like ThingCount does.
- Added ACS function UniqueTID(tid, limit): It returns a new TID that is not currently used by
  any actors. It has two modes of operation. If tid is non-zero, then it checks TIDs one-by-one
  starting at the given tid until if finds a free one. If tid is zero, then it returns a completely
  random TID. If limit is non-zero, then it will only check that many times for a free TID, so
  it might not find a free one. If no free TID is found, 0 is returned. If limit is zero, then
  the search is effectively unlimited.

SVN r3798 (trunk)
2012-08-01 03:12:43 +00:00
Randy Heit eea532ce48 - Move the float bob offset calculation into a separate function.
SVN r3789 (trunk)
2012-07-27 01:53:21 +00:00
Randy Heit e1641da881 - Make APoisonCloud::DoSpecialDamage() and P_PoisonDamage() respect damage factors.
- Pass the damage type to AActor::DoSpecialDamage().

SVN r3717 (trunk)
2012-06-29 04:21:31 +00:00
Christoph Oelckers ff25785781 - removed the MF5_FASTER and MF5_FASTMELEE flags and replaced them with a 'Fast' state flag.
SVN r3692 (trunk)
2012-06-16 08:35:51 +00:00
Christoph Oelckers 3d7c6811c1 - The bouncing check from r3643 cannot be applied retroactively to the existing DOOMBOUNCE flag because mods depend on the old behavior. Instead of modifying BOUNCE_OnOff's behavior the correct way of doing this has to be implemented as a separate flag in order to avoid problems.
SVN r3685 (trunk)
2012-06-10 10:17:49 +00:00
Randy Heit 086d0a797e - Added AActor::SetFriendPlayer() to make setting FriendPlayer cleaner to read when doing it with
a player_t pointer.

SVN r3681 (trunk)
2012-06-09 04:15:56 +00:00
Christoph Oelckers 9c4a565366 - fixed: Inventory clearing after changing a level with the ACS ChangeLevel command did not properly clear the inventory. This will now use the same code as the ACS ClearInventory command.
SVN r3673 (trunk)
2012-05-31 09:46:07 +00:00
Christoph Oelckers 3a24790056 - fixed: The newly added checks for printing weapon obituaries failed if the weapon used a puff with a special damage type. To handle this, P_DamageMobj will now pass the damage flags to AActor::Die and from there to ClientObituary so that P_LineAttack - which is a better place to decide this - can flag an attack as coming from a player weapon.
- fixed: The same rules that are used for deciding if a weapon attack took place should be used when checking the PIERCEARMOR flag in P_LineAttack: It should be ignored if the attack doesn't originate from the weapon.

SVN r3649 (trunk)
2012-05-13 07:54:44 +00:00
Christoph Oelckers 83620fca1f - added Gez's NOTAUTOAIMED patch but did not set it for Heretic's pod.
SVN r3527 (trunk)
2012-04-07 12:40:50 +00:00
Randy Heit 37a322e46b - Fixed: Teleports that were not initiated by walking would not trigger sector actions.
SVN r3455 (trunk)
2012-03-18 03:52:18 +00:00