Merge branch 'devel'
This commit is contained in:
commit
c35ca98bec
1010 changed files with 1807 additions and 406 deletions
|
|
@ -36,13 +36,13 @@ Class UTArmorBonus : UTArmor
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Armor Bonus";
|
||||
Tag "$T_ARMORBONUS";
|
||||
+COUNTITEM;
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 50;
|
||||
Inventory.InterHubAmount 50;
|
||||
UTArmor.ArmorAbsorption 25;
|
||||
Inventory.PickupMessage "You picked up an Armor Bonus.";
|
||||
Inventory.PickupMessage "$I_ARMORBONUS";
|
||||
Inventory.PickupSound "misc/ut_shard";
|
||||
}
|
||||
States
|
||||
|
|
@ -76,12 +76,12 @@ Class UTThighPads : UTArmor
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Thigh Pads";
|
||||
Tag "$T_THIGHPADS";
|
||||
Inventory.Amount 50;
|
||||
Inventory.MaxAmount 50;
|
||||
Inventory.InterHubAmount 50;
|
||||
UTArmor.ArmorAbsorption 50;
|
||||
Inventory.PickupMessage "You got the Thigh Pads.";
|
||||
Inventory.PickupMessage "$I_THIGHPADS";
|
||||
Inventory.PickupSound "misc/ut_armor";
|
||||
}
|
||||
States
|
||||
|
|
@ -115,12 +115,12 @@ Class UTBodyArmor : UTArmor
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Body Armor";
|
||||
Tag "$T_BODYARMOR";
|
||||
Inventory.Amount 100;
|
||||
Inventory.MaxAmount 100;
|
||||
Inventory.InterHubAmount 100;
|
||||
UTArmor.ArmorAbsorption 75;
|
||||
Inventory.PickupMessage "You got the Body Armor.";
|
||||
Inventory.PickupMessage "$I_BODYARMOR";
|
||||
Inventory.PickupSound "misc/ut_armor";
|
||||
}
|
||||
States
|
||||
|
|
@ -142,7 +142,7 @@ Class UTShieldBelt : UTArmor
|
|||
}
|
||||
int oldamt = amount;
|
||||
Super.AbsorbDamage(damage,damageType,newdamage);
|
||||
if ( (oldamt > 0) && (amount <= 0) ) PrintPickupMessage(true,"The Shield Belt has depleted.");
|
||||
if ( (oldamt > 0) && (amount <= 0) ) PrintPickupMessage(true,StringTable.Localize("$D_SHIELDBELT"));
|
||||
}
|
||||
override bool HandlePickup( Inventory item )
|
||||
{
|
||||
|
|
@ -173,14 +173,14 @@ Class UTShieldBelt : UTArmor
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Shield Belt";
|
||||
Tag "$T_SHIELDBELT";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.BIGPOWERUP;
|
||||
Inventory.Amount 150;
|
||||
Inventory.MaxAmount 150;
|
||||
Inventory.InterHubAmount 150;
|
||||
UTArmor.ArmorAbsorption 100;
|
||||
Inventory.PickupMessage "You got the Shield Belt.";
|
||||
Inventory.PickupMessage "$I_SHIELDBELT";
|
||||
Inventory.PickupSound "belt/pickup";
|
||||
Inventory.RespawnTics 2100;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class BioAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Biosludge Ammo";
|
||||
Inventory.PickupMessage "You picked up the Biosludge Ammo.";
|
||||
Tag "$T_BIOAMMO";
|
||||
Inventory.PickupMessage "$I_BIOAMMO";
|
||||
Inventory.Amount 25;
|
||||
Inventory.MaxAmount 100;
|
||||
Ammo.BackpackAmount 50;
|
||||
|
|
@ -22,8 +22,8 @@ Class BioAmmo2 : BioAmmo // small variant
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Biosludge Ammo";
|
||||
Inventory.PickupMessage "You picked up the Small Biosludge Ammo.";
|
||||
Tag "$T_BIOAMMO2";
|
||||
Inventory.PickupMessage "$I_BIOAMMO2";
|
||||
Inventory.Amount 10;
|
||||
Ammo.DropAmount 5;
|
||||
Scale 0.5;
|
||||
|
|
@ -138,6 +138,7 @@ Class BioLight : DynamicLight
|
|||
Destroy();
|
||||
return;
|
||||
}
|
||||
SetOrigin(target.pos,true);
|
||||
args[LIGHT_INTENSITY] = int(8*target.Scale.x);
|
||||
}
|
||||
}
|
||||
|
|
@ -158,7 +159,7 @@ Class BioXLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(64*lifetime);
|
||||
args[LIGHT_GREEN] = int(255*lifetime);
|
||||
args[LIGHT_BLUE] = int(48*lifetime);
|
||||
|
|
@ -211,7 +212,7 @@ Class BioGel : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !bNOGRAVITY )
|
||||
{
|
||||
roll += rollvel;
|
||||
|
|
@ -497,7 +498,7 @@ Class BioGel : Actor
|
|||
invoker.deadtimer = -2;
|
||||
if ( invoker.atline ) invoker.atline.RemoteActivate(target,invoker.atside,SPAC_Impact,pos);
|
||||
UTMainHandler.DoBlast(self,Min(175,int(Scale.x*50)),20000*Scale.x);
|
||||
A_Explode(int(Random[GES](18,26)*Scale.x),Min(175,int(Scale.x*50)));
|
||||
A_Explode(int(20*Scale.x),Min(175,int(Scale.x*50)));
|
||||
A_PlaySound("ges/explode",CHAN_VOICE);
|
||||
int numpt = Min(300,int(Scale.x*30))+Random[GES](-10,10);
|
||||
for ( int i=0; i<numpt; i++ )
|
||||
|
|
@ -521,7 +522,7 @@ Class BioGel : Actor
|
|||
}
|
||||
Default
|
||||
{
|
||||
Obituary "%o drank a glass of %k's dripping green load.";
|
||||
Obituary "$O_BIORIFLE";
|
||||
DamageType 'Slime';
|
||||
RenderStyle "Add";
|
||||
Radius 3;
|
||||
|
|
@ -607,7 +608,7 @@ Class BioGlob : BioGel
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
Vector3 ofs = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
for ( int i=0; i<2; i++ )
|
||||
{
|
||||
|
|
@ -657,7 +658,7 @@ Class BioRifle : UTWeapon
|
|||
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
||||
Vector3 x, y, z;
|
||||
double a, s;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+8.0*y-5.0*z;
|
||||
Actor p;
|
||||
if ( alt )
|
||||
|
|
@ -686,6 +687,7 @@ Class BioRifle : UTWeapon
|
|||
s.A_SetRenderStyle(0.5,STYLE_AddShaded);
|
||||
UTViewSmoke(s).vvel += (FRandom[GES](0.8,1.6),FRandom[GES](-0.5,0.5),FRandom[GES](-0.5,0.5));
|
||||
}
|
||||
invoker.charge = 0;
|
||||
}
|
||||
action void A_BeginCharge()
|
||||
{
|
||||
|
|
@ -712,8 +714,8 @@ Class BioRifle : UTWeapon
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "GES Bio Rifle";
|
||||
Inventory.PickupMessage "You got the GES BioRifle.";
|
||||
Tag "$T_BIORIFLE";
|
||||
Inventory.PickupMessage "$I_BIORIFLE";
|
||||
Weapon.UpSound "ges/select";
|
||||
Weapon.SlotNumber 3;
|
||||
Weapon.SelectionOrder 7;
|
||||
|
|
@ -736,6 +738,7 @@ Class BioRifle : UTWeapon
|
|||
Idle:
|
||||
BIOI A 1
|
||||
{
|
||||
invoker.charge = 0;
|
||||
invoker.bCharging = false;
|
||||
A_CheckReload();
|
||||
A_WeaponReady();
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ Class UTChainsaw : UTWeapon
|
|||
invoker.FireEffect();
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-4.0*z;
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = Random[Chainsaw](20,30);
|
||||
int dmg = 20;
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg,'slashed',DMG_USEANGLE,atan2(d.HitDir.y,d.HitDir.x));
|
||||
d.HitActor.vel -= x*(500/d.HitActor.mass);
|
||||
vel += x*(100/mass);
|
||||
|
|
@ -91,16 +91,16 @@ Class UTChainsaw : UTWeapon
|
|||
if ( initial ) invoker.FireEffect();
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-2.0*z;
|
||||
FLineTraceData d;
|
||||
double ang = (angle-60)+120*invoker.sawcnt;
|
||||
LineTrace(ang,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = Random[Chainsaw](20,30);
|
||||
int dmg = 20;
|
||||
if ( d.HitLocation.z >= (d.HitActor.pos.z+d.HitActor.height*0.8) )
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg*2,'Decapitated',DMG_USEANGLE,atan2(d.HitDir.y,d.HitDir.x));
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg*3,'Decapitated',DMG_USEANGLE,atan2(d.HitDir.y,d.HitDir.x));
|
||||
else dmg = d.HitActor.DamageMobj(invoker,self,dmg,'slashed',DMG_USEANGLE,atan2(d.HitDir.y,d.HitDir.x));
|
||||
d.HitActor.vel = -y*(1200/d.HitActor.mass);
|
||||
vel += x*(100/mass);
|
||||
|
|
@ -141,7 +141,7 @@ Class UTChainsaw : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-1,1),FRandom[Chainsaw](-1,1)),0.25,-0.1,2,SWING_Spring);
|
||||
if ( bAlt || Random[Chainsaw](0,2) ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+5.0*x+1.0*y-3.0*z;
|
||||
for ( int i=0; i<5; i++ )
|
||||
{
|
||||
|
|
@ -156,14 +156,15 @@ Class UTChainsaw : UTWeapon
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Chainsaw";
|
||||
Obituary "%k ripped into %o with a blood soaked Chainsaw.";
|
||||
Inventory.PickupMessage "It's been twenty five years since I've seen one of these."; // was five years in UT99
|
||||
Tag "$T_CHAINSAW";
|
||||
Obituary "$O_CHAINSAW";
|
||||
Inventory.PickupMessage "$I_CHAINSAW";
|
||||
Weapon.UpSound "chainsaw/select";
|
||||
Weapon.SlotNumber 1;
|
||||
Weapon.SelectionOrder 9;
|
||||
+WEAPON.MELEEWEAPON;
|
||||
+FORCEPAIN;
|
||||
+NOEXTREMEDEATH;
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,404 @@
|
|||
// TODO Heretic keys
|
||||
// Heretic keys
|
||||
Class UTHereticYellowKey : KeyYellow
|
||||
{
|
||||
Default
|
||||
{
|
||||
Tag "$T_YELLOWKEY";
|
||||
Species "KeyYellow";
|
||||
Inventory.PickupMessage "$I_YELLOWKEY";
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
UKEY B -1;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Alternative player classes used for compatibility with Heretic, Hexen, Strife and Chex
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,4 +69,68 @@ Class dt_CoordUtil
|
|||
}
|
||||
else return ((screenpos.x+1)*Screen.getWidth(),(-screenpos.y+1)*Screen.getHeight())*0.5, (screenpos.z<=1.0);
|
||||
}
|
||||
|
||||
// In Tim Sweeney's own words: "transform by a pitch-yaw-roll rotation"
|
||||
static Vector3, Vector3, Vector3 GetUnAxes( double pitch, double yaw, double roll )
|
||||
{
|
||||
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
||||
Vector3 a, b, c;
|
||||
// pitch and roll in gzdoom work in reverse compared to UE
|
||||
pitch = -pitch;
|
||||
roll = -roll;
|
||||
// yaw
|
||||
a = (cos(yaw),sin(yaw),0);
|
||||
b = (-sin(yaw),cos(yaw),0);
|
||||
c = (0,0,1);
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// pitch
|
||||
a = (cos(pitch),0,sin(pitch));
|
||||
b = (0,1,0);
|
||||
c = (-sin(pitch),0,cos(pitch));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// roll
|
||||
a = (1,0,0);
|
||||
b = (0,cos(roll),-sin(roll));
|
||||
c = (0,sin(roll),cos(roll));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
return x, y, z;
|
||||
}
|
||||
|
||||
// In Tim Sweeney's own words: "detransform by a pitch-yaw-roll rotation"
|
||||
static Vector3, Vector3, Vector3 GetAxes( double pitch, double yaw, double roll )
|
||||
{
|
||||
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
||||
Vector3 a, b, c;
|
||||
// pitch and roll in gzdoom work in reverse compared to UE
|
||||
pitch = -pitch;
|
||||
roll = -roll;
|
||||
// inverse roll
|
||||
a = (1,0,0);
|
||||
b = (0,cos(roll),sin(roll));
|
||||
c = (0,-sin(roll),cos(roll));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// inverse pitch
|
||||
a = (cos(pitch),0,-sin(pitch));
|
||||
b = (0,1,0);
|
||||
c = (sin(pitch),0,cos(pitch));
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
// inverse yaw
|
||||
a = (cos(yaw),-sin(yaw),0);
|
||||
b = (sin(yaw),cos(yaw),0);
|
||||
c = (0,0,1);
|
||||
x = (x dot a, x dot b, x dot c);
|
||||
y = (y dot a, y dot b, y dot c);
|
||||
z = (z dot a, z dot b, z dot c);
|
||||
return x, y, z;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ Class dt_Matrix4
|
|||
return r;
|
||||
}
|
||||
|
||||
// UE-like axes from rotation
|
||||
// [deprecated] UE-like axes from rotation
|
||||
// proper implementation moved to CoordUtil
|
||||
static Vector3, Vector3, Vector3 getaxes( double pitch, double yaw, double roll )
|
||||
{
|
||||
Vector3 x = (1,0,0), y = (0,-1,0), z = (0,0,1); // y inverted for left-handed result
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class UTRocketAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Rocket Pack";
|
||||
Inventory.PickupMessage "You picked up a Rocket Pack.";
|
||||
Tag "$T_ROCKETAMMO";
|
||||
Inventory.PickupMessage "$I_ROCKETAMMO";
|
||||
Inventory.Amount 12;
|
||||
Inventory.MaxAmount 48;
|
||||
Ammo.BackpackAmount 12;
|
||||
|
|
@ -23,8 +23,8 @@ Class UTRocketAmmo2 : UTRocketAmmo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Single Rocket";
|
||||
Inventory.PickupMessage "You picked up a Single Rocket.";
|
||||
Tag "$T_ROCKETAMMO2";
|
||||
Inventory.PickupMessage "$I_ROCKETAMMO2";
|
||||
Inventory.Amount 1;
|
||||
Ammo.DropAmount 1;
|
||||
+INVENTORY.IGNORESKILL;
|
||||
|
|
@ -107,7 +107,7 @@ Class UTRocket : Actor
|
|||
int ticcnt;
|
||||
Default
|
||||
{
|
||||
Obituary "%o was smacked down by %k's Rocket Launcher.";
|
||||
Obituary "$O_EIGHTBALL";
|
||||
DamageType 'RocketDeath';
|
||||
Radius 2;
|
||||
Height 2;
|
||||
|
|
@ -206,7 +206,7 @@ Class UTRocket : Actor
|
|||
}
|
||||
Wait;
|
||||
Death:
|
||||
TNT1 A 0 A_RocketExplode(Random[Eightball](90,120),160);
|
||||
TNT1 A 0 A_RocketExplode(100,160);
|
||||
SSMX ABCDEFGHIJ 2 Bright;
|
||||
Stop;
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ Class UTGrenade : UTRocket
|
|||
}
|
||||
Goto Spawn;
|
||||
Death:
|
||||
TNT1 A 0 A_RocketExplode(Random[Eightball](100,150),140);
|
||||
TNT1 A 0 A_RocketExplode(120,140);
|
||||
Goto Super::Death+1;
|
||||
}
|
||||
}
|
||||
|
|
@ -337,6 +337,7 @@ Class UTRocketLauncher : UTWeapon
|
|||
invoker.LockedOn = false;
|
||||
}
|
||||
if ( checktarget && !weap.bAltFire ) A_CheckTarget();
|
||||
invoker.special1++;
|
||||
}
|
||||
|
||||
// refire that is ignored if there's no ammo
|
||||
|
|
@ -353,6 +354,7 @@ Class UTRocketLauncher : UTWeapon
|
|||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
invoker.special1 = 0;
|
||||
if ( weap.bAltFire ) A_PlaySound("utrl/altfire",CHAN_WEAPON);
|
||||
else A_PlaySound("utrl/fire",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
|
|
@ -363,9 +365,9 @@ Class UTRocketLauncher : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Eightball](0.4,-0.8),FRandom[Eightball](-0.5,0.5)),1,-0.2,Random[Eightball](3,4),SWING_Spring,Random[Eightball](2,5),Random[Eightball](2,4));
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
double a, s;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-3.0*z;
|
||||
[x2, y2, z2] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Actor p;
|
||||
if ( weap.bAltFire )
|
||||
{
|
||||
|
|
@ -462,8 +464,8 @@ Class UTRocketLauncher : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Rocket Launcher";
|
||||
Inventory.PickupMessage "You got the Rocket Launcher.";
|
||||
Tag "$T_EIGHTBALL";
|
||||
Inventory.PickupMessage "$I_EIGHTBALL";
|
||||
Weapon.UpSound "utrl/select";
|
||||
Weapon.SlotNumber 9;
|
||||
Weapon.SelectionOrder 1;
|
||||
|
|
@ -490,6 +492,7 @@ Class UTRocketLauncher : UTWeapon
|
|||
EBLI A 1
|
||||
{
|
||||
invoker.locktics = 0;
|
||||
invoker.special1 = 0;
|
||||
A_CheckReload();
|
||||
A_WeaponReady(WRF_ALLOWRELOAD);
|
||||
}
|
||||
|
|
@ -509,8 +512,9 @@ Class UTRocketLauncher : UTWeapon
|
|||
EBLI A 5
|
||||
{
|
||||
A_PlaySound("utrl/load",CHAN_6,0.3);
|
||||
if ( invoker.bSingleRocket = !invoker.bSingleRocket ) A_Print("Instant Rocket mode enabled");
|
||||
else A_Print("Instant Rocket mode disabled");
|
||||
if ( invoker.bSingleRocket = !invoker.bSingleRocket )
|
||||
A_Print(StringTable.Localize("$M_SINGLEROCKETON"));
|
||||
else A_Print(StringTable.Localize("$M_SINGLEROCKETOFF"));
|
||||
}
|
||||
Goto Idle;
|
||||
Fire:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class EClip : MiniAmmo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Clip"; // "Large Bullets" in UT, but I think that's an oversight, since it's the same as the Minigun ammo
|
||||
Inventory.PickupMessage "You picked up a Clip.";
|
||||
Tag "$T_CLIP"; // "Large Bullets" in UT, but I think that's an oversight, since it's the same as the Minigun ammo
|
||||
Inventory.PickupMessage "$I_CLIP";
|
||||
Inventory.Amount 20;
|
||||
Ammo.DropAmount 5;
|
||||
}
|
||||
|
|
@ -120,7 +120,7 @@ Class UTCasing : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( InStateSequence(CurState,ResolveState("Death")) )
|
||||
{
|
||||
deadtimer++;
|
||||
|
|
@ -170,22 +170,16 @@ Class Enforcer : UTWeapon
|
|||
int ClipCount, SlaveClipCount;
|
||||
bool SlaveActive, SlaveDown, SlaveReload, SlaveAltFire;
|
||||
int SlaveRefire;
|
||||
transient ui Font usmf;
|
||||
|
||||
property ClipCount : ClipCount;
|
||||
property SlaveClipCount : SlaveClipCount;
|
||||
|
||||
override void PostRender( double lbottom )
|
||||
{
|
||||
if ( !flak_enforcerreload ) return;
|
||||
if ( Amount > 1 ) Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight()*2,String.Format("L Clip: %2d / 20\nR Clip: %2d / 20",slaveclipcount,clipcount));
|
||||
else Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 20",clipcount));
|
||||
}
|
||||
|
||||
override bool HandlePickup( Inventory item )
|
||||
{
|
||||
if ( item.GetClass() == GetClass() )
|
||||
{
|
||||
SetTag("Dual Enforcers");
|
||||
SetTag(StringTable.Localize("$T_ENFORCER2"));
|
||||
return Super.HandlePickup(item);
|
||||
}
|
||||
return false;
|
||||
|
|
@ -196,8 +190,8 @@ Class Enforcer : UTWeapon
|
|||
Inventory inv = Super.CreateTossable(amt);
|
||||
if ( inv )
|
||||
{
|
||||
SetTag("Enforcer");
|
||||
inv.SetTag("Enforcer");
|
||||
SetTag(StringTable.Localize("$T_ENFORCER"));
|
||||
inv.SetTag(StringTable.Localize("$T_ENFORCER"));
|
||||
if ( Owner && (Owner.player.ReadyWeapon == self) )
|
||||
{
|
||||
// delete the slave overlay
|
||||
|
|
@ -322,20 +316,20 @@ Class Enforcer : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Enforcer](-0.2,-0.5),FRandom[Enforcer](-0.3,0.2)),2,0,1,SWING_Spring,0,2);
|
||||
}
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x;
|
||||
int ydir = slave?-1:1;
|
||||
if ( alt ) origin = origin-z*3.0+ydir*y*1.0;
|
||||
else origin = origin-z*1.0+ydir*y*4.0;
|
||||
double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?0.08:0.004);
|
||||
if ( invoker.SlaveActive ) s *= 3;
|
||||
[x2, y2, z2] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = Random[Enforcer](12,17);
|
||||
int dmg = 17;
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg,'shot',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x));
|
||||
double mm = 3000;
|
||||
if ( FRandom[Enforcer](0,1) < 0.2 ) mm *= 5;
|
||||
|
|
@ -382,8 +376,8 @@ Class Enforcer : UTWeapon
|
|||
|
||||
override String GetObituary( Actor victim, Actor inflictor, Name mod, bool playerattack )
|
||||
{
|
||||
if ( Amount > 1 ) return "%k riddled %o full of holes with the Dual Enforcers.";
|
||||
return "%k riddled %o full of holes with the Enforcer.";
|
||||
if ( Amount > 1 ) return StringTable.Localize("$O_ENFORCER2");
|
||||
return StringTable.Localize("$O_ENFORCER");
|
||||
}
|
||||
|
||||
override void Travelled()
|
||||
|
|
@ -400,8 +394,8 @@ Class Enforcer : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Enforcer";
|
||||
Inventory.PickupMessage "You picked up another Enforcer!";
|
||||
Tag "$T_ENFORCER";
|
||||
Inventory.PickupMessage "$I_ENFORCER";
|
||||
Inventory.MaxAmount 2;
|
||||
Inventory.InterHubAmount 2;
|
||||
Weapon.UpSound "enforcer/select";
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class FlakAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Flak Shells";
|
||||
Inventory.PickupMessage "You picked up %d Flak Shells.";
|
||||
Tag "$T_FLAKAMMO";
|
||||
Inventory.PickupMessage "";
|
||||
Inventory.Amount 10;
|
||||
Inventory.MaxAmount 50;
|
||||
Ammo.BackpackAmount 20;
|
||||
|
|
@ -12,7 +12,7 @@ Class FlakAmmo : Ammo
|
|||
}
|
||||
override String PickupMessage()
|
||||
{
|
||||
return String.Format(pickupmsg,Amount);
|
||||
return String.Format("%s%d%s",StringTable.Localize("$I_FLAKAMMOL"),Amount,StringTable.Localize("$I_FLAKAMMOR"));
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -26,8 +26,8 @@ Class FlakAmmo2 : FlakAmmo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Flak Shell";
|
||||
Inventory.PickupMessage "You picked up a Flak Shell.";
|
||||
Tag "$T_FLAKAMMO2";
|
||||
Inventory.PickupMessage "$I_FLAKAMMO2";
|
||||
Inventory.Amount 1;
|
||||
Ammo.DropAmount 1;
|
||||
+INVENTORY.IGNORESKILL;
|
||||
|
|
@ -55,7 +55,8 @@ Class ChunkLight : DynamicLight
|
|||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
SetOrigin(target.pos,true);
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(255*(10-target.frame)*0.1);
|
||||
args[LIGHT_GREEN] = int(224*(10-target.frame)*0.1);
|
||||
args[LIGHT_BLUE] = int(128*(10-target.frame)*0.1);
|
||||
|
|
@ -84,7 +85,7 @@ Class ChunkTrail : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( InStateSequence(CurState,FindState("Death")) ) return;
|
||||
if ( !target )
|
||||
{
|
||||
|
|
@ -161,11 +162,11 @@ Class FlakChunk : Actor
|
|||
Vector3 oldvel;
|
||||
Default
|
||||
{
|
||||
Obituary "%o was ripped to shreds by %k's Flak Cannon.";
|
||||
Obituary "$O_FLAKCANNON";
|
||||
Radius 2;
|
||||
Height 2;
|
||||
Speed 32;
|
||||
DamageFunction Random[Flak](15,20);
|
||||
DamageFunction 16;
|
||||
DamageType 'Shredded';
|
||||
BounceType "Hexen";
|
||||
BounceFactor 1.0;
|
||||
|
|
@ -196,7 +197,7 @@ Class FlakChunk : Actor
|
|||
{
|
||||
oldvel = vel;
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( waterlevel > 0 )
|
||||
{
|
||||
vel.xy *= 0.98;
|
||||
|
|
@ -373,7 +374,7 @@ Class SlugSmoke : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
lifetime += lifespeed;
|
||||
let s = Spawn("UTSmoke",pos);
|
||||
s.vel = (FRandom[Flak](-0.5,0.5),FRandom[Flak](-0.5,0.5),FRandom[Flak](-0.5,0.5));
|
||||
|
|
@ -407,7 +408,7 @@ Class SlugLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(255*lifetime);
|
||||
args[LIGHT_GREEN] = int(224*lifetime);
|
||||
args[LIGHT_BLUE] = int(128*lifetime);
|
||||
|
|
@ -420,7 +421,7 @@ Class FlakSlug : Actor
|
|||
{
|
||||
Default
|
||||
{
|
||||
Obituary "%o was ripped to shreds by %k's Flak Cannon.";
|
||||
Obituary "$O_FLAKCANNON";
|
||||
DamageType 'FlakDeath';
|
||||
Radius 2;
|
||||
Height 2;
|
||||
|
|
@ -452,7 +453,7 @@ Class FlakSlug : Actor
|
|||
A_NoGravity();
|
||||
A_SetScale(1.2);
|
||||
UTMainHandler.DoBlast(self,120,75000);
|
||||
A_Explode(Random[Flak](70,80),120);
|
||||
A_Explode(70,120);
|
||||
A_QuakeEx(4,4,4,8,0,170,"",QF_RELATIVE|QF_SCALEDOWN,falloff:120,rollIntensity:0.2);
|
||||
A_PlaySound("flak/explode",CHAN_VOICE);
|
||||
A_AlertMonsters();
|
||||
|
|
@ -460,7 +461,7 @@ Class FlakSlug : Actor
|
|||
Spawn("SlugLight",pos);
|
||||
Vector3 x, y, z;
|
||||
double a, s;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Actor p;
|
||||
Vector3 spawnofs;
|
||||
if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8;
|
||||
|
|
@ -564,12 +565,12 @@ Class FlakCannon : UTWeapon
|
|||
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
||||
Vector3 x, y, z;
|
||||
double a, s;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+4.0*y-3.0*z;
|
||||
A_Overlay(-2,"MuzzleFlash");
|
||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||
[x, y, z] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 offsets[8]; // vanilla adds these to each chunk
|
||||
offsets[0] = (0,0,0);
|
||||
offsets[1] = -z;
|
||||
|
|
@ -623,7 +624,7 @@ Class FlakCannon : UTWeapon
|
|||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
double a, s;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-3.0*z;
|
||||
A_Overlay(-2,"MuzzleFlash");
|
||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
|
|
@ -654,8 +655,8 @@ Class FlakCannon : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Flak Cannon";
|
||||
Inventory.PickupMessage "You got the Flak Cannon.";
|
||||
Tag "$T_FLAKCANNON";
|
||||
Inventory.PickupMessage "$I_FLAKCANNON";
|
||||
Weapon.UpSound "flak/select";
|
||||
Weapon.SlotNumber 8;
|
||||
Weapon.SelectionOrder 2;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ Class UTHealthPack : Health
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Big Keg O' Health";
|
||||
Tag "$T_SUPERHEALTH";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
+INVENTORY.FANCYPICKUPSOUND;
|
||||
Inventory.Amount 100;
|
||||
Inventory.MaxAmount 200;
|
||||
Inventory.PickupMessage "You picked up the Big Keg O' Health.";
|
||||
Inventory.PickupMessage "$I_SUPERHEALTH";
|
||||
Inventory.PickupSound "misc/ut_keg";
|
||||
Inventory.RespawnTics 3500;
|
||||
}
|
||||
|
|
@ -25,9 +25,9 @@ Class UTHealthBox : Health
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Health Box";
|
||||
Tag "$T_HEALTHBOX";
|
||||
Inventory.Amount 50;
|
||||
Inventory.PickupMessage "You picked up a Health Box.";
|
||||
Inventory.PickupMessage "$I_HEALTHBOX";
|
||||
Inventory.PickupSound "misc/ut_heal";
|
||||
}
|
||||
States
|
||||
|
|
@ -42,9 +42,9 @@ Class UTMedBox : Health
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Health Pack";
|
||||
Tag "$T_MEDBOX";
|
||||
Inventory.Amount 20;
|
||||
Inventory.PickupMessage "You picked up a Health Pack.";
|
||||
Inventory.PickupMessage "$I_MEDBOX";
|
||||
Inventory.PickupSound "misc/ut_heal";
|
||||
Inventory.RespawnTics 700;
|
||||
}
|
||||
|
|
@ -60,12 +60,12 @@ Class UTHealthBonus : Health
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Health Vial";
|
||||
Tag "$T_VIAL";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
Inventory.Amount 5;
|
||||
Inventory.MaxAmount 200;
|
||||
Inventory.PickupMessage "You picked up a Health Vial.";
|
||||
Inventory.PickupMessage "$I_VIAL";
|
||||
Inventory.PickupSound "misc/ut_heal";
|
||||
RenderStyle "Add";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,14 +70,14 @@ Class ImpactHammer : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),3,-0.8,3,SWING_Spring,3,2);
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||
double realcharge = min(1.5,invoker.chargesize);
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,60,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = int(Random[Impact](90,120)*realcharge);
|
||||
int dmg = int(60*realcharge);
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS);
|
||||
d.HitActor.vel = x*(8000/d.HitActor.mass)*realcharge;
|
||||
if ( d.HitActor.bNOBLOOD )
|
||||
|
|
@ -95,7 +95,7 @@ Class ImpactHammer : UTWeapon
|
|||
else if ( d.HitType != TRACE_HitNone )
|
||||
{
|
||||
realcharge = max(1.0,realcharge);
|
||||
int dmg = int(Random[Impact](16,24)*realcharge); // It's a flat damage of 36 on UT, but I think it's more fair for it to scale
|
||||
int dmg = int(24*realcharge); // It's a flat damage on UT, but I think it's more fair for it to scale
|
||||
dmg = DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS);
|
||||
TraceBleed(dmg,invoker);
|
||||
vel -= x*(1200/mass)*realcharge;
|
||||
|
|
@ -122,6 +122,8 @@ Class ImpactHammer : UTWeapon
|
|||
s.vel = pvel;
|
||||
s.scale *= 0.4;
|
||||
}
|
||||
invoker.chargesize = 0;
|
||||
invoker.count = 0;
|
||||
}
|
||||
action void A_FireAltBlast()
|
||||
{
|
||||
|
|
@ -133,20 +135,20 @@ Class ImpactHammer : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,120,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
double dscale = d.Distance/120.;
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = int(Random[Impact](25,35)*dscale);
|
||||
int dmg = int(20*dscale);
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS);
|
||||
d.HitActor.vel = x*(4000/d.HitActor.mass)*dscale;
|
||||
}
|
||||
else if ( d.HitType != TRACE_HitNone )
|
||||
{
|
||||
int dmg = int(Random[Impact](16,24)*dscale);
|
||||
int dmg = int(24*dscale);
|
||||
dmg = DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS);
|
||||
vel -= x*(600/mass)*dscale;
|
||||
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4);
|
||||
|
|
@ -188,7 +190,7 @@ Class ImpactHammer : UTWeapon
|
|||
{
|
||||
FLineTraceData d;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
|
||||
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
|
||||
|
|
@ -206,9 +208,9 @@ Class ImpactHammer : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Impact Hammer";
|
||||
Obituary "%o was smeared by %k's piston.";
|
||||
Inventory.PickupMessage "You got the Impact Hammer.";
|
||||
Tag "$T_IMPACTHAMMER";
|
||||
Obituary "$O_IMPACTHAMMER";
|
||||
Inventory.PickupMessage "$I_IMPACTHAMMER";
|
||||
Weapon.UpSound "impact/select";
|
||||
Weapon.SlotNumber 1;
|
||||
Weapon.SelectionOrder 9;
|
||||
|
|
@ -227,7 +229,12 @@ Class ImpactHammer : UTWeapon
|
|||
Ready:
|
||||
IMPS ABCDEFGHIJKLMNOPQ 1 A_WeaponReady(WRF_NOFIRE);
|
||||
Idle:
|
||||
IMPI A 1 A_WeaponReady();
|
||||
IMPI A 1
|
||||
{
|
||||
invoker.chargesize = 0;
|
||||
invoker.count = 0;
|
||||
A_WeaponReady();
|
||||
}
|
||||
Wait;
|
||||
Fire:
|
||||
IMPL A 0
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class MiniAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Large Bullets";
|
||||
Inventory.PickupMessage "You picked up %d bullets.";
|
||||
Tag "$T_MINIAMMO";
|
||||
Inventory.PickupMessage "";
|
||||
Inventory.Amount 50;
|
||||
Inventory.MaxAmount 200;
|
||||
Ammo.BackpackAmount 100;
|
||||
|
|
@ -12,7 +12,7 @@ Class MiniAmmo : Ammo
|
|||
}
|
||||
override String PickupMessage()
|
||||
{
|
||||
return String.Format(pickupmsg,Amount);
|
||||
return String.Format("%s%d%s",StringTable.Localize("$I_MINIAMMOL"),Amount,StringTable.Localize("$I_MINIAMMOR"));
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ Class MinigunTracer : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
Vector3 dir = level.Vec3Diff(pos,dest);
|
||||
if ( dir.length() < 160 )
|
||||
{
|
||||
|
|
@ -101,10 +101,10 @@ Class Minigun : UTWeapon
|
|||
l.target = self;
|
||||
if ( !alt ) MinigunLight(l).cnt--;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*2.0-z*2.0;
|
||||
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
|
||||
[x2, y2, z2] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
|
||||
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
|
|
@ -195,9 +195,9 @@ Class Minigun : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Minigun";
|
||||
Obituary "%k's Minigun turned %o into a leaky piece of meat.";
|
||||
Inventory.PickupMessage "You got the Minigun.";
|
||||
Tag "$T_MINIGUN";
|
||||
Obituary "$O_MINIGUN";
|
||||
Inventory.PickupMessage "$I_MINIGUN";
|
||||
Weapon.UpSound "minigun/select";
|
||||
Weapon.SlotNumber 7;
|
||||
Weapon.SelectionOrder 3;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class UDamage : PowerupGiver
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Damage Amplifier";
|
||||
Inventory.PickupMessage "You got the Damage Amplifier!";
|
||||
Tag "$T_UDAMAGE";
|
||||
Inventory.PickupMessage "$I_UDAMAGE";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
|
|
@ -78,7 +78,7 @@ Class DamageAmplifier : Powerup
|
|||
override void EndEffect()
|
||||
{
|
||||
Super.EndEffect();
|
||||
if ( EffectTics <= 0 ) PrintPickupMessage(true,"Damage Amplifier has worn off.");
|
||||
if ( EffectTics <= 0 ) PrintPickupMessage(true,StringTable.Localize("$D_UDAMAGE"));
|
||||
}
|
||||
|
||||
override bool isBlinking()
|
||||
|
|
@ -188,8 +188,8 @@ Class UTBackpack : BackpackItem
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Backpack";
|
||||
Inventory.PickupMessage "You got a Backpack.";
|
||||
Tag "$T_BACKPACK";
|
||||
Inventory.PickupMessage "$I_BACKPACK";
|
||||
Inventory.RespawnTics 2100;
|
||||
}
|
||||
States
|
||||
|
|
@ -217,7 +217,7 @@ Class PowerUTInvisibility : PowerInvisibility
|
|||
override void EndEffect()
|
||||
{
|
||||
Super.EndEffect();
|
||||
if ( EffectTics <= 0 ) PrintPickupMessage(true,"Invisibility has worn off.");
|
||||
if ( EffectTics <= 0 ) PrintPickupMessage(true,StringTable.Localize("$D_INVISIBILITY"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -225,14 +225,14 @@ Class UTInvisibility : PowerupGiver
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Invisibility";
|
||||
Tag "$T_INVISIBILITY";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
+INVENTORY.BIGPOWERUP;
|
||||
Inventory.MaxAmount 0;
|
||||
Powerup.Type "PowerUTInvisibility";
|
||||
Inventory.PickupMessage "You have Invisibility.";
|
||||
Inventory.PickupMessage "$I_INVISIBILITY";
|
||||
Inventory.PickupSound "invis/pickup";
|
||||
Inventory.RespawnTics 4200;
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ Class UTMapRevealer : MapRevealer
|
|||
+INVENTORY.ALWAYSPICKUP;
|
||||
Inventory.MaxAmount 0;
|
||||
Inventory.PickupSound "trans/pickup";
|
||||
Inventory.PickupMessage "You got the Computer Map.";
|
||||
Inventory.PickupMessage "$I_MAPREVEALER";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -304,13 +304,13 @@ Class UTJumpBoots : Inventory
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "AntiGrav Boots";
|
||||
Tag "$T_JUMPBOOTS";
|
||||
+INVENTORY.AUTOACTIVATE;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
Inventory.Amount 2100;
|
||||
Inventory.MaxAmount 2100;
|
||||
Inventory.InterHubAmount 2100;
|
||||
Inventory.PickupMessage "You picked up the AntiGrav boots.";
|
||||
Inventory.PickupMessage "$I_JUMPBOOTS";
|
||||
Inventory.PickupSound "boot/pickup";
|
||||
Inventory.RespawnTics 1050;
|
||||
}
|
||||
|
|
@ -337,7 +337,7 @@ Class UTJumpBoots : Inventory
|
|||
}
|
||||
else if ( (Amount <= 0) && owner.player.onground )
|
||||
{
|
||||
PrintPickupMessage(true,"The AntiGrav Boots have drained.");
|
||||
PrintPickupMessage(true,StringTable.Localize("$D_JUMPBOOTS"));
|
||||
DepleteOrDestroy();
|
||||
}
|
||||
}
|
||||
|
|
@ -394,7 +394,7 @@ Class Searchlight : Inventory
|
|||
int ticcnt;
|
||||
Default
|
||||
{
|
||||
Tag "Searchligh";
|
||||
Tag "$T_SEARCHLIGHT";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.UNTOSSABLE;
|
||||
+INVENTORY.FANCYPICKUPSOUND;
|
||||
|
|
@ -403,7 +403,9 @@ Class Searchlight : Inventory
|
|||
Inventory.Amount 200;
|
||||
Inventory.MaxAmount 200;
|
||||
Inventory.InterHubAmount 0;
|
||||
Inventory.PickupMessage "You picked up the Searchlight.";
|
||||
Inventory.PickupMessage "$I_SEARCHLIGHT";
|
||||
Inventory.PickupSound "lite/pickup";
|
||||
Inventory.RespawnTics 1050;
|
||||
}
|
||||
|
||||
override bool Use( bool pickup )
|
||||
|
|
@ -434,7 +436,7 @@ Class Searchlight : Inventory
|
|||
ticcnt = 0;
|
||||
if ( --Amount <= 0 )
|
||||
{
|
||||
PrintPickupMessage(true,"Searchlight batteries have died.");
|
||||
PrintPickupMessage(true,StringTable.Localize("$D_SEARCHLIGHT"));
|
||||
DepleteOrDestroy();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class PulseAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Pulse Cell";
|
||||
Inventory.PickupMessage "You picked up a Pulse Cell.";
|
||||
Tag "$T_PULSEAMMO";
|
||||
Inventory.PickupMessage "$I_PULSEAMMO";
|
||||
Inventory.Amount 25;
|
||||
Inventory.MaxAmount 200;
|
||||
Ammo.BackpackAmount 40;
|
||||
|
|
@ -87,11 +87,11 @@ Class ViewPulseSpark : PulseSpark
|
|||
return;
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||
bInvisible = (players[consoleplayer].camera != target);
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
ofs += vvel;
|
||||
vvel *= 0.9;
|
||||
scale *= 0.8;
|
||||
|
|
@ -149,7 +149,7 @@ Class PulseExplLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(64*lifetime);
|
||||
args[LIGHT_GREEN] = int(255*lifetime);
|
||||
lifetime -= 1./ReactionTime;
|
||||
|
|
@ -161,10 +161,10 @@ Class PulseBall : Actor
|
|||
{
|
||||
Default
|
||||
{
|
||||
Obituary "%o ate %k's burning plasma death.";
|
||||
Obituary "$O_PULSEGUN";
|
||||
DamageType 'Pulsed';
|
||||
RenderStyle "Add";
|
||||
DamageFunction Random[Pulse](20,30);
|
||||
DamageFunction 20;
|
||||
PROJECTILE;
|
||||
+EXPLODEONWATER;
|
||||
+SKYEXPLODE;
|
||||
|
|
@ -373,12 +373,12 @@ Class PulseBolt : Actor
|
|||
if ( !damagedactor )
|
||||
{
|
||||
accdamage = min(0.5*(level.time-lasthit),0.1);
|
||||
t.Results.HitActor.DamageMobj(self,target,int(Random[Pulse](80,100)*accdamage),'zapped',DMG_USEANGLE,atan2(x.y,x.x));
|
||||
t.Results.HitActor.DamageMobj(self,target,int(72*accdamage),'zapped',DMG_USEANGLE,atan2(x.y,x.x));
|
||||
accdamage = 0;
|
||||
}
|
||||
else if ( t.Results.HitActor != damagedactor )
|
||||
{
|
||||
t.Results.HitActor.DamageMobj(self,target,int(Random[Pulse](80,100)*accdamage),'zapped',DMG_USEANGLE,atan2(x.y,x.x));
|
||||
t.Results.HitActor.DamageMobj(self,target,int(72*accdamage),'zapped',DMG_USEANGLE,atan2(x.y,x.x));
|
||||
accdamage = 0;
|
||||
}
|
||||
lasthit = level.time;
|
||||
|
|
@ -386,7 +386,7 @@ Class PulseBolt : Actor
|
|||
accdamage += 1./TICRATE;
|
||||
if ( accdamage > 0.17 )
|
||||
{
|
||||
t.Results.HitActor.DamageMobj(self,target,int(Random[Pulse](80,100)*accdamage),'zapped',DMG_USEANGLE,atan2(x.y,x.x));
|
||||
t.Results.HitActor.DamageMobj(self,target,int(72*accdamage),'zapped',DMG_USEANGLE,atan2(x.y,x.x));
|
||||
accdamage = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ Class PulseBolt : Actor
|
|||
}
|
||||
else if ( damagedactor )
|
||||
{
|
||||
damagedactor.DamageMobj(self,target,int(Random[Pulse](65,75)*accdamage),'zapped');
|
||||
damagedactor.DamageMobj(self,target,int(72*accdamage),'zapped');
|
||||
accdamage = 0;
|
||||
damagedactor = null;
|
||||
}
|
||||
|
|
@ -483,7 +483,7 @@ Class PulseBolt : Actor
|
|||
Default
|
||||
{
|
||||
RenderStyle "Add";
|
||||
Obituary "%o ate %k's burning plasma death.";
|
||||
Obituary "$O_PULSEGUN";
|
||||
Radius 0.1;
|
||||
Height 0;
|
||||
+NOGRAVITY;
|
||||
|
|
@ -507,7 +507,7 @@ Class StarterBolt : PulseBolt
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !target )
|
||||
{
|
||||
Destroy();
|
||||
|
|
@ -517,7 +517,7 @@ Class StarterBolt : PulseBolt
|
|||
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
|
||||
if ( target.player )
|
||||
{
|
||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+8.0*x+4.1*y-2.7*z;
|
||||
}
|
||||
else origin = target.Vec3Offset(0,0,target.missileheight);
|
||||
|
|
@ -535,15 +535,10 @@ Class PulseGun : UTWeapon
|
|||
int clipcount;
|
||||
double sangle;
|
||||
Actor beam;
|
||||
transient ui Font usmf;
|
||||
|
||||
Property ClipCount : clipcount;
|
||||
|
||||
override void PostRender( double lbottom )
|
||||
{
|
||||
if ( !flak_pulsereload ) return;
|
||||
Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 50",clipcount));
|
||||
}
|
||||
|
||||
action void A_Reloading()
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
|
|
@ -564,7 +559,7 @@ Class PulseGun : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.1,-0.02,3,SWING_Spring,0,2);
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
|
||||
for ( int i=0; i<4; i++ )
|
||||
{
|
||||
|
|
@ -630,7 +625,7 @@ Class PulseGun : UTWeapon
|
|||
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||
Vector3 x, y, z;
|
||||
double a;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+3.0*y-1.8*z;
|
||||
origin += y*cos(invoker.sangle)*2.0+z*sin(invoker.sangle)*2.0;
|
||||
invoker.sangle += 100;
|
||||
|
|
@ -662,7 +657,7 @@ Class PulseGun : UTWeapon
|
|||
{
|
||||
A_PlaySound("pulse/bolt",CHAN_WEAPON,1.0,true);
|
||||
Vector3 x, y, z, origin;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
|
||||
invoker.beam = Spawn("StarterBolt",origin);
|
||||
invoker.beam.angle = angle;
|
||||
|
|
@ -691,8 +686,8 @@ Class PulseGun : UTWeapon
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Pulse Gun";
|
||||
Inventory.PickupMessage "You got a Pulse Gun";
|
||||
Tag "$T_PULSEGUN";
|
||||
Inventory.PickupMessage "$I_PULSEGUN";
|
||||
Weapon.UpSound "pulse/select";
|
||||
Weapon.SlotNumber 5;
|
||||
Weapon.SelectionOrder 5;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class RipperAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Razor Blades";
|
||||
Inventory.PickupMessage "You picked up Razor Blades.";
|
||||
Tag "$T_RIPPERAMO";
|
||||
Inventory.PickupMessage "$I_RIPPERAMMO";
|
||||
Inventory.Amount 10;
|
||||
Inventory.MaxAmount 40;
|
||||
Ammo.BackpackAmount 20;
|
||||
|
|
@ -57,9 +57,9 @@ Class Razor2 : Actor
|
|||
Radius 2;
|
||||
Height 2;
|
||||
Speed 25;
|
||||
DamageFunction (Random[Ripper](20,25)*((DamageType=='Decapitated')?3:1.0));
|
||||
DamageFunction (int(30*((DamageType=='Decapitated')?3.5:1.0)));
|
||||
DamageType 'Shredded';
|
||||
Obituary "%k ripped a chunk of meat out of %o with the Ripper.";
|
||||
Obituary "$O_RIPPER";
|
||||
BounceType "Hexen";
|
||||
ReactionTime 7;
|
||||
BounceFactor 1.0;
|
||||
|
|
@ -170,7 +170,7 @@ Class Razor2AltLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(255*lifetime);
|
||||
args[LIGHT_GREEN] = int(240*lifetime);
|
||||
args[LIGHT_BLUE] = int(224*lifetime);
|
||||
|
|
@ -200,7 +200,7 @@ Class Razor2Alt : Razor2
|
|||
A_AlertMonsters();
|
||||
A_SprayDecal("RazorBlast",20);
|
||||
UTMainHandler.DoBlast(self,90,87000);
|
||||
A_Explode(Random[Ripper](30,50),90,damagetype:'RipperAltDeath');
|
||||
A_Explode(34,90,damagetype:'RipperAltDeath');
|
||||
A_QuakeEx(3,3,3,10,0,140,"",QF_RELATIVE|QF_SCALEDOWN,falloff:90,rollIntensity:0.1);
|
||||
int numpt = Random[Ripper](10,20);
|
||||
Vector3 x = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
|
|
@ -248,8 +248,8 @@ Class Ripper2 : UTWeapon
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Ripper";
|
||||
Inventory.PickupMessage "You got the Ripper.";
|
||||
Tag "$T_RIPPER";
|
||||
Inventory.PickupMessage "$I_RIPPER";
|
||||
Weapon.UpSound "ripper/select";
|
||||
Weapon.SlotNumber 6;
|
||||
Weapon.SelectionOrder 4;
|
||||
|
|
@ -282,7 +282,7 @@ Class Ripper2 : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.3,-0.6),FRandom[Ripper](0.2,0.6)),1,-0.3,2,SWING_Spring,2,2);
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+6.0*y-4.0*z;
|
||||
Actor p;
|
||||
if ( alt ) p = Spawn("Razor2Alt",origin);
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class ShockAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Shock Core";
|
||||
Inventory.PickupMessage "You picked up a Shock Core.";
|
||||
Tag "$T_SHOCKAMMO";
|
||||
Inventory.PickupMessage "$I_SHOCKAMMO";
|
||||
Inventory.Amount 10;
|
||||
Inventory.MaxAmount 50;
|
||||
Ammo.BackpackAmount 20;
|
||||
|
|
@ -22,8 +22,8 @@ Class ShockAmmo2 : ShockAmmo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Used Shock Core";
|
||||
Inventory.PickupMessage "You picked up a used Shock Core.";
|
||||
Tag "$T_SHOCKAMMO2";
|
||||
Inventory.PickupMessage "$I_SHOCKAMMO2";
|
||||
Inventory.Amount 3;
|
||||
Ammo.DropAmount 3;
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ Class ShockRifleWave : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
alpha -= 1/50.;
|
||||
}
|
||||
States
|
||||
|
|
@ -99,7 +99,7 @@ Class SuperShockRifleWave : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
alpha -= 1/50.;
|
||||
}
|
||||
States
|
||||
|
|
@ -127,7 +127,7 @@ Class ShockBeamRing : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
alpha -= 1./ReactionTime;
|
||||
}
|
||||
States
|
||||
|
|
@ -154,7 +154,7 @@ Class SuperShockBeamRing : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
alpha -= 1./ReactionTime;
|
||||
}
|
||||
States
|
||||
|
|
@ -271,7 +271,7 @@ Class ShockBeam : Actor
|
|||
|
||||
Default
|
||||
{
|
||||
Obituary "%k inflicted mortal damage upon %o with the Shock Rifle";
|
||||
Obituary "$O_SHOCKRIFLE";
|
||||
DamageType 'jolted';
|
||||
RenderStyle "Add";
|
||||
Radius 0.1;
|
||||
|
|
@ -295,7 +295,7 @@ Class ShockBeam : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !moving ) return;
|
||||
// step trace
|
||||
tracedir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
|
|
@ -342,7 +342,7 @@ Class ShockBeam : Actor
|
|||
let b = t.Results.HitActor.target;
|
||||
UTMainHandler.DoBlast(b,250,70000);
|
||||
b.ExplodeMissile(null,self);
|
||||
b.A_Explode(Random[ASMD](150,180),250);
|
||||
b.A_Explode(165,250);
|
||||
b.A_QuakeEx(6,6,6,60,0,1200,"",QF_RELATIVE|QF_SCALEDOWN,falloff:250,rollIntensity:0.2);
|
||||
b.A_SprayDecal("BigShockMark1",100);
|
||||
b.A_SprayDecal("BigShockMark2",100);
|
||||
|
|
@ -362,7 +362,7 @@ Class ShockBeam : Actor
|
|||
}
|
||||
else
|
||||
{
|
||||
t.Results.HitActor.DamageMobj(self,target,Random[ASMD](35,50),'jolted',DMG_USEANGLE,atan2(t.Results.HitVector.y,t.Results.HitVector.x));
|
||||
t.Results.HitActor.DamageMobj(self,target,40,'jolted',DMG_USEANGLE,atan2(t.Results.HitVector.y,t.Results.HitVector.x));
|
||||
UTMainHandler.DoKnockback(t.Results.HitActor,t.Results.HitVector,60000);
|
||||
let r = Spawn("ShockBeamRing",pos);
|
||||
r.angle = atan2(t.Results.HitVector.y,t.Results.HitVector.x);
|
||||
|
|
@ -497,7 +497,7 @@ Class SuperShockBeam : Actor
|
|||
|
||||
Default
|
||||
{
|
||||
Obituary "%k electrified %o with the Enhanced Shock Rifle.";
|
||||
Obituary "$O_SSHOCKRIFLE";
|
||||
DamageType 'joltedX';
|
||||
RenderStyle "Add";
|
||||
Radius 0.1;
|
||||
|
|
@ -522,7 +522,7 @@ Class SuperShockBeam : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !moving ) return;
|
||||
// step trace
|
||||
tracedir = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||
|
|
@ -569,7 +569,7 @@ Class SuperShockBeam : Actor
|
|||
let b = t.Results.HitActor.target;
|
||||
UTMainHandler.DoBlast(b,400,70000);
|
||||
b.ExplodeMissile(null,self);
|
||||
b.A_Explode(Random[ASMD](15000,16000),400);
|
||||
b.A_Explode(int.max,400);
|
||||
b.A_QuakeEx(9,9,9,60,0,2400,"",QF_RELATIVE|QF_SCALEDOWN,falloff:400,rollIntensity:0.4);
|
||||
b.A_SprayDecal("BigShockMark1",100);
|
||||
b.A_SprayDecal("SBigShockMark2",100);
|
||||
|
|
@ -593,7 +593,10 @@ Class SuperShockBeam : Actor
|
|||
// the actor may "cease to exist" if it dies after the call to ExplodeMissile, so guard against that
|
||||
if ( t.Results.HitActor )
|
||||
{
|
||||
t.Results.HitActor.DamageMobj(self,target,Random[ASMD](3500,5000),'joltedX',DMG_USEANGLE|DMG_THRUSTLESS,atan2(t.Results.HitVector.y,t.Results.HitVector.x));
|
||||
// damage was 1000 in UT but it's meant to be instakill and players couldn't reach that health legitimately anyway, so rather than
|
||||
// some absurd number they settled for that
|
||||
// we ain't goin' that way here
|
||||
t.Results.HitActor.DamageMobj(self,target,int.max,'joltedX',DMG_USEANGLE|DMG_THRUSTLESS,atan2(t.Results.HitVector.y,t.Results.HitVector.x));
|
||||
UTMainHandler.DoKnockback(t.Results.HitActor,t.Results.HitVector,60000);
|
||||
}
|
||||
let r = Spawn("SuperShockBeamRing",pos);
|
||||
|
|
@ -632,7 +635,7 @@ Class SuperShockBeam : Actor
|
|||
if ( !flak_classicsshock )
|
||||
{
|
||||
UTMainHandler.DoBlast(self,50,60000);
|
||||
A_Explode(Random[ASMD](500,800),50);
|
||||
A_Explode(int.max,50);
|
||||
}
|
||||
A_QuakeEx(6,6,6,5,0,100,"",QF_RELATIVE|QF_SCALEDOWN,falloff:50,rollIntensity:0.2);
|
||||
A_PlaySound("shock/hit",CHAN_VOICE,attenuation:0.5);
|
||||
|
|
@ -765,7 +768,7 @@ Class ShockExplLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(160*lifetime);
|
||||
args[LIGHT_GREEN] = int(128*lifetime);
|
||||
args[LIGHT_BLUE] = int(255*lifetime);
|
||||
|
|
@ -791,7 +794,7 @@ Class SuperShockExplLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(255*lifetime);
|
||||
args[LIGHT_GREEN] = int(160*lifetime);
|
||||
args[LIGHT_BLUE] = int(128*lifetime);
|
||||
|
|
@ -841,7 +844,7 @@ Class ShockBall : Actor
|
|||
action void A_BallExplode()
|
||||
{
|
||||
UTMainHandler.DoBlast(self,70,70000);
|
||||
A_Explode(Random[ASMD](50,60),70);
|
||||
A_Explode(55,70);
|
||||
A_SprayDecal("ShockMarkBig",16);
|
||||
Spawn("ShockExplLight",pos);
|
||||
A_SetScale(1.0);
|
||||
|
|
@ -863,7 +866,7 @@ Class ShockBall : Actor
|
|||
}
|
||||
Default
|
||||
{
|
||||
Obituary "%k inflicted mortal damage upon %o with the Shock Rifle";
|
||||
Obituary "$O_SHOCKRIFLE";
|
||||
RenderStyle "Add";
|
||||
DamageType 'jolted';
|
||||
Radius 2;
|
||||
|
|
@ -905,7 +908,7 @@ Class SuperShockBall : Actor
|
|||
action void A_BallExplode()
|
||||
{
|
||||
UTMainHandler.DoBlast(self,120,70000);
|
||||
A_Explode(Random[ASMD](4000,5000),120);
|
||||
A_Explode(int.max,120);
|
||||
A_SprayDecal("ShockMarkBig",16);
|
||||
Spawn("SuperShockExplLight",pos);
|
||||
A_SetScale(1.5);
|
||||
|
|
@ -928,7 +931,7 @@ Class SuperShockBall : Actor
|
|||
}
|
||||
Default
|
||||
{
|
||||
Obituary "%k electrified %o with the Enhanced Shock Rifle.";
|
||||
Obituary "$O_SSHOCKRIFLE";
|
||||
RenderStyle "Add";
|
||||
DamageType 'joltedX';
|
||||
Radius 2;
|
||||
|
|
@ -978,11 +981,11 @@ Class ViewShockSpark : ShockSpark
|
|||
return;
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||
bInvisible = (players[consoleplayer].camera != target);
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
ofs += vvel;
|
||||
vvel *= 0.9;
|
||||
scale *= 0.8;
|
||||
|
|
@ -1012,7 +1015,7 @@ Class ShockRifle : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||
Actor p = Spawn("ShockBeam",origin);
|
||||
p.angle = angle;
|
||||
|
|
@ -1050,7 +1053,7 @@ Class ShockRifle : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||
Actor p = Spawn("ShockBall",origin);
|
||||
p.angle = angle;
|
||||
|
|
@ -1079,8 +1082,8 @@ Class ShockRifle : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Shock Rifle";
|
||||
Inventory.PickupMessage "You got the ASMD Shock Rifle.";
|
||||
Tag "$T_SHOCKRIFLE";
|
||||
Inventory.PickupMessage "$I_SHOCKRIFLE";
|
||||
Weapon.UpSound "shock/select";
|
||||
Weapon.SlotNumber 4;
|
||||
Weapon.SelectionOrder 6;
|
||||
|
|
@ -1129,28 +1132,28 @@ Class EnhancedShockAmmo : Ammo
|
|||
{
|
||||
int ticcnt;
|
||||
|
||||
override void BeginPlay()
|
||||
{
|
||||
Super.BeginPlay();
|
||||
if ( deathmatch )
|
||||
{
|
||||
MaxAmount /= 2;
|
||||
BackpackMaxAmount /= 2;
|
||||
}
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( !Owner ) return;
|
||||
ticcnt++;
|
||||
if ( ticcnt < 105 ) return;
|
||||
ticcnt = 0;
|
||||
if ( Amount > 0 ) Amount--;
|
||||
if ( deathmatch && flak_instagib )
|
||||
{
|
||||
if ( ticcnt < 35 ) return;
|
||||
ticcnt = 0;
|
||||
if ( Amount < MaxAmount ) Amount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ticcnt < 105 ) return;
|
||||
ticcnt = 0;
|
||||
if ( Amount > 0 ) Amount--;
|
||||
}
|
||||
}
|
||||
Default
|
||||
{
|
||||
Tag "Enhanced Shock Core";
|
||||
Inventory.PickupMessage "You picked up an Enhanced Shock Core.";
|
||||
Tag "$T_SSHOCKAMMO";
|
||||
Inventory.PickupMessage "$I_SSHOCKAMMO";
|
||||
Inventory.Amount 5;
|
||||
Inventory.MaxAmount 50;
|
||||
Ammo.BackpackAmount 0;
|
||||
|
|
@ -1195,7 +1198,7 @@ Class EnhancedShockRifle : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||
Actor p = Spawn("SuperShockBeam",origin);
|
||||
p.angle = angle;
|
||||
|
|
@ -1233,7 +1236,7 @@ Class EnhancedShockRifle : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
|
||||
Actor p = Spawn("SuperShockBall",origin);
|
||||
p.angle = angle;
|
||||
|
|
@ -1266,8 +1269,8 @@ Class EnhancedShockRifle : UTWeapon
|
|||
}
|
||||
Default
|
||||
{
|
||||
Tag "Enhanced Shock Rifle";
|
||||
Inventory.PickupMessage "You got an Enhanced Shock Rifle!";
|
||||
Tag "$T_SSHOCKRIFLE";
|
||||
Inventory.PickupMessage "$I_SSHOCKRIFLE";
|
||||
Weapon.UpSound "shock/select";
|
||||
Weapon.SlotNumber 4;
|
||||
Weapon.SelectionOrder 6;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Class RifleAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Box of Rifle Rounds";
|
||||
Inventory.PickupMessage "You picked up a Box of Rifle Rounds.";
|
||||
Tag "$T_RIFLEAMMO";
|
||||
Inventory.PickupMessage "$I_RIFLEAMMO";
|
||||
Inventory.Amount 10;
|
||||
Inventory.MaxAmount 50;
|
||||
Ammo.BackpackAmount 20;
|
||||
|
|
@ -22,8 +22,8 @@ Class RifleAmmo2 : RifleAmmo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Rifle Round";
|
||||
Inventory.PickupMessage "You got a Rifle Round.";
|
||||
Tag "$T_RIFLEAMMO2";
|
||||
Inventory.PickupMessage "$I_RIFLEAMMO2";
|
||||
Inventory.Amount 1;
|
||||
Ammo.DropAmount 1;
|
||||
+INVENTORY.IGNORESKILL;
|
||||
|
|
@ -48,6 +48,7 @@ Class SniperRifle : UTWeapon
|
|||
{
|
||||
double sniperzoom;
|
||||
TextureID reticle;
|
||||
transient ui Font zfont;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -57,8 +58,9 @@ Class SniperRifle : UTWeapon
|
|||
override void PreRender( double lbottom )
|
||||
{
|
||||
if ( sniperzoom <= 1.0 ) return;
|
||||
Screen.DrawTexture(reticle,false,320,240,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_RenderStyle,(1|2<<8|1<<16));
|
||||
Screen.DrawText(confont,Font.CR_DARKGREEN,192,160,String.Format("X%.1f",sniperzoom),DTA_Clean,true);
|
||||
Screen.DrawTexture(reticle,false,320,240,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
if ( !zfont ) zfont = Font.GetFont('UTFont40');
|
||||
Screen.DrawText(zfont,Font.FindFontColor('UGreen'),960,960,String.Format("X%.1f",sniperzoom),DTA_VirtualWidth,1600,DTA_VirtualHeight,1200,DTA_LegacyRenderStyle,STYLE_Add);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
@ -95,17 +97,17 @@ Class SniperRifle : UTWeapon
|
|||
let l = Spawn("SniperLight",pos);
|
||||
l.target = self;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x;
|
||||
if ( !zoomed ) origin = origin+y*4.0-z*2.0;
|
||||
FLineTraceData d;
|
||||
LineTrace(angle,10000,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = Random[Sniper](45,60);
|
||||
int dmg = 45;
|
||||
if ( d.HitLocation.z >= (d.HitActor.pos.z+d.HitActor.height*0.81) )
|
||||
{
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg+70,'Decapitated',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x));
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,100,'Decapitated',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x));
|
||||
UTMainHandler.DoKnockback(d.HitActor,d.HitDir,35000);
|
||||
}
|
||||
else
|
||||
|
|
@ -158,14 +160,14 @@ Class SniperRifle : UTWeapon
|
|||
}
|
||||
override String GetObituary( Actor victim, Actor inflictor, Name mod, bool playerattack )
|
||||
{
|
||||
if ( mod == 'Decapitated' ) return "%k put a bullet through %o's head.";
|
||||
if ( mod == 'Decapitated' ) return StringTable.Localize("$O_SNIPERDECAP");
|
||||
return Obituary;
|
||||
}
|
||||
Default
|
||||
{
|
||||
Tag "Sniper Rifle";
|
||||
Obituary "%k put a bullet through %o.";
|
||||
Inventory.PickupMessage "You got the Sniper Rifle.";
|
||||
Tag "$T_SNIPER";
|
||||
Obituary "$O_SNIPER";
|
||||
Inventory.PickupMessage "$I_SNIPER";
|
||||
Weapon.UpSound "sniper/select";
|
||||
Weapon.SlotNumber 0;
|
||||
Weapon.SelectionOrder 5;
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ Class TranslocatorAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Translocator Ammo";
|
||||
Tag "$T_TRANSLOCATORAMMO";
|
||||
Inventory.Amount 6;
|
||||
Inventory.MaxAmount 6;
|
||||
Ammo.BackpackAmount 0;
|
||||
|
|
@ -330,7 +330,7 @@ Class Translocator : UTWeapon
|
|||
UTMainHandler.DoSwing(self,(FRandom[Translocator](-0.2,0.4),FRandom[Translocator](-0.2,0.7)),2,-0.3,3,SWING_Spring,2,3);
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-8.0*y-12.0*z;
|
||||
let p = Spawn("TranslocatorModule",origin);
|
||||
p.target = self;
|
||||
|
|
@ -413,8 +413,8 @@ Class Translocator : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Translocator";
|
||||
Inventory.PickupMessage "You got the Translocator Source Module.";
|
||||
Tag "$T_TRANSLOCATOR";
|
||||
Inventory.PickupMessage "$I_TRANSLOCATOR";
|
||||
Weapon.SlotNumber 1;
|
||||
Weapon.SelectionOrder 10;
|
||||
+WEAPON.NO_AUTO_SWITCH;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ Class UTPlayer : DoomPlayer
|
|||
const groundfriction = 8.;
|
||||
const fluidfriction = 1.2;
|
||||
const terminalvelocity = 2500.;
|
||||
const slantnormal = 0.7; // slope sliding will have to be handled eventually, but currently due to how much is hardcoded this is impossible
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -50,8 +51,6 @@ Class UTPlayer : DoomPlayer
|
|||
// Have to modify the give cheat to handle UT armor
|
||||
override void CheatGive( String name, int amount )
|
||||
{
|
||||
if ( PlayerNumber() != consoleplayer )
|
||||
A_Log(String.Format("%s is a cheater: give %s\n",player.GetUserName(),name));
|
||||
if ( !player.mo || (player.health <= 0) ) return;
|
||||
int giveall = ALL_NO;
|
||||
if ( name ~== "all" ) giveall = ALL_YES;
|
||||
|
|
@ -162,7 +161,10 @@ Class UTPlayer : DoomPlayer
|
|||
{
|
||||
let type = (class<Inventory>)(AllActorClasses[i]);
|
||||
if ( !type ) continue;
|
||||
let def = GetDefaultByType (type);
|
||||
let def = GetDefaultByType(type);
|
||||
if ( !(self is "UTPlayerHereticCompat")
|
||||
&& ((type is "UTActivatable") || (type is "UTActivatableHealth")) )
|
||||
continue; // don't give these outside of Heretic/Hexen
|
||||
if ( def.Icon.isValid() && (def.MaxAmount > 1) &&
|
||||
!(type is "PuzzleItem") && !(type is "Powerup") && !(type is "Ammo") && !(type is "Armor"))
|
||||
{
|
||||
|
|
@ -394,7 +396,7 @@ Class UTPlayer : DoomPlayer
|
|||
Vector3 dir = (0,0,0);
|
||||
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
||||
Vector3 x, y;
|
||||
[x, y] = dt_Matrix4.GetAxes(pitch,angle,0);
|
||||
[x, y] = dt_CoordUtil.GetAxes(pitch,angle,0);
|
||||
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
||||
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
||||
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
||||
|
|
@ -423,7 +425,7 @@ Class UTPlayer : DoomPlayer
|
|||
if ( vel.length() > double.epsilon ) dir = vel.unit();
|
||||
double doomfriction = clamp(GetFriction()/ORIG_FRICTION,0.0,1.0);
|
||||
Vector3 x, y;
|
||||
[x, y] = dt_Matrix4.GetAxes(pitch,angle,0);
|
||||
[x, y] = dt_CoordUtil.GetAxes(pitch,angle,0);
|
||||
acceleration3 = x*player.cmd.forwardmove+y*player.cmd.sidemove;
|
||||
if ( player.cmd.buttons&BT_JUMP ) acceleration3.z = 0x500;
|
||||
else if ( player.cmd.buttons&BT_CROUCH ) acceleration3.z = -0x500;
|
||||
|
|
@ -590,7 +592,7 @@ Class UTPlayerTMale1 : UTPlayer
|
|||
Default
|
||||
{
|
||||
Player.SoundClass "tmale1";
|
||||
Player.DisplayName "M Commando";
|
||||
Player.DisplayName "$N_TMALE1";
|
||||
Player.Portrait "Blake";
|
||||
-NOMENU;
|
||||
}
|
||||
|
|
@ -600,7 +602,7 @@ Class UTPlayerTMale2 : UTPlayer
|
|||
Default
|
||||
{
|
||||
Player.SoundClass "tmale2";
|
||||
Player.DisplayName "M Soldier";
|
||||
Player.DisplayName "$N_TMALE2";
|
||||
Player.Portrait "Brock";
|
||||
-NOMENU;
|
||||
}
|
||||
|
|
@ -610,7 +612,7 @@ Class UTPlayerTFemale1 : UTPlayer
|
|||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "F Commando";
|
||||
Player.DisplayName "$N_TFEMALE1";
|
||||
Player.Portrait "Ivana";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
-NOMENU;
|
||||
|
|
@ -621,7 +623,7 @@ Class UTPlayerTFemale2 : UTPlayer
|
|||
Default
|
||||
{
|
||||
Player.SoundClass "tfemale";
|
||||
Player.DisplayName "F Soldier";
|
||||
Player.DisplayName "$N_TFEMALE2";
|
||||
Player.Portrait "Lauren";
|
||||
UTPlayer.DollType DOLL_Female;
|
||||
-NOMENU;
|
||||
|
|
@ -633,7 +635,7 @@ Class UTPlayerTBoss : UTPlayer
|
|||
Default
|
||||
{
|
||||
Player.SoundClass "tboss";
|
||||
Player.DisplayName "Boss";
|
||||
Player.DisplayName "$N_TBOSS";
|
||||
Player.Portrait "Xan";
|
||||
UTPlayer.DollType DOLL_Boss;
|
||||
// should have NOBLOOD, but Xan did bleed in vanilla UT so...
|
||||
|
|
@ -784,7 +786,7 @@ Class UTWeapon : Weapon
|
|||
Vector2 hofs = RotateVector((dropper.radius,0),dropper.angle);
|
||||
SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(dropper.pitch,dropper.angle,dropper.roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(dropper.pitch,dropper.angle,dropper.roll);
|
||||
vel = x*12.0;
|
||||
vel.z += 4.0;
|
||||
angle = dropper.angle;
|
||||
|
|
@ -955,11 +957,11 @@ Class UTViewSpark : UTSpark
|
|||
return;
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||
bInvisible = (players[consoleplayer].camera != target);
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
ofs += vvel;
|
||||
vvel.z -= 0.1;
|
||||
scale *= 0.8;
|
||||
|
|
@ -1001,7 +1003,7 @@ Class UTChip : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( InStateSequence(CurState,ResolveState("Death")) )
|
||||
{
|
||||
deadtimer++;
|
||||
|
|
@ -1064,7 +1066,7 @@ Class UTBubble : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
vel *= 0.96;
|
||||
vel.z += 0.05;
|
||||
if ( (waterlevel <= 0) || !Random[Puff](0,100) ) Destroy();
|
||||
|
|
@ -1112,7 +1114,7 @@ Class UTSmoke : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
vel *= 0.96;
|
||||
vel.z += 0.01;
|
||||
A_FadeOut(1/32.);
|
||||
|
|
@ -1200,11 +1202,11 @@ Class UTViewSmoke : UTSmoke
|
|||
return;
|
||||
}
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(target.pitch,target.angle,target.roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
|
||||
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
|
||||
bInvisible = (players[consoleplayer].camera != target);
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
ofs += vvel;
|
||||
vvel *= 0.96;
|
||||
vvel.z += 0.01;
|
||||
|
|
@ -1227,9 +1229,9 @@ Class UTRedSkull : RedSkull
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Red Skull";
|
||||
Tag "$T_REDSKULL";
|
||||
Species "RedSkull";
|
||||
Inventory.PickupMessage "You got the Red Skull.";
|
||||
Inventory.PickupMessage "$I_REDSKULL";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -1243,9 +1245,9 @@ Class UTGoldSkull : YellowSkull
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Gold Skull";
|
||||
Tag "$T_GOLDSKULL";
|
||||
Species "YellowSkull";
|
||||
Inventory.PickupMessage "You got the Gold Skull.";
|
||||
Inventory.PickupMessage "$I_GOLDSKULL";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -1259,9 +1261,9 @@ Class UTBlueSkull : BlueSkull
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Blue Skull";
|
||||
Tag "$T_BLUESKULL";
|
||||
Species "BlueSkull";
|
||||
Inventory.PickupMessage "You got the Blue Skull.";
|
||||
Inventory.PickupMessage "$I_BLUESKULL";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -1275,9 +1277,9 @@ Class UTRedKey : RedCard
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Red Key";
|
||||
Tag "%T_REDKEY";
|
||||
Species "RedCard";
|
||||
Inventory.PickupMessage "You got the Red Key.";
|
||||
Inventory.PickupMessage "$I_REDKEY";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -1291,9 +1293,9 @@ Class UTGoldKey : YellowCard
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Gold Key";
|
||||
Tag "$T_GOLDKEY";
|
||||
Species "YellowCard";
|
||||
Inventory.PickupMessage "You got the Gold Key.";
|
||||
Inventory.PickupMessage "$I_GOLDKEY";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -1307,9 +1309,9 @@ Class UTBlueKey : BlueCard
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Blue Key";
|
||||
Tag "$T_BLUEKEY";
|
||||
Species "BlueCard";
|
||||
Inventory.PickupMessage "You got the Blue Key.";
|
||||
Inventory.PickupMessage "$I_BLUEKEY";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
@ -1436,6 +1438,7 @@ Class GenericFlash : HUDMessageBase
|
|||
int duration;
|
||||
double alpha;
|
||||
Actor cam;
|
||||
transient CVar str;
|
||||
GenericFlash Setup( Actor camera, Color c, int d )
|
||||
{
|
||||
alpha = 1.0;
|
||||
|
|
@ -1453,7 +1456,8 @@ Class GenericFlash : HUDMessageBase
|
|||
{
|
||||
if ( automapactive || (visibility != BaseStatusBar.HUDMSGLayer_UnderHUD) ) return;
|
||||
if ( cam && (players[consoleplayer].camera != cam) ) return;
|
||||
Screen.Dim(col,(col.a/255.)*alpha,0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||
if ( !str ) str = CVar.GetCVar('flak_flashstrength',players[consoleplayer]);
|
||||
Screen.Dim(col,(col.a/255.)*alpha*str.GetFloat(),0,0,Screen.GetWidth(),Screen.GetHeight());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1547,8 +1551,13 @@ Class UTMainHandler : EventHandler
|
|||
else e.Replacement = 'SniperRifle';
|
||||
}
|
||||
else if ( e.Replacee == 'BFG9000' ) e.Replacement = 'WarheadLauncher';
|
||||
else if ( e.Replacee == 'Clip' ) e.Replacement = 'EClip';
|
||||
else if ( e.Replacee == 'ClipBox' )
|
||||
else if ( e.Replacee == 'Mace' )
|
||||
{
|
||||
if ( (!deathmatch || flak_dmsshock) && !Random[Replacements](0,6) ) e.Replacement = 'EnhancedShockRifle';
|
||||
else e.Replacement = 'WarheadLauncher';
|
||||
}
|
||||
else if ( (e.Replacee == 'Clip') || (e.Replacee == 'GoldWandAmmo') || (e.Replacee == 'GoldWandHefty') ) e.Replacement = 'EClip';
|
||||
else if ( (e.Replacee == 'ClipBox') )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'EClip';
|
||||
else if ( Random[Replacements](0,2) ) e.Replacement = 'PulseAmmo';
|
||||
|
|
@ -1595,21 +1604,40 @@ Class UTMainHandler : EventHandler
|
|||
else if ( Random[Replacements](0,1) ) e.Replacement = 'MiniAmmo';
|
||||
else e.Replacement = 'RifleAmmo';
|
||||
}
|
||||
else if ( e.Replacee == 'InvulnerabilitySphere' ) e.Replacement = 'EnhancedShockRifle';
|
||||
else if ( e.Replacee == 'InvulnerabilitySphere' ) e.Replacement = (!deathmatch||flak_dmsshock)?'EnhancedShockRifle':'UDamage';
|
||||
else if ( e.Replacee == 'Berserk' ) e.Replacement = 'UDamage';
|
||||
else if ( (e.Replacee == 'ArtiTomeOfPower') || (e.Replacee == 'ArtiEgg') ) e.Replacement = 'ActUDamage';
|
||||
else if ( e.Replacee == 'Soulsphere' ) e.Replacement = 'UTHealthPack';
|
||||
else if ( e.Replacee == 'ArtiSuperHealth' ) e.Replacement = 'ActHealthPack';
|
||||
else if ( e.Replacee == 'Megasphere' ) e.Replacement = 'UTShieldBelt';
|
||||
else if ( e.Replacee == 'Allmap' ) e.Replacement = 'UTMapRevealer';
|
||||
else if ( e.Replacee == 'ArtiInvulnerability' ) e.Replacement = 'ActShieldBelt';
|
||||
else if ( (e.Replacee == 'Allmap') || (e.Replacee == 'SuperMap') ) e.Replacement = 'UTMapRevealer';
|
||||
else if ( e.Replacee == 'BlurSphere' ) e.Replacement = 'UTInvisibility';
|
||||
else if ( e.Replacee == 'ArtiInvisibility' ) e.Replacement = 'ActInvisibility';
|
||||
else if ( e.Replacee == 'Infrared' ) e.Replacement = 'Searchlight';
|
||||
else if ( e.Replacee == 'ArtiTorch' ) e.Replacement = 'ActSearchlight';
|
||||
else if ( e.Replacee == 'RadSuit' ) e.Replacement = 'UTJumpBoots';
|
||||
else if ( e.Replacee == 'Backpack' ) e.Replacement = 'UTBackpack';
|
||||
else if ( e.Replacee == 'ArmorBonus' ) e.Replacement = 'UTArmorBonus';
|
||||
else if ( e.Replacee == 'HealthBonus' ) e.Replacement = 'UTHealthBonus';
|
||||
else if ( e.Replacee == 'GreenArmor' ) e.Replacement = 'UTThighPads';
|
||||
else if ( e.Replacee == 'BlueArmor' ) e.Replacement = 'UTBodyArmor';
|
||||
else if ( e.Replacee == 'ArtiFly' ) e.Replacement = 'ActJumpBoots';
|
||||
else if ( (e.Replacee == 'Backpack') || (e.Replacee == 'BagOfHolding') ) e.Replacement = 'UTBackpack';
|
||||
else if ( (e.Replacee == 'ArmorBonus') || (e.Replacee == 'ArtiTimeBomb') ) e.Replacement = 'UTArmorBonus';
|
||||
else if ( (e.Replacee == 'HealthBonus') || (e.Replacee == 'CrystalVial') ) e.Replacement = 'UTHealthBonus';
|
||||
else if ( (e.Replacee == 'GreenArmor') || (e.Replacee == 'Silvershield') ) e.Replacement = 'UTThighPads';
|
||||
else if ( (e.Replacee == 'BlueArmor') || (e.Replacee == 'EnchantedShield') ) e.Replacement = 'UTBodyArmor';
|
||||
else if ( e.Replacee == 'Stimpack' ) e.Replacement = 'UTMedBox';
|
||||
else if ( e.Replacee == 'Medikit' ) e.Replacement = 'UTHealthBox';
|
||||
else if ( e.Replacee == 'ArtiHealth' )
|
||||
{
|
||||
if ( !Random[Replacements](0,3) ) e.Replacement = 'ActHealthBox';
|
||||
else e.Replacement = 'ActMedBox';
|
||||
}
|
||||
else if ( e.Replacee == 'ArtiTeleport' )
|
||||
{
|
||||
// I have no idea what to replace this with, so just have some random stuff
|
||||
if ( Random[Replacements](0,1) ) e.Replacement = 'UTBackpack';
|
||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'ActShieldBelt';
|
||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'ActHealthPack';
|
||||
else e.Replacement = 'ActUDamage';
|
||||
}
|
||||
else if ( e.Replacee == 'RedCard' ) e.Replacement = 'UTRedKey';
|
||||
else if ( e.Replacee == 'BlueCard' ) e.Replacement = 'UTBlueKey';
|
||||
else if ( e.Replacee == 'YellowCard' ) e.Replacement = 'UTGoldKey';
|
||||
|
|
@ -1645,16 +1673,16 @@ Class UTMainHandler : EventHandler
|
|||
// just replace the -noflat- with a better scaled version and change the sky
|
||||
if ( !flak_doomtest )
|
||||
{
|
||||
if ( level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33" )
|
||||
if ( (level.GetChecksum() ~== "959A613006CC3AA912C4A22908B7566A") || (level.GetChecksum() ~== "75319AE5D2DBA214C5D394BF69DF32F4") )
|
||||
{
|
||||
TexMan.ReplaceTextures("-noflat-","DefTex",0);
|
||||
Level.ReplaceTextures("-noflat-","DefTex",0);
|
||||
TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any);
|
||||
level.ChangeSky(skytx,skytx);
|
||||
}
|
||||
return;
|
||||
}
|
||||
// prettify Kinsie's test map for a more Unreal feel
|
||||
if ( level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33" )
|
||||
if ( level.GetChecksum() ~== "959A613006CC3AA912C4A22908B7566A" )
|
||||
{
|
||||
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
|
||||
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
|
||||
|
|
@ -1674,13 +1702,13 @@ Class UTMainHandler : EventHandler
|
|||
level.sectors[i].SetTexture(1,skyflatnum);
|
||||
if ( level.sectors[i].GetTexture(0) == deftex )
|
||||
{
|
||||
level.sectors[i].SetTexture(0,(i==47)?baseceil:baseflor);
|
||||
level.sectors[i].SetTexture(0,((i==47)||((i>=256)&&(i<=260)))?baseceil:baseflor);
|
||||
level.sectors[i].SetXScale(0,2.);
|
||||
level.sectors[i].SetYScale(0,2.);
|
||||
}
|
||||
if ( level.sectors[i].GetTexture(1) == deftex )
|
||||
{
|
||||
level.sectors[i].SetTexture(1,(i==47)?baseflor:baseceil);
|
||||
level.sectors[i].SetTexture(1,((i==47)||((i>=256)&&(i<=260)))?baseflor:baseceil);
|
||||
level.sectors[i].SetXScale(1,2.);
|
||||
level.sectors[i].SetYScale(1,2.);
|
||||
}
|
||||
|
|
@ -1751,20 +1779,130 @@ Class UTMainHandler : EventHandler
|
|||
AddAmbient((3584,736,64),"testamb/slime",0.4,2.4);
|
||||
AddAmbient((3584,512,64),"testamb/lava",0.8,2.4);
|
||||
}
|
||||
else if ( level.GetChecksum() ~== "75319AE5D2DBA214C5D394BF69DF32F4" )
|
||||
{
|
||||
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
|
||||
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
|
||||
TextureID baseflor = TexMan.CheckForTexture("rClfFlr0",TexMan.Type_Any);
|
||||
TextureID baseceil = TexMan.CheckForTexture("rClfBas0",TexMan.Type_Any);
|
||||
TextureID basewall = TexMan.CheckForTexture("uAlnWl2b",TexMan.Type_Any);
|
||||
TextureID xbasewall = TexMan.CheckForTexture("xAlnWl2b",TexMan.Type_Any);
|
||||
TextureID glasstex = TexMan.CheckForTexture("Glassg",TexMan.Type_Any);
|
||||
level.ChangeSky(skytx,skytx);
|
||||
for ( int i=0; i<level.sectors.size(); i++ )
|
||||
{
|
||||
level.sectors[i].lightlevel = 0;
|
||||
level.sectors[i].SetPlaneLight(0,0);
|
||||
level.sectors[i].SetPlaneLight(1,0);
|
||||
// open some ceilings
|
||||
if ( level.sectors[i].ceilingplane.ZAtPoint(level.sectors[i].centerspot) == 1280 )
|
||||
level.sectors[i].SetTexture(1,skyflatnum);
|
||||
if ( level.sectors[i].GetTexture(0) == deftex )
|
||||
{
|
||||
level.sectors[i].SetTexture(0,((i==47)||((i>=144)&&(i<=148)))?baseceil:baseflor);
|
||||
level.sectors[i].SetXScale(0,2.);
|
||||
level.sectors[i].SetYScale(0,2.);
|
||||
}
|
||||
if ( level.sectors[i].GetTexture(1) == deftex )
|
||||
{
|
||||
level.sectors[i].SetTexture(1,((i==47)||((i>=144)&&(i<=148)))?baseflor:baseceil);
|
||||
level.sectors[i].SetXScale(1,2.);
|
||||
level.sectors[i].SetYScale(1,2.);
|
||||
}
|
||||
}
|
||||
for ( int i=0; i<level.sides.size(); i++ )
|
||||
{
|
||||
level.sides[i].light = 0;
|
||||
for ( int j=0; j<3; j++ )
|
||||
{
|
||||
if ( level.sides[i].GetTexture(j) != deftex ) continue;
|
||||
if ( (i==295) || (i==296) || (i==309) || (i==310) )
|
||||
{
|
||||
level.sides[i].SetTexture(j,xbasewall);
|
||||
level.sides[i].SetTextureYOffset(j,-2304);
|
||||
}
|
||||
else level.sides[i].SetTexture(j,basewall);
|
||||
level.sides[i].SetTextureXScale(j,2.);
|
||||
level.sides[i].SetTextureYScale(j,2.);
|
||||
}
|
||||
}
|
||||
// fixup
|
||||
for ( int i=104; i<134; i++ )
|
||||
{
|
||||
if ( (i==107) || (i==110) || (i==116)
|
||||
|| (i==119) || (i==121) || (i==127)
|
||||
|| (i==132) ) continue;
|
||||
level.sectors[i].SetSpecialColor(0,"00 00 00");
|
||||
}
|
||||
level.sectors[53].SetFade("00 00 20");
|
||||
level.sides[216].SetTexture(1,glasstex);
|
||||
level.lines[125].alpha = 0.5;
|
||||
AddLight((0,-288,128),"E0 E0 FF",256);
|
||||
AddLight((-2560,1024,1280),"E0 E0 FF",1024);
|
||||
AddLight((0,1024,1280),"E0 E0 FF",1024);
|
||||
AddLight((2560,1024,1280),"E0 E0 FF",1024);
|
||||
AddLight((-384,-160,64),"FF FF FF",128);
|
||||
AddLight((-384,-288,64),"FF FF FF",128);
|
||||
AddLight((-384,-416,64),"FF FF FF",128);
|
||||
AddLight((0,2816,96),"FF FF FF",512);
|
||||
AddLight((2904,1344,128),"80 80 FF",256);
|
||||
AddLight((3408,1344,128),"80 80 FF",256);
|
||||
AddLight((1568,1760,64),"20 20 80",128);
|
||||
AddLight((1824,1760,64),"A0 A0 30",128);
|
||||
AddLight((2080,1760,64),"80 80 20",128);
|
||||
AddLight((2336,1760,64),"20 20 80",128);
|
||||
AddLight((2592,1760,64),"FF 80 20",128);
|
||||
AddLight((2944,960,64),"A0 A0 30",128);
|
||||
AddLight((2944,736,64),"A0 A0 30",128);
|
||||
AddLight((3264,960,64),"A0 A0 30",128);
|
||||
AddLight((3264,736,64),"A0 A0 30",128);
|
||||
AddLight((3264,512,64),"A0 A0 30",128);
|
||||
AddLight((3264,288,64),"FF 80 20",128);
|
||||
AddLight((3584,960,64),"A0 A0 30",128);
|
||||
AddLight((3584,736,64),"80 80 20",128);
|
||||
AddLight((3584,512,64),"FF 80 20",128);
|
||||
AddLight((3584,288,64),"A0 A0 30",128);
|
||||
AddAmbient((0,-288,192),"testamb/wind1",0.5,1.6);
|
||||
AddAmbient((-2560,1024,768),"testamb/wind1",0.4,0.8);
|
||||
AddAmbient((0,1024,768),"testamb/wind1",0.4,0.8);
|
||||
AddAmbient((2560,1024,768),"testamb/wind1",0.4,0.8);
|
||||
AddAmbient((768,1600,1280),"testamb/wind2",0.8,1.6);
|
||||
AddAmbient((3174,1344,128),"testamb/water",0.4,1.6);
|
||||
AddAmbient((1568,1760,64),"testamb/water",0.4,2.4);
|
||||
AddAmbient((2336,1760,64),"testamb/water",0.4,2.4);
|
||||
AddAmbient((2592,1760,64),"testamb/lava",0.8,2.4);
|
||||
AddAmbient((3584,512,64),"testamb/lava",0.8,2.4);
|
||||
AddAmbient((3264,288,64),"testamb/lava",0.8,2.4);
|
||||
}
|
||||
}
|
||||
|
||||
override void WorldThingSpawned( WorldEvent e )
|
||||
{
|
||||
if ( flak_nobosstelefrag && e.Thing.bBOSS ) e.Thing.bNOTELEFRAG = true;
|
||||
if ( deathmatch && flak_instagib )
|
||||
{
|
||||
if ( (e.Thing is 'EnhancedShockRifle') || (e.Thing is 'EnhancedShockAmmo') ) return;
|
||||
if ( e.Thing is 'Inventory' ) e.Thing.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
override void PlayerEntered( PlayerEvent e )
|
||||
{
|
||||
if ( deathmatch && flak_instagib )
|
||||
{
|
||||
players[e.playernumber].mo.GiveInventory("EnhancedShockRifle",1);
|
||||
return;
|
||||
}
|
||||
if ( flak_translocator )
|
||||
players[e.playernumber].mo.GiveInventory("Translocator",1);
|
||||
}
|
||||
override void PlayerRespawned( PlayerEvent e )
|
||||
{
|
||||
if ( deathmatch && flak_instagib )
|
||||
{
|
||||
players[e.playernumber].mo.GiveInventory("EnhancedShockRifle",1);
|
||||
return;
|
||||
}
|
||||
if ( flak_translocator )
|
||||
players[e.playernumber].mo.GiveInventory("Translocator",1);
|
||||
}
|
||||
|
|
@ -1844,6 +1982,7 @@ Class UTMainHandler : EventHandler
|
|||
qf.tic = gametic;
|
||||
qf.cam = camera;
|
||||
let hnd = UTMainHandler(EventHandler.Find("UTMainHandler"));
|
||||
if ( !hnd ) return; // not supposed to happen
|
||||
hnd.flashes.push(qf);
|
||||
}
|
||||
|
||||
|
|
@ -1857,7 +1996,11 @@ Class UTMainHandler : EventHandler
|
|||
if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) || (Source.Distance3D(a) > ExplosionRadius) )
|
||||
continue;
|
||||
Vector3 midpoint = a.Vec3Offset(0,0,a.height*0.5);
|
||||
a.vel += Level.Vec3Diff(Source.pos,midpoint).unit()*(MomentumTransfer/(Thinker.TICRATE*a.mass));
|
||||
Vector3 dir = Level.Vec3Diff(Source.pos,midpoint);
|
||||
double dist = max(1,dir.length());
|
||||
double damagescale = 1-max(0,(dist-a.radius)/ExplosionRadius);
|
||||
dir = dir/dist;
|
||||
a.vel += dir*damagescale*(MomentumTransfer/(Thinker.TICRATE*a.mass));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ Class UTBloodTrail : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !target ) return;
|
||||
SetOrigin(target.pos,true);
|
||||
double ang, pt;
|
||||
|
|
|
|||
|
|
@ -23,19 +23,19 @@ Class ViewTracer : LineTracer
|
|||
|
||||
Class UTHud : BaseStatusBar
|
||||
{
|
||||
TextureID AmmoBar, Boxes[4], Keys[5], BigNum[12], Flash, Slots[10], Icons[14], Uses[14], Man[5], Woman[5], Boss[5], WeaponBox, IconTloc2, UseTloc2;
|
||||
TextureID AmmoBar, Boxes[4], Keys[5], BigNum[12], Flash, Slots[10], Icons[14], Uses[14], Man[5], Woman[5], Boss[5], WeaponBox, IconTloc2, UseTloc2, ItemBox, ItemSel, ItemFlash, ItemArrow[2], LastItem;
|
||||
Class<Weapon> IconClasses[14];
|
||||
double HScale;
|
||||
Color tintcolor, bgcolor;
|
||||
int opacity;
|
||||
int lastfrag, lastfragcnt, lastpickup, lastslot;
|
||||
int lastfrag, lastfragcnt, lastpickup, lastslot, lastamount;
|
||||
ViewTracer vtracer;
|
||||
Actor lastseen;
|
||||
int lastseentic;
|
||||
bool showweapons, showfrags, showammo, showstatus, showinfo;
|
||||
double hudsize, weaponsize, statussize;
|
||||
|
||||
HUDFont mConFont;
|
||||
HUDFont mUTFont12;
|
||||
|
||||
// For easier UT Canvas drawing
|
||||
Color DrawColor, WhiteColor, GoldColor;
|
||||
|
|
@ -49,7 +49,7 @@ Class UTHud : BaseStatusBar
|
|||
lastfrag = int.min;
|
||||
lastfragcnt = 0;
|
||||
vtracer = new("ViewTracer");
|
||||
mConFont = HUDFont.Create("confont");
|
||||
mUTFont12 = HUDFont.Create("UTFONT12");
|
||||
// Set defaults
|
||||
DrawColor = WhiteColor = "White";
|
||||
GoldColor = "Gold";
|
||||
|
|
@ -145,6 +145,11 @@ Class UTHud : BaseStatusBar
|
|||
Boss[3] = TexMan.CheckForTexture("BossBot",TexMan.Type_Any);
|
||||
Boss[4] = TexMan.CheckForTexture("BossBlt",TexMan.Type_Any);
|
||||
WeaponBox = TexMan.CheckForTexture("WpSel",TexMan.Type_Any);
|
||||
ItemBox = TexMan.CheckForTexture("ItemBox",TexMan.Type_Any);
|
||||
ItemSel = TexMan.CheckForTexture("ItmSel",TexMan.Type_Any);
|
||||
ItemFlash = TexMan.CheckForTexture("IFlash",TexMan.Type_Any);
|
||||
ItemArrow[0] = TexMan.CheckForTexture("ItmArrw1",TexMan.Type_Any);
|
||||
ItemArrow[1] = TexMan.CheckForTexture("ItmArrw2",TexMan.Type_Any);
|
||||
}
|
||||
|
||||
override void Draw( int state, double TicFrac )
|
||||
|
|
@ -189,7 +194,7 @@ Class UTHud : BaseStatusBar
|
|||
{
|
||||
BeginHUD();
|
||||
FracTic = TicFrac;
|
||||
DrawUTHUD();
|
||||
DrawUTHUD(lbottom);
|
||||
}
|
||||
if ( (CPlayer.ReadyWeapon is 'UTWeapon') )
|
||||
UTWeapon(CPlayer.ReadyWeapon).PostRender(lbottom);
|
||||
|
|
@ -200,25 +205,25 @@ Class UTHud : BaseStatusBar
|
|||
return Color(a.a,int(a.r*(1.-x)+b.r*x),int(a.g*(1.-x)+b.g*x),int(a.b*(1.-x)+b.b*x));
|
||||
}
|
||||
|
||||
private void UTDrawTintedTex( TextureID tx, double sx = 1.0, int opacity = -1, Color tint = Color("Black") )
|
||||
private void UTDrawTintedTex( TextureID tx, double sx = 1.0, int opacity = -1, Color tint = Color("Black"), bool flip = false )
|
||||
{
|
||||
double ss = (HScale*sx);
|
||||
double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss);
|
||||
double dx = CurX/ss, dy = CurY/ss;
|
||||
if ( opacity == -1 ) opacity = self.opacity;
|
||||
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor,DTA_TopOffset,0,DTA_LeftOffset,0);
|
||||
double alpha = clamp(opacity/15.,0.0,1.0);
|
||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,(tint!="Black")?tint:tintcolor);
|
||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,(tint!="Black")?tint:tintcolor,DTA_TopOffset,0,DTA_LeftOffset,0,DTA_FlipX,flip);
|
||||
}
|
||||
private void UTDrawPlainTex( TextureID tx, double sx = 1.0, int opacity = -1 )
|
||||
private void UTDrawPlainTex( TextureID tx, double sx = 1.0, int opacity = -1, bool flip = false )
|
||||
{
|
||||
double ss = (HScale*sx);
|
||||
double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss);
|
||||
double dx = CurX/ss, dy = CurY/ss;
|
||||
if ( opacity == -1 ) opacity = self.opacity;
|
||||
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||
if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor,DTA_TopOffset,0,DTA_LeftOffset,0,DTA_FlipX,flip);
|
||||
double alpha = clamp(opacity/15.,0.0,1.0);
|
||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha);
|
||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_TopOffset,0,DTA_LeftOffset,0,DTA_FlipX,flip);
|
||||
}
|
||||
|
||||
private bool UTDrawWeaponIcon( Weapon w, bool use, double sx = 1.0 )
|
||||
|
|
@ -255,9 +260,9 @@ Class UTHud : BaseStatusBar
|
|||
double flen = 3*step;
|
||||
double len = digits.length()*step;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
for ( int i=0; i<digits.length(); i++ ) if ( digits.CharAt(i) == "1" ) len -= 0.5*step;
|
||||
for ( int i=0; i<digits.length(); i++ ) if ( digits.ByteAt(i) == 0x31 ) len -= 0.5*step;
|
||||
CurX += (flen-len)*0.5;
|
||||
if ( digits.CharAt(0) == "1" ) CurX -= 0.5*step;
|
||||
if ( digits.ByteAt(0) == 0x31 ) CurX -= 0.5*step;
|
||||
if ( value < 0 )
|
||||
{
|
||||
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[11],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||
|
|
@ -266,9 +271,9 @@ Class UTHud : BaseStatusBar
|
|||
}
|
||||
for ( int i=0; i<digits.length(); i++ )
|
||||
{
|
||||
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[digits.CharCodeAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||
Screen.DrawTexture(BigNum[digits.CharCodeAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,DrawColor);
|
||||
CurX += ((i<digits.length()-1)&&(digits.CharAt(i+1)=="1"))?step*0.5:step;
|
||||
if ( opacity+7 > 15 ) Screen.DrawTexture(BigNum[digits.ByteAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor);
|
||||
Screen.DrawTexture(BigNum[digits.ByteAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_LegacyRenderStyle,STYLE_AddShaded,DTA_FillColor,DrawColor);
|
||||
CurX += ((i<digits.length()-1)&&(digits.ByteAt(i+1)==0x31))?step*0.5:step;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -285,25 +290,8 @@ Class UTHud : BaseStatusBar
|
|||
CurX += 8*hudsize*HScale;
|
||||
CurY += 14*hudsize*HScale;
|
||||
DrawColor = WhiteColor;
|
||||
if ( ammotype1 )
|
||||
{
|
||||
UTDrawBigNum(ammotype1.Amount,hudsize);
|
||||
let cw = CPlayer.ReadyWeapon;
|
||||
if ( flak_transloc2k4 && (cw is 'Translocator') )
|
||||
{
|
||||
// draw ammo charge bar
|
||||
double ch = Translocator(cw).ammocharge;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+53*hudsize*HScale;
|
||||
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
}
|
||||
let cw = CPlayer.ReadyWeapon;
|
||||
if ( ammotype1 ) UTDrawBigNum(ammotype1.Amount,hudsize);
|
||||
if ( ammotype2 && (ammotype2 != ammotype1) )
|
||||
{
|
||||
CurX = showweapons?(Screen.GetWidth()-128*hudsize*HScale):((Screen.GetWidth()+256*hudsize*HScale)*0.5);
|
||||
|
|
@ -314,6 +302,101 @@ Class UTHud : BaseStatusBar
|
|||
CurY += 14*hudsize**HScale;
|
||||
UTDrawBigNum(ammotype2.Amount,hudsize);
|
||||
}
|
||||
// extra bars
|
||||
if ( flak_transloc2k4 && (cw is 'Translocator') )
|
||||
{
|
||||
// draw ammo charge bar
|
||||
double ch = Translocator(cw).ammocharge;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+54*hudsize*HScale;
|
||||
Vector2 ss = (0.54,0.25)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
else if ( flak_enforcerreload && (cw is 'Enforcer') )
|
||||
{
|
||||
// draw clip(s)
|
||||
double ch = Enforcer(cw).ClipCount/20.;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+53*hudsize*HScale;
|
||||
Vector2 ss;
|
||||
ss = (0.54,(cw.Amount>1)?0.125:0.3)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
if ( cw.Amount > 1 )
|
||||
{
|
||||
ch = Enforcer(cw).SlaveClipCount/20.;
|
||||
CurY += 3*hudsize*HScale;
|
||||
ss = (0.54,0.125)*hudsize*HScale;
|
||||
dw = (Screen.GetWidth()/ss.x);
|
||||
dh = (Screen.GetHeight()/ss.y);
|
||||
dx = CurX/ss.x;
|
||||
dy = CurY/ss.y;
|
||||
ddw = bs.x*ch;
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
}
|
||||
else if ( flak_pulsereload && (cw is 'Pulsegun') )
|
||||
{
|
||||
// draw clip
|
||||
double ch = Pulsegun(cw).ClipCount/50.;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+53*hudsize*HScale;
|
||||
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
else if ( cw is 'ImpactHammer' )
|
||||
{
|
||||
double ch = min(ImpactHammer(cw).chargesize,1.5)/1.5;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+53*hudsize*HScale;
|
||||
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
else if ( cw is 'BioRifle' )
|
||||
{
|
||||
double ch = min(BioRifle(cw).charge,5.1)/5.1;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+53*hudsize*HScale;
|
||||
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
else if ( cw is 'UTRocketLauncher' )
|
||||
{
|
||||
double ch = cw.special1/6.;
|
||||
CurX = BaseX+6*hudsize*HScale;
|
||||
CurY = BaseY+53*hudsize*HScale;
|
||||
Vector2 ss = (0.54,0.3)*hudsize*HScale;
|
||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||
double ddw = bs.x*ch;
|
||||
double alpha = clamp((opacity+7)/15.,0.0,1.0);
|
||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha);
|
||||
}
|
||||
}
|
||||
private void DrawStatus()
|
||||
{
|
||||
|
|
@ -541,21 +624,21 @@ Class UTHud : BaseStatusBar
|
|||
{
|
||||
double lalpha = 2.0-((level.time+fractic)-lastseentic)/Thinker.TICRATE;
|
||||
if ( !lastseen || (lalpha <= 0) ) return;
|
||||
String cl1 = "Teal", cl2 = "Cyan";
|
||||
String cl1 = "UTHUDTextLight", cl2 = "UTHUDText";
|
||||
if ( deathmatch && (lastseen.player.GetTeam() < teams.size()) )
|
||||
{
|
||||
cl2 = teams[lastseen.player.GetTeam()].mName;
|
||||
cl1 = String.Format("Dark%s",cl2);
|
||||
}
|
||||
String tname = String.Format("\c[%s]Name:\c[%s] %s",cl1,cl2,lastseen.player.GetUserName());
|
||||
CurX = (640-confont.StringWidth(tname))*0.5;
|
||||
String tname = String.Format("\c[%s]%s:\c[%s] %s",cl1,StringTable.Localize("$M_NAME"),cl2,lastseen.player.GetUserName());
|
||||
CurX = (640-mUTFont12.mFont.StringWidth(tname))*0.5;
|
||||
CurY = 480*0.75;
|
||||
Screen.DrawText(confont,Font.CR_UNTRANSLATED,CurX,CurY,tname,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_Alpha,lalpha/2.);
|
||||
Screen.DrawText(mUTFont12.mFont,Font.CR_UNTRANSLATED,CurX,CurY,tname,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_Alpha,lalpha/2.);
|
||||
if ( !deathmatch || (lastseen.IsTeammate(CPlayer.mo)) )
|
||||
{
|
||||
CurY += 1.2*confont.GetHeight();
|
||||
tname = String.Format("\c[%s]Health:\c[%s] %d",cl1,cl2,lastseen.Health);
|
||||
Screen.DrawText(confont,Font.CR_UNTRANSLATED,CurX,CurY,tname,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_Alpha,lalpha/2.);
|
||||
CurY += 1.2*mUTFont12.mFont.GetHeight();
|
||||
tname = String.Format("\c[%s]%s:\c[%s] %d",cl1,StringTable.Localize("$M_HEALTH"),cl2,lastseen.Health);
|
||||
Screen.DrawText(mUTFont12.mFont,Font.CR_UNTRANSLATED,CurX,CurY,tname,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_Alpha,lalpha/2.);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -608,9 +691,108 @@ Class UTHud : BaseStatusBar
|
|||
}
|
||||
}
|
||||
|
||||
private void DrawInventory( double lbottom )
|
||||
{
|
||||
if ( isInventoryBarVisible() )
|
||||
{
|
||||
CPlayer.mo.InvFirst = ValidateInvFirst(5);
|
||||
if ( !CPlayer.mo.InvFirst ) return;
|
||||
// draw the boxes
|
||||
double BaseX, BaseY;
|
||||
BaseX = CurX = (Screen.GetWidth()-64*5*hudsize*HScale)/2.;
|
||||
BaseY = CurY = Screen.GetHeight()-224*hudsize*HScale;
|
||||
for ( int i=0; i<5; i++ )
|
||||
{
|
||||
UTDrawTintedTex(ItemBox,hudsize);
|
||||
CurX += 64*hudsize*HScale;
|
||||
}
|
||||
int i = 0;
|
||||
Inventory itm;
|
||||
for ( itm=CPlayer.mo.InvFirst; (itm && (i < 5)); itm=itm.NextInv() )
|
||||
{
|
||||
CurX = BaseX+2*hudsize*HScale;
|
||||
CurY = BaseY+2*hudsize*HScale;
|
||||
// if item doesn't fit 60x60, scale
|
||||
Vector2 scl = TexMan.GetScaledSize(itm.Icon);
|
||||
double mscl = max(scl.x,scl.y)/60.;
|
||||
UTDrawTintedTex(itm.Icon,hudsize*mscl);
|
||||
// amount if >1
|
||||
if ( itm.Amount > 1 )
|
||||
{
|
||||
CurX = BaseX+32*hudsize*HScale;
|
||||
CurY = BaseY+40*hudsize*HScale;
|
||||
DrawColor = WhiteColor;
|
||||
UTDrawBigNum(itm.Amount,hudsize*0.5);
|
||||
}
|
||||
// selection box if current item
|
||||
if ( itm == CPlayer.mo.InvSel )
|
||||
{
|
||||
CurX = BaseX;
|
||||
CurY = BaseY;
|
||||
UTDrawPlainTex(ItemSel,hudsize,opacity+7);
|
||||
}
|
||||
BaseX += 64*hudsize*HScale;
|
||||
i++;
|
||||
}
|
||||
// draw arrows
|
||||
CurY = Screen.GetHeight()-204*hudsize*HScale;
|
||||
CurX = (Screen.GetWidth()-(64*5+40)*hudsize*HScale)/2.;
|
||||
UTDrawTintedTex(ItemArrow[CPlayer.mo.InvFirst!=CPlayer.mo.FirstInv()],hudsize,flip:true);
|
||||
CurX = (Screen.GetWidth()+(64*5+8)*hudsize*HScale)/2.;
|
||||
UTDrawTintedTex(ItemArrow[!!itm],hudsize);
|
||||
}
|
||||
else if ( CPlayer.mo.InvSel || artiflashtick )
|
||||
{
|
||||
// flashie
|
||||
if ( artiflashtick )
|
||||
{
|
||||
DrawColor = GoldColor;
|
||||
CurX = -32*hudsize*HScale;
|
||||
CurY = lbottom-96*hudsize*HScale;
|
||||
UTDrawTintedTex(ItemFlash,hudsize,min(opacity,15),DrawColor);
|
||||
}
|
||||
// position 64x64 box
|
||||
CurX = 0;
|
||||
CurY = lbottom-64*hudsize*HScale;
|
||||
UTDrawTintedTex(ItemBox,hudsize);
|
||||
if ( artiflashtick )
|
||||
{
|
||||
Vector2 scl = TexMan.GetScaledSize(LastItem);
|
||||
double mscl = max(scl.x,scl.y)/60.;
|
||||
CurX += 2*hudsize*HScale;
|
||||
CurY += 2*hudsize*HScale;
|
||||
UTDrawTintedTex(LastItem,hudsize*mscl);
|
||||
if ( LastAmount <= 1 ) return;
|
||||
CurX = 32*hudsize*HScale;
|
||||
CurY = lbottom-24*hudsize*HScale;
|
||||
DrawColor = WhiteColor;
|
||||
UTDrawBigNum(LastAmount,hudsize*0.5);
|
||||
return;
|
||||
}
|
||||
if ( !CPlayer.mo.InvSel ) return;
|
||||
// if item doesn't fit 60x60, scale
|
||||
Vector2 scl = TexMan.GetScaledSize(CPlayer.mo.InvSel.Icon);
|
||||
double mscl = max(scl.x,scl.y)/60.;
|
||||
CurX += 2*hudsize*HScale;
|
||||
CurY += 2*hudsize*HScale;
|
||||
UTDrawTintedTex(CPlayer.mo.InvSel.Icon,hudsize*mscl);
|
||||
// amount if >1
|
||||
if ( CPlayer.mo.InvSel.Amount <= 1 ) return;
|
||||
CurX = 32*hudsize*HScale;
|
||||
CurY = lbottom-24*hudsize*HScale;
|
||||
DrawColor = WhiteColor;
|
||||
UTDrawBigNum(CPlayer.mo.InvSel.Amount,hudsize*0.5);
|
||||
}
|
||||
}
|
||||
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( CPlayer.mo.InvSel && !artiflashtick )
|
||||
{
|
||||
LastItem = CPlayer.mo.InvSel.Icon;
|
||||
LastAmount = CPlayer.mo.InvSel.Amount-1;
|
||||
}
|
||||
if ( deathmatch||teamplay )
|
||||
{
|
||||
if ( CPlayer.fragcount != lastfragcnt ) lastfrag = level.time;
|
||||
|
|
@ -628,7 +810,7 @@ Class UTHud : BaseStatusBar
|
|||
lastseentic = level.time;
|
||||
}
|
||||
|
||||
private void DrawUTHUD()
|
||||
private void DrawUTHUD( double lbottom )
|
||||
{
|
||||
// Display Weapons
|
||||
if ( showweapons ) DrawWeapons();
|
||||
|
|
@ -640,14 +822,16 @@ Class UTHud : BaseStatusBar
|
|||
DrawStatus();
|
||||
// Display Keys
|
||||
DrawKeys();
|
||||
// Inventory Bar
|
||||
DrawInventory(lbottom);
|
||||
// Display Identification Info
|
||||
if ( CPlayer == players[consoleplayer] && showinfo ) DrawIdentifyInfo();
|
||||
}
|
||||
|
||||
override void DrawAutomapHUD( double ticFrac )
|
||||
{
|
||||
int crdefault = Font.CR_TEAL;
|
||||
int highlight = Font.CR_CYAN;
|
||||
int crdefault = Font.FindFontColor('UTHUDTextLight');
|
||||
int highlight = Font.FindFontColor('UTHUDText');
|
||||
HScale = Screen.GetWidth()/1280.;
|
||||
showweapons = CVar.GetCVar('flak_showweapons',players[consoleplayer]).GetBool();
|
||||
showstatus = CVar.GetCVar('flak_showstatus',players[consoleplayer]).GetBool();
|
||||
|
|
@ -656,12 +840,12 @@ Class UTHud : BaseStatusBar
|
|||
double cbottom = Screen.GetHeight()*0.99;
|
||||
let scale = GetHUDScale();
|
||||
double textdist = 8./scale.Y;
|
||||
int height = ConFont.GetHeight();
|
||||
int height = mUTFont12.mFont.GetHeight();
|
||||
String printtext;
|
||||
int SCREENWIDTH = screen.GetWidth();
|
||||
BeginHUD();
|
||||
let y = textdist;
|
||||
let width = ConFont.StringWidth("00:00:00");
|
||||
let width = mUTFont12.mFont.StringWidth("00:00:00");
|
||||
double tmp, hres;
|
||||
[tmp,tmp,hres] = StatusbarToRealCoords(0,0,HorizontalResolution);
|
||||
double swidth = 0;
|
||||
|
|
@ -678,36 +862,36 @@ Class UTHud : BaseStatusBar
|
|||
if ( am_showtime )
|
||||
{
|
||||
printtext = level.TimeFormatted();
|
||||
DrawString(mConFont,level.TimeFormatted(),(-textdist-width,y),0,crdefault);
|
||||
DrawString(mUTFont12,level.TimeFormatted(),(-textdist-width,y),0,crdefault);
|
||||
y += height;
|
||||
}
|
||||
if ( am_showtotaltime ) DrawString(mConFont,level.TimeFormatted(true),(-textdist-width,y),0,crdefault);
|
||||
if ( am_showtotaltime ) DrawString(mUTFont12,level.TimeFormatted(true),(-textdist-width,y),0,crdefault);
|
||||
if ( !deathmatch )
|
||||
{
|
||||
y = textdist;
|
||||
if ( am_showmonsters )
|
||||
{
|
||||
DrawString(mConFont,String.Format("%s\34%c %d/%d",Stringtable.Localize("$AM_MONSTERS"),crdefault+65,level.killed_monsters,level.total_monsters),(textdist,y),0,highlight);
|
||||
DrawString(mUTFont12,String.Format("%s\34%c %d/%d",Stringtable.Localize("$AM_MONSTERS"),crdefault+65,level.killed_monsters,level.total_monsters),(textdist,y),0,highlight);
|
||||
y += height;
|
||||
}
|
||||
if ( am_showsecrets )
|
||||
{
|
||||
DrawString(mConFont,String.Format("%s\34%c %d/%d",Stringtable.Localize("$AM_SECRETS"),crdefault+65,level.found_secrets,level.total_secrets),(textdist,y),0,highlight);
|
||||
DrawString(mUTFont12,String.Format("%s\34%c %d/%d",Stringtable.Localize("$AM_SECRETS"),crdefault+65,level.found_secrets,level.total_secrets),(textdist,y),0,highlight);
|
||||
y += height;
|
||||
}
|
||||
if ( am_showitems ) DrawString(mConFont,String.Format("%s\34%c %d/%d",Stringtable.Localize("$AM_ITEMS"),crdefault+65,level.found_items,level.total_items),(textdist,y),0,highlight);
|
||||
if ( am_showitems ) DrawString(mUTFont12,String.Format("%s\34%c %d/%d",Stringtable.Localize("$AM_ITEMS"),crdefault+65,level.found_items,level.total_items),(textdist,y),0,highlight);
|
||||
}
|
||||
String mapname = level.FormatMapName(crdefault);
|
||||
BrokenLines lines = ConFont.BreakLines(mapname,int(SCREENWIDTH/scale.X));
|
||||
BrokenLines lines = mUTFont12.mFont.BreakLines(mapname,int(SCREENWIDTH/scale.X));
|
||||
int numlines = lines.Count();
|
||||
int finalwidth = int(ConFont.StringWidth(lines.StringAt(numlines-1))*scale.X);
|
||||
int finalwidth = int(mUTFont12.mFont.StringWidth(lines.StringAt(numlines-1))*scale.X);
|
||||
[tmp,tmp,hres] = StatusbarToRealCoords(0,0,HorizontalResolution);
|
||||
protrusion = GetProtrusion(finalwidth/hres);
|
||||
[tmp,tmp,tmp,hres] = StatusbarToRealCoords(0,0,0,protrusion);
|
||||
y = (cbottom-hres)/scale.Y-height*numlines;
|
||||
for ( int i = 0; i < numlines; i++ )
|
||||
{
|
||||
DrawString(mConFont,lines.StringAt(i),(0,y),DI_TEXT_ALIGN_CENTER|DI_SCREEN_HCENTER|DI_SCREEN_TOP,highlight);
|
||||
DrawString(mUTFont12,lines.StringAt(i),(0,y),DI_TEXT_ALIGN_CENTER|DI_SCREEN_HCENTER|DI_SCREEN_TOP,highlight);
|
||||
y += height;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ Class WarheadAmmo : Ammo
|
|||
{
|
||||
Default
|
||||
{
|
||||
Tag "Redeemer Missile";
|
||||
Inventory.PickupMessage "You picked up a Redeemer Missile.";
|
||||
Tag "$T_WARHEADAMMO";
|
||||
Inventory.PickupMessage "$I_WARHEADAMMO";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 2;
|
||||
Ammo.BackpackAmount 0;
|
||||
|
|
@ -29,7 +29,7 @@ Class ShockWave : Actor
|
|||
transient ThinkerIterator t;
|
||||
Default
|
||||
{
|
||||
Obituary "%o was vaporized by %k's Redeemer!!";
|
||||
Obituary "$O_REDEEMER";
|
||||
RenderStyle "Add";
|
||||
Radius 0.1;
|
||||
Height 0;
|
||||
|
|
@ -48,7 +48,7 @@ Class ShockWave : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( alpha <= 0 ) return;
|
||||
if ( !t ) t = ThinkerIterator.Create("Actor");
|
||||
icount++;
|
||||
|
|
@ -164,7 +164,7 @@ Class WarheadExplodLight : DynamicLight
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
args[LIGHT_RED] = int(255*lifetime);
|
||||
args[LIGHT_GREEN] = int(192*lifetime);
|
||||
args[LIGHT_BLUE] = int(128*lifetime);
|
||||
|
|
@ -224,7 +224,7 @@ Class WarheadTrail : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( level.frozen || globalfreeze ) return;
|
||||
if ( isFrozen() ) return;
|
||||
vel *= 0.99;
|
||||
A_FadeOut(0.1);
|
||||
}
|
||||
|
|
@ -243,7 +243,7 @@ Class WarShell : Actor
|
|||
|
||||
Default
|
||||
{
|
||||
Obituary "%o was vaporized by %k's Redeemer!!";
|
||||
Obituary "$O_REDEEMER";
|
||||
Radius 2;
|
||||
Height 2;
|
||||
Speed 6;
|
||||
|
|
@ -275,7 +275,7 @@ Class WarShell : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !bMISSILE ) return;
|
||||
if ( vel.length() > 0 )
|
||||
{
|
||||
|
|
@ -375,7 +375,7 @@ Class GuidedWarShell : WarShell
|
|||
justleft = false;
|
||||
bHITOWNER = true;
|
||||
}
|
||||
if ( globalfreeze || level.frozen ) return;
|
||||
if ( isFrozen() ) return;
|
||||
if ( !bMISSILE ) return;
|
||||
if ( !target || !target.player || (target.Health <= 0) )
|
||||
{
|
||||
|
|
@ -660,7 +660,7 @@ Class WarheadLauncher : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
vel -= x*10;
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
||||
Actor p = Spawn("WarShell",origin);
|
||||
|
|
@ -674,7 +674,7 @@ Class WarheadLauncher : UTWeapon
|
|||
Weapon weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
vel -= x*0.2;
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
||||
int numpt = Random[Warhead](10,20);
|
||||
|
|
@ -698,7 +698,7 @@ Class WarheadLauncher : UTWeapon
|
|||
A_AlertMonsters();
|
||||
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
vel -= x*10;
|
||||
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-2.0*z;
|
||||
Actor p = Spawn("GuidedWarShell",origin);
|
||||
|
|
@ -731,8 +731,8 @@ Class WarheadLauncher : UTWeapon
|
|||
|
||||
Default
|
||||
{
|
||||
Tag "Redeemer";
|
||||
Inventory.PickupMessage "You got the Redeemer.";
|
||||
Tag "$T_REDEEMER";
|
||||
Inventory.PickupMessage "$I_REDEEMER";
|
||||
Weapon.UpSound "warhead/select";
|
||||
Weapon.SlotNumber 0;
|
||||
Weapon.SelectionOrder 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue