Commit graph

137 commits

Author SHA1 Message Date
MajorCooke
3399ed60e0 Updated to scripting branch merge. 2016-02-04 20:17:46 -06:00
Randy Heit
b3b0886b64 Merge branch 'scripting'
Conflicts:
	src/actor.h
	src/g_doom/a_doomweaps.cpp
	src/g_hexen/a_blastradius.cpp
	src/p_enemy.cpp
	src/p_enemy.h
	src/thingdef/thingdef.h
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
2016-02-04 15:17:22 -06:00
MajorCooke
eb2829ad5e - Added CBF_DROPOFF to A_CheckBlock. Checks for actors stuck in tall ledges or dropoffs. 2016-01-31 09:45:41 -06:00
MajorCooke
275cdcd958 Renamed A_FaceVelocity to A_FaceMovementDirection. 2016-01-27 10:12:13 -06:00
MajorCooke
6dcbc930d6 NoRandomTurn, not NoDirectionTurn, inside the macro. 2016-01-27 09:39:46 -06:00
MajorCooke
ece6fa776c - Renamed CHF_DONTANGLE to CHF_NODIRECTIONTURN.
- A_Wander now shares CHF_NODIRECTIONTURN and CHF_NORANDOMTURN instead of having its own flags.
2016-01-27 09:35:19 -06:00
Christoph Oelckers
2a1fa60aa6 Merge branch 'CheckProxExpPruned' of https://github.com/MajorCooke/zdoom 2016-01-26 18:49:03 +01:00
MajorCooke
1c0ef1d367 Removed CPXF_NODISTANCE. 2016-01-26 10:00:20 -06:00
Randy Heit
c63f65d441 Merge remote-tracking branch 'origin/master' into scripting
Conflicts:
	src/thingdef/thingdef_codeptr.cpp
	wadsrc/static/actors/constants.txt
2016-01-22 20:53:27 -06:00
MajorCooke
13dc6be5a1 - Added flags for A_SpawnParticle and angle parameter.
- SPF_FULLBRIGHT makes the particle full bright.
- SPF_RELATIVE encapsulates the following flags:
- SPF_RELPOS: Position is relative to angle.
- SPF_RELVEL: Velocity is relative to angle.
- SPF_RELACCEL: Acceleration is relative to angle.
- SPF_RELANG: Add caller's angle to angle parameter for relativity.
2016-01-21 16:36:58 -06:00
Randy Heit
1ac0d0690c Re-remove testglobalvar from constants.txt so scripting branch runs again 2016-01-21 12:46:12 -06:00
MajorCooke
9638cbb844 Updated A_CheckProximity Expansion Pruned Edition. 2016-01-21 11:39:13 -06:00
MajorCooke
93aff2413f Fixed an issue which caused A_Teleport to set the caller and itself to SpotZ's z position. 2016-01-20 18:18:00 -06:00
MajorCooke
d20a7516c9 Updated A_FaceVelocity to remove conflicts. 2016-01-20 15:51:11 -06: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
MajorCooke
ccc694bbcd - Added the following flags, all affixed with CPXF_:
- NODISTANCE: Disables distance checking.
- CHECKSIGHT: The qualifying actor must be in sight in order to count.
- SET<TARGET/MASTER/TRACER>: Gets the first qualifying actor and sets the calling actor's specified pointer to it.
- SETONPTR: If the function is being aimed at another actor other than the caller, sets that actor's pointers instead. Requires a SET* flag to work.
- FARTHEST: The actor farthest from the checking actor is set as the pointer. Requires a SET* flag to work.
- CLOSEST: The closest qualifying actor is set as the pointer. Requires a SET* flag to work.
2016-01-07 17:09:02 -06:00
Randy Heit
1d759283c0 Cleanup the zoom/reload/userX handling for A_WeaponReady
- There was lots of code duplication. Consolidated it.
- Renamed WRF_UserX to WRF_AllowUserX for consistancy.
2015-12-31 16:46:19 -06:00
Randy Heit
afbf88cc63 Remove WRF_ALLUSER. 2015-12-31 16:46:18 -06:00
MajorCooke
eed6680a67 Added support for weapon states User#.
- Added keybinds for the user state triggering.
- Added WRF_USER# flags which must be specified in order to use.
- # can be 1-4.
2015-12-31 16:46:16 -06:00
MajorCooke
452c82cbe2 - Added TF_SENSITIVEZ to A_Teleport. Fail teleportation instead of adjusting the actor to fit if they cannot.
- When checking whether to use spot z or floorz, use spot floorz instead of ref for consistency.
2015-12-17 10:34:38 -06:00
MajorCooke
4fb48b332b Added A_CheckProximity.
- Checks to see if a certain actor class, in numbers, is close to the actor/pointer via distance, based upon count. Can check for ancestry, disable Z searching, perform less than or equal to instead of greater or equal to, exact counts, check a pointer instead of itself and differentiate between live monsters and dead.
2015-11-28 10:53:34 -06:00
MajorCooke
a1e3112850 Removed FVF_RESETPITCH. 2015-11-25 23:15:59 -06:00
MajorCooke
75855dc64a A_FaceVelocity(offset, flags, ptr)
- Changes the caller's angle and pitch according to the direction of velocity they're travelling.
- FVF_NOPITCH and FVF_NOANGLE disable changing of pitch/angle respectively and should be counted as mutually exclusive, or the function does nothing.
- FVF_INTERPOLATE - Interpolate's the angle and pitch changes.
- FVF_RESETPITCH will, if there's no z velocity, reset the pitch to 0. Otherwise, the pitch remains unchanged.
2015-11-25 01:44:19 -06:00
Braden Obrzut
a8ac748123 Merge commit 'e2d874e343da34df6edfad0bb47370cbe10f4bae' 2015-10-25 15:00:43 -04:00
MajorCooke
154e023800 - Added A_CheckBlock(state block, int flags, int ptr).
- Performs a jump if an actor or a line is in the way.
- Can be used without a jump state if the desire is only to have a pointer change.
- CBF_NOLINES disables jumping if a line is involved.
- CBF_SET* flags set the target, master or tracer to whoever is blocking, for the actor calling the function.
- CBF_SETONPTR causes the pointer changing flags to apply to the pointed actor instead of itself.
2015-10-04 16:00:40 -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
Xaser Acheron
8948f5dc2b Added FPF_NOAUTOAIM to A_FireCustomMissile 2015-09-08 10:40:21 -05:00
MajorCooke
e7aa5c690a Minor oversight... 2015-08-10 06:48:24 -05:00
MajorCooke
fcf1d56b1a - Added SXF_IS<TARGET/MASTER/TRACER>.
- The spawned actor becomes the calling actor's specified pointers respectively.
2015-08-09 14:06:22 -05:00
Benjamin Moir
efce2a200c Added WARPF_USETID to A_Warp 2015-07-31 22:24:01 +09:30
MajorCooke
b4f05ee89b - Significant A_RadiusGive update.
- Added filter and species parameter.
- Added new flags: RGF_INCLUSIVE, RGF_ITEMS, RGF_KILLED, RGF_EXFILTER, RGF_EXSPECIES, and RGF_EITHER.
- RGF_ITEMS: Items can receive inventory.
- RGF_KILLED: Actors who are truly dead might not be corpses, and vice versa.
- RGF_EXFILTER: Blacklists the specified actor filter. All but the filtered actor can receive the item.
- RGF_EXSPECIES: Blacklists the specified species. All but the filtered species can receive the item.
- RGF_EITHER: The actor can receive the item if it satisfies either the filter or the species. Only useful when both are used.
- RGF_INCLUSIVE: An actor marked as more than one pointer to the calling actor can ignore the exclusion pointers, but only if at least one is missing. I.e. an actor who is a target and tracer of the calling actor can still receive the item, if the calling actor doesn't pass RGF_NOTARGET and NOTRACER at the same time. RGF_INCLUSIVE only works with the pointer filtering flags. By default, if not specified, the actor will not be loopholed the item if they are under any one of the three filters.
- Fixed discrepancies and dependencies upon several flags and actor conditions which caused the function to fail.
2015-07-22 16:46:14 -05:00
MajorCooke
dc00d61f4d - Added TF_OVERRIDE to A_Teleport.
- Overrides the NOTELEPORT flag so actors with velocity don't need to disable it in order to perform A_Teleport, which could be screwed up by a teleporting line or sudden ACS interference.
- Ensure that the result is set to false if it fails prematurely. Wasn't sure if this was needed, but with the upcoming if/else statements, better safe than sorry.
2015-05-01 08:32:07 -05:00
MajorCooke
087d564343 - Added MORPH_UNDOALWAYS for morph powerups. 2015-04-03 12:16:27 -05:00
Randy Heit
dca5f0e908 Added QF_SINE
- Squashed commit of the following:

commit bc45fe3263d34ef5f746f524687999c19bf7b779
Author: Randy Heit <rheit@users.noreply.github.com>
Date:   Sun Mar 1 18:51:05 2015 -0600

    wave scale -> wave speed

commit ff96388b128c724c1198757bfa52f1935a263356
Author: Randy Heit <rheit@users.noreply.github.com>
Date:   Sun Mar 1 18:45:32 2015 -0600

    More sine quake fixes

commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6
Merge: 719dfbe 5456074
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 20:37:22 2015 -0600

    Added QF_WAVE to A_QuakeEx.
    - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.)
    - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE.
    - Intensity X/Y/Z property becomes the amplitude of the wave.
    - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions.
    - Uses the youngest quake's time for positioning.

commit 54560741581e8d15cc7060e8e068cf85e9a4b432
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 20:21:19 2015 -0600

    Recommitted recommended changes by Randi, with some modifications. Now, we should be finished!

commit 6f4473013411686d88fc185bdc1cc58b1035b0f1
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 12:52:57 2015 -0600

    Finish this revert.

commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 12:46:02 2015 -0600

    Reverted back to what was working.

commit da9de56a67efda08036e481fd5fccd5392ce6810
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Thu Feb 26 18:53:20 2015 -0600

    Forgot this bit, for testing.

commit c5093d9bb97caf8478cefc32abc56a036feeea58
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Thu Feb 26 18:52:46 2015 -0600

    Some more progress, but...
    - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress.
    - Left in the commented code on purpose so Randi can test it.

commit 7e526405d2127cbb279f66008c8f8e55a5d497f3
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Wed Feb 25 17:50:42 2015 -0600

    - Use newest waveform timer, not oldest.

commit 1356443609dbc6c7f46e081d0846816dc0836124
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Wed Feb 25 17:32:09 2015 -0600

    - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too.

commit d95796c94c70cd0229d4a6d30f69e3a7568b9588
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Wed Feb 25 16:46:21 2015 -0600

    - Last hurdle. Now just need to figure out how to properly scale up and down.

commit 4bc3458e689155ce72c09776604d9eb4fa73d8be
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Tue Feb 24 23:18:03 2015 -0600

    - Fixed the quakes being unstackable.

commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Mon Feb 23 23:48:34 2015 -0600

    QF_WAVE renamed from SINE.
    - Lots of ground covered, but still more to go.
    - Still need to figure out how to make the camera properly shudder.

commit 427e4893193470bbf45415ffec70a0b69b8cccfd
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sun Feb 22 16:52:30 2015 -0600

    - Begin the groundworks for QF_SINE.
    - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-01 18:53:34 -06:00
MajorCooke
fb9231a38d - Added QF_FULLINTENSITY.
- When using both scaling flags, by default, the effect only reaches half peak going either way. This forces it to go all the way to the top (or bottom if using QF_MAX) before scaling back to its original height..
2015-02-20 11:06:41 -06:00
MajorCooke
140a650442 - Added QF_SCALEUP and QF_MAX.
- QF_SCALEUP behaves like QF_SCALEDOWN: it gradually scales the tremors, only going upwards.
- QF_SCALEUP and QF_SCALEDOWN can be combined to make an earthquake that gradually smoothes in and out.
- QF_MAX can be used to invert this behavior, where it starts at the peak of the amplitude, fades out half way, and then grows back to maximum.
2015-02-20 10:46:37 -06:00
MajorCooke
045ab9fd5b Initial groundwork for QF_SCALEDOWN. 2015-02-19 21:42:32 -06:00
Randy Heit
2d4f02c560 Merge branch 'MajorCooke-quakeex' 2015-02-18 15:01:45 -06:00
MajorCooke
0f4bca8607 - Added SXF_TRANSFERROLL. 2015-02-14 16:51:05 -06:00
MajorCooke
7050d03222 Added A_QuakeEx(intensity x, y, z, duration, damrad, tremrad, sound, flags)
- Unlocks the full potential of using quakes, including the Z axis. Each intensity applies to X/Y/Z planes whenever a player is experiencing it.
- Flags:
- QF_RELATIVE - Adjusts the quaking of the camera to go in the direction its aiming (X: forward/backward. Y: Left/right.)
- Plans for including pitch will be implemented in the future for the Z axis with relativity.
2015-02-14 15:58:39 -06:00
MajorCooke
c93f96c303 Typo in SXF_TRANSFERSPRITEFRAME fixed. 2015-02-08 08:54:55 -06: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
MajorCooke
643d37ab7c - Added A_SetFloatBobPhase(int). Takes a number between 0 and 63. If it's outside that range, it does nothing.
- Added A_Warp flags:
- WARPF_BOB: Gets the bob offset of actor pointer with the FLOATBOB flag.
- WARPF_MOVEPTR: The function is inversed to move the pointed actor with applied flags, but only the original caller will make the success/jump.
2015-01-06 11:55:41 -06: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
2c7a3f2eba - Optimized DoDamage and DoKill.
- Do a filter and species check first to save time.
- Added DMSS/KILS/RMVF_EITHER, which means if the actor is of type or species, it counts.
- A_DamageTarget(20,"Normal",DMSS_EITHER,"DoomImp","CyberdemonSpecies")
- This affects actor DoomImp, and anything that's of species CyberdemonSpecies.
- Added a little more documentation via comments.
2014-12-21 10:38:51 -06:00
MajorCooke
5a472e815b - Added species checking.
- Added two more flags for each of the functions, EXFILTER and EXSPECIES.
- Stands for "exclude filter/species" and makes the function not take them into account.
- Cleaned up the code and placed all the checking in their own subfunctions.
2014-12-21 09:31:24 -06:00
Christoph Oelckers
a19f0219c5 Merge branch 'master' of https://github.com/Blue-Shadow/zdoom 2014-12-20 11:36:10 +01:00