1.2 update w/ GZDoom 4.9 features:
- Changeable player skins. - Ammo LEDs are now 1:1 with UT by using canvas textures. - Integrate some add-ons, including reskins. - Various fixes (some backported from Demolitionist). - Migrated from libeye to Gutamatics.
This commit is contained in:
parent
81ffca403d
commit
602a89cc68
1761 changed files with 4461 additions and 1597 deletions
|
|
@ -1,5 +1,25 @@
|
|||
Class PulseAmmo : Ammo
|
||||
{
|
||||
int OldSkin;
|
||||
|
||||
void A_CheckSkin()
|
||||
{
|
||||
switch ( flak_oldpulse )
|
||||
{
|
||||
case 1:
|
||||
if ( OldSkin != 1 ) A_ChangeModel("",1,"","",1,"models/222","JPammo_01.png");
|
||||
OldSkin = 1;
|
||||
break;
|
||||
case 2:
|
||||
if ( OldSkin != 2 ) A_ChangeModel("",1,"","",1,"models/322","JPammo_01.png");
|
||||
OldSkin = 2;
|
||||
break;
|
||||
default:
|
||||
if ( OldSkin != 0 ) A_ChangeModel("",1,"","",1,"models","JPammo_01.png");
|
||||
OldSkin = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Default
|
||||
{
|
||||
Tag "$T_PULSEAMMO";
|
||||
|
|
@ -13,8 +33,8 @@ Class PulseAmmo : Ammo
|
|||
States
|
||||
{
|
||||
Spawn:
|
||||
PAMO A -1;
|
||||
Stop;
|
||||
PAMO A 1 A_CheckSkin();
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -527,7 +547,7 @@ Class StarterBolt : PulseBolt
|
|||
A_SetPitch(target.BulletSlope());
|
||||
frame++;
|
||||
if ( frame > 4 ) frame = 0;
|
||||
CheckBeam((cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch)));
|
||||
CheckBeam(dt_Utility.Vec3FromAngle(angle,pitch));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -562,24 +582,70 @@ Class PulseGun : UTWeapon
|
|||
bool ClipOut;
|
||||
double sangle;
|
||||
Actor beam;
|
||||
transient ui Font usmf;
|
||||
|
||||
Property ClipCount : clipcount;
|
||||
|
||||
PulseGunLED ammoled;
|
||||
ui Canvas AmmoLed;
|
||||
ui TextureID LedFont, LedBase, CountBar;
|
||||
|
||||
override void DoEffect()
|
||||
int OldSkin;
|
||||
|
||||
override void Tick()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( !ammoled )
|
||||
Super.Tick();
|
||||
switch ( flak_oldpulse )
|
||||
{
|
||||
let ti = ThinkerIterator.Create("PulseGunLED");
|
||||
while ( ammoled=PulseGunLED(ti.Next()) ) break;
|
||||
if ( !ammoled ) ammoled = PulseGunLED(Spawn("PulseGunLED"));
|
||||
case 1:
|
||||
if ( OldSkin != 1 )
|
||||
{
|
||||
A_ChangeModel("",1,"","",1,"models/222","JPulsePickup_01.png");
|
||||
A_ChangeModel("",0,"","",2,"models/222","JPulseGun_02.png",CMDL_USESURFACESKIN);
|
||||
A_ChangeModel("",0,"","",3,"models/222","JPulseGun_03.png",CMDL_USESURFACESKIN);
|
||||
}
|
||||
OldSkin = 1;
|
||||
break;
|
||||
case 2:
|
||||
if ( OldSkin != 2 )
|
||||
{
|
||||
A_ChangeModel("",1,"","",1,"models/322","JPulsePickup_01.png");
|
||||
A_ChangeModel("",0,"","",2,"models/322","JPulseGun_02.png",CMDL_USESURFACESKIN);
|
||||
A_ChangeModel("",0,"","",3,"models/322","JPulseGun_03.png",CMDL_USESURFACESKIN);
|
||||
}
|
||||
OldSkin = 2;
|
||||
break;
|
||||
default:
|
||||
if ( OldSkin != 1 )
|
||||
{
|
||||
A_ChangeModel("",1,"","",1,"models","JPulsePickup_01.png");
|
||||
A_ChangeModel("",0,"","",2,"models","JPulseGun_02.png",CMDL_USESURFACESKIN);
|
||||
A_ChangeModel("",0,"","",3,"models","JPulseGun_03.png",CMDL_USESURFACESKIN);
|
||||
}
|
||||
OldSkin = 0;
|
||||
break;
|
||||
}
|
||||
if ( !Owner || !Owner.player || (Owner != players[consoleplayer].Camera) ) return;
|
||||
ammoled.mygun = self;
|
||||
TexMan.SetCameraToTexture(ammoled,"PAmmoLed",90);
|
||||
}
|
||||
|
||||
override void RenderOverlay( RenderEvent e )
|
||||
{
|
||||
Vector2 fnt[] =
|
||||
{
|
||||
(0,1), (49,1), (98,1), (147,1), (196,1),
|
||||
(0,87), (49,87), (98,87), (147,87), (196,87)
|
||||
};
|
||||
if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("PAmmoLed");
|
||||
if ( !LedFont ) LedFont = TexMan.CheckForTexture("models/LEDFont.png",TexMan.Type_Any);
|
||||
if ( !LedBase ) LedBase = TexMan.CheckForTexture("models/AmmoLedBase.png",TexMan.Type_Any);
|
||||
if ( !CountBar ) CountBar = TexMan.CheckForTexture("models/AmmoCountBar.png",TexMan.Type_Any);
|
||||
AmmoLed.DrawTexture(LedBase,false,0,0);
|
||||
int amo = flak_pulsereload?ClipCount:Ammo1.Amount;
|
||||
int mamo = flak_pulsereload?default.ClipCount:Ammo1.MaxAmount;
|
||||
int dg3 = (amo/100)%10;
|
||||
int dg2 = (amo/10)%10;
|
||||
int dg1 = amo%10;
|
||||
AmmoLed.DrawTexture(LedFont,false,56,14,DTA_SrcX,fnt[dg3].x,DTA_SrcY,fnt[dg3].y,DTA_SrcWidth,48,DTA_SrcHeight,85,DTA_DestWidth,48,DTA_DestHeight,85,DTA_Color,(amo<10)?0xFFFF0000:0xFF0000FF);
|
||||
AmmoLed.DrawTexture(LedFont,false,104,14,DTA_SrcX,fnt[dg2].x,DTA_SrcY,fnt[dg2].y,DTA_SrcWidth,48,DTA_SrcHeight,85,DTA_DestWidth,48,DTA_DestHeight,85,DTA_Color,(amo<10)?0xFFFF0000:0xFF0000FF);
|
||||
AmmoLed.DrawTexture(LedFont,false,152,14,DTA_SrcX,fnt[dg1].x,DTA_SrcY,fnt[dg1].y,DTA_SrcWidth,48,DTA_SrcHeight,85,DTA_DestWidth,48,DTA_DestHeight,85,DTA_Color,(amo<10)?0xFFFF0000:0xFF0000FF);
|
||||
AmmoLed.DrawTexture(CountBar,false,30,100,DTA_DestWidth,(min(amo,mamo)*196)/mamo,DTA_DestHeight,10);
|
||||
}
|
||||
|
||||
override int, int, bool, bool GetClipAmount()
|
||||
|
|
@ -677,12 +743,12 @@ Class PulseGun : UTWeapon
|
|||
double a;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-1.8*z);
|
||||
origin = level.Vec3Offset(origin,y*cos(invoker.sangle)*2+z*sin(invoker.sangle)*2);
|
||||
origin = level.Vec3Offset(origin,dt_Utility.CircleOffset(y,z,invoker.sangle,2));
|
||||
invoker.sangle += 100;
|
||||
Actor p = Spawn("PulseBall",origin);
|
||||
p.angle = angle;
|
||||
p.pitch = BulletSlope();
|
||||
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
|
||||
p.vel = dt_Utility.Vec3FromAngle(p.angle,p.pitch)*p.speed;
|
||||
p.target = self;
|
||||
for ( int i=0; i<8; i++ )
|
||||
{
|
||||
|
|
@ -749,6 +815,7 @@ Class PulseGun : UTWeapon
|
|||
Weapon.AmmoGive 60;
|
||||
PulseGun.ClipCount 50;
|
||||
UTWeapon.DropAmmo 15;
|
||||
UTWeapon.NameColor "80 FF 80";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue