by FEZ_GG » Sat Nov 04, 2023 1:26 pm
I'm trying to apply a ZScript mod that reduces the weapon switch speed of all weapons. The code that I'm using has the following format across all weapons:
class BFGNew: BFG9000 replaces BFG9000
{
Default
{
Weapon.SlotNumber 7;
}
States
{
Deselect:
BFGG A 1 A_Lower(18);
Loop;
Select:
BFGG A 1 A_Raise(18);
Loop;
}
}
For the most part this works fine. However, I decided to test this with the mapset Struggle: Antaresian Legacy, which uses extensive Dehacked to change the enemies and weapons. Most of the weapons cooperate with the new lower/raise speed, but the Leichenfaust, the BFG replacement, isn't cooperating. Shortly after I fire the weapon, before the projectile makes contact with anything, GZDoom will crash. I'm given the error "Address not mapped to object (signal 11) Address: 0x7fff57c0eff0".
I tried removing my States changes, and even the SlotNumber change so I had no new code when inheriting from BFG9000. That did not solve the issue. I also noticed that when firing the Leichenfaust, it still used 40 cells for ammo, when it's supposed to use 6 rockets. I tried adding Weapon.Ammotype = "RocketAmmo"; and Weapon.AmmoUse = 6; to see if that would resolve the issue, but it did not. At this point I'm not sure what to do. The original Leichenfaust, with no ZScript meddling, will work perfectly. It's only when I try to add a new BFG weapon in ZScript that issues arise. I can only assume there's some sort of conflict with Struggle's Dehacked file. The new BFG states call unusual pointers, like CheckReload and CloseShotgun2.
I'm running this on GZDoom 4.10.0 on my Steam Deck.
I'm trying to apply a ZScript mod that reduces the weapon switch speed of all weapons. The code that I'm using has the following format across all weapons:
class BFGNew: BFG9000 replaces BFG9000
{
Default
{
Weapon.SlotNumber 7;
}
States
{
Deselect:
BFGG A 1 A_Lower(18);
Loop;
Select:
BFGG A 1 A_Raise(18);
Loop;
}
}
For the most part this works fine. However, I decided to test this with the mapset Struggle: Antaresian Legacy, which uses extensive Dehacked to change the enemies and weapons. Most of the weapons cooperate with the new lower/raise speed, but the Leichenfaust, the BFG replacement, isn't cooperating. Shortly after I fire the weapon, before the projectile makes contact with anything, GZDoom will crash. I'm given the error "Address not mapped to object (signal 11) Address: 0x7fff57c0eff0".
I tried removing my States changes, and even the SlotNumber change so I had no new code when inheriting from BFG9000. That did not solve the issue. I also noticed that when firing the Leichenfaust, it still used 40 cells for ammo, when it's supposed to use 6 rockets. I tried adding Weapon.Ammotype = "RocketAmmo"; and Weapon.AmmoUse = 6; to see if that would resolve the issue, but it did not. At this point I'm not sure what to do. The original Leichenfaust, with no ZScript meddling, will work perfectly. It's only when I try to add a new BFG weapon in ZScript that issues arise. I can only assume there's some sort of conflict with Struggle's Dehacked file. The new BFG states call unusual pointers, like CheckReload and CloseShotgun2.
I'm running this on GZDoom 4.10.0 on my Steam Deck.