diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 0063e72c..07b7c0f5 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -467,7 +467,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FirePlasma) // // [RH] A_FireRailgun // -static void FireRailgun(AActor *self, int RailOffset) +static void FireRailgun(AActor *self, int offset_xy) { int damage; player_t *player; @@ -492,7 +492,7 @@ static void FireRailgun(AActor *self, int RailOffset) damage = deathmatch ? 100 : 150; - P_RailAttack (self, damage, RailOffset); + P_RailAttack (self, damage, offset_xy); } diff --git a/src/p_local.h b/src/p_local.h index 0c16373b..fe149d43 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -469,7 +469,7 @@ void P_TraceBleed (int damage, AActor *target); // random direction version bool P_HitFloor (AActor *thing); bool P_HitWater (AActor *thing, sector_t *sec, fixed_t splashx = FIXED_MIN, fixed_t splashy = FIXED_MIN, fixed_t splashz=FIXED_MIN, bool checkabove = false, bool alert = true); void P_CheckSplash(AActor *self, fixed_t distance); -void P_RailAttack (AActor *source, int damage, int offset, int color1 = 0, int color2 = 0, float maxdiff = 0, int flags = 0, const PClass *puff = NULL, angle_t angleoffset = 0, angle_t pitchoffset = 0, fixed_t distance = 8192*FRACUNIT, int duration = 0, float sparsity = 1.0, float drift = 1.0, const PClass *spawnclass = NULL); // [RH] Shoot a railgun +void P_RailAttack (AActor *source, int damage, int offset_xy, fixed_t offset_z = 0, int color1 = 0, int color2 = 0, float maxdiff = 0, int flags = 0, const PClass *puff = NULL, angle_t angleoffset = 0, angle_t pitchoffset = 0, fixed_t distance = 8192*FRACUNIT, int duration = 0, float sparsity = 1.0, float drift = 1.0, const PClass *spawnclass = NULL); // [RH] Shoot a railgun enum // P_RailAttack / A_RailAttack / A_CustomRailgun / P_DrawRailTrail flags { diff --git a/src/p_map.cpp b/src/p_map.cpp index 4777d7e9..c31e6636 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3942,7 +3942,7 @@ static bool ProcessNoPierceRailHit (FTraceResults &res) // // //========================================================================== -void P_RailAttack (AActor *source, int damage, int offset, int color1, int color2, float maxdiff, int railflags, const PClass *puffclass, angle_t angleoffset, angle_t pitchoffset, fixed_t distance, int duration, float sparsity, float drift, const PClass *spawnclass) +void P_RailAttack (AActor *source, int damage, int offset_xy, fixed_t offset_z, int color1, int color2, float maxdiff, int railflags, const PClass *puffclass, angle_t angleoffset, angle_t pitchoffset, fixed_t distance, int duration, float sparsity, float drift, const PClass *spawnclass) { fixed_t vx, vy, vz; angle_t angle, pitch; @@ -3963,7 +3963,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color x1 = source->x; y1 = source->y; - shootz = source->z - source->floorclip + (source->height >> 1); + shootz = source->z - source->floorclip + (source->height >> 1) + offset_z; if (!(railflags & RAF_CENTERZ)) { @@ -3978,8 +3978,8 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color } angle = ((source->angle + angleoffset) - ANG90) >> ANGLETOFINESHIFT; - x1 += offset*finecosine[angle]; - y1 += offset*finesine[angle]; + x1 += offset_xy * finecosine[angle]; + y1 += offset_xy * finesine[angle]; RailHits.Clear (); start.X = FIXED2FLOAT(x1); @@ -4478,7 +4478,7 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b AActor *thing; if (flags & RADF_SOURCEISSPOT) - { // The source is actually the same as the spot, even if that wasn't what we receized. + { // The source is actually the same as the spot, even if that wasn't what we received. bombsource = bombspot; } @@ -4567,11 +4567,12 @@ void P_RadiusAttack (AActor *bombspot, AActor *bombsource, int bombdamage, int b } points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT)/(double)FRACUNIT; - if (points > 0.f && P_CheckSight (thing, bombspot, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY)) + // points and bombdamage should be the same sign + if ((points * bombdamage) > 0 && P_CheckSight (thing, bombspot, SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY)) { // OK to damage; target is in direct path double velz; double thrust; - int damage = (int)points; + int damage = abs((int)points); int newdam = damage; if (!(flags & RADF_NODAMAGE)) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index f07ab0ff..d36c2746 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -5619,11 +5619,11 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, bool nofreeaim) { static const int angdiff[3] = { -1<<26, 1<<26, 0 }; - int i; angle_t an = angle; angle_t pitch; AActor *linetarget; - int vrange = nofreeaim? ANGLE_1*35 : 0; + AActor *defaultobject = GetDefaultByType(type); + int vrange = nofreeaim ? ANGLE_1*35 : 0; if (source && source->player && source->player->ReadyWeapon && (source->player->ReadyWeapon->WeaponFlags & WIF_NOAUTOAIM)) { @@ -5634,11 +5634,16 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, } else // see which target is to be aimed at { - i = 2; + // [XA] If MaxTargetRange is defined in the spawned projectile, use this as the + // maximum range for the P_AimLineAttack call later; this allows MaxTargetRange + // to function as a "maximum tracer-acquisition range" for seeker missiles. + fixed_t linetargetrange = defaultobject->maxtargetrange > 0 ? defaultobject->maxtargetrange*64 : 16*64*FRACUNIT; + + int i = 2; do { an = angle + angdiff[i]; - pitch = P_AimLineAttack (source, an, 16*64*FRACUNIT, &linetarget, vrange); + pitch = P_AimLineAttack (source, an, linetargetrange, &linetarget, vrange); if (source->player != NULL && !nofreeaim && @@ -5660,8 +5665,6 @@ AActor *P_SpawnPlayerMissile (AActor *source, fixed_t x, fixed_t y, fixed_t z, } if (pLineTarget) *pLineTarget = linetarget; - i = GetDefaultByType (type)->flags3; - if (z != ONFLOORZ && z != ONCEILINGZ) { // Doom spawns missiles 4 units lower than hitscan attacks for players. diff --git a/src/p_teleport.cpp b/src/p_teleport.cpp index 79dd105f..50470d9e 100644 --- a/src/p_teleport.cpp +++ b/src/p_teleport.cpp @@ -184,14 +184,16 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, if (sourceFog) { fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT; - Spawn (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE); + AActor *fog = Spawn (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE); + fog->target = thing; } if (useFog) { fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT; an = angle >> ANGLETOFINESHIFT; - Spawn (x + 20*finecosine[an], + AActor *fog = Spawn (x + 20*finecosine[an], y + 20*finesine[an], thing->z + fogDelta, ALLOW_REPLACE); + fog->target = thing; if (thing->player) { // [RH] Zoom player's field of vision diff --git a/src/svnrevision.h b/src/svnrevision.h index 34b2534e..4d4e70a3 100644 --- a/src/svnrevision.h +++ b/src/svnrevision.h @@ -3,5 +3,5 @@ // This file was automatically generated by the // updaterevision tool. Do not edit by hand. -#define ZD_SVN_REVISION_STRING "4186" -#define ZD_SVN_REVISION_NUMBER 4186 +#define ZD_SVN_REVISION_STRING "4191" +#define ZD_SVN_REVISION_NUMBER 4191 diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index c1ff7853..ccb7f596 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -838,8 +838,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust) bool sourcenothrust = false; - if (force <= 0) force = 128; - if (distance <= 0) distance = force; + if (force == 0) force = 128; + if (distance <= 0) distance = abs(force); // Temporarily negate MF2_NODMGTHRUST on the shooter, since it renders this function useless. if (!(flags & RTF_NOTMISSILE) && self->target != NULL && self->target->flags2 & MF2_NODMGTHRUST) @@ -847,7 +847,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust) sourcenothrust = true; self->target->flags2 &= ~MF2_NODMGTHRUST; } - int sourceflags2 = self->target != NULL ? self->target->flags2 : 0; P_RadiusAttack (self, self->target, force, distance, self->DamageType, flags | RADF_NODAMAGE, fullthrustdistance); P_CheckSplash(self, distance << FRACBITS); @@ -1430,7 +1429,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch) //========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack) { - ACTION_PARAM_START(15); + ACTION_PARAM_START(16); ACTION_PARAM_INT(Damage, 0); ACTION_PARAM_INT(Spawnofs_XY, 1); ACTION_PARAM_BOOL(UseAmmo, 2); @@ -1446,6 +1445,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack) ACTION_PARAM_FLOAT(Sparsity, 12); ACTION_PARAM_FLOAT(DriftSpeed, 13); ACTION_PARAM_CLASS(SpawnClass, 14); + ACTION_PARAM_FIXED(Spawnofs_Z, 15); if(Range==0) Range=8192*FRACUNIT; if(Sparsity==0) Sparsity=1.0; @@ -1474,7 +1474,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack) slope = pr_crailgun.Random2() * (Spread_Z / 255); } - P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Flags, PuffType, angle, slope, Range, Duration, Sparsity, DriftSpeed, SpawnClass); + P_RailAttack (self, Damage, Spawnofs_XY, Spawnofs_Z, Color1, Color2, MaxDiff, Flags, PuffType, angle, slope, Range, Duration, Sparsity, DriftSpeed, SpawnClass); } //========================================================================== @@ -1492,7 +1492,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun) { - ACTION_PARAM_START(15); + ACTION_PARAM_START(16); ACTION_PARAM_INT(Damage, 0); ACTION_PARAM_INT(Spawnofs_XY, 1); ACTION_PARAM_COLOR(Color1, 2); @@ -1508,6 +1508,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun) ACTION_PARAM_FLOAT(Sparsity, 12); ACTION_PARAM_FLOAT(DriftSpeed, 13); ACTION_PARAM_CLASS(SpawnClass, 14); + ACTION_PARAM_FIXED(Spawnofs_Z, 15); if(Range==0) Range=8192*FRACUNIT; if(Sparsity==0) Sparsity=1.0; @@ -1591,7 +1592,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun) slopeoffset = pr_crailgun.Random2() * (Spread_Z / 255); } - P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Flags, PuffType, angleoffset, slopeoffset, Range, Duration, Sparsity, DriftSpeed, SpawnClass); + P_RailAttack (self, Damage, Spawnofs_XY, Spawnofs_Z, Color1, Color2, MaxDiff, Flags, PuffType, angleoffset, slopeoffset, Range, Duration, Sparsity, DriftSpeed, SpawnClass); self->x = saved_x; self->y = saved_y; @@ -1717,102 +1718,127 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_TakeFromTarget) // Common code for A_SpawnItem and A_SpawnItemEx // //=========================================================================== + enum SIX_Flags { - SIXF_TRANSFERTRANSLATION=1, - SIXF_ABSOLUTEPOSITION=2, - SIXF_ABSOLUTEANGLE=4, - SIXF_ABSOLUTEVELOCITY=8, - SIXF_SETMASTER=16, - SIXF_NOCHECKPOSITION=32, - SIXF_TELEFRAG=64, - // 128 is used by Skulltag! - SIXF_TRANSFERAMBUSHFLAG=256, - SIXF_TRANSFERPITCH=512, - SIXF_TRANSFERPOINTERS=1024, - SIXF_USEBLOODCOLOR=2048, + SIXF_TRANSFERTRANSLATION = 1 << 0, + SIXF_ABSOLUTEPOSITION = 1 << 1, + SIXF_ABSOLUTEANGLE = 1 << 2, + SIXF_ABSOLUTEVELOCITY = 1 << 3, + SIXF_SETMASTER = 1 << 4, + SIXF_NOCHECKPOSITION = 1 << 5, + SIXF_TELEFRAG = 1 << 6, + SIXF_CLIENTSIDE = 1 << 7, // only used by Skulldronum + SIXF_TRANSFERAMBUSHFLAG = 1 << 8, + SIXF_TRANSFERPITCH = 1 << 9, + SIXF_TRANSFERPOINTERS = 1 << 10, + SIXF_USEBLOODCOLOR = 1 << 11, + SIXF_CLEARCALLERTID = 1 << 12, + SIXF_MULTIPLYSPEED = 1 << 13, + SIXF_TRANSFERSCALE = 1 << 14, }; - static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) { - if (mo) + if (mo == NULL) { - AActor * originator = self; + return false; + } + AActor *originator = self; - if (!(mo->flags2 & MF2_DONTTRANSLATE)) + if (!(mo->flags2 & MF2_DONTTRANSLATE)) + { + if (flags & SIXF_TRANSFERTRANSLATION) { - if (flags & SIXF_TRANSFERTRANSLATION) - { - mo->Translation = self->Translation; - } - else if (flags & SIXF_USEBLOODCOLOR) - { - // [XA] Use the spawning actor's BloodColor to translate the newly-spawned object. - PalEntry bloodcolor = self->GetBloodColor(); - mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); - } + mo->Translation = self->Translation; } - if (flags & SIXF_TRANSFERPOINTERS) + else if (flags & SIXF_USEBLOODCOLOR) { - mo->target = self->target; - mo->master = self->master; // This will be overridden later if SIXF_SETMASTER is set - mo->tracer = self->tracer; + // [XA] Use the spawning actor's BloodColor to translate the newly-spawned object. + PalEntry bloodcolor = self->GetBloodColor(); + mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a); } + } + if (flags & SIXF_TRANSFERPOINTERS) + { + mo->target = self->target; + mo->master = self->master; // This will be overridden later if SIXF_SETMASTER is set + mo->tracer = self->tracer; + } - mo->angle=self->angle; - if (flags & SIXF_TRANSFERPITCH) mo->pitch = self->pitch; - while (originator && originator->isMissile()) originator = originator->target; + mo->angle = self->angle; + if (flags & SIXF_TRANSFERPITCH) + { + mo->pitch = self->pitch; + } + while (originator && originator->isMissile()) + { + originator = originator->target; + } - if (flags & SIXF_TELEFRAG) + if (flags & SIXF_TELEFRAG) + { + P_TeleportMove(mo, mo->x, mo->y, mo->z, true); + // This is needed to ensure consistent behavior. + // Otherwise it will only spawn if nothing gets telefragged + flags |= SIXF_NOCHECKPOSITION; + } + if (mo->flags3 & MF3_ISMONSTER) + { + if (!(flags & SIXF_NOCHECKPOSITION) && !P_TestMobjLocation(mo)) { - P_TeleportMove(mo, mo->x, mo->y, mo->z, true); - // This is needed to ensure consistent behavior. - // Otherwise it will only spawn if nothing gets telefragged - flags |= SIXF_NOCHECKPOSITION; + // The monster is blocked so don't spawn it at all! + mo->ClearCounters(); + mo->Destroy(); + return false; } - if (mo->flags3&MF3_ISMONSTER) + else if (originator) { - if (!(flags&SIXF_NOCHECKPOSITION) && !P_TestMobjLocation(mo)) + if (originator->flags3 & MF3_ISMONSTER) { - // The monster is blocked so don't spawn it at all! - mo->ClearCounters(); - mo->Destroy(); - return false; + // If this is a monster transfer all friendliness information + mo->CopyFriendliness(originator, true); + if (flags & SIXF_SETMASTER) mo->master = originator; // don't let it attack you (optional)! } - else if (originator) + else if (originator->player) { - if (originator->flags3&MF3_ISMONSTER) + // A player always spawns a monster friendly to him + mo->flags |= MF_FRIENDLY; + mo->SetFriendPlayer(originator->player); + + AActor * attacker=originator->player->attacker; + if (attacker) { - // If this is a monster transfer all friendliness information - mo->CopyFriendliness(originator, true); - if (flags&SIXF_SETMASTER) mo->master = originator; // don't let it attack you (optional)! - } - else if (originator->player) - { - // A player always spawns a monster friendly to him - mo->flags |= MF_FRIENDLY; - mo->SetFriendPlayer(originator->player); - - AActor * attacker=originator->player->attacker; - if (attacker) + if (!(attacker->flags&MF_FRIENDLY) || + (deathmatch && attacker->FriendPlayer!=0 && attacker->FriendPlayer!=mo->FriendPlayer)) { - if (!(attacker->flags&MF_FRIENDLY) || - (deathmatch && attacker->FriendPlayer!=0 && attacker->FriendPlayer!=mo->FriendPlayer)) - { - // Target the monster which last attacked the player - mo->LastHeard = mo->target = attacker; - } + // Target the monster which last attacked the player + mo->LastHeard = mo->target = attacker; } } } } - else if (!(flags & SIXF_TRANSFERPOINTERS)) - { - // If this is a missile or something else set the target to the originator - mo->target=originator? originator : self; - } } + else if (!(flags & SIXF_TRANSFERPOINTERS)) + { + // If this is a missile or something else set the target to the originator + mo->target = originator ? originator : self; + } + if (flags & SIXF_TRANSFERSCALE) + { + mo->scaleX = self->scaleX; + mo->scaleY = self->scaleY; + } + if (flags & SIXF_TRANSFERAMBUSHFLAG) + { + mo->flags = (mo->flags & ~MF_AMBUSH) | (self->flags & MF_AMBUSH); + } + if (flags & SIXF_CLEARCALLERTID) + { + self->RemoveFromHash(); + self->tid = 0; + } + return true; } @@ -1862,7 +1888,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItem) self->y + FixedMul(distance, finesine[self->angle>>ANGLETOFINESHIFT]), self->z - self->floorclip + self->GetBobOffset() + zheight, ALLOW_REPLACE); - int flags = (transfer_translation? SIXF_TRANSFERTRANSLATION:0) + (useammo? SIXF_SETMASTER:0); + int flags = (transfer_translation ? SIXF_TRANSFERTRANSLATION : 0) + (useammo ? SIXF_SETMASTER : 0); bool res = InitSpawnedItem(self, mo, flags); ACTION_SET_RESULT(res); // for an inventory item's use state } @@ -1876,7 +1902,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItem) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItemEx) { - ACTION_PARAM_START(10); + ACTION_PARAM_START(11); ACTION_PARAM_CLASS(missile, 0); ACTION_PARAM_FIXED(xofs, 1); ACTION_PARAM_FIXED(yofs, 2); @@ -1887,6 +1913,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItemEx) ACTION_PARAM_ANGLE(Angle, 7); ACTION_PARAM_INT(flags, 8); ACTION_PARAM_INT(chance, 9); + ACTION_PARAM_INT(tid, 10); if (!missile) { @@ -1929,17 +1956,30 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItemEx) xvel = newxvel; } - AActor * mo = Spawn(missile, x, y, self->z - self->floorclip + self->GetBobOffset() + zofs, ALLOW_REPLACE); + AActor *mo = Spawn(missile, x, y, self->z - self->floorclip + self->GetBobOffset() + zofs, ALLOW_REPLACE); bool res = InitSpawnedItem(self, mo, flags); ACTION_SET_RESULT(res); // for an inventory item's use state - if (mo) + if (res) { - mo->velx = xvel; - mo->vely = yvel; - mo->velz = zvel; + if (tid != 0) + { + assert(mo->tid == 0); + mo->tid = tid; + mo->AddToHash(); + } + if (flags & SIXF_MULTIPLYSPEED) + { + mo->velx = FixedMul(xvel, mo->Speed); + mo->vely = FixedMul(yvel, mo->Speed); + mo->velz = FixedMul(zvel, mo->Speed); + } + else + { + mo->velx = xvel; + mo->vely = yvel; + mo->velz = zvel; + } mo->angle = Angle; - if (flags & SIXF_TRANSFERAMBUSHFLAG) - mo->flags = (mo->flags&~MF_AMBUSH) | (self->flags & MF_AMBUSH); } } diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index b4024878..ab0898fa 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -198,7 +198,7 @@ ACTOR Actor native //: Thinker action native A_Jump(int chance = 256, state label, ...); action native A_CustomMissile(class missiletype, float spawnheight = 32, int spawnofs_xy = 0, float angle = 0, int flags = 0, float pitch = 0); action native A_CustomBulletAttack(float spread_xy, float spread_z, int numbullets, int damageperbullet, class pufftype = "BulletPuff", float range = 0, int flags = 0); - action native A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = "", color color2 = "", int flags = 0, bool aim = false, float maxdiff = 0, class pufftype = "BulletPuff", float spread_xy = 0, float spread_z = 0, float range = 0, int duration = 0, float sparsity = 1.0, float driftspeed = 1.0, class spawnclass = "none"); + action native A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = "", color color2 = "", int flags = 0, bool aim = false, float maxdiff = 0, class pufftype = "BulletPuff", float spread_xy = 0, float spread_z = 0, float range = 0, int duration = 0, float sparsity = 1.0, float driftspeed = 1.0, class spawnclass = "none", float spawnofs_z = 0); action native A_JumpIfHealthLower(int health, state label); action native A_JumpIfCloser(float distance, state label); action native A_JumpIfTracerCloser(float distance, state label); @@ -210,7 +210,7 @@ ACTOR Actor native //: Thinker action native A_GiveInventory(class itemtype, int amount = 0, int giveto = AAPTR_DEFAULT); action native A_TakeInventory(class itemtype, int amount = 0, int flags = 0, int giveto = AAPTR_DEFAULT); action native A_SpawnItem(class itemtype = "Unknown", float distance = 0, float zheight = 0, bool useammo = true, bool transfer_translation = false); - action native A_SpawnItemEx(class itemtype, float xofs = 0, float yofs = 0, float zofs = 0, float xvel = 0, float yvel = 0, float zvel = 0, float angle = 0, int flags = 0, int failchance = 0); + action native A_SpawnItemEx(class itemtype, float xofs = 0, float yofs = 0, float zofs = 0, float xvel = 0, float yvel = 0, float zvel = 0, float angle = 0, int flags = 0, int failchance = 0, int tid=0); action native A_Print(string whattoprint, float time = 0, string fontname = ""); action native A_PrintBold(string whattoprint, float time = 0, string fontname = ""); action native A_Log(string whattoprint); diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 07dbeda7..db4e9abb 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -41,19 +41,22 @@ const int FBF_NOFLASH = 16; const int FBF_NORANDOMPUFFZ = 32; // Flags for A_SpawnItemEx -const int SXF_TRANSFERTRANSLATION=1; -const int SXF_ABSOLUTEPOSITION=2; -const int SXF_ABSOLUTEANGLE=4; -const int SXF_ABSOLUTEMOMENTUM=8; -const int SXF_ABSOLUTEVELOCITY=8; -const int SXF_SETMASTER=16; +const int SXF_TRANSFERTRANSLATION = 1; +const int SXF_ABSOLUTEPOSITION = 2; +const int SXF_ABSOLUTEANGLE = 4; +const int SXF_ABSOLUTEMOMENTUM = 8; +const int SXF_ABSOLUTEVELOCITY = 8; +const int SXF_SETMASTER = 16; const int SXF_NOCHECKPOSITION = 32; -const int SXF_TELEFRAG=64; -const int SXF_CLIENTSIDE=128; // only used by Skulltag -const int SXF_TRANSFERAMBUSHFLAG=256; -const int SXF_TRANSFERPITCH=512; -const int SXF_TRANSFERPOINTERS=1024; -const int SXF_USEBLOODCOLOR=2048; +const int SXF_TELEFRAG = 64; +const int SXF_CLIENTSIDE = 128; // only used by Skulltag +const int SXF_TRANSFERAMBUSHFLAG = 256; +const int SXF_TRANSFERPITCH = 512; +const int SXF_TRANSFERPOINTERS = 1024; +const int SXF_USEBLOODCOLOR = 2048; +const int SXF_CLEARCALLERTID = 4096; +const int SXF_MULTIPLYSPEED = 8192; +const int SXF_TRANSFERSCALE = 16384; // Flags for A_Chase const int CHF_FASTCHASE = 1; diff --git a/wadsrc/static/actors/shared/inventory.txt b/wadsrc/static/actors/shared/inventory.txt index 0632195c..7b2c3d5e 100644 --- a/wadsrc/static/actors/shared/inventory.txt +++ b/wadsrc/static/actors/shared/inventory.txt @@ -11,7 +11,7 @@ ACTOR Inventory native action native A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class pufftype = "BulletPuff", float range = 0, float lifesteal = 0); action native A_FireBullets(float spread_xy, float spread_z, int numbullets, int damageperbullet, class pufftype = "BulletPuff", int flags = 1, float range = 0); action native A_FireCustomMissile(class missiletype, float angle = 0, bool useammo = true, int spawnofs_xy = 0, float spawnheight = 0, bool aimatangle = false, float pitch = 0); - action native A_RailAttack(int damage, int spawnofs_xy = 0, int useammo = true, color color1 = "", color color2 = "", int flags = 0, float maxdiff = 0, class pufftype = "BulletPuff", float spread_xy = 0, float spread_z = 0, float range = 0, int duration = 0, float sparsity = 1.0, float driftspeed = 1.0, class spawnclass = "none"); + action native A_RailAttack(int damage, int spawnofs_xy = 0, int useammo = true, color color1 = "", color color2 = "", int flags = 0, float maxdiff = 0, class pufftype = "BulletPuff", float spread_xy = 0, float spread_z = 0, float range = 0, int duration = 0, float sparsity = 1.0, float driftspeed = 1.0, class spawnclass = "none", float spawnofs_z = 0); action native A_Light(int extralight); action native A_Light0(); action native A_Light1();