mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-27 06:02:18 +00:00
- added a new parameter to A_CustomRailgun to customize the inaccuracy induced by a moving target.
This commit is contained in:
parent
3696d34806
commit
06c97d898b
2 changed files with 4 additions and 3 deletions
|
@ -2270,6 +2270,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CustomRailgun)
|
|||
PARAM_FLOAT_DEF (spawnofs_z)
|
||||
PARAM_INT_DEF (SpiralOffset)
|
||||
PARAM_INT_DEF (limit)
|
||||
PARAM_FLOAT_DEF (veleffect)
|
||||
|
||||
if (range == 0) range = 8192.;
|
||||
if (sparsity == 0) sparsity = 1;
|
||||
|
@ -2308,7 +2309,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CustomRailgun)
|
|||
// Let the aim trail behind the player
|
||||
if (aim)
|
||||
{
|
||||
saved_angle = self->Angles.Yaw = self->AngleTo(self->target, -self->target->Vel.X * 3, -self->target->Vel.Y * 3);
|
||||
saved_angle = self->Angles.Yaw = self->AngleTo(self->target, -self->target->Vel.X * veleffect, -self->target->Vel.Y * veleffect);
|
||||
|
||||
if (aim == CRF_AIMDIRECT)
|
||||
{
|
||||
|
@ -2318,7 +2319,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CustomRailgun)
|
|||
spawnofs_xy * self->Angles.Yaw.Cos(),
|
||||
spawnofs_xy * self->Angles.Yaw.Sin()));
|
||||
spawnofs_xy = 0;
|
||||
self->Angles.Yaw = self->AngleTo(self->target,- self->target->Vel.X * 3, -self->target->Vel.Y * 3);
|
||||
self->Angles.Yaw = self->AngleTo(self->target,- self->target->Vel.X * veleffect, -self->target->Vel.Y * veleffect);
|
||||
}
|
||||
|
||||
if (self->target->flags & MF_SHADOW)
|
||||
|
|
|
@ -702,7 +702,7 @@ class Actor : Thinker native
|
|||
native action state A_Jump(int chance, statelabel label, ...);
|
||||
native void A_SpawnProjectile(class<Actor> missiletype, double spawnheight = 32, double spawnofs_xy = 0, double angle = 0, int flags = 0, double pitch = 0, int ptr = AAPTR_TARGET);
|
||||
native void A_CustomBulletAttack(double spread_xy, double spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", double range = 0, int flags = 0, int ptr = AAPTR_TARGET, class<Actor> missile = null, double Spawnheight = 32, double Spawnofs_xy = 0);
|
||||
native void A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = 0, color color2 = 0, int flags = 0, int aim = 0, double maxdiff = 0, class<Actor> pufftype = "BulletPuff", double spread_xy = 0, double spread_z = 0, double range = 0, int duration = 0, double sparsity = 1.0, double driftspeed = 1.0, class<Actor> spawnclass = null, double spawnofs_z = 0, int spiraloffset = 270, int limit = 0);
|
||||
native void A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = 0, color color2 = 0, int flags = 0, int aim = 0, double maxdiff = 0, class<Actor> pufftype = "BulletPuff", double spread_xy = 0, double spread_z = 0, double range = 0, int duration = 0, double sparsity = 1.0, double driftspeed = 1.0, class<Actor> spawnclass = null, double spawnofs_z = 0, int spiraloffset = 270, int limit = 0, double veleffect = 3);
|
||||
native bool A_SetInventory(class<Inventory> itemtype, int amount, int ptr = AAPTR_DEFAULT, bool beyondMax = false);
|
||||
native bool A_GiveInventory(class<Inventory> itemtype, int amount = 0, int giveto = AAPTR_DEFAULT);
|
||||
native bool A_TakeInventory(class<Inventory> itemtype, int amount = 0, int flags = 0, int giveto = AAPTR_DEFAULT);
|
||||
|
|
Loading…
Reference in a new issue