Commit Graph

370 Commits

Author SHA1 Message Date
Christoph Oelckers c4377b7039 - removed the implicit fixedvec -> TVector conversions because they caused too many problems. Also reviewed all uses of these and made the necessary adjustments. Problems were present in P_SpawnMissileXYZ and P_Thing_Projectile.
- replaced some single precision float math with doubles.
2016-01-23 20:44:33 +01:00
Randy Heit 9744b9e0d9 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/dobject.h
	src/dobjgc.cpp
	src/p_local.h
	src/thingdef/thingdef_codeptr.cpp
2016-01-21 12:45:06 -06:00
alexey.lysiuk f10dd68ca6 Fixed actors intersection check 2016-01-21 16:21:09 +02:00
Christoph Oelckers c78344c19d Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/p_user.cpp
	src/thingdef/thingdef_expression.cpp
2016-01-20 15:16:06 +01:00
Christoph Oelckers 68c0f929dc - refactoring complete. The source compiles again with the renamed position variable. 2016-01-20 15:12:51 +01:00
Christoph Oelckers 25107ed421 - since I had to shuffle around the first variables in AActor, let's better commit that change. 2016-01-20 13:49:52 +01:00
Christoph Oelckers 4b9647e539 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/g_hexen/a_hexenspecialdecs.cpp
	src/g_strife/a_thingstoblowup.cpp
	src/thingdef/thingdef_codeptr.cpp
2016-01-20 11:45:57 +01:00
Christoph Oelckers 7ea3e49332 - refactored p_mobj.cpp and the first half of p_map.cpp. 2016-01-20 01:48:57 +01:00
Christoph Oelckers b73e1e65f5 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/p_local.h
	src/thingdef/thingdef_codeptr.cpp
2016-01-19 20:17:34 +01:00
Christoph Oelckers 7658111566 - refactoriung of thingdef_codeptr.cpp - probably the ugliest file in the entire project... 2016-01-19 20:15:45 +01:00
Christoph Oelckers bc63b70d88 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/fragglescript/t_func.cpp
	src/g_doom/a_bossbrain.cpp
	src/g_doom/a_revenant.cpp
	src/g_heretic/a_hereticartifacts.cpp
	src/g_heretic/a_hereticweaps.cpp
	src/g_heretic/a_knight.cpp
	src/g_hexen/a_bishop.cpp
	src/g_hexen/a_clericholy.cpp
	src/g_hexen/a_dragon.cpp
	src/g_hexen/a_firedemon.cpp
	src/g_hexen/a_flechette.cpp
	src/g_hexen/a_heresiarch.cpp
	src/g_hexen/a_hexenspecialdecs.cpp
	src/g_hexen/a_iceguy.cpp
	src/g_hexen/a_korax.cpp
	src/g_hexen/a_magelightning.cpp
	src/g_hexen/a_serpent.cpp
	src/g_hexen/a_spike.cpp
	src/g_hexen/a_wraith.cpp
	src/g_raven/a_minotaur.cpp
	src/g_shared/a_bridge.cpp
	src/g_shared/a_pickups.cpp
	src/g_shared/a_randomspawner.cpp
	src/g_strife/a_alienspectres.cpp
	src/g_strife/a_crusader.cpp
	src/g_strife/a_entityboss.cpp
	src/g_strife/a_inquisitor.cpp
	src/g_strife/a_loremaster.cpp
	src/g_strife/a_programmer.cpp
	src/g_strife/a_sentinel.cpp
	src/g_strife/a_spectral.cpp
	src/g_strife/a_strifestuff.cpp
	src/g_strife/a_strifeweapons.cpp
	src/g_strife/a_thingstoblowup.cpp
	src/p_local.h
	src/r_utility.cpp
2016-01-19 13:43:11 +01:00
Christoph Oelckers 9f78bcd1e6 - Strife game code refactored for coordinates. 2016-01-19 11:50:07 +01:00
Christoph Oelckers 2326928ff7 - the last bits of Hexen refactored
This also fixes a problem with some of Hexen's Wraith's effects which did some repositioning without properly linking them into the blockmap.
2016-01-19 01:10:57 +01:00
Christoph Oelckers c1b44a5694 - let's make some use of AActor::Pos and get rid of some of those X() and Y() calls...
- restore proper actor.h file.
2016-01-18 21:01:52 +01:00
Christoph Oelckers 460751653d - refactored most of Heretic's game code. 2016-01-18 20:13:20 +01:00
Christoph Oelckers 57ab1387f2 - yet more refactoring.
Note about A_SkelMissile: The direct change of the missile's position was changed to use SetOrigin. If this is later supposed to be portal-aware, such direct coordinate changes are a no-go to ensure that everything is properly maintained.
2016-01-18 18:52:24 +01:00
Christoph Oelckers 2b5e5b6bc3 - next round of refactoring.
This contains some advance work for handling line-to-line portals in A_PainShootSkull.
This function is special because it performs a map check itself instead of using one of the common functions from p_map.cpp, like most of the rest of the game code.
2016-01-18 16:49:24 +01:00
Christoph Oelckers b63eb391f7 - refactored two mire files.
- fixed: FraggleScript's SetObjPosition function did not properly set the moved actor's properties. Better use SetOrigin for changing the position.
2016-01-18 12:37:39 +01:00
Christoph Oelckers 43314f0c0d - started refactoring p_map.cpp
- added AActor::Top function to replace the frequent occurences of actor->z + actor->height.
2016-01-18 00:59:16 +01:00
Christoph Oelckers b735138332 - forgot the changes to actor.h. 2016-01-17 22:56:16 +01:00
Christoph Oelckers bf747075e8 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/g_hexen/a_clericstaff.cpp
	src/p_enemy.cpp
	src/p_interaction.cpp
	src/p_local.h
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
2016-01-17 20:57:55 +01:00
Christoph Oelckers fbaab5044d Merge commit '38df0665e3a2018cf1d0028a36357df6c7e908e9' into scripting
Conflicts:
	src/d_dehacked.cpp
	src/decallib.cpp
	src/g_hexen/a_clericstaff.cpp
	src/p_interaction.cpp
	src/p_local.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
	wadsrc/static/actors/shared/inventory.txt
2016-01-17 19:50:34 +01:00
Christoph Oelckers c611456397 - more refactoring of AActor coordinate access. 2016-01-17 18:36:14 +01:00
Christoph Oelckers 5b610390e1 - some more inline functions. 2016-01-17 16:49:15 +01:00
Christoph Oelckers bf5ee5e542 - added X(), Y(), Z() access functions to AActor.
This commit is just preparation for upcoming changes to completely encapsulate the coordinate info in AActor because I'm going to have to work with an altered version of actor.h that cannot be committed without breaking the engine.
With this file present in the repo before work is started the changes can be committed piece by piece.
2016-01-17 12:23:49 +01:00
Christoph Oelckers 2c0f64cf9f - refactoring of R_PointToAngle2 when used to calculate direction between two actors. 2016-01-10 20:46:26 +01:00
Christoph Oelckers 1e2ce9a622 - some refactoring of P_AproxDistance calls into newly defined AActor method AproxDistance.
The main reason here is to reduce the number of instances where AActor::x and AActor::y are being referenced.
2016-01-10 17:52:41 +01:00
Christoph Oelckers 71c7f2b42c - added 'floorterrain' and 'ceilingterrain' sector properties for UDMF. These will take precedence over texture based terrain if used.
'ceilingterrain' is needed because the top of 3D-floors refers to the model sector's ceiling, so in order to give a 3D floor a terrain it must be assignable to the sector's ceiling.
Note that although it is basically the same property, its actual function bears no relevance to its use in Eternity.
2016-01-09 12:10:36 +01:00
MajorCooke 75100d76fb - Added Threshold Manipulation.
- Added 'threshold' and 'defthreshold' to DECORATE expression exposure.
- ChaseThreshold sets the default threshold for how long a monster must chase one target before it can switch targets. Default is 100, must not be negative.
- A_SetChaseThreshold can be used to alter the current or default threshold of an actor <pointer>.
- Changing current threshold has no effect on what the default will be once it hits 0 and something makes it infight with another.
2015-10-12 11:06:55 -05:00
MajorCooke 380b5c1eb7 - Added ICESHATTER flag.
- Any inflictor with this flag can break ice corpses
2015-10-11 09:10:33 -05:00
Christoph Oelckers 7ba577e1b0 Merge branch 'master' into scripting
Conflicts:
	src/g_heretic/a_hereticweaps.cpp
	src/thingdef/thingdef_codeptr.cpp
2015-06-07 09:43:54 +02:00
MajorCooke 22570e079e * Added LAXTELEFRAGDMG. This flag forces all damage to be factored, regardless being above or below the telefrag threshold.
- This only affects damage calculations being received by the end result. If the original damage was not a million or more, from the start, it will not hurt invulnerable-flagged or kill buddha-flagged monsters.
- Fixed: Damage was inconsistent by the time the function checked for player cheats/invulnerability and (monster and player) buddha, yet monster invulnerability checked the original damage prior to factor processing. This means a damage source that intended to damage another below the threshold could accidentally increase with a powerdamage multiplier or the recipient with a weakness for it, resulting in invulnerability/buddha foiling. Now, checks for telefrag damage using the raw original value on player godmode, player/monster invulnerability and buddha.
2015-06-02 12:10:45 -05:00
Edoardo Prezioso 4546df7dc3 - Fixed SetActorPitch and ChangeActorPitch issue.
The code did not take into account the player's limited pitch.
2015-05-28 00:41:07 +02:00
Christoph Oelckers 5f1c4d157c Merge branch 'master' into scripting
Conflicts:
	src/g_shared/a_sharedglobal.h
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_data.cpp
2015-04-30 12:30:36 +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
Christoph Oelckers 9880af1b0c - this line got lost during conflict resolution. 2015-04-30 09:18:13 +02:00
Christoph Oelckers 405fc31e81 Merge branch 'master' of https://github.com/DaZombieKiller/zdoom
Conflicts:
	src/actor.h
2015-04-30 09:14:31 +02:00
Christoph Oelckers 646c135eff Merge branch 'master' into scripting
Conflicts:
	src/m_cheat.cpp
	src/p_acs.cpp
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_properties.cpp
2015-04-28 23:04:10 +02:00
Edoardo Prezioso b51fac344d Little TakeInventory refactoring.
Introduce AActor::TakeInventory, which unifies DoTakeInv from ACS and DoTakeInventory from Decorate, and AInventory::DepleteOrDestroy, which is extracted from the DoTakeInv core function, and use both where they're needed.
I don't know if the differences between DoTakeInv and DoTakeInventory were intentional, so I kept both behaviors.
2015-04-28 15:45:11 +02:00
Christoph Oelckers 065c0a79cd Merge commit '4f7ec3ad891d556c0d3f680e209a120ed38e9cdb' into scripting
Conflicts:
	src/d_main.cpp
	src/info.cpp
	src/info.h
	src/p_acs.cpp
	src/p_interaction.cpp
	src/p_mobj.cpp
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_properties.cpp

(scripting branch update part 5)
2015-04-28 12:48:33 +02:00
Christoph Oelckers 792cad89b3 Merge commit '3849cb86231ce24131a86e9c29795a8cf3706a3d' into scripting
Conflicts:
	src/g_hexen/a_clericstaff.cpp
	src/g_hexen/a_hexenspecialdecs.cpp
	src/p_acs.cpp
	src/p_enemy.cpp
	src/p_interaction.cpp
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_expression.cpp

(Scripting branch update part 4)
2015-04-28 11:59:33 +02:00
Christoph Oelckers d6e3fc0567 Merge commit 'fb9231a38db2025eb77bfd246f36d985cbbccd2e' into scripting
Conflicts:
	src/info.cpp
	src/thingdef/thingdef_expression.cpp
	wadsrc/static/actors/constants.txt

(Scripting branch update part 2)
2015-04-28 09:57:01 +02:00
Teemu Piippo ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Randy Heit d37f9cbcae Add flies (doomed #112) from the Hexen retail beta
...because it brought back memories of adding Strife support.
- The search function is radically different, but the flying mechanics are
  the same.
2015-04-02 17:52:54 -05:00
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
Randy Heit 775e33ede7 Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/g_doom/a_archvile.cpp
	src/g_shared/a_morph.cpp
	src/p_enemy.h
	src/p_local.h
	src/p_mobj.cpp
	src/sc_man_tokens.h
	src/thingdef/thingdef_codeptr.cpp
	src/thingdef/thingdef_exp.h
	src/thingdef/thingdef_expression.cpp
	src/thingdef/thingdef_states.cpp
	wadsrc/static/actors/actor.txt
2015-01-29 20:53:08 -06:00
Benjamin Moir 6dff8da503 Added +NODECAL and +FORCEDECAL actor flags
Added FHF_NOIMPACTDECAL for LineAttack
2015-01-20 12:05:00 +10:30
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
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 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 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 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
Randy Heit 4deeb8d8ae Merge branch 'master' into scripting
Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/p_local.h
	src/p_map.cpp
	src/sdl/i_main.cpp
	src/thingdef/thingdef_codeptr.cpp
2013-06-25 19:28:25 -05: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 459ad5abff - Updated scripting branch to latest version in trunk.
SVN r4337 (scripting)
2013-06-07 03:31:30 +00: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 6e88529324 - Added a RETI instruction for returning 15-bit signed immediate values.
- Changed Actor's Damage property into an actual function. All access to the damage property
  must now be done through GetMissileDamage. actor->GetMissileDamage(0, 1) is equivalent
  to the former actor->Damage, for the case where actor->Damage was not an expression. (I
  suppose I will probably need to make a thunk for DECORATE expressions that want to read it.)
- Cleaned up some decorate expression evaluation functions that are no longer used.

SVN r3919 (scripting)
2012-10-28 04:36:52 +00:00
Randy Heit 38d7b7d203 - Fixed errors and warnings when compiling with GCC. (Unfortunately, the VC++ debug builds
become ungodly slow when using mods with complex DECORATE. The GCC debug builds run just
  fine, however. Hopefully this is something that can be fixed later with an assembly-optimized
  version of the main VM loop, because I don't relish the thought of being stuck with GDB
  for debugging.)
- Fixed: The ACS_Named* action specials were erroneously defined as taking strings instead of
  names.
- Fixed: Copy-paste error caused FxMultiNameState::Emit to generate code that called
  DecoNameToClass instead of DecoFindMultiNameState.
- Updated FxActionSpecialCall::Emit for named script specials.
- Fixed inverted asserts for FxMinusSign::Emit and FxUnaryNotBitwise::Emit.


SVN r3893 (scripting)
2012-10-18 03:19:27 +00:00
Randy Heit e7efa1d802 - Update to latest version in trunk.
SVN r3890 (scripting)
2012-10-17 04:24:54 +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 fcceeb814a - Changed state calls to use the VM's standard return value mechanism. StateCallData has been
removed as a result, so now action functions take a minimum of three parameters rather than four.

SVN r3770 (scripting)
2012-07-17 05:31:41 +00:00
Randy Heit 562cf04db2 - Update scripting branch to trunk.
SVN r3758 (scripting)
2012-07-14 03:04:41 +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
Christoph Oelckers e4880d162f - added Xaser's submission for accessing accuracy and stamina from DECORATE and ACS.
- added DECORATE properties for accuracy and stamina.
- Since these changes move properties from player_t to AActor all savegame compatibility code was removed and the min. savegame version bumped.


SVN r3427 (trunk)
2012-03-11 09:08:35 +00:00
Braden Obrzut faa122ede3 - Adjust VisibleToPlayerClass to accept multiple classes as well as work with inheritance.
SVN r3291 (trunk)
2011-09-10 04:24:40 +00:00
Braden Obrzut c013e72caa - Backported VisibleToTeam and VisibleToPlayerClass from Skulltag with some modifications.
SVN r3290 (trunk)
2011-09-08 01:28:26 +00:00
Christoph Oelckers 5c6fd66ed5 - rename src/resources to src/r_data.
SVN r3254 (trunk)
2011-07-06 07:35:36 +00:00
Christoph Oelckers 5bf6398d85 - moved render style and border drawing code out of r_draw.cpp.
SVN r3251 (trunk)
2011-07-05 20:41:53 +00:00
Christoph Oelckers 4d7fcbf1b8 - added Major Cooke's Death/Paintype submission.
SVN r3237 (trunk)
2011-06-13 17:15:09 +00:00
Christoph Oelckers e4455c293f - added DavidPH's DOHARMSPECIES submission.
SVN r3236 (trunk)
2011-06-13 10:43:07 +00:00
Christoph Oelckers 44921297d3 - added DavidPH's PoisonDamageType submission.
SVN r3235 (trunk)
2011-06-13 10:39:14 +00:00
Christoph Oelckers ab60afd0b8 - added DavifPH's fix for poisoning invulnerable players.
SVN r3231 (trunk)
2011-06-13 10:25:03 +00:00
Christoph Oelckers 5d65ab6e6c - cleaned up setPointer interface.
- ZDoom part of setPointer/setActivator, submitted by FDARI.


SVN r3230 (trunk)
2011-06-13 10:22:47 +00:00
Christoph Oelckers 61dfb608f4 - added DavidPH's ProjectileKickback submission.
SVN r3228 (trunk)
2011-06-13 09:16:57 +00:00
Christoph Oelckers 2e4e5bdb28 - added DavidPH's damage type specific damage color submission.
SVN r3220 (trunk)
2011-06-06 22:23:43 +00:00
Christoph Oelckers 6053627c5c - added DONTCORPSE submission.
SVN r3216 (trunk)
2011-05-26 23:27:58 +00:00
Christoph Oelckers 3277b508cd - added SEEINVISIBLE submission.
SVN r3215 (trunk)
2011-05-26 23:25:02 +00:00
Christoph Oelckers 820554d636 - added FDARI's pointer operation submission.
SVN r3167 (trunk)
2011-03-18 08:02:23 +00:00
Christoph Oelckers 07eed2f2be - added Gez's fix for timing of the boss cube while a time freezer is active.
SVN r3118 (trunk)
2011-01-23 08:33:30 +00:00
Braden Obrzut d9d94d04ba - Added DesingatedTeam property from Skulltag. Allows friendly fire calculations to be applied to monsters/objects and allows the friendly AI to be aware of teams.
SVN r3113 (trunk)
2011-01-22 03:35:33 +00:00
Christoph Oelckers 789c937635 - use FSharedStringArena to handle AActor's tag strings properly. They were names before which are not case sensitive and could cause problems.
- fixed FSharedStringArena::FreeAll did not NULL TopBlock.
- bumped savegame version for above changes.


SVN r3100 (trunk)
2011-01-12 00:17:13 +00:00
Christoph Oelckers f0f17e531c - move static AM color initialization into the AM_StaticInit function.
- move D_LoadWadSettings to keysections.cpp.
- made some more data reloadable.
- data structures filled by P_SetupLevel should be cleared before loading the level. They can remain non-empty in case of an error. There's probably more to fix here...
- fixed: MidiDevices and MusicAliases were not cleared before reloading local SNDINFOs.
- fixed signed/unsigned warnings in AddSwitchPair for real (GCC really allows -1u? MSVC prints a warning for that.)


SVN r3036 (trunk)
2010-12-14 00:50:02 +00:00
Christoph Oelckers 74525ab1d6 - moved some info into the GAMEINFO section:
* the sprite used for 'pause'.
 * the factor with which a monster's health is multiplied to decide if it's supposed to be gibbed,
 * the decision to make monsters run faster in nightmare mode.
- moved the hard coded lock messages for lock types 102 and 103 into the language lump.
- fixed: Raven's fast monsters could become slower in Nightmare if they had very short walking states.


SVN r2834 (trunk)
2010-09-19 10:39:34 +00:00
Christoph Oelckers 9a8a446840 - added player class definition through the GAMEINFO section in MAPINFO. Also added a NOMENU flag that can be set for a player class. This means that the use of KEYCONF is now deprecated except for its original purpose: To define mod specific key binding options.
SVN r2832 (trunk)
2010-09-19 08:27:20 +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
Randy Heit 99670b708c - Sync scripting branch with what was in trunk on Sunday. I believe that would be revision 2739.
SVN r2790 (scripting)
2010-09-16 03:14:32 +00:00
Christoph Oelckers 9a4abe0915 - merged automap branch into trunk.
SVN r2609 (trunk)
2010-08-27 15:20:05 +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 96a8f1ceee - fixed: The SaveVersion check for the USDF related changes for the current dialogue did not have the correct version number.
- fixed: All blood spawning functions checked the ALLOWPARTICLES flag on the class defaults before actor replacement instead of after.


SVN r2563 (trunk)
2010-08-21 19:50:07 +00:00
Christoph Oelckers b452bec0ee - merge USDF branch into trunk.
- add USDF spexs.


SVN r2561 (trunk)
2010-08-20 12:20:51 +00:00
Christoph Oelckers f430881a54 - Added DavidPH's Poison damage extension but changed it so that the metadata can be removed.
SVN r2450 (trunk)
2010-07-23 21:36:17 +00:00
Christoph Oelckers b8db84b6bc - added a new dmflag to allow killing all monsters spawned by a boss brain's cubes after killing the brain (for those who like clean level statistics.)
SVN r2385 (trunk)
2010-06-20 17:57:32 +00:00
Christoph Oelckers b2cef54d72 - fixed: Classes inherited from PowerScanner didn't work anymore.
SVN r2368 (trunk)
2010-06-13 10:11:50 +00:00
Christoph Oelckers eadc539bc6 - fixed: Poison clouds spawned by the PoisonShroom should not be pushable by the Disc of Repulsion.
SVN r2350 (trunk)
2010-05-30 20:12:32 +00:00
Randy Heit 178587fff2 - Merged SetState and SetStateNF into a single function.
- Added new sprite #### and frame character # to specify the behavior of sprite ---- on a
  per-sprite and per-frame basis respectively.

SVN r2291 (trunk)
2010-04-19 02:46:50 +00:00
Randy Heit 42ac75e894 - Sync scriptbranch with trunk.
SVN r2269 (scripting)
2010-04-04 04:09:24 +00:00
Randy Heit 19f5b1dea1 - Removed the RUNTIME_TYPE macro. I just included it because MFC has one, but it's pretty
pointless here.

SVN r2267 (scripting)
2010-04-04 02:58:58 +00:00
Randy Heit 06995e26d9 - Be stricter about types accepted by spawning functions.
SVN r2265 (scripting)
2010-04-03 04:07:17 +00:00
Christoph Oelckers 0529ffa043 - fixed: P_SpawnMapThing always reduced the angular precision to 45 degrees.
- removed AngleIncrements because it's not really useful.


SVN r2246 (trunk)
2010-03-26 16:57:00 +00:00
Randy Heit 604b5ef673 - Removed the old meta data system. All meta data is now stored in subclasses of PClass. This
should simplify scripting, since it means that meta fields can be treated (mostly) the same as
  normal fields.

SVN r2242 (scripting)
2010-03-25 20:38:00 +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 a2cfbec3cf - added a CrushPainSound actor property for Strife.
- fixed memory leaks in SBARINFO and WAD loading code.
- added GetBloodColor and GetBloodType inline functions to AActor to wrap the GetMeta calls used for this.


SVN r2234 (trunk)
2010-03-21 08:09:45 +00:00
Christoph Oelckers 0246f2bf4d - fixed: Being resurrected by an Arch Vile did not restore flags5 and flags6 to the defaults.
SVN r2142 (trunk)
2010-01-30 13:08:52 +00:00
Randy Heit 6ba548511b - Fixed: Macil2 and the Oracle need to be immune to SpectralLightningV2 as well as V1, since
they are both created by the first-stage Sigil. AlienSpectre3 should have also been
  immune to them but was not. In addition, Macil1 was erroneously immune to V1, when he should
  not be immune to any spectral damage. (Though, since he's immortal, all that really amounts to
  is that he can enter his pain state.)

SVN r2106 (trunk)
2010-01-08 03:24:22 +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