Skip to content

Commit

Permalink
Paladin Axe: Add Power xmldef, remove pitchfrommomentum, adjust spawn…
Browse files Browse the repository at this point in the history
… position

PitchFromMomentum does not work correctly and only allows ~45 degrees of movement. Has been replaced with a more manual facing from velocity zs function.
  • Loading branch information
Lemon-King committed Oct 25, 2023
1 parent 19c1171 commit 5eda6b8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
26 changes: 13 additions & 13 deletions resources/assets/zscript/actors/hxdd/hexen2/weapons/paladinaxe.zs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ class PWeapAxe : PaladinWeapon {
if (hasTome) {
double angOff = 5.0 * 3.2;
A_StartSound("hexen2/paladin/axgenpr");
PWeapVorpalSword_MissileWave(SpawnPlayerMissile("PWeapAxe_BladeProjectilePower", angle, 0, 10, 12));
PWeapVorpalSword_MissileWave(SpawnPlayerMissile("PWeapAxe_BladeProjectilePower", angle - angOff, 0, 10, 12));
PWeapVorpalSword_MissileWave(SpawnPlayerMissile("PWeapAxe_BladeProjectilePower", angle + angOff, 0, 10, 12));
PWeapAxe_BladeProjectilePower(SpawnFirstPerson("PWeapAxe_BladeProjectilePower", 30, 7, -5, 0));
PWeapAxe_BladeProjectilePower(SpawnFirstPerson("PWeapAxe_BladeProjectilePower", 30, 7, -5, false, -angOff));
PWeapAxe_BladeProjectilePower(SpawnFirstPerson("PWeapAxe_BladeProjectilePower", 30, 7, -5, false, angOff));
} else {
A_StartSound("hexen2/paladin/axgen");
PWeapAxe_BladeProjectilePower projAxe = PWeapAxe_BladeProjectilePower(SpawnFirstPerson("PWeapAxe_BladeProjectile", angle, 1, -7, true));
PWeapAxe_BladeProjectilePower(SpawnFirstPerson("PWeapAxe_BladeProjectile", 30, 7, -5, true));
}
}

Expand Down Expand Up @@ -297,9 +297,9 @@ class PWeapAxe_BladeProjectile : Hexen2Projectile {
self.roll = facing.z;

if (self.attachedTail) {
self.attachedTail.angle = self.angle;
self.attachedTail.pitch = self.pitch;
self.attachedTail.roll = self.roll;
self.attachedTail.angle = facing.x;
self.attachedTail.pitch = facing.y;
self.attachedTail.roll = facing.z;
self.attachedTail.SetOrigin(self.pos, true);
}

Expand All @@ -313,15 +313,15 @@ class PWeapAxe_BladeProjectile : Hexen2Projectile {
void A_OnBounce() {
// use lightbringer code for adjustment!

Actor fxHit;
A_StartSound("hexen2/weapons/explode", CHAN_WEAPON, CHANF_OVERLAP);
Actor fx;
A_StartSound("hexen2/weapons/explode");
if (self is "PWeapAxe_BladeProjectilePower") {
fxHit = Actor(Spawn("BlueExplosion"));
fx = Actor(Spawn("BlueExplosion"));
} else {
fxHit = Actor(Spawn("SmallExplosion"));
fx = Actor(Spawn("SmallExplosion"));
}
if (fxHit) {
fxHit.SetOrigin(self.pos, false);
if (fx) {
fx.SetOrigin(self.pos, false);
}

self.bounces++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class PWeapPurifier: PaladinWeapon {
}

double refire = 0.0;
vector2 recoil = (frandom(-1.75, -0.75), 0.0); // modified from hx2's -3 recoil strength to -1.75 to -0.75 for GZDoom
vector2 recoil = (frandom(-1.75, -0.25), 0.0); // modified from hx2's -3 recoil strength to -1.75 to -0.75 for GZDoom
String sfx = "hexen2/paladin/purfire";
Actor proj;
if (isPowered) {
Expand Down
13 changes: 12 additions & 1 deletion resources/pakdata/modeldef/paladinaxe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@

<Flag name="USEACTORPITCH" />
<Flag name="USEACTORROLL" />
<Flag name="PITCHFROMMOMENTUM" />

<Animation key="AXEP" frames="5" model="0" comment="Loop"/>
</Group>
<Group class="PWeapAxe_BladeProjectilePower">
<Path folder="models" />
<Model file="axblade.md3" model="0" />
<Skin file="axblade_skin1.png" model="0" />

<Scale value="1 1 1" />

<Flag name="USEACTORPITCH" />
<Flag name="USEACTORROLL" />

<Animation key="AXEP" frames="5" model="0" comment="Loop"/>
</Group>
Expand Down

0 comments on commit 5eda6b8

Please sign in to comment.