Began working on Rocket Launcher.

Corrected some stuff and tweaked models and offsets again.
Added gib impact sounds (Droplets compat).
Made Translocator module throwing work like in UT (same math, even).
Corrected sludge wall sticking, uses projection now rather than a cheap trace.
This commit is contained in:
Marisa the Magician 2018-05-30 01:36:38 +02:00
commit a6ccec0997
19 changed files with 356 additions and 60 deletions

View file

@ -38,6 +38,10 @@ Class UTRocketAmmo2 : UTRocketAmmo
Class UTRocket : Actor
{
Default
{
Obituary "%o was smacked down by %k's Rocket Launcher.";
}
States
{
Spawn:
@ -48,6 +52,10 @@ Class UTRocket : Actor
Class UTGrenade : Actor
{
Default
{
Obituary "%o was smacked down by %k's Rocket Launcher.";
}
States
{
Spawn:
@ -58,12 +66,49 @@ Class UTGrenade : Actor
Class UTRocketLauncher : UTWeapon
{
int loaded;
Actor LockedTarget;
// consumes 1 ammo
action void A_LoadRocket()
{
Weapon weap = Weapon(invoker);
if ( !weap ) return;
if ( weap.Ammo1.Amount <= 0 ) return;
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
}
// refire that is ignored if there's no ammo
action void A_LoadedRefire( statelabel flash = null )
{
Weapon weap = Weapon(invoker);
if ( !weap ) return;
if ( weap.Ammo1.Amount <= 0 ) return;
A_Refire(flash);
}
// fire all the rockets (or grenades)
action void A_FireRockets( int num )
{
Weapon weap = Weapon(invoker);
if ( !weap ) return;
if ( weap.bAltFire ) A_PlaySound("utrl/altfire",CHAN_WEAPON);
else A_PlaySound("utrl/fire",CHAN_WEAPON);
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(64,255,0,0),1);
A_AlertMonsters();
A_QuakeEx(2+num,2+num,2+num,6+num,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1+num*0.05);
// TODO
}
// lock-on check (TODO)
Actor CheckTarget()
{
return null;
}
Default
{
Tag "Rocket Launcher";
//Obituary "%o was smacked down by %k's Rocket Launcher.";
Inventory.PickupMessage "You got the Rocket Launcher.";
Weapon.UpSound "utrl/select";
Weapon.SlotNumber 9;
@ -94,23 +139,253 @@ Class UTRocketLauncher : UTWeapon
}
Wait;
Fire:
EBF1 ABCDEFGH 1;
EBF2 ABCDEFGHIJK 1;
EBF3 ABCDEFGHIJ 1;
EBF4 ABCDEFGHIJK 1;
EBF5 ABCDEFGHIJKLM 1;
EBF6 ABCDEFGHIJKLMNOP 1;
EBR1 ABCDEFG 1;
EBR2 ABCDEFG 1;
EBR3 ABCDEFG 1;
EBR4 ABCDEFG 1;
EBR5 ABCDEFG 1;
EBL1 ABCDEFG 1;
EBL2 ABCDEFG 1;
EBL3 ABCDEFG 1;
EBL4 ABCDEFG 1;
EBL5 ABCDEFG 1;
EBL6 ABCDEF 1;
AltFire:
// one is loaded already
EBLI A 3 A_LoadRocket();
EBLI A 0 A_LoadedRefire(1);
Goto FireOne;
// load two
EBLI A 2;
EBL1 A 0;
EBR1 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR1 B 0 A_Refire(1);
Goto FireOne;
EBR1 B 2;
EBR1 C 0 A_Refire(1);
Goto FireOne;
EBR1 C 2;
EBR1 D 0 A_Refire(1);
Goto FireOne;
EBR1 D 2;
EBR1 E 0 A_Refire(1);
Goto FireOne;
EBR1 E 2;
EBR1 F 0 A_Refire(1);
Goto FireOne;
EBR1 F 2;
EBR1 G 0 A_Refire(1);
Goto FireOne;
EBR1 G 2;
EBL2 A 0 A_Refire(1);
Goto FireOne;
EBL2 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL2 B 0 A_Refire(1);
Goto FireOne;
EBL2 B 3;
EBL2 C 0 A_Refire(1);
Goto FireOne;
EBL2 C 3;
EBL2 D 0 A_Refire(1);
Goto FireOne;
EBL2 D 3;
EBL2 E 0 A_Refire(1);
Goto FireOne;
EBL2 E 3;
EBL2 F 0 A_Refire(1);
Goto FireOne;
EBL2 F 3;
EBL2 G 0 A_Refire(1);
Goto FireOne;
EBL2 G 3 A_LoadRocket();
EBR2 A 0 A_LoadedRefire(1);
Goto FireTwo;
// load three
EBR2 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR2 B 0 A_Refire(1);
Goto FireTwo;
EBR2 B 2;
EBR2 C 0 A_Refire(1);
Goto FireTwo;
EBR2 C 2;
EBR2 D 0 A_Refire(1);
Goto FireTwo;
EBR2 D 2;
EBR2 E 0 A_Refire(1);
Goto FireTwo;
EBR2 E 2;
EBR2 F 0 A_Refire(1);
Goto FireTwo;
EBR2 F 2;
EBR2 G 0 A_Refire(1);
Goto FireTwo;
EBR2 G 2;
EBL3 A 0 A_Refire(1);
Goto FireTwo;
EBL3 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL3 B 0 A_Refire(1);
Goto FireTwo;
EBL3 B 3;
EBL3 C 0 A_Refire(1);
Goto FireTwo;
EBL3 C 3;
EBL3 D 0 A_Refire(1);
Goto FireTwo;
EBL3 D 3;
EBL3 E 0 A_Refire(1);
Goto FireTwo;
EBL3 E 3;
EBL3 F 0 A_Refire(1);
Goto FireTwo;
EBL3 F 3;
EBL3 G 0 A_Refire(1);
Goto FireTwo;
EBL3 G 3 A_LoadRocket();
EBR3 A 0 A_LoadedRefire(1);
Goto FireThree;
// load four
EBR3 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR3 B 0 A_Refire(1);
Goto FireThree;
EBR3 B 2;
EBR3 C 0 A_Refire(1);
Goto FireThree;
EBR3 C 2;
EBR3 D 0 A_Refire(1);
Goto FireThree;
EBR3 D 2;
EBR3 E 0 A_Refire(1);
Goto FireThree;
EBR3 E 2;
EBR3 F 0 A_Refire(1);
Goto FireThree;
EBR3 F 2;
EBR3 G 0 A_Refire(1);
Goto FireThree;
EBR3 G 2;
EBL4 A 0 A_Refire(1);
Goto FireThree;
EBL4 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL4 B 0 A_Refire(1);
Goto FireThree;
EBL4 B 3;
EBL4 C 0 A_Refire(1);
Goto FireThree;
EBL4 C 3;
EBL4 D 0 A_Refire(1);
Goto FireThree;
EBL4 D 3;
EBL4 E 0 A_Refire(1);
Goto FireThree;
EBL4 E 3;
EBL4 F 0 A_Refire(1);
Goto FireThree;
EBL4 F 3;
EBL4 G 0 A_Refire(1);
Goto FireThree;
EBL4 G 3 A_LoadRocket();
EBR4 A 0 A_LoadedRefire(1);
Goto FireFour;
// load five
EBR4 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR4 B 0 A_Refire(1);
Goto FireFour;
EBR4 B 2;
EBR4 C 0 A_Refire(1);
Goto FireFour;
EBR4 C 2;
EBR4 D 0 A_Refire(1);
Goto FireFour;
EBR4 D 2;
EBR4 E 0 A_Refire(1);
Goto FireFour;
EBR4 E 2;
EBR4 F 0 A_Refire(1);
Goto FireFour;
EBR4 F 2;
EBR4 G 0 A_Refire(1);
Goto FireFour;
EBR4 G 2;
EBL5 A 0 A_Refire(1);
Goto FireFour;
EBL5 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL5 B 0 A_Refire(1);
Goto FireFour;
EBL5 B 3;
EBL5 C 0 A_Refire(1);
Goto FireFour;
EBL5 C 3;
EBL5 D 0 A_Refire(1);
Goto FireFour;
EBL5 D 3;
EBL5 E 0 A_Refire(1);
Goto FireFour;
EBL5 E 3;
EBL5 F 0 A_Refire(1);
Goto FireFour;
EBL5 F 3;
EBL5 G 0 A_Refire(1);
Goto FireFour;
EBL5 G 3 A_LoadRocket();
EBR5 A 0 A_LoadedRefire(1);
Goto FireFive;
// load six
EBR5 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR5 B 0 A_Refire(1);
Goto FireFive;
EBR5 B 2;
EBR5 C 0 A_Refire(1);
Goto FireFive;
EBR5 C 2;
EBR5 D 0 A_Refire(1);
Goto FireFive;
EBR5 D 2;
EBR5 E 0 A_Refire(1);
Goto FireFive;
EBR5 E 2;
EBR5 F 0 A_Refire(1);
Goto FireFive;
EBR5 F 2;
EBR5 G 0 A_Refire(1);
Goto FireFive;
EBR5 G 2;
EBL6 A 0 A_Refire(1);
Goto FireFive;
EBL6 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL6 B 0 A_Refire(1);
Goto FireFive;
EBL6 B 3;
EBL6 C 0 A_Refire(1);
Goto FireFive;
EBL6 C 3;
EBL6 D 0 A_Refire(1);
Goto FireFive;
EBL6 D 3;
EBL6 E 0 A_Refire(1);
Goto FireFive;
EBL6 E 3;
EBL6 F 0 A_Refire(1);
Goto FireFive;
EBL6 F 3 A_LoadRocket();
Goto FireSix;
FireOne:
EBF1 A 0 A_FireRockets(1);
EBF1 ABCDEFGH 2;
EBLI A 2;
Goto Idle;
FireTwo:
EBF2 A 0 A_FireRockets(2);
EBF2 ABCDEFGHIJK 2;
EBLI A 2;
Goto Idle;
FireThree:
EBF3 A 0 A_FireRockets(3);
EBF3 ABCDEFGHIJ 2;
EBLI A 2;
Goto Idle;
FireFour:
EBF4 A 0 A_FireRockets(4);
EBF4 ABCDEFGHIJK 2;
EBLI A 2;
Goto Idle;
FireFive:
EBF5 A 0 A_FireRockets(5);
EBF5 ABCDEFGHIJKLM 2;
EBLI A 2;
Goto Idle;
FireSix:
EBF6 A 0 A_FireRockets(6);
EBF6 ABCDEFGHIJKLMNOP 2;
EBLI A 2;
Goto Idle;
Deselect:
EBLD ABCDEFGHIJK 1;