@@ -219,7 +219,10 @@ AltFire: | |||
Reload: | |||
#### # 0 Lith_A_JumpIfMagFull; | |||
MARP A 0 Lith_A_ScopeOut; | |||
MARP A 0 A_StartSound("weapons/pistol/reload", lch_reload); | |||
MARP A 0 { | |||
A_StartSound("weapons/pistol/reload", lch_reload); | |||
lith_a_setInterpolation(true); | |||
} | |||
MARP A 1 offset(0, 34); | |||
MARP A 1 offset(0, 36); | |||
MARP B 1 offset(0, 50); | |||
@@ -232,7 +235,7 @@ Reload: | |||
MARP B 1 offset(-1, 50); | |||
MARP B 1 offset(0, 45); | |||
MARP B 1 offset(0, 36); | |||
MARP B 2; | |||
MARP B 2 lith_a_setInterpolation(false); | |||
MARP A 0 Lith_A_ReloadFinish; | |||
goto ReadySelector; | |||
} | |||
@@ -71,7 +71,10 @@ FireEmpty: | |||
Reload: | |||
#### # 0 Lith_A_JumpIfMagFull; | |||
REVO A 1 offset(0, 33) A_StartSound("weapons/revolver/reload", lch_reload); | |||
REVO A 1 offset(0, 33) { | |||
A_StartSound("weapons/revolver/reload", lch_reload); | |||
lith_a_setInterpolation(true); | |||
} | |||
REVO A 1 offset(0, 34); | |||
REVO A 1 offset(0, 35) Lith_A_ReloadBobDn(0.1); | |||
REVO A 1 offset(-1, 37) Lith_A_ReloadBobDn(0.1); | |||
@@ -85,7 +88,7 @@ Reload: | |||
} | |||
REVO H 1 offset(-12, 55) Lith_A_ReloadBobDn(0.1); | |||
REVO I 1 offset(-13, 64); | |||
REVO I 1 offset(-13, 69); | |||
REVO I 1 offset(-13, 69) lith_a_setInterpolation(false); | |||
TNT1 A 16; | |||
TNT1 A 2 Lith_A_ReloadBobUp(0.5); | |||
TNT1 A 2 Lith_A_ReloadBobUp(0.5); | |||
@@ -93,13 +96,16 @@ Reload: | |||
Lith_A_ReloadFinish(); | |||
Lith_A_ReloadBobUp(0.3); | |||
} | |||
REVO J 1 offset(2, 55) Lith_A_ReloadBobUp(0.2); | |||
REVO J 1 offset(2, 55) { | |||
Lith_A_ReloadBobUp(0.2); | |||
lith_a_setInterpolation(true); | |||
} | |||
REVO K 1 offset(2, 50); | |||
REVO K 1 offset(2, 45); | |||
REVO K 1 offset(1, 40); | |||
REVO A 1 offset(1, 35); | |||
REVO A 1 offset(1, 33); | |||
REVO A 1 offset(1, 32); | |||
REVO A 1 offset(1, 32) lith_a_setInterpolation(false); | |||
goto ReadySelector; | |||
} | |||
@@ -179,7 +179,10 @@ FireFinish_Rail_Unscoped: | |||
SHTG C 1 bright offset(0, 33) A_Light(2); | |||
SHTG D 2 offset(0, 32) {A_Light(0); Lith_A_RecoilDn(0.25);} | |||
SHTG A 4 Lith_A_RecoilDn(0.25); | |||
SHTG F 3 Lith_A_RecoilDn(0.25); | |||
SHTG F 3 { | |||
Lith_A_RecoilDn(0.25); | |||
lith_a_setInterpolation(true); | |||
} | |||
SHTG G 3; | |||
SHTG H 2; | |||
SHTG I 1; | |||
@@ -189,7 +192,7 @@ FireFinish_Rail_Unscoped: | |||
SHTG G 1 offset(-13, 32); | |||
SHTG G 1 offset(0, 32); | |||
SHTG F 1 offset(-9, 32); | |||
SHTG F 1 offset(0, 32); | |||
SHTG F 1 offset(0, 32) lith_a_setInterpolation(false); | |||
SHTG A 2 offset(1, 32); | |||
SHTG AAAAAAA 1 A_ReFire(); | |||
goto ReadySelector; | |||
@@ -249,6 +249,7 @@ FireGrenade: | |||
goto ReadySelector; | |||
GrenadeReload: | |||
CRFG A 1 offset(1, 32) { | |||
lith_a_setInterpolation(true); | |||
if(Lith_UTIL.pData(self, pdata_upgrade, UPGR_7777777)) | |||
A_StartSound("marathon/rifle/reload", lch_reload); | |||
else | |||
@@ -283,7 +284,7 @@ GrenadeReload: | |||
CRFG A 1 offset(8, 40); | |||
CRFG A 1 offset(5, 38); | |||
CRFG A 1 offset(2, 35); | |||
CRFG A 8 offset(0, 32); | |||
CRFG A 8 offset(0, 32) lith_a_setInterpolation(false); | |||
goto ReadySelector; | |||
FireEmpty: | |||
@@ -310,7 +311,7 @@ SwitchMode: | |||
Reload: | |||
#### # 0 Lith_A_JumpIfMagFull; | |||
CRFG K 1; | |||
CRFG K 1 lith_a_setInterpolation(true); | |||
CRFG J 1 offset(-2, 34); | |||
CRFG J 1 offset(-4, 37); | |||
CRFG J 0 Lith_A_ReloadBobUp(0.1); | |||
@@ -326,7 +327,10 @@ Reload: | |||
CRFG J 0 Lith_A_ReloadFinish; | |||
CRFG J 0 Lith_A_ReloadBobDn(0.1); | |||
CRFG J 2 offset(-13, 59) A_StartSound("weapons/rifle/reloadin", lch_reload2); | |||
CRFG J 2 offset(-11, 49) Lith_A_ReloadBobDn(0.7); | |||
CRFG J 2 offset(-11, 49) { | |||
Lith_A_ReloadBobDn(0.7); | |||
lith_a_setInterpolation(false); | |||
} | |||
CRFG J 2 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
CRFG A 7 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
CRFG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
@@ -116,7 +116,10 @@ FireAnim_Scoped: | |||
SCOP A 1 {Lith_A_RecoilDn(0.25); Lith_A_ZoomFactorScoped(0.95);} | |||
SCOP A 3 {Lith_A_RecoilDn(0.25); Lith_A_ZoomFactorScoped(1.00);} | |||
BoltAnim: | |||
#### # 1 offset(1, 32) Lith_A_RecoilDn(0.25); | |||
#### # 1 offset(1, 32) { | |||
Lith_A_RecoilDn(0.25); | |||
lith_a_setInterpolation(true); | |||
} | |||
#### # 1 offset(3, 32) Lith_A_RecoilDn(0.25); | |||
#### # 1 offset(4, 32) Lith_A_RecoilDn(0.25); | |||
#### # 1 offset(8, 38) Lith_A_RecoilDn(0.25); | |||
@@ -147,7 +150,7 @@ BoltAnim: | |||
#### # 1 offset(8, 40); | |||
#### # 1 offset(5, 38); | |||
#### # 1 offset(2, 35); | |||
#### # 5 offset(0, 32); | |||
#### # 5 offset(0, 32) lith_a_setInterpolation(false); | |||
goto ReadySelector; | |||
FireEmpty: | |||
#### # 1; | |||
@@ -169,7 +172,7 @@ AltFire: | |||
Reload: | |||
#### # 0 Lith_A_JumpIfMagFull; | |||
SNPG A 0 Lith_A_ScopeOut; | |||
SNPG A 1; | |||
SNPG A 1 lith_a_setInterpolation(true); | |||
SNPG A 1 offset(-2, 34); | |||
SNPG A 1 offset(-4, 37); | |||
SNPG A 0 Lith_A_ReloadBobUp(0.5); | |||
@@ -185,7 +188,7 @@ Reload: | |||
SNPG A 2 offset(-13, 59) A_StartSound("weapons/sniper/magin", lch_reload2); | |||
SNPG A 2 offset(-11, 49); | |||
SNPG A 2 offset(-11, 47); | |||
SNPG A 7 offset(-11, 45); | |||
SNPG A 7 offset(-11, 45) lith_a_setInterpolation(false); | |||
SNPG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
SNPG A 1 offset(-8, 53) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
SNPG A 1 offset(-1, 57) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
@@ -262,7 +262,7 @@ Fire: | |||
Reload: | |||
CSRG A 0 Lith_A_JumpIfMagFull; | |||
CSRG D 1 offset(1, 32); | |||
CSRG D 1 offset(1, 32) lith_a_setInterpolation(true); | |||
CSRG E 1 offset(3, 32); | |||
CSRG F 1 offset(4, 32); | |||
CSRG F 1 offset(8, 38); | |||
@@ -301,7 +301,7 @@ Reload: | |||
CSRG A 1 offset(10, 42); | |||
CSRG A 1 offset(8, 40); | |||
CSRG A 1 offset(5, 38); | |||
CSRG A 1 offset(2, 35); | |||
CSRG A 1 offset(2, 35) lith_a_setInterpolation(false); | |||
goto ReadySelector; | |||
FireEmpty: | |||
@@ -282,7 +282,7 @@ DoFire: | |||
TNT1 A 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "FireAnim_Scoped"); | |||
FireAnim_Unscoped: | |||
IONG CB 2 bright; | |||
IONG D 1 bright; | |||
IONG D 1 bright lith_a_setInterpolation(true); | |||
IONG E 1 bright; | |||
IONG FGA 1; | |||
goto ChillCheck; | |||
@@ -347,7 +347,7 @@ BoltAnim: | |||
#### # 1 offset(8, 40); | |||
#### # 1 offset(5, 38); | |||
#### # 1 offset(2, 35); | |||
#### # 5 offset(1, 32); | |||
#### # 5 offset(1, 32) lith_a_setInterpolation(false); | |||
#### # 0 Lith_A_JumpIfMagEmpty(false); | |||
goto ReadySelector; | |||
@@ -59,7 +59,7 @@ Fire: | |||
KM64 A 1 offset(0, 34); | |||
KM64 AAA 1 offset(0, 32) A_ReFire; | |||
LoadAnim: | |||
#### D 1 offset(3, 32); | |||
#### D 1 offset(3, 32) lith_a_setInterpolation(true); | |||
#### D 1 offset(8, 38); | |||
#### D 1 offset(12, 45); | |||
#### D 1 offset(19, 60); | |||
@@ -82,7 +82,7 @@ LoadAnim: | |||
#### D 1 offset(10, 42); | |||
#### D 1 offset(8, 40); | |||
#### D 1 offset(5, 38); | |||
#### D 1 offset(2, 35); | |||
#### D 1 offset(2, 35) lith_a_setInterpolation(false); | |||
goto ReadySelector; | |||
FireEmpty: | |||
#### # 1; | |||
@@ -168,7 +168,10 @@ Select: | |||
Fire: | |||
#### # 0 Lith_A_JumpIfMagEmpty; | |||
#### # 0 Lith_A_MagIncr; | |||
700E A 1 offset(2, 32) lith_laser(0.0); | |||
700E A 1 offset(2, 32) { | |||
lith_laser(0.0); | |||
lith_a_setInterpolation(true); | |||
} | |||
700E Y 1 bright { | |||
lith_fire700e(); | |||
lith_laser(22.0); | |||
@@ -188,7 +191,10 @@ Fire: | |||
700E A 1 lith_laser(0.0); | |||
700E A 1 lith_laser(0.0); | |||
700E A 1 offset(0, 32) lith_laser(0.0); | |||
700E A 1 offset(0, 32) lith_laser(0.0); | |||
700E A 1 offset(0, 32) { | |||
lith_laser(0.0); | |||
lith_a_setInterpolation(false); | |||
} | |||
goto ReadySelector; | |||
FireEmpty: | |||
@@ -205,7 +211,8 @@ FireEmpty: | |||
goto ReadySelector; | |||
Reload: | |||
700E B 1 Lith_A_JumpIfMagFull; | |||
#### # 0 Lith_A_JumpIfMagFull; | |||
700E B 1 lith_a_setInterpolation(true); | |||
700E B 1 offset(2, 31) A_StartSound("weapons/700e/move", lch_reload); | |||
700E C 1 offset(1, 32) Lith_A_ReloadBobUp(0.5); | |||
700E C 1 offset(3, 32) Lith_A_ReloadBobUp(0.5); | |||
@@ -222,13 +229,14 @@ Reload: | |||
for(int i = 0; i < invoker.m_Fired; i++) | |||
Lith_A_Casing("Lith_Cas700e", 10, frandom(1,2), 32, frandom(1,2), frandom(1,3), 0); | |||
} | |||
700E F 1 offset(-9, 68); | |||
700E F 1 offset(-9, 68) lith_a_setInterpolation(false); | |||
TNT1 A 6 A_SetTics(invoker.m_Fired * 2); | |||
TNT1 A 2 Lith_A_ReloadFinish; | |||
700E C 1 offset(-35, 100); | |||
700E C 1 offset(-20, 90) { | |||
A_StartSound("weapons/700e/in", lch_reload2); | |||
Lith_A_ReloadBobUp(2); | |||
lith_a_setInterpolation(true); | |||
} | |||
700E C 1 offset(-15, 70); | |||
700E C 1 offset(-10, 60); | |||
@@ -236,7 +244,7 @@ Reload: | |||
700E C 2 offset(-5, 36); | |||
700E C 4 offset(-2, 34); | |||
700E B 2 offset(1, 32); | |||
700E A 2; | |||
700E A 2 lith_a_setInterpolation(false); | |||
goto ReadySelector; | |||
} | |||
@@ -133,12 +133,12 @@ Release2: | |||
#### B 1; | |||
#### A 0 A_CustomPunch(CallACS("Lith_ChargeFistDamage"), true, 0, "Lith_ChargeFistPuff", 128); | |||
#### A 0 A_JumpIfInventory("Lith_FistHit", 1, "HitRecoil"); | |||
#### C 2; /* Missed, so you quickly bring your fist back */ | |||
#### C 2 lith_a_setInterpolation(true); /* Missed, so you quickly bring your fist back */ | |||
#### D 5; | |||
#### H 2; | |||
#### I 1; | |||
#### J 1; | |||
#### K 1; | |||
#### K 1 lith_a_setInterpolation(false); | |||
TNT1 A 1; | |||
TNT1 AAAAAAAAAA 1 A_ReFire; | |||
goto ReadySelector; | |||
@@ -146,6 +146,7 @@ HitRecoil: | |||
#### A 0 { | |||
A_AlertMonsters(); | |||
A_ChangeVelocity(Cos(Pitch) * -2, 0, Sin(Pitch) * 2, 1); | |||
lith_a_setInterpolation(true); | |||
} | |||
#### C 1; | |||
#### DEFG 1; /* Shaking from the force of the impact */ | |||
@@ -153,7 +154,7 @@ HitRecoil: | |||
#### H 2; | |||
#### I 2; | |||
#### J 2; | |||
#### K 2; | |||
#### K 2 lith_a_setInterpolation(false); | |||
TNT1 A 1; | |||
TNT1 AAAAAAAAAA 1 A_ReFire; | |||
goto ReadySelector; | |||
@@ -60,7 +60,7 @@ Select: | |||
Reload: | |||
MISG A 0 Lith_A_JumpIfMagFull; | |||
MISG A 1; | |||
MISG A 1 lith_a_setInterpolation(true); | |||
MISG A 1 offset(-2, 34); | |||
MISG A 1 offset(-4, 37); | |||
MISG A 1 offset(-9, 43) A_StartSound("weapons/missile/reloadout", lch_reload); | |||
@@ -74,7 +74,10 @@ Reload: | |||
A_StartSound("weapons/missile/reloadin", lch_reload2); | |||
Lith_A_ReloadFinish(); | |||
} | |||
MISG A 2 offset(-11, 49) Lith_A_ReloadBobDn(0.4); | |||
MISG A 2 offset(-11, 49) { | |||
Lith_A_ReloadBobDn(0.4); | |||
lith_a_setInterpolation(false); | |||
} | |||
MISG A 2 offset(-11, 47) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
MISG A 7 offset(-11, 45) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
MISG A 1 offset(-12, 49) A_WeaponReady(WRF_NOBOB|WRF_NOFIRE); | |||
@@ -100,6 +100,12 @@ int lith_getRaiseSpeed(Lith_RaiseSpeed speed) { | |||
return 0; | |||
} | |||
action(Weapon) void lith_a_setInterpolation(bool on) { | |||
for(int psp = _psp_weapon; psp < _psp_wep_max; ++psp) { | |||
a_overlayFlags(psp, pspf_interpolate, on); | |||
} | |||
} | |||
action(Weapon) void lith_a_setupOverlays() { | |||
float a; | |||
int style; | |||
@@ -127,6 +133,7 @@ action(Weapon) void Lith_A_Lower(Lith_RaiseSpeed speed) { | |||
} | |||
if(!player.readyWeapon) { | |||
lith_a_setInterpolation(false); | |||
player.mo.bringUpWeapon(); | |||
return; | |||
} | |||
@@ -135,6 +142,7 @@ action(Weapon) void Lith_A_Lower(Lith_RaiseSpeed speed) { | |||
let psp = player.getPSprite(_psp_weapon); | |||
if(psp) { | |||
lith_a_setupOverlays(); | |||
lith_a_setInterpolation(true); | |||
if(player.morphTics || player.cheats & cf_instantweapswitch) { | |||
psp.y = weaponBottom; | |||
@@ -148,11 +156,13 @@ action(Weapon) void Lith_A_Lower(Lith_RaiseSpeed speed) { | |||
resetPSprite(psp); | |||
if(player.playerState == pst_dead) { | |||
lith_a_setInterpolation(false); | |||
player.setPSprite(_psp_flash, null); | |||
psp.setState(findState('DeadLowered')); | |||
return; | |||
} | |||
lith_a_setInterpolation(false); | |||
player.setPSprite(_psp_flash, null); | |||
player.mo.bringUpWeapon(); | |||
} | |||
@@ -251,12 +261,22 @@ virtual void Lith_ReloadFinish(bool isauto) { | |||
action(Weapon) state Lith_A_JumpIfMagEmpty(bool autoreload = true, statelabel rsn = "Reload", statelabel esn = "FireEmpty") { | |||
statelabel sn; | |||
if(autoreload) { | |||
if(CVar.GetCVar('lith_weapons_reloadempty', Player).GetBool()) sn = rsn; | |||
else sn = esn; | |||
if(CVar.GetCVar('lith_weapons_reloadempty', Player).GetBool()) { | |||
sn = rsn; | |||
} else { | |||
sn = esn; | |||
} | |||
} else { | |||
sn = rsn; | |||
} | |||
return invoker.Lith_MagEmpty() ? ResolveState(sn) : null; | |||
if(invoker.lith_magEmpty()) { | |||
if(sn == "FireEmpty") { | |||
lith_a_setInterpolation(true); | |||
} | |||
return ResolveState(sn); | |||
} else { | |||
return null; | |||
} | |||
} | |||
action(Weapon) state Lith_A_JumpIfMagFull(statelabel sn = "ReadySelector") { | |||
@@ -284,6 +304,9 @@ action(Weapon) state Lith_A_JumpIfNoSlot3OptAmmo(statelabel sn = "FireEmpty", in | |||
if(!Lith_UTIL.pData(self, pdata_slot3ammo) || CountInv("Lith_ShellAmmo") >= req) { | |||
return null; | |||
} else { | |||
if(sn == "FireEmpty") { | |||
lith_a_setInterpolation(true); | |||
} | |||
return ResolveState(sn); | |||
} | |||
} | |||
@@ -400,6 +423,7 @@ Spawn: | |||
states(Weapon) { | |||
ReadySelector: | |||
#### # 0 { | |||
lith_a_setInterpolation(false); | |||
return CountInv("Lith_WeaponScopedToken") ? ResolveState("AltReady") | |||
: ResolveState("Ready"); | |||
} | |||
@@ -24,46 +24,54 @@ bool m_KnifeReFire; | |||
states(Weapon) | |||
{ | |||
User4: | |||
#### # 0 {return Lith_UTIL.pData(self, pdata_pclass) == pcl_marine ? null : ResolveState("ReadySelector");} | |||
#### # 0 { | |||
return Lith_UTIL.pData(self, pdata_pclass) == pcl_marine ? | |||
null : | |||
ResolveState("ReadySelector"); | |||
} | |||
_UseKnife: | |||
#### # 0 A_JumpIfInventory("Lith_WeaponScopedToken", 1, "ReadySelector"); | |||
#### # 0 A_JumpIf(invoker.m_KnifeReFire, "_KnifeStart"); | |||
#### # 3 offset(2, 34); | |||
#### # 3 offset(2, 34) lith_a_setInterpolation(true); | |||
#### # 1 offset(5, 41); | |||
#### # 1 offset(10, 58); | |||
#### # 1 offset(17, 87); | |||
#### # 1 offset(17, 87) lith_a_setInterpolation(false); | |||
_KnifeStart: | |||
TNT1 A 0 {invoker.m_KnifeReFire = true;} | |||
TNT1 A 0 offset(1, 32) A_AlertMonsters; | |||
TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "_Knife1"); | |||
KNIF A 1 A_StartSound("weapons/knife/swing1", lch_weapon); | |||
KNIF BCD 1; | |||
KNIF B 1 lith_a_setInterpolation(true); | |||
KNIF CD 1; | |||
goto _KnifeNormal; | |||
_Knife1: | |||
TNT1 A 1 A_StartSound("weapons/knife/swing2", lch_weapon); | |||
KNIF FGH 1; | |||
KNIF F 1; | |||
KNIF G 1 lith_a_setInterpolation(true); | |||
KNIF H 1; | |||
_KnifeNormal: | |||
TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "_KnifeEnd2"); | |||
TNT1 A 0 Lith_A_HitKnife("Lith_KnifPuf1"); | |||
KNIF E 1; | |||
KNIF E 0 A_JumpIfInventory("Lith_Knif", 1, "_KnifeEnd2"); | |||
KNIF E 0 Lith_A_HitKnife("Lith_KnifPuf1"); | |||
KNIF E 1 lith_a_setInterpolation(false); | |||
TNT1 A 1; | |||
TNT1 A 0 ResolveState("_KnifeEnd"); | |||
stop; | |||
_KnifeEnd2: | |||
TNT1 A 0 Lith_A_HitKnife("Lith_KnifPuf2"); | |||
KNIF IJ 1; | |||
KNIF I 0 Lith_A_HitKnife("Lith_KnifPuf2"); | |||
KNIF I 1; | |||
KNIF J 1 lith_a_setInterpolation(false); | |||
TNT1 A 0 ResolveState("_KnifeEnd"); | |||
stop; | |||
_KnifeEnd: | |||
TNT1 A 7; | |||
TNT1 A 0 A_JumpIfInventory("Lith_Knif", 1, "_KnifeDone"); | |||
TNT1 A 0 {self.GiveInventory("Lith_Knif", 1);} | |||
TNT1 A 0 GiveInventory("Lith_Knif", 1); | |||
TNT1 A 0 ResolveState("_KnifeEnd_1"); | |||
stop; | |||
_KnifeEnd_1: | |||
TNT1 AAAAA 1 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWUSER4); | |||
_KnifeEnd_2: | |||
TNT1 A 0 {self.TakeInventory("Lith_Knif", 1);} | |||
TNT1 A 0 TakeInventory("Lith_Knif", 1); | |||
TNT1 A 0 ResolveState("_KnifeFinish"); | |||
stop; | |||
_KnifeDone: | |||