2016-10-13 18:45:52 +00:00
|
|
|
class Inventory : Actor native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
|
|
|
|
native Actor Owner; // Who owns this item? NULL if it's still a pickup.
|
|
|
|
native int Amount; // Amount of item this instance has
|
|
|
|
native int MaxAmount; // Max amount of item this instance can have
|
|
|
|
native int InterHubAmount; // Amount of item that can be kept between hubs or levels
|
|
|
|
native int RespawnTics; // Tics from pickup time to respawn time
|
|
|
|
native TextureID Icon; // Icon to show on status bar or HUD
|
|
|
|
native int DropTime; // Countdown after dropping
|
|
|
|
native Class<Actor> SpawnPointClass; // For respawning like Heretic's mace
|
|
|
|
native Class<Actor> PickupFlash; // actor to spawn as pickup flash
|
|
|
|
native Sound PickupSound;
|
|
|
|
native bool bPickupGood;
|
|
|
|
native bool bCreateCopyMoved;
|
|
|
|
native bool bInitEffectFailed;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Inventory.Amount 1;
|
|
|
|
Inventory.MaxAmount 1;
|
|
|
|
Inventory.InterHubAmount 1;
|
|
|
|
Inventory.UseSound "misc/invuse";
|
|
|
|
Inventory.PickupSound "misc/i_pkup";
|
|
|
|
Inventory.PickupMessage "$TXT_DEFAULTPICKUPMSG";
|
|
|
|
}
|
|
|
|
|
2016-11-25 17:41:00 +00:00
|
|
|
virtual native bool Use (bool pickup);
|
2016-11-26 12:18:48 +00:00
|
|
|
virtual native color GetBlend ();
|
2016-11-27 10:59:47 +00:00
|
|
|
virtual native bool HandlePickup(Inventory item);
|
|
|
|
virtual native Inventory CreateCopy(Actor other);
|
2016-11-28 17:15:18 +00:00
|
|
|
virtual native Inventory CreateTossable();
|
2016-11-28 13:39:25 +00:00
|
|
|
virtual native bool SpecialDropAction (Actor dropper);
|
2016-11-28 15:19:01 +00:00
|
|
|
virtual native String PickupMessage();
|
2016-11-25 17:41:00 +00:00
|
|
|
|
2016-11-27 11:52:54 +00:00
|
|
|
native void GoAwayAndDie();
|
2016-11-28 17:15:18 +00:00
|
|
|
native void BecomeItem();
|
|
|
|
native void BecomePickup();
|
2016-11-25 17:41:00 +00:00
|
|
|
|
2016-10-22 14:46:47 +00:00
|
|
|
// These are regular functions for the item itself.
|
2016-10-22 15:49:08 +00:00
|
|
|
private native void A_RestoreSpecialDoomThing();
|
|
|
|
private native void A_RestoreSpecialThing1();
|
|
|
|
private native void A_RestoreSpecialThing2();
|
2016-11-19 23:25:38 +00:00
|
|
|
|
|
|
|
native bool, Actor CallTryPickup(Actor toucher);
|
2016-10-22 14:46:47 +00:00
|
|
|
|
2016-11-14 22:24:10 +00:00
|
|
|
States(Actor, Overlay, Weapon, Item)
|
2016-10-22 14:46:47 +00:00
|
|
|
{
|
|
|
|
HideDoomish:
|
|
|
|
TNT1 A 1050;
|
|
|
|
TNT1 A 0 A_RestoreSpecialPosition;
|
|
|
|
TNT1 A 1 A_RestoreSpecialDoomThing;
|
|
|
|
Stop;
|
|
|
|
HideSpecial:
|
|
|
|
ACLO E 1400;
|
|
|
|
ACLO A 0 A_RestoreSpecialPosition;
|
|
|
|
ACLO A 4 A_RestoreSpecialThing1;
|
|
|
|
ACLO BABCBCDC 4;
|
|
|
|
ACLO D 4 A_RestoreSpecialThing2;
|
|
|
|
Stop;
|
|
|
|
Held:
|
|
|
|
TNT1 A -1;
|
|
|
|
Stop;
|
|
|
|
HoldAndDestroy:
|
|
|
|
TNT1 A 1;
|
|
|
|
Stop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class StateProvider : Inventory native
|
|
|
|
{
|
2016-11-14 13:12:27 +00:00
|
|
|
action native state A_JumpIfNoAmmo(statelabel label);
|
2016-11-21 12:04:27 +00:00
|
|
|
action native void A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class<Actor> pufftype = "BulletPuff", double range = 0, double lifesteal = 0, int lifestealmax = 0, class<BasicArmorBonus> armorbonustype = "ArmorBonus", sound MeleeSound = 0, sound MissSound = "");
|
|
|
|
action native void A_FireBullets(double spread_xy, double spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", int flags = 1, double range = 0, class<Actor> missile = null, double Spawnheight = 32, double Spawnofs_xy = 0);
|
|
|
|
action native void A_FireCustomMissile(class<Actor> missiletype, double angle = 0, bool useammo = true, double spawnofs_xy = 0, double spawnheight = 0, int flags = 0, double pitch = 0);
|
|
|
|
action native void A_RailAttack(int damage, int spawnofs_xy = 0, bool useammo = true, color color1 = 0, color color2 = 0, int flags = 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 = "none", double spawnofs_z = 0, int spiraloffset = 270, int limit = 0);
|
2016-11-13 13:20:30 +00:00
|
|
|
action native void A_WeaponReady(int flags = 0);
|
|
|
|
action native void A_Lower();
|
|
|
|
action native void A_Raise();
|
|
|
|
|
2016-11-14 13:12:27 +00:00
|
|
|
action native void A_ReFire(statelabel flash = null);
|
2016-11-13 13:20:30 +00:00
|
|
|
action native void A_ClearReFire();
|
|
|
|
action native void A_CheckReload();
|
2016-11-14 13:12:27 +00:00
|
|
|
action native void A_GunFlash(statelabel flash = null, int flags = 0);
|
2016-11-13 13:20:30 +00:00
|
|
|
action native void A_FireAssaultGun();
|
2016-11-14 13:12:27 +00:00
|
|
|
action native state A_CheckForReload(int counter, statelabel label, bool dontincrement = false);
|
2016-11-13 13:20:30 +00:00
|
|
|
action native void A_ResetReloadCounter();
|
2016-10-15 13:10:48 +00:00
|
|
|
}
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
class ScoreItem : Inventory native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Height 10;
|
2016-11-14 17:31:12 +00:00
|
|
|
+COUNTITEM
|
2016-10-13 18:45:52 +00:00
|
|
|
Inventory.Amount 1;
|
2016-11-14 17:31:12 +00:00
|
|
|
+Inventory.ALWAYSPICKUP
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Ammo : Inventory native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
native int BackpackAmount;
|
|
|
|
native int BackpackMaxAmount;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.KEEPDEPLETED
|
2016-10-13 18:45:52 +00:00
|
|
|
Inventory.PickupSound "misc/ammo_pkup";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class BackpackItem : Inventory native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
native bool bDepleted;
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Armor : Inventory native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Inventory.PickupSound "misc/armor_pkup";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class BasicArmor : Armor native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
|
|
|
|
native int AbsorbCount;
|
|
|
|
native double SavePercent;
|
|
|
|
native int MaxAbsorb;
|
|
|
|
native int MaxFullAbsorb;
|
|
|
|
native int BonusCount;
|
|
|
|
native Name ArmorType;
|
|
|
|
native int ActualSaveAmount;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+Inventory.KEEPDEPLETED
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class BasicArmorBonus : Armor native
|
|
|
|
{
|
2016-11-22 22:42:32 +00:00
|
|
|
native double SavePercent; // The default, for when you don't already have armor
|
|
|
|
native int MaxSaveAmount;
|
|
|
|
native int MaxAbsorb;
|
|
|
|
native int MaxFullAbsorb;
|
|
|
|
native int SaveAmount;
|
|
|
|
native int BonusCount;
|
|
|
|
native int BonusMax;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+Inventory.AUTOACTIVATE
|
|
|
|
+Inventory.ALWAYSPICKUP
|
2016-10-13 18:45:52 +00:00
|
|
|
Inventory.MaxAmount 0;
|
|
|
|
Armor.SavePercent 33.335;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class BasicArmorPickup : Armor native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
|
|
|
|
native double SavePercent;
|
|
|
|
native int MaxAbsorb;
|
|
|
|
native int MaxFullAbsorb;
|
|
|
|
native int SaveAmount;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
+Inventory.AUTOACTIVATE;
|
|
|
|
Inventory.MaxAmount 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class HexenArmor : Armor native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
|
|
|
|
native double Slots[5];
|
|
|
|
native double SlotsIncrement[4];
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+Inventory.KEEPDEPLETED
|
|
|
|
+Inventory.UNDROPPABLE
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DehackedPickup : Inventory native {}
|
|
|
|
|
2016-11-23 00:31:48 +00:00
|
|
|
class FakeInventory : Inventory native
|
|
|
|
{
|
|
|
|
native bool Respawnable;
|
|
|
|
}
|
2016-10-13 18:45:52 +00:00
|
|
|
|
2016-11-14 17:31:12 +00:00
|
|
|
class CustomInventory : StateProvider native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
DefaultStateUsage SUF_ACTOR|SUF_OVERLAY|SUF_ITEM;
|
|
|
|
}
|
|
|
|
}
|
2016-10-13 18:45:52 +00:00
|
|
|
|
|
|
|
class Health : Inventory native
|
|
|
|
{
|
2016-11-23 00:31:48 +00:00
|
|
|
native int PrevHealth;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Inventory.Amount 1;
|
|
|
|
Inventory.MaxAmount 0;
|
|
|
|
Inventory.PickupSound "misc/health_pkup";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class HealthPickup : Inventory native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
native int autousemode;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Inventory.DefMaxAmount;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.INVBAR
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Key : Inventory native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
native uint8 KeyNumber;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
+DONTGIB; // Don't disappear due to a crusher
|
|
|
|
Inventory.InterHubAmount 0;
|
|
|
|
Inventory.PickupSound "misc/k_pkup";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerupGiver : Inventory native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
|
|
|
|
native Class<Actor> PowerupType;
|
|
|
|
native int EffectTics; // Non-0 to override the powerup's default tics
|
|
|
|
native color BlendColor; // Non-0 to override the powerup's default blend
|
|
|
|
native Name Mode; // Meaning depends on powerup - used for Invulnerability and Invisibility
|
|
|
|
native double Strength; // Meaning depends on powerup - currently used only by Invisibility
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Inventory.DefMaxAmount;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.INVBAR
|
|
|
|
+INVENTORY.FANCYPICKUPSOUND
|
2016-10-13 18:45:52 +00:00
|
|
|
Inventory.PickupSound "misc/p_pkup";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-23 16:34:36 +00:00
|
|
|
class Powerup : Inventory native
|
|
|
|
{
|
|
|
|
native int EffectTics;
|
|
|
|
native color BlendColor;
|
|
|
|
native Name Mode; // Meaning depends on powerup - used for Invulnerability and Invisibility
|
|
|
|
native double Strength; // Meaning depends on powerup - currently used only by Invisibility
|
|
|
|
}
|
2016-10-13 18:45:52 +00:00
|
|
|
|
|
|
|
class PowerInvulnerable : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -30;
|
|
|
|
inventory.icon "SPSHLD0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerStrength : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration 1;
|
|
|
|
Powerup.Color "ff 00 00", 0.5;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.HUBPOWER
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerInvisibility : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
+SHADOW;
|
|
|
|
Powerup.Duration -60;
|
|
|
|
Powerup.Strength 80;
|
|
|
|
Powerup.Mode "Fuzzy";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerGhost : PowerInvisibility
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
+GHOST;
|
|
|
|
Powerup.Duration -60;
|
|
|
|
Powerup.Strength 60;
|
|
|
|
Powerup.Mode "None";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerShadow : PowerInvisibility
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.HUBPOWER
|
2016-10-13 18:45:52 +00:00
|
|
|
Powerup.Duration -55;
|
|
|
|
Powerup.Strength 75;
|
|
|
|
Powerup.Mode "Cumulative";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerIronFeet : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -60;
|
|
|
|
Powerup.Color "00 ff 00", 0.125;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerMask : PowerIronFeet native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -80;
|
|
|
|
Powerup.Color "00 00 00", 0;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.HUBPOWER
|
2016-10-13 18:45:52 +00:00
|
|
|
Inventory.Icon "I_MASK";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerLightAmp : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -120;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerTorch : PowerLightAmp native {}
|
|
|
|
|
|
|
|
class PowerFlight : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -60;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.HUBPOWER
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerWeaponLevel2 : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -40;
|
|
|
|
Inventory.Icon "SPINBK0";
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.NOTELEPORTFREEZE
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerSpeed : Powerup native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
native int SpeedFlags;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -45;
|
|
|
|
Speed 1.5;
|
|
|
|
Inventory.Icon "SPBOOT0";
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.NOTELEPORTFREEZE
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Player Speed Trail (used by the Speed Powerup) ----------------------------
|
|
|
|
|
2016-11-23 16:34:36 +00:00
|
|
|
class PlayerSpeedTrail : Actor
|
2016-10-13 18:45:52 +00:00
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+NOBLOCKMAP
|
|
|
|
+NOGRAVITY
|
2016-10-13 18:45:52 +00:00
|
|
|
Alpha 0.6;
|
|
|
|
RenderStyle "Translucent";
|
|
|
|
}
|
2016-11-23 16:34:36 +00:00
|
|
|
|
|
|
|
override void Tick()
|
|
|
|
{
|
|
|
|
Alpha -= .6 / 8;
|
|
|
|
if (Alpha <= 0)
|
|
|
|
{
|
|
|
|
Destroy ();
|
|
|
|
}
|
|
|
|
}
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class PowerMinotaur : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -25;
|
|
|
|
Inventory.Icon "SPMINO0";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerTargeter : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -160;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.HUBPOWER
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Targeter:
|
|
|
|
TRGT A -1;
|
|
|
|
Stop;
|
|
|
|
TRGT B -1;
|
|
|
|
Stop;
|
|
|
|
TRGT C -1;
|
|
|
|
Stop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerFrightener : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerBuddha : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerScanner : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -80;
|
2016-11-14 17:31:12 +00:00
|
|
|
+INVENTORY.HUBPOWER
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerTimeFreezer : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -12;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerDamage : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerProtection : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -25;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerDrain : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -60;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerRegeneration : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -120;
|
|
|
|
Powerup.Strength 5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerHighJump : Powerup native {}
|
|
|
|
|
|
|
|
class PowerDoubleFiringSpeed : Powerup native {}
|
|
|
|
|
|
|
|
class PowerMorph : Powerup native
|
|
|
|
{
|
2016-11-23 22:28:03 +00:00
|
|
|
native Class<PlayerPawn> PlayerClass;
|
|
|
|
native Class<Actor> MorphFlash, UnMorphFlash;
|
|
|
|
native int MorphStyle;
|
|
|
|
native PlayerInfo MorphedPlayer;
|
|
|
|
native bool bInUndoMorph;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -40;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class PowerInfiniteAmmo : Powerup native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Powerup.Duration -30;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class MapRevealer : Inventory native {}
|
|
|
|
|
|
|
|
class PuzzleItem : Inventory native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
native int PuzzleItemNumber;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+NOGRAVITY
|
|
|
|
+INVENTORY.INVBAR
|
2016-10-13 18:45:52 +00:00
|
|
|
Inventory.DefMaxAmount;
|
|
|
|
Inventory.UseSound "PuzzleSuccess";
|
|
|
|
Inventory.PickupSound "misc/i_pkup";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-15 13:10:48 +00:00
|
|
|
class Weapon : StateProvider native
|
2016-10-13 18:45:52 +00:00
|
|
|
{
|
2016-11-26 20:39:20 +00:00
|
|
|
enum EFireMode
|
|
|
|
{
|
|
|
|
PrimaryFire,
|
|
|
|
AltFire,
|
|
|
|
EitherFire
|
|
|
|
};
|
|
|
|
|
2016-11-22 22:42:32 +00:00
|
|
|
native uint WeaponFlags;
|
|
|
|
native class<Ammo> AmmoType1, AmmoType2; // Types of ammo used by this weapon
|
|
|
|
native int AmmoGive1, AmmoGive2; // Amount of each ammo to get when picking up weapon
|
|
|
|
native int MinAmmo1, MinAmmo2; // Minimum ammo needed to switch to this weapon
|
|
|
|
native int AmmoUse1, AmmoUse2; // How much ammo to use with each shot
|
|
|
|
native int Kickback;
|
|
|
|
native float YAdjust; // For viewing the weapon fullscreen (visual only so no need to be a double)
|
|
|
|
native sound UpSound, ReadySound; // Sounds when coming up and idle
|
|
|
|
native class<Weapon> SisterWeaponType; // Another weapon to pick up with this one
|
|
|
|
native class<Actor> ProjectileType; // Projectile used by primary attack
|
|
|
|
native class<Actor> AltProjectileType; // Projectile used by alternate attack
|
|
|
|
native int SelectionOrder; // Lower-numbered weapons get picked first
|
|
|
|
native int MinSelAmmo1, MinSelAmmo2; // Ignore in BestWeapon() if inadequate ammo
|
|
|
|
native double MoveCombatDist; // Used by bots, but do they *really* need it?
|
|
|
|
native int ReloadCounter; // For A_CheckForReload
|
|
|
|
native int BobStyle; // [XA] Bobbing style. Defines type of bobbing (e.g. Normal, Alpha) (visual only so no need to be a double)
|
|
|
|
native float BobSpeed; // [XA] Bobbing speed. Defines how quickly a weapon bobs.
|
|
|
|
native float BobRangeX, BobRangeY; // [XA] Bobbing range. Defines how far a weapon bobs in either direction.
|
|
|
|
native Ammo Ammo1, Ammo2; // In-inventory instance variables
|
|
|
|
native Weapon SisterWeapon;
|
|
|
|
native float FOVScale;
|
|
|
|
native int Crosshair; // 0 to use player's crosshair
|
|
|
|
native bool GivenAsMorphWeapon;
|
|
|
|
native bool bAltFire; // Set when this weapon's alternate fire is used.
|
|
|
|
native readonly bool bDehAmmo;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Inventory.PickupSound "misc/w_pkup";
|
|
|
|
Weapon.DefaultKickback;
|
|
|
|
Weapon.BobSpeed 1.0;
|
|
|
|
Weapon.BobRangeX 1.0;
|
|
|
|
Weapon.BobRangeY 1.0;
|
2016-11-14 17:31:12 +00:00
|
|
|
+WEAPONSPAWN
|
2016-11-14 19:00:01 +00:00
|
|
|
DefaultStateUsage SUF_ACTOR|SUF_OVERLAY|SUF_WEAPON;
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
States
|
|
|
|
{
|
|
|
|
LightDone:
|
|
|
|
SHTG E 0 A_Light0;
|
|
|
|
Stop;
|
|
|
|
}
|
|
|
|
|
2016-11-26 20:39:20 +00:00
|
|
|
native bool CheckAmmo(int fireMode, bool autoSwitch, bool requireAmmo = false, int ammocount = -1);
|
2016-11-19 00:23:56 +00:00
|
|
|
native bool DepleteAmmo(bool altFire, bool checkEnough = true, int ammouse = -1);
|
2016-11-25 17:13:08 +00:00
|
|
|
native virtual void EndPowerup();
|
2016-11-19 00:23:56 +00:00
|
|
|
|
2016-11-22 11:21:55 +00:00
|
|
|
virtual State GetReadyState ()
|
|
|
|
{
|
|
|
|
return FindState('Ready');
|
|
|
|
}
|
|
|
|
|
2016-11-26 18:48:30 +00:00
|
|
|
virtual State GetUpState ()
|
|
|
|
{
|
|
|
|
return FindState('Select');
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual State GetDownState ()
|
|
|
|
{
|
|
|
|
return FindState('Deselect');
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual State GetAtkState (bool hold)
|
|
|
|
{
|
|
|
|
State s = null;
|
|
|
|
if (hold) s = FindState('Hold');
|
|
|
|
if (s == null) s = FindState('Fire');
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual State GetAltAtkState (bool hold)
|
|
|
|
{
|
|
|
|
State s = null;
|
|
|
|
if (hold) s = FindState('AltHold');
|
|
|
|
if (s == null) s = FindState('AltFire');
|
|
|
|
return s;
|
|
|
|
}
|
2016-11-22 11:21:55 +00:00
|
|
|
|
2016-11-21 12:04:27 +00:00
|
|
|
native action void A_ZoomFactor(double scale = 1, int flags = 0);
|
2016-11-15 15:05:42 +00:00
|
|
|
native action void A_SetCrosshair(int xhair);
|
2016-10-13 18:45:52 +00:00
|
|
|
const ZOOM_INSTANT = 1;
|
|
|
|
const ZOOM_NOSCALETURNING = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class WeaponGiver : Weapon native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
|
|
|
|
native double DropAmmoFactor;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
|
|
|
Weapon.AmmoGive1 -1;
|
|
|
|
Weapon.AmmoGive2 -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class WeaponHolder : Inventory native
|
|
|
|
{
|
2016-11-23 16:34:36 +00:00
|
|
|
native int PieceMask;
|
|
|
|
native Class<Actor> PieceWeapon;
|
|
|
|
|
2016-10-13 18:45:52 +00:00
|
|
|
Default
|
|
|
|
{
|
2016-11-14 17:31:12 +00:00
|
|
|
+NOBLOCKMAP
|
|
|
|
+NOSECTOR
|
|
|
|
+INVENTORY.UNDROPPABLE
|
2016-10-13 18:45:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class WeaponPiece : Inventory native
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
+WEAPONSPAWN;
|
|
|
|
}
|
|
|
|
}
|