Commit Graph

255 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
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 ef7be016c4 - all those 'actor->SetZ(actor->Z() +...) calls weren't pretty so now there's an AddZ method, too. 2016-01-18 22:32:36 +01:00
Christoph Oelckers ca5ac72364 - added missing FIXED2DBL call in A_Face. 2016-01-18 21:17:11 +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 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 a65ff39872 - more coordinate refactoring in p_enemy.cpp. 2016-01-17 22:13:17 +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 3e446ea04d - replaced access to AActor's coordinate members with access functions
(first 200 compile errors down...)
2016-01-17 13:48:16 +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
MajorCooke bfd9e2bc1c - Added CHF_STOPIFBLOCKED and CHF_DONTTURN macro.
- CHF_STOPIFBLOCKED simply prevents the actor from changing directions for movement.
- CHF_DONTTURN implies NORANDOMTURN, NOPOSTATTACKTURN and STOPIFBLOCKED.
2016-01-07 19:20:02 -06:00
MajorCooke da9c3ff9d2 Added A_Wander Flags.
- WF_NORANDOMTURN and WF_DONTANGLE do the same as their CHF_ counterparts for A_Wander.
2016-01-07 17:38:45 -06:00
MajorCooke f357a36c5c - New A_Chase flags.
- CHF_NORANDOMTURN: Actor will not randomly turn during chasing to pursue its target. It will only turn if it cannot keep moving forward.
- CHF_DONTANGLE: Actor does not adjust its angle to match the movement direction.
- CHF_NOPOSTATTACKTURN: Actor will not make its first turn after exiting its attacks.
2016-01-07 17:38:25 -06:00
Christoph Oelckers d8ea128f38 Merge branch 'master' into scripting
Conflicts:
	src/p_effect.cpp
	src/p_effect.h
	src/p_local.h
	src/p_map.cpp
	src/thingdef/thingdef_codeptr.cpp
2015-07-16 20:37:17 +02:00
Edward Richardson 2a69ae2a43 Change all float calcs in rails to doubles 2015-06-25 13:57:36 +12: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
Christoph Oelckers 4444d3c0c5 - removed the _3DFLOOR #define because we really do not want to comment this out anymore, right? 2015-06-07 09:41:44 +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 e42b688afa - finally found the reason why the garbage collector went haywire after a restart: PClass::StaticShutdown set the PClass::bShutdown variable which disables much of the garbage collector. This needs to be cleared after successful cleanup. Restart works now, except for some random CCMDs being executed right afterward.
- fixed incorrect variable init in A_Face* functions which was missed before.
2015-04-28 23:37:04 +02:00
Christoph Oelckers 0f8972c96b - don't delete any DObjects
FraggleScript's global_script was deleted instead of destroyed.
2015-04-28 21:30:12 +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
Christoph Oelckers 56989d3422 Merge commit 'ec5817869592660af6837b9f4e20ed140972a2b2' into scripting
Conflicts:
	src/p_enemy.cpp
	src/p_enemy.h
	wadsrc/static/actors/constants.txt

(Scripting branch update part 1)
2015-04-28 09:34:51 +02:00
Teemu Piippo ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Christoph Oelckers 25e5ac7e2a - fixed: CheckForResurrection should check whether the active translation is actually a blood translation before resetting it, not assuming that GenericCrush is a single state with infinite duration. 2015-03-27 18:29:57 +01:00
Randy Heit 32a55c9229 Revert "- Fixed: A_Die didn't consider missiles for the function."
This reverts commit 5977cb04d9.

- It breaks at least one mod (Complex Doom) and who knows how many others.
  Considering how long A_Die has been around, a random "fix" like this is
  probably not a good idea. [P.S. Missiles have health and can be damaged
  by P_DamageMob, so it's not like it never did anything on missiles.]
2015-03-26 20:57:12 -05:00
Randy Heit d84c85d40f Remove warnings warned by Clang 2015-03-08 17:21:15 -05:00
Christoph Oelckers 45117b2603 Merge branch 'codesanity' of https://github.com/ZzZombo/zdoom
Conflicts:
	src/info.h
2015-02-08 11:47:49 +01:00
ZzZombo c4b742ebf0 - Part 2 of the sanity crusade. 2015-02-08 17:03:49 +08:00
Christoph Oelckers 0688247ee1 Merge branch 'NewChaseDir-opt' of https://github.com/Edward850/zdoom 2015-02-08 09:06:53 +01:00
MajorCooke b37a98689a - Added SXF_TRANSFERSPRITEFRAME. Now it's possible to make starting frames that start with "####" "#" 0 in Spawn.
- Fixed a compile warning with FAF_NODISTFACTOR.
2015-02-07 10:04:33 -06:00
MajorCooke 53fd57d6b7 - Added ang_offset and pitch_offset to A_Face, along with 4 new flags:
- ang_offset: the extra angle to apply to the actor after calculating the maximum turn.
- pitch_offset: Just like ang_offset, with pitch instead.
- FAF_BOTTOM: Aim straight for the actor's z coordinate, not with +32 units.
- FAF_MIDDLE: Aims for the direct middle of the actor.
- FAF_TOP: Aims for the very top of the actor.
- FAF_NODISTFACTOR: Use the raw pitch offset without calculating it into the distance of the aimed actor.
2015-01-30 16:48:24 -06:00
Edward Richardson 455e6cd214 Improved NewChaseDir performance by cutting repeats 2015-01-19 23:57:15 +13: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 5977cb04d9 - Fixed: A_Die didn't consider missiles for the function. 2014-10-29 12:33:25 -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
Christoph Oelckers 6f7b83faa1 - fixed: EV_DoFloor was a bit too selective about which movement types were allowed to crush. Changed so that the crush parameter is always used. Also changed all non-crushing calls to explicitly pass -1 as crush damage instead of relying on EV_DoFloor to ignore the passed value. 2014-10-24 23:12:38 +02:00
Christoph Oelckers f0e9fde336 - fixed: In Raven games, don't chase after monsters in the titlemap or when actor has a goal. 2014-09-13 10:40:56 +02:00
Christoph Oelckers fcbb72a4d4 - removed redundant variable. 2014-05-06 09:59:56 +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 584dd78ba9 Merge branch 'master' of https://github.com/Edward850/zdoom 2014-04-16 16:42:43 +02:00
Edward Richardson 897d87a6a3 Invisibility would could P_LookForPlayers early 2014-04-17 01:13:18 +12:00
Edward Richardson d855bd66b3 Fixed P_LookForPlayers scanning redundancies
- Players could be scanned multiple times, repeating expensive tests
- Players could be skipped completely and become invisible as a result
2014-04-17 00:46:33 +12:00
Christoph Oelckers 4e683d360d Merge branch 'master' of https://github.com/Edward850/zdoom 2014-04-15 09:22:50 +02:00
Edward Richardson 4270838613 CANRAISE state definition
CANRAISE state for allowing a monster to be resurrected without an
infinite frame
2014-04-12 22:02:19 +12:00
Gaerzi 4cac599b88 Less flags, more generic properties 2014-04-11 00:58:59 +02:00
Randy Heit fc843c28ba Merge branch 'maint' 2013-09-18 22:06:31 -05:00
Randy Heit ad7aefff20 - Fixed: Do not apply AVOIDMELEE logic when moving toward a goal 2013-09-18 21:52:29 -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 116defbb35 - fixed: LookForEnemiesInBlock needs to check for MF7_NEVERTARGET. 2013-08-18 09:11:40 +02:00
Christoph Oelckers aa03609b69 - added IF_TOSSED inventory flag. 2013-08-12 21:00:23 +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 5b74e1acba - Fixed: A_Face() should use other instead of self->target when calculating pitch.
SVN r4267 (trunk)
2013-05-17 00:49:45 +00:00
Randy Heit d86b16d540 - Added a DropAmmoFactor field to WeaponGiver so that ModifyDropAmount() can record the drop
amount modifier into it without fiddling with the actual AmmoGiveX fields.

SVN r4246 (trunk)
2013-05-02 00:24:53 +00:00
Randy Heit ecdde24bda - Fixed: WeaponGiver did not give half ammo when dropped.
SVN r4238 (trunk)
2013-04-30 03:07:39 +00:00
Randy Heit cbe11657f0 - Fixed: A_Face should take into account the target's height when aiming pitch.
SVN r4214 (trunk)
2013-04-10 00:13:55 +00:00
Randy Heit 4fe9b6112a - Fixed: The change in r3951 knew nothing about 3D floors.
SVN r4152 (trunk)
2013-02-20 02:26:36 +00:00
Randy Heit 11862ac06b - Sync A_LookEx with A_Look, with regards to COMPATF_SOUNDTARGET.
SVN r4036 (trunk)
2013-01-23 04:04:21 +00:00
Braden Obrzut 3e1aa40461 - Fixed: If AInventory::SpecialDropAction returns true the item should be destroyed.
- Fixed: Building with SSE disabled triggered an error.

SVN r4028 (trunk)
2013-01-17 19:42:52 +00:00
Randy Heit 4f811b89e5 - Remove testing bit inadvertently left in for r3951.
SVN r3953 (trunk)
2012-11-09 17:18:47 +00:00
Randy Heit 181cfd80b2 - Fixed: Monsters stepping down in A_Chase() should trigger SECSPAC_HitFloor actions.
SVN r3951 (trunk)
2012-11-09 05:14:47 +00:00
Randy Heit e7efa1d802 - Update to latest version in trunk.
SVN r3890 (scripting)
2012-10-17 04:24:54 +00:00
Randy Heit 6a91335841 - Turned A_Explode's affectsource parameter into a flags parameter and added XF_NOTMISSILE
and RTF_NOTMISSILE so that you can use A_Explode and A_RadiusThrust with non-missiles without
  them telling P_RadiusAttack() that the target is the source.

SVN r3860 (trunk)
2012-08-30 04:01:50 +00:00
Randy Heit 23c950ba98 - Fix typo: MF6_SEEINVISIBLE is in flags6, not flags.
SVN r3777 (trunk)
2012-07-21 02:33:08 +00:00
Randy Heit 562cf04db2 - Update scripting branch to trunk.
SVN r3758 (scripting)
2012-07-14 03:04:41 +00:00
Christoph Oelckers 6d993b8c04 - re-fix of r3655: 180° in angle_t needs to be specified as ANGLE_180.
SVN r3656 (trunk)
2012-05-15 22:33:08 +00:00
Randy Heit 0fae305224 - Fixed: A_LookEx did not default to a 180 degree cone.
SVN r3655 (trunk)
2012-05-15 22:05:14 +00:00
Randy Heit 393b2177a9 - Fixed: When P_ZMovement() handled MF_FLOAT, it reset the actor's z velocity to 0. I'd like to
know why that was in there, but I have no idea. It was like this for the entire life of the
  repository, so I can't find anything from that. And since MF_FLOAT is typically also applied to
  monsters with MF_NOGRAVITY, the z velocity should already be 0, so it's a change that makes
  little sense.

SVN r3645 (trunk)
2012-05-13 00:27:51 +00:00
Christoph Oelckers 40c906f10d - fixed new A_Facetarget pitch code which made some incorrect assumptions about variables' signedness.
- fixed a few compiler warnings.


SVN r3535 (trunk)
2012-04-07 20:44:28 +00:00
Christoph Oelckers 3aa759714a - added DavidPH's A_FaceTarget with pitch submission.
SVN r3528 (trunk)
2012-04-07 12:48:56 +00:00
Randy Heit 49aaf9b451 - Added A_ClearLastHeard action function.
SVN r3464 (trunk)
2012-03-22 21:40:26 +00:00
Christoph Oelckers 6ba0689b8d - added DavidPH's A_AlertMonsters range submission.
SVN r3233 (trunk)
2011-06-13 10:30:30 +00:00
Christoph Oelckers 3277b508cd - added SEEINVISIBLE submission.
SVN r3215 (trunk)
2011-05-26 23:25:02 +00:00
Christoph Oelckers b8f4592ad5 - added A_FaceTracer/A_FaceMaster submission.
SVN r3161 (trunk)
2011-03-06 14:21:44 +00:00
Christoph Oelckers 1ea5cc8bd8 - added a function to execute action specials and changed all calls to use this function. This was done to make it easier to check such calls.
SVN r3152 (trunk)
2011-02-13 10:18:28 +00:00
Christoph Oelckers fae8ed444c - merged 3dfloors2 branch into trunk.
SVN r3124 (trunk)
2011-01-29 11:09:38 +00:00
Christoph Oelckers c22ce824a5 - fixed some incorrect P_CHeckSight flag use in p_enemy.cpp.
SVN r3115 (trunk)
2011-01-23 00:22:08 +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 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
Randy Heit eb031d73e7 - Change the time when walking monsters step down steps to just after the step rather than just before.
This allows for thrusting walking monsters vertically without them suddenly warping to the ground.



SVN r2819 (trunk)
2010-09-18 02:55:08 +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
Randy Heit a2573e4bb3 - Fixes to compile with GCC 4.5.0.
SVN r2660 (trunk)
2010-09-01 03:30:18 +00:00
Christoph Oelckers cbff41f481 - assws PinkSilver's LOF_NOJUMP submission for A_LookEx.
SVN r2626 (trunk)
2010-08-28 20:22:35 +00:00
Christoph Oelckers 096edb0817 - move vid_listadapters CCMD into common code.
SVN r2509 (trunk)
2010-08-11 06:31:47 +00:00
Randy Heit 3416a7fc47 - Fix compilation with MinGW + w32api and clean up warnings.
SVN r2505 (trunk)
2010-08-11 03:56:31 +00:00
Christoph Oelckers 545a892faa - added Firebrand's patch to rename 'swap' due to naming conflicts in newer MSVC compilers.
SVN r2449 (trunk)
2010-07-23 21:19:59 +00:00
Christoph Oelckers 862d6551bc - fixed: Heretic's 666 lower floor must be of type LowerToHighest unlike Doom which is LowerToLowest.
SVN r2342 (trunk)
2010-05-28 21:29:28 +00:00
Christoph Oelckers 942108f7ea - added DavidPH's A_FaceTarget patch but modified it so that if a turn angle is set the MF_SHADOW flag is ignored.
SVN r2316 (trunk)
2010-05-12 07:02:23 +00:00
Christoph Oelckers 674c63d66c - fixed: A_KeenDie should not drop items.
SVN r2300 (trunk)
2010-04-23 08:12:47 +00:00
Randy Heit 42ac75e894 - Sync scriptbranch with trunk.
SVN r2269 (scripting)
2010-04-04 04:09:24 +00:00
Randy Heit d53fdb418b - Fixed: P_LookForMonsters() had not been updated for the new species check.
SVN r2268 (trunk)
2010-04-04 03:03:01 +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 1436f0a4fa - Fixed: It was no longer possible to talk to non-shootable NPCs. Also took
the opportunity to merge the various boolean parameters to P_AimLineAttack into one flag parameter.



SVN r2254 (trunk)
2010-03-28 10:51:35 +00:00
Christoph Oelckers a357a70f82 - fixed: Explosions directly under a water surface would not hurt any actor directly above this surface.
- cleaned up P_CheckSight flag handling.


SVN r2249 (trunk)
2010-03-27 07:42:31 +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