Support new versions of Kinsie's test map. Switch to new GetAxes implementation across the board. Minor fixes here and there.
404 lines
No EOL
6.9 KiB
Text
404 lines
No EOL
6.9 KiB
Text
// Heretic keys
|
|
Class UTHereticYellowKey : KeyYellow
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_YELLOWKEY";
|
|
Species "KeyYellow";
|
|
Inventory.PickupMessage "$I_YELLOWKEY";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
UKEY B -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class UTHereticGreenKey : KeyGreen
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_GREENKEY";
|
|
Species "KeyGreen";
|
|
Inventory.PickupMessage "$I_GREENKEY";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
UKEY D -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class UTHereticBlueKey : KeyBlue
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_BLUEKEY";
|
|
Species "KeyBlue";
|
|
Inventory.PickupMessage "$I_BLUEKEY";
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
UKEY C -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
// Base class for items that can be activated from the inventory bar
|
|
Class UTActivatable : Inventory
|
|
{
|
|
Class<Inventory> GiveItem;
|
|
|
|
Property GiveItem: GiveItem;
|
|
|
|
override bool Use( bool pickup )
|
|
{
|
|
if ( !Owner ) return true;
|
|
let i = GetDefaultByType(GiveItem);
|
|
if ( Owner.GiveInventory(GiveItem,i.Amount) )
|
|
{
|
|
Owner.A_PlaySound(i.PickupSound,CHAN_ITEM);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
Default
|
|
{
|
|
+INVENTORY.INVBAR;
|
|
Inventory.DefMaxAmount;
|
|
Inventory.PickupSound "misc/p_pkup";
|
|
Inventory.UseSound "";
|
|
}
|
|
}
|
|
|
|
Class ActUDamage : UTActivatable
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_UDAMAGE";
|
|
Inventory.Icon "ItemUdmg";
|
|
Inventory.PickupMessage "$I_UDAMAGE";
|
|
+COUNTITEM;
|
|
+INVENTORY.BIGPOWERUP;
|
|
UTActivatable.GiveItem "UDamage";
|
|
Inventory.RespawnTics 4200;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
UDAM A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class ActShieldBelt : UTActivatable
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_SHIELDBELT";
|
|
Inventory.Icon "ItemBelt";
|
|
Inventory.PickupMessage "$I_SHIELDBELT";
|
|
+COUNTITEM;
|
|
+INVENTORY.BIGPOWERUP;
|
|
UTActivatable.GiveItem "UTShieldBelt";
|
|
Inventory.RespawnTics 2100;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
BELT A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class ActInvisibility : UTActivatable
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_INVISIBILITY";
|
|
Inventory.Icon "ItemInvs";
|
|
Inventory.PickupMessage "$I_INVISIBILITY";
|
|
+COUNTITEM;
|
|
+INVENTORY.BIGPOWERUP;
|
|
UTActivatable.GiveItem "UTInvisibility";
|
|
Inventory.RespawnTics 4200;
|
|
}
|
|
override void PostBeginPlay()
|
|
{
|
|
Super.PostBeginPlay();
|
|
tracer = Spawn("UTInvisibilityX",pos);
|
|
tracer.angle = angle;
|
|
tracer.target = self;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
INVS A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class ActJumpBoots : UTActivatable
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_JUMPBOOTS";
|
|
Inventory.Icon "ItemBoot";
|
|
Inventory.PickupMessage "$I_JUMPBOOTS";
|
|
UTActivatable.GiveItem "UTJumpBoots";
|
|
Inventory.RespawnTics 1050;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
JBUT A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class ActSearchlight : UTActivatable
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_SEARCHLIGHT";
|
|
Inventory.Icon "ItemLite";
|
|
Inventory.PickupMessage "$I_SEARCHLIGHT";
|
|
+COUNTITEM;
|
|
UTActivatable.GiveItem "Searchlight";
|
|
Inventory.RespawnTics 1050;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
SLIT A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
// These have to be subclassed from HealthPickup for auto-use
|
|
Class UTActivatableHealth : HealthPickup
|
|
{
|
|
Default
|
|
{
|
|
+INVENTORY.INVBAR;
|
|
Inventory.DefMaxAmount;
|
|
Inventory.PickupSound "misc/p_pkup";
|
|
Inventory.UseSound "misc/ut_heal";
|
|
HealthPickup.Autouse 1;
|
|
}
|
|
}
|
|
|
|
Class ActHealthPack : UTActivatableHealth
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_SUPERHEALTH";
|
|
Inventory.Icon "ItemHbox";
|
|
Inventory.PickupMessage "$I_SUPERHEALTH";
|
|
+COUNTITEM;
|
|
Health 100;
|
|
Inventory.UseSound "misc/ut_keg";
|
|
Inventory.RespawnTics 3500;
|
|
HealthPickup.Autouse 2;
|
|
}
|
|
override bool Use( bool pickup )
|
|
{
|
|
return Owner.GiveBody(health,200);
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
HBOX A -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class ActHealthBox : UTActivatableHealth
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_HEALTHBOX";
|
|
Inventory.Icon "ItemHbxb";
|
|
Inventory.PickupMessage "$I_HEALTHBOX";
|
|
Health 50;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
HBOX B -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class ActMedBox : UTActivatableHealth
|
|
{
|
|
Default
|
|
{
|
|
Tag "$T_MEDBOX";
|
|
Inventory.Icon "ItemMbox";
|
|
Inventory.PickupMessage "$I_MEDBOX";
|
|
Health 20;
|
|
Inventory.RespawnTics 700;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
HBOX C -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
// Alternative player classes for compatibility with Heretic sprites
|
|
Class UTPlayerHereticCompat : UTPlayer
|
|
{
|
|
Default
|
|
{
|
|
Player.ColorRange 225, 240;
|
|
Player.Colorset 0, "Green", 225, 240, 238;
|
|
Player.Colorset 1, "Yellow", 114, 129, 127;
|
|
Player.Colorset 2, "Red", 145, 160, 158;
|
|
Player.Colorset 3, "Blue", 190, 205, 203;
|
|
Player.Colorset 4, "Brown", 67, 82, 80;
|
|
Player.Colorset 5, "Light Gray", 9, 24, 22;
|
|
Player.Colorset 6, "Light Brown", 74, 89, 87;
|
|
Player.Colorset 7, "Light Red", 150, 165, 163;
|
|
Player.Colorset 8, "Light Blue", 192, 207, 205;
|
|
Player.Colorset 9, "Beige", 95, 110, 108;
|
|
}
|
|
States
|
|
{
|
|
Spawn:
|
|
PLAY A -1;
|
|
Stop;
|
|
See:
|
|
PLAY ABCD 4;
|
|
Loop;
|
|
Melee:
|
|
Missile:
|
|
PLAY F 6 BRIGHT;
|
|
PLAY E 12;
|
|
Goto Spawn;
|
|
Pain:
|
|
PLAY G 4;
|
|
PLAY G 4 A_Pain;
|
|
Goto Spawn;
|
|
Death:
|
|
PLAY H 6 A_PlayerSkinCheck("AltSkinDeath");
|
|
PLAY I 6 A_PlayerScream;
|
|
PLAY JK 6;
|
|
PLAY L 6 A_NoBlocking;
|
|
PLAY MNO 6;
|
|
PLAY P -1;
|
|
Stop;
|
|
XDeath:
|
|
PLAY Q 0 A_PlayerSkinCheck("AltSkinXDeath");
|
|
PLAY Q 5 A_PlayerScream;
|
|
PLAY R 0 A_NoBlocking;
|
|
PLAY R 5 A_SkullPop;
|
|
PLAY STUVWX 5;
|
|
PLAY Y -1;
|
|
Stop;
|
|
Burn:
|
|
FDTH A 5 BRIGHT A_PlaySound("*burndeath");
|
|
FDTH B 4 BRIGHT;
|
|
FDTH C 5 BRIGHT;
|
|
FDTH D 4 BRIGHT A_PlayerScream;
|
|
FDTH E 5 BRIGHT;
|
|
FDTH F 4 BRIGHT;
|
|
FDTH G 5 BRIGHT A_PlaySound("*burndeath");
|
|
FDTH H 4 BRIGHT;
|
|
FDTH I 5 BRIGHT;
|
|
FDTH J 4 BRIGHT;
|
|
FDTH K 5 BRIGHT;
|
|
FDTH L 4 BRIGHT;
|
|
FDTH M 5 BRIGHT;
|
|
FDTH N 4 BRIGHT;
|
|
FDTH O 5 BRIGHT A_NoBlocking;
|
|
FDTH P 4 BRIGHT;
|
|
FDTH Q 5 BRIGHT;
|
|
FDTH R 4 BRIGHT;
|
|
ACLO E 35 A_CheckPlayerDone;
|
|
Wait;
|
|
AltSkinDeath:
|
|
PLAY H 10;
|
|
PLAY I 10 A_PlayerScream;
|
|
PLAY J 10 A_NoBlocking;
|
|
PLAY KLM 10;
|
|
PLAY N -1;
|
|
Stop;
|
|
AltSkinXDeath:
|
|
PLAY O 5;
|
|
PLAY P 5 A_XScream;
|
|
PLAY Q 5 A_NoBlocking;
|
|
PLAY RSTUV 5;
|
|
PLAY W -1;
|
|
Stop;
|
|
}
|
|
}
|
|
|
|
Class UTPlayerHereticCompatTMale1 : UTPlayerHereticCompat
|
|
{
|
|
Default
|
|
{
|
|
Player.SoundClass "tmale1";
|
|
Player.DisplayName "$N_TMALE1";
|
|
Player.Portrait "Blake";
|
|
-NOMENU;
|
|
}
|
|
}
|
|
Class UTPlayerHereticCompatTMale2 : UTPlayerHereticCompat
|
|
{
|
|
Default
|
|
{
|
|
Player.SoundClass "tmale2";
|
|
Player.DisplayName "$N_TMALE2";
|
|
Player.Portrait "Brock";
|
|
-NOMENU;
|
|
}
|
|
}
|
|
Class UTPlayerHereticCompatTFemale1 : UTPlayerHereticCompat
|
|
{
|
|
Default
|
|
{
|
|
Player.SoundClass "tfemale";
|
|
Player.DisplayName "$N_TFEMALE1";
|
|
Player.Portrait "Ivana";
|
|
UTPlayer.DollType DOLL_Female;
|
|
-NOMENU;
|
|
}
|
|
}
|
|
Class UTPlayerHereticCompatTFemale2 : UTPlayerHereticCompat
|
|
{
|
|
Default
|
|
{
|
|
Player.SoundClass "tfemale";
|
|
Player.DisplayName "$N_TFEMALE2";
|
|
Player.Portrait "Lauren";
|
|
UTPlayer.DollType DOLL_Female;
|
|
-NOMENU;
|
|
}
|
|
}
|
|
Class UTPlayerHereticCompatTBoss : UTPlayerHereticCompat
|
|
{
|
|
transient CVar bossfootsteps;
|
|
Default
|
|
{
|
|
Player.SoundClass "tboss";
|
|
Player.DisplayName "$N_TBOSS";
|
|
Player.Portrait "Xan";
|
|
UTPlayer.DollType DOLL_Boss;
|
|
// should have NOBLOOD, but Xan did bleed in vanilla UT so...
|
|
// (this is what gave birth to the theory that Xan was actually Jerl Liandri himself)
|
|
-NOMENU;
|
|
}
|
|
override void PlayFootstep( double vol )
|
|
{
|
|
if ( !bossfootsteps ) bossfootsteps = CVar.GetCVar('flak_bossfootsteps',players[consoleplayer]);
|
|
if ( bossfootsteps.GetBool() ) A_PlaySound("ut/bossfootstep",CHAN_5,vol);
|
|
else Super.PlayFootstep(vol);
|
|
}
|
|
} |