1 ////////////////////////////////////////////////////////////////////////////////
2 Actor Zan_PaingunBulletCasingSpawn {
21 TNT1 A 1 A_CustomMissile("Zan_PainGunEmptyBrass", -5, 0, random(-80, -100), CMF_AIMDIRECTION, random(45, 80))
27 Actor Zan_PainGunEmptyBrass : Zan_CasingBase {
34 BounceSound "Ammo/BulletBounce"
39 ZPGX ABCDEFGHABCDEFGHABCDEFGHABCDEFGH 3
41 A_JumpIf(waterlevel > 1, "Splash");
42 if (!A_k8JumpIfOnFloorSky("Disappear")) {
43 A_k8JumpIfOnLiquidFloor("Death");
55 A_ChangeFlag("DoomBounce", false);
56 A_ChangeFlag("NoInteraction", true);
58 TNT1 A 0 A_Jump(256, "Rest1", "Rest2", "Rest3", "Rest4", "Rest5", "Rest6", "Rest7", "Rest8")
65 if (!A_k8JumpIfOnFloorSky("Disappear")) {
66 A_k8JumpIfOnLiquidFloor("Stopping");
70 //"####" "#" 0 A_SetTics(GetCVar("ZanExOpt_EmptyCasingTime")*35*60+10)
71 // become non-scripted instead
72 "####" "#" -1 A_BecomeK8VavoomInternalNoTickGrav(GetCVar("ZanExOpt_EmptyCasingTime")*60+frandom(1, 4), frandom(64, 90)/35.0/10.0)
74 "####" "#" random(10, 15) A_FadeOut(0.01)
104 TNT1 A 0 A_SpawnItem("Zan_PainGunUnderwaterEmptyBrass")
110 A_ChangeFlag("NoInteraction", true);
111 A_ChangeVelocity(0, 0, -14, CVF_REPLACE);
118 Actor Zan_PainGunUnderwaterEmptyBrass : Zan_PainGunEmptyBrass {
127 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
129 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
131 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
133 TNT1 A 0 ThrustThingZ(0, 7, 1, 0)
135 TNT1 A 0 A_SpawnItem("UnderwaterBubble")
142 ACTOR PaingunBulletCasing {
162 //BounceSound "Ammo/BulletBounce"
167 TNT1 A 0 A_SetScale(0.15, 0.15)
173 //TNT1 A 0 A_PlaySound("Ammo/BulletBounce", CHAN_AUTO, 1.0, 0, 2)
174 TNT1 A 0 A_PlaySoundEx("Ammo/BulletBounce", "SoundSlot5", 0, -1)
176 ACAS D 105 A_CheckSight("Remove")
177 TNT1 A 0 A_Jump(50, "Remove")
188 ////////////////////////////////////////////////////////////////////////////////
189 ACTOR AmmoBox : Ammo replaces ClipBox {
194 Inventory.MaxAmount 450
195 Ammo.BackpackAmount 300
196 Ammo.BackpackMaxAmount 666
197 //Inventory.Icon "SPMGA0"
198 Inventory.Icon "ABULB0"
199 Inventory.PickupMessage "Picked up an Ammo Box."
200 Inventory.PickupSound "Ammo/AmmoBoxPick"
210 Actor AmmoBelt : AmmoBox /*replaces Clip*/ {
213 Inventory.PickupMessage "Picked up an Ammo Belt."
214 Inventory.PickupSound "Ammo/AmmoBeltPick"
215 //Inventory.Icon "SPMGA0"
216 Inventory.Icon "ABULC0"
226 Actor AmmoBullet : AmmoBox /*10936*/ {
231 Inventory.Amount 6 // 1
232 Inventory.PickupMessage "Picked up a Bullet."
233 Inventory.PickupSound "Ammo/BulletBounce"
234 //Inventory.Icon "SPMGA0"
235 Inventory.Icon "ABULC0"
253 ACTOR Paingun : Weapon replaces Chaingun {
258 +INVENTORY.UNDROPPABLE
260 //+WEAPON.NO_AUTO_SWITCH
261 +WEAPON.AMMO_OPTIONAL
262 //+WEAPON.ALT_USES_BOTH
263 Inventory.PickupMessage "Got a Paingun."
264 Inventory.PickupSound "Weapons/PaingunPick"
265 Inventory.Icon "WPAIA0"
267 Weapon.SelectionOrder 3
268 //Weapon.MinSelectionAmmo1 0
269 //Weapon.MinSelectionAmmo2 0
270 Weapon.AmmoType1 "AmmoBox"
271 //Weapon.AmmoGive1 40
274 Weapon.AmmoType2 "none"
278 Weapon.SlotPriority 1
279 Weapon.PlayerSpeedScale 0.64
280 Weapon.Kickback 136 // slightly bigger than the default
281 //+Weapon.DisablePlayerRun
283 var float user_FireAngle;
284 var float user_FirePitch;
285 var bool user_DropShell;
293 stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
294 TNT1 A 0 A_GiveInventory("HoldingPaingun", 1)
295 TNT1 A 0 { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(14); }
296 TNT1 A 0 A_Raise(666)
300 stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
301 WPAR A 1 Offset(-15, 40)
302 WPAR A 1 Offset(-30, 50)
303 WPAR A 1 Offset(-50, 65)
304 WPAR A 1 Offset(-70, 80)
308 TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
309 TNT1 A 0 A_TakeInventory("HoldingPaingun", 1)
310 TNT1 A 1 A_Lower(666)
315 TNT1 A 0 A_PlaySound("Weapons/PaingunReady", CHAN_WEAPON, 0.6)
316 WPAR A 1 Offset(-70, 80)
317 WPAR A 1 Offset(-50, 65)
318 WPAR A 1 Offset(-30, 50)
319 WPAR A 1 Offset(-15, 40)
320 TNT1 A 0 A_TakeInventory("QuickKickDisabled")
325 A_PlayerWeaponSpeedScale(0.64);
326 A_PlayerWeaponJumpScale(0.62);
327 A_PlayerWeaponDisableRun(false);
328 A_WeaponReady(WRF_ALLOWRELOAD);
333 TNT1 A 0 A_JumpIfNoAmmo("Reload")
334 TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
335 TNT1 A 0 A_JumpIfInventory("BarrelIsSpinning", 1, "Firing")
336 WPAF A 4 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
339 WPAF A 3 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
342 WPAF A 2 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
345 WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
348 TNT1 A 0 A_Refire("Firing")
349 WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
350 WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
351 WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
352 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
353 WPAF A 2 A_WeaponReady(WRF_ALLOWRELOAD)
354 WPAF B 2 A_WeaponReady(WRF_ALLOWRELOAD)
355 WPAF C 2 A_WeaponReady(WRF_ALLOWRELOAD)
356 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
357 TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
358 WPAF A 3 A_WeaponReady
359 WPAF B 3 A_WeaponReady
360 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
361 WPAF C 4 A_WeaponReady
365 TNT1 A 0 A_JumpIfNoAmmo("Reload")
366 TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
367 //TNT1 A 0 A_Overlay(3, "MuzzleFlash")
368 TNT1 A 0 A_GunFlash("MuzzleFlash")
373 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6");
375 A_PlayerWeaponSpeedScale(0.56);
376 A_PlayerWeaponJumpScale(0.56);
377 //A_PlayerWeaponDisableRun(true);
379 // each five bullet is a tracer
381 if (IsPlayerRunning()) {
383 user_FireAngle = frandom(-6.2, 6.2);
384 user_FirePitch = frandom(-6.2, 6.2);
385 } else if (!IsPlayerStanding()) {
386 if (IsPlayerCrouching()) {
388 user_FireAngle = frandom(-2.6, 2.6);
389 user_FirePitch = frandom(-2.6, 2.6);
392 user_FireAngle = frandom(-3.2, 3.2);
393 user_FirePitch = frandom(-3.2, 3.2);
395 } else if (IsPlayerCrouching()) {
397 user_FireAngle = frandom(-1.2, 1.2);
398 user_FirePitch = frandom(-1.2, 1.2);
401 user_FireAngle = frandom(-2.2, 2.2);
402 user_FirePitch = frandom(-2.2, 2.2);
405 if (CountInv("AmmoBox")%5 != 0) {
406 A_FireProjectile("PaingunBullet", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
408 A_FireProjectile("PaingunTracer", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
410 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON);
412 A_SetPitch(-0.35+pitch);
413 A_SetAngle(-0.20+angle);
420 if (GetCVarB('k8ZanMod_PainCasing')) {
421 if (GetCVarB('r_models')) {
422 A_FireCustomMissileEx("Zan_PaingunBulletCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
424 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0);
428 if (CountInv("AmmoBox") != 0) {
429 user_DropShell = true;
431 if (IsPlayerRunning()) {
433 user_FireAngle = frandom(-6.2, 6.2);
434 user_FirePitch = frandom(-6.2, 6.2);
435 } else if (!IsPlayerStanding()) {
436 if (IsPlayerCrouching()) {
438 user_FireAngle = frandom(-2.6, 2.6);
439 user_FirePitch = frandom(-2.6, 2.6);
442 user_FireAngle = frandom(-3.2, 3.2);
443 user_FirePitch = frandom(-3.2, 3.2);
445 } else if (IsPlayerCrouching()) {
447 user_FireAngle = frandom(-1.2, 1.2);
448 user_FirePitch = frandom(-1.2, 1.2);
451 user_FireAngle = frandom(-2.2, 2.2);
452 user_FirePitch = frandom(-2.2, 2.2);
455 if (CountInv("AmmoBox")%5 != 0) {
456 A_FireProjectile("PaingunBullet", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
458 A_FireProjectile("PaingunTracer", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
460 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON);
462 user_DropShell = false;
469 if (user_DropShell) {
470 if (GetCVarB('k8ZanMod_PainCasing')) {
471 if (GetCVarB('r_models')) {
472 A_FireCustomMissileEx("Zan_PaingunBulletCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
474 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0);
479 if (CountInv("AmmoBox") != 0) {
480 user_DropShell = true;
482 if (IsPlayerRunning()) {
484 user_FireAngle = frandom(-6.2, 6.2);
485 user_FirePitch = frandom(-6.2, 6.2);
486 } else if (!IsPlayerStanding()) {
487 if (IsPlayerCrouching()) {
489 user_FireAngle = frandom(-2.6, 2.6);
490 user_FirePitch = frandom(-2.6, 2.6);
493 user_FireAngle = frandom(-3.2, 3.2);
494 user_FirePitch = frandom(-3.2, 3.2);
496 } else if (IsPlayerCrouching()) {
498 user_FireAngle = frandom(-1.2, 1.2);
499 user_FirePitch = frandom(-1.2, 1.2);
502 user_FireAngle = frandom(-2.2, 2.2);
503 user_FirePitch = frandom(-2.2, 2.2);
506 if (CountInv("AmmoBox")%5 != 0) {
507 A_FireProjectile("PaingunBullet", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
509 A_FireProjectile("PaingunTracer", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
511 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON);
513 user_DropShell = false;
516 A_SetPitch(0.35+pitch);
517 A_SetAngle(0.20+angle);
523 if (user_DropShell) {
524 if (GetCVarB('k8ZanMod_PainCasing')) {
525 if (GetCVarB('r_models')) {
526 A_FireCustomMissileEx("Zan_PaingunBulletCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
528 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0);
534 TNT1 A 0 A_Refire("Firing")
535 WPAF A 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
536 WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
537 WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
538 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
539 WPAF A 2 A_WeaponReady(WRF_ALLOWRELOAD)
540 WPAF B 2 A_WeaponReady(WRF_ALLOWRELOAD)
541 WPAF C 2 A_WeaponReady(WRF_ALLOWRELOAD)
542 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
543 TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
544 WPAF A 3 A_WeaponReady
545 WPAF B 3 A_WeaponReady
546 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
547 WPAF C 4 A_WeaponReady
558 TNT1 A 0 A_JumpIfNoAmmo("Reload")
559 TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
560 TNT1 A 0 A_JumpIfInventory("BarrelIsSpinning", 1, "Altfiring")
561 WPAF A 3 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
564 WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
567 TNT1 A 0 A_Refire("Altfiring")
568 WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
569 WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
570 WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
571 TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
572 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
573 WPAF A 2 A_WeaponReady
574 WPAF C 2 A_WeaponReady
575 WPAF B 2 A_WeaponReady
579 TNT1 A 0 A_JumpIfNotInventory("AmmoBox", "Reload")
580 TNT1 A 0 A_JumpIf(waterlevel==3, "Reload")
581 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
582 //TNT1 A 0 A_Overlay(3, "MuzzleGas")
583 TNT1 A 0 A_GunFlash("MuzzleGas")
588 if (!HasSpecialPowerup(PWRT_INFAMMO)) A_TakeInventory("AmmoBox", 1);
590 A_PlayerWeaponSpeedScale(0.56);
591 A_PlayerWeaponJumpScale(0.56);
592 //A_PlayerWeaponDisableRun(true);
594 // each five bullet is "alt-bullet"
596 if (IsPlayerRunning()) {
597 user_FireAngle = frandom(-4.8, 4.8);
598 user_FirePitch = frandom(-4.8, 4.8);
599 } else if (IsPlayerCrouching()) {
600 user_FireAngle = frandom(-0.8, 0.8);
601 user_FirePitch = frandom(-0.8, 0.8);
602 } else if (!IsPlayerStanding()) {
603 user_FireAngle = frandom(-1.8, 1.8);
604 user_FirePitch = frandom(-1.8, 1.8);
606 user_FireAngle = frandom(-1.2, 1.2);
607 user_FirePitch = frandom(-1.2, 1.2);
610 if (IsPlayerRunning()) {
612 user_FireAngle = frandom(-4.8, 4.8);
613 user_FirePitch = frandom(-4.8, 4.8);
614 } else if (!IsPlayerStanding()) {
615 if (IsPlayerCrouching()) {
617 user_FireAngle = frandom(-1.4, 1.4);
618 user_FirePitch = frandom(-1.4, 1.4);
621 user_FireAngle = frandom(-1.8, 1.8);
622 user_FirePitch = frandom(-1.8, 1.8);
624 } else if (IsPlayerCrouching()) {
626 user_FireAngle = frandom(-0.8, 0.8);
627 user_FirePitch = frandom(-0.8, 0.8);
630 user_FireAngle = frandom(-1.2, 1.2);
631 user_FirePitch = frandom(-1.2, 1.2);
634 if (CountInv("AmmoBox")%5 != 0) {
635 A_FireProjectile("PaingunTracer", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
637 A_FireProjectile("PaingunBulletAlt", user_FireAngle, 1, /*5*/0, 0, FPF_NOAUTOAIM, user_FirePitch);
639 A_PlaySound("Weapons/PaingunFire", CHAN_WEAPON);
641 A_SetPitch(-0.25+pitch);
642 A_SetAngle(-0.1+angle);
648 if (GetCVarB('k8ZanMod_PainCasing')) {
649 if (GetCVarB('r_models')) {
650 A_FireCustomMissileEx("Zan_PaingunBulletCasingSpawn", 5, false, 4+randompick(0, 1, 2, 3), -6, -6, FPF_NOAUTOAIM);
652 A_SpawnItemEx("PaingunBulletCasing", 10, 8, 58, frandom(1, 2), frandom(4, 5), frandom(3, 4), 0, SXF_NOCHECKPOSITION, 0);
659 A_SetPitch(0.25+pitch);
660 A_SetAngle(0.1+angle);
663 TNT1 A 0 A_Refire("Altfiring")
664 WPAF A 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
665 WPAF C 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
666 WPAF B 1 A_WeaponReady(WRF_NOPRIMARY | WRF_ALLOWRELOAD)
667 TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
668 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
669 WPAF A 2 A_WeaponReady
670 WPAF C 2 A_WeaponReady
671 WPAF B 2 A_WeaponReady
681 TNT1 A 0 A_JumpIfInventory("BarrelIsSpinning", 1, "ReloadSpinning")
684 A_PlayerWeaponSpeedScale(0.56);
685 A_PlayerWeaponJumpScale(0.56);
686 A_PlayerWeaponDisableRun(false);
687 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6");
691 WPAF A 3 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
694 WPAF A 2 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
697 TNT1 A 0 A_GiveInventory("BarrelIsSpinning", 1)
701 A_PlayerWeaponSpeedScale(0.56);
702 A_PlayerWeaponJumpScale(0.56);
703 A_PlayerWeaponDisableRun(false);
704 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6");
708 WPAF A 1 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
711 WPAF B 1 A_WeaponReady(WRF_ALLOWRELOAD)
713 TNT1 A 0 A_TakeInventory("BarrelIsSpinning", 1)
714 WPAF B 1 A_WeaponReady
715 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
716 WPAF B 2 A_WeaponReady
717 WPAF C 2 A_WeaponReady
718 TNT1 A 0 A_PlaySoundEx("Weapons/PaingunSpin", "SoundSlot6")
719 WPAF A 3 A_WeaponReady
720 WPAF B 3 A_WeaponReady
721 WPAF C 4 A_WeaponReady
724 stateinclude "QuickKick/QuickKickInclude.txt"
729 ACTOR PaingunBullet : FastProjectile {
735 Damage (2*random(7, 10))
738 +k8MissileHitscan // block by "block hitscan" line flag, not by "block projectile" flag
746 //SeeSound "Ammo/BulletCrack"
747 //DeathSound "Ammo/BulletCrack"
748 Obituary "%o was shredded down by %k."
749 Decal "PaingunBulletDecal"
758 TNT1 A 0 A_Jump(150, 4)
759 TNT1 A 0 A_SetScale(1.0, 1.0)
761 TNT1 A 0 A_SetScale(1.3, 1.3)
768 ACTOR PaingunBulletAlt : PaingunBullet {
770 Damage (2*random(9, 12))
774 ACTOR PaingunTracer : PaingunBullet {
790 ACTOR BarrelIsSpinning : Inventory {
792 Inventory.MaxAmount 1
793 Inventory.InterHubAmount 0
804 Actor (optional) Zan_SkullRodAmmoBelt : AmmoBelt Replaces SkullRodAmmo {}
805 Actor (optional) Zan_SkullRodAmmoBox : AmmoBox Replaces SkullRodHefty {}
807 Actor (optional) Zan_SkullRodPaingun : Paingun Replaces SkullRod {}
808 Actor (optional) Zan_SkullRodPoweredPaingun : Paingun Replaces SkullRodPowered {}
810 Actor (optional) Zan_TPH_AmmoChaingun : AmmoBox Replaces AmmoChaingun {}
811 Actor (optional) Zan_TPH_TPHBulletDispenser : Paingun Replaces TPHBulletDispenser {}