Commit graph

268 commits

Author SHA1 Message Date
Christoph Oelckers
9315a217b3 - scriptified AActor::ClearInventory 2019-04-16 21:28:21 +02:00
Christoph Oelckers
d18ed18d2e - scriptified invnext and invprev CCMDs. 2019-04-16 18:45:54 +02:00
Christoph Oelckers
081d0bbcca - moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory. 2019-04-16 18:45:52 +02:00
Christoph Oelckers
be8d1c950d - scriptified GiveAmmo and the one remaining piece of native code still using it. 2019-04-16 18:45:41 +02:00
Christoph Oelckers
f1bf1cc44e - scriptified DropInventory. 2019-04-16 18:45:38 +02:00
Christoph Oelckers
a614f2a81e - scriptified UseInventory and several functions using the already scriptified ones,
# Conflicts:
#	src/g_statusbar/sbar.h
2019-04-16 18:45:36 +02:00
Christoph Oelckers
e7c798f58f - scriptified TakeInventory, including the ACS/FS interfaces. 2019-04-16 18:45:03 +02:00
Christoph Oelckers
d2741813ab - scriptified RemoveInventory and Inventory.OnDestroy. 2019-04-16 18:44:59 +02:00
Christoph Oelckers
8609e2ba68 - scriptified GiveInventory and made the interface a bit more configurable by mods.
Now a child type can decide for itself how to treat 'amount'.
The scripting interfaces to this function in ACS and FraggleScript have been consolidated and also scriptified.
2019-04-16 18:44:56 +02:00
Christoph Oelckers
2a192cde92 - scriptified AddInventory. 2019-04-16 18:44:53 +02:00
Christoph Oelckers
00fed23e5f - explicitly declare the constructor and destructor methods of FCheckPosition so that they get a working prototype. 2019-04-16 15:12:33 +02:00
Christoph Oelckers
7caa6a922d - moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2019-04-15 22:29:35 +02:00
Christoph Oelckers
08059f718b - scriptified FilterCoopRespawnInventory. 2019-04-15 21:59:00 +02:00
Christoph Oelckers
1ecada388c - scriptified some simple sound functions. 2019-04-15 21:58:58 +02:00
Christoph Oelckers
d123230fb1 - scriptified APlayerPawn::Die and fixed a few things I encountered while doing it. 2019-04-15 21:58:56 +02:00
Christoph Oelckers
f1c7815b16 - scriptified A_Explode and relatives. 2019-04-15 21:58:52 +02:00
Christoph Oelckers
8c2c888d82 - scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2019-04-15 21:58:39 +02:00
Christoph Oelckers
05e8a6c62d - scriptified A_RailAttack. 2019-04-15 21:58:35 +02:00
Christoph Oelckers
394d8e414f - scriptified A_CustomPunch 2019-04-15 21:58:33 +02:00
Christoph Oelckers
d99b46c861 - scriptified A_FireBullets and A_CustomBulletAttack. 2019-04-15 21:58:30 +02:00
Christoph Oelckers
b886219f53 - scriptified P_MorphMonster. 2019-04-15 21:56:23 +02:00
Christoph Oelckers
45f83636e9 - restored the old A_Jump prototype because DECORATE needs this to parse the arguments. 2019-04-15 15:48:34 +02:00
Christoph Oelckers
9456c877d4 - deconstruct A_Jump with multiple labels into A_Jump(chance, RandomPick(label1, label2, label3,...)) to remove this ugly special case from the VM calling convention.
This also adds the number of available choices to OP_IJMP.
2019-04-15 15:48:27 +02:00
Christoph Oelckers
7fe33d336c Avoid using argument count for any kind of decision making in native VM functions.
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.

# Conflicts:
#	src/r_data/r_sections.h
2019-04-15 14:37:28 +02:00
Player701
d72d820bba - Exported AActor::Grind to ZScript. 2018-11-30 10:18:43 +01:00
Alexander
aa6820737a fixed spelling (mostly comments) 2018-11-28 15:37:45 +01:00
Major Cooke
57efd617fa Changed A_RaiseActor to just RaiseActor. 2018-11-16 21:17:53 +01:00
Major Cooke
a083eb6421 Added A_RaiseActor(Actor other, int flags = 0) 2018-11-16 21:17:51 +01:00
Major Cooke
24fdaf751c Added CanResurrect(Actor other, bool passive)
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-16 21:17:49 +01:00
ZZYZX
b581648d6f Destructible geometry - minor fixes and 3D floor support 2018-11-07 11:00:05 +01:00
Player701
4751181eb6 - Added a function to get the actor's age in ticks. 2018-11-05 01:38:37 +01:00
Player701
905146d87c - Added a new field to the Actor class which stores the amount of ticks passed since the game started on the moment the actor was spawned.
- Added a function to the Actor class to get its spawn time relative to the current level.
- Added spawn time information to the output of the "info" console command.
2018-11-05 01:38:35 +01:00
Cacodemon345
57e51debec Extend SKYEXPLODE flag for LineAttack 2018-11-03 21:52:25 +01:00
Major Cooke
7eef13c859 Added VelIntercept.
- Uses the same code as Thing_ProjectileIntercept to aim and move the projectile.
  - targ: The actor the caller will aim at.
  - speed: Used for calculating the new angle/pitch and adjusts the speed accordingly. Default is -1 (current speed).
  - aimpitch: If true, aims the pitch in the travelling direction. Default is true.
  - oldvel: If true, does not replace the velocity with the specified speed. Default is false.

- Split the code from Thing_ProjectileIntercept and have that function call VelIntercept.
2018-11-01 21:25:56 +01:00
ZZYZX
a40d717006 Fixed sector floor/ceiling actions not triggering in P_XYMovement 2018-11-01 21:08:53 +01:00
Marisa Kirisame
5877c0248d Exports various resurrection-related functions to ZScript. 2018-10-04 19:30:39 +02:00
argv-minus-one
98db61dc74 Make various getter and pure-math Actor methods clearscope.
These methods do not examine or change playsim state. They only perform math or look at class metadata.

Methods changed are:

• deltaangle
• absangle
• AngleToVector
• RotateVector
• Normalize180
• BobSin
• GetDefaultSpeed
• FindState
• GetDropItems (which changes the scope of the returned struct, but the returned struct is all-readonly anyway)
2018-08-14 23:48:42 +02:00
Christoph Oelckers
f48b2d8b71 - fixed: A global variable was used to pass MeansOfDeath to ClientObituary.
The problem here is that this affects the public scripting interface so it cannot be committed to master without further adjustments.

# Conflicts:
#	src/p_interaction.cpp
2018-07-29 19:30:28 +02:00
Rachael Alexanderson
196748236a - fixed: 'empty function OnGiveSecret' - this was my fault, giving bad advice to Marisa in her PR. I fixed it.
(cherry picked from commit 512082b222)
2018-06-05 20:10:13 +02:00
Marisa Kirisame
70c5886987 Adds "OnGiveSecret" virtual function on Actor for customizing behavior of secret finding.
(cherry picked from commit 477cf23fd2)
2018-06-05 20:10:12 +02:00
ZippeyKeys12
0441994106 Default newradius in A_SetSize 2018-03-30 18:06:46 -05:00
Marisa Kirisame
069c5aa90a Fix accidentally removed SectorPlane assignment. Added missing HitVector support. 2018-03-03 09:30:06 +01:00
Major Cooke
7ac8b496f1 Added Distance(2/3)DSquared functions. 2018-02-28 09:28:11 +01:00
alexey.lysiuk
fb1f8a6045 Restored ACS_NamedExecuteWithResult for DECORATE
https://forum.zdoom.org/viewtopic.php?t=59250
2018-02-24 22:03:23 +02:00
alexey.lysiuk
1679065a5d Exposed Actor.ACS_ScriptCall() function
This method can be used with arbitrary actor object like thing.ACS_ScriptCall("script")
CallACS() and ACS_NamedExecuteWithResult() intrinsics work only within self actor context
2018-02-24 16:23:55 +02:00
Marisa Kirisame
69e8c9ec6e A more "general purpose" line trace function. Far from a complete ZScript interface with Trace(), though. 2018-01-21 10:54:02 +01:00
Rachael Alexanderson
6df936e0a0 - remove A_IsPlayingSound 2018-01-20 19:01:47 +01:00
Marisa Kirisame
a01ca4c3a1 Exported S_IsActorPlayingSomething and S_GetMSLength to ZScript.
Added missing vm.h include, moved A_IsPlayingSound to p_actionfunctions.cpp.

- make A_IsPlayingSound ui only
2018-01-20 19:01:47 +01:00
Major Cooke
d5d393aaf2 - Added GetRadiusDamage. Returns the raw calculated explosion damage falloff by distance only.
- Split off both explosion damage calculations into P_Get(Old)RadiusDamage functions for ease of maintenance.
2018-01-20 18:45:01 +02:00
Rachael Alexanderson
7416f42b47 - add 'FriendlySeeBlocks' actor property that allows a modder to expand the maximum radius that a friendly monster can see enemies. 2018-01-09 12:34:12 -05:00