Spoiler: Here's where it crashesI'm just trying to have a monster drop a random custominventory item, but when the "no monsters" flag is on, it crashes. If it's off, it doesn't.
RandomSpawner Crash with No Monsters DMFlag
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
RandomSpawner Crash with No Monsters DMFlag
A monster that drops a randomspawner, which in turn drops a custominventory item, for example, will cause a crash.
-
- Lead GZDoom+Raze Developer
- Posts: 49184
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: RandomSpawner Crash with No Monsters DMFlag
There's obviously a NULL pointer check for the class missing, caused by passing a non-existent class name.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RandomSpawner Crash with No Monsters DMFlag
It's strange, because the class isn't actually missing. No warnings of missing actors are thrown at all.
I copied and pasted all the names into the search through my mod files, and they match it perfectly.
I copied and pasted all the names into the search through my mod files, and they match it perfectly.
Code: Select all
Actor AECyberWeaponDropper : RandomSpawner
{
DropItem "AEoDRocketLauncherItem" 255 60
DropItem "AEoDDevastatorItem" 255 50
DropItem "AEoDMorserLauncherItem" 255 40 //Yes, this is spelled correctly.
DropItem "AEoDHERocketLauncherItem" 255 30
DropItem "AEoDPenetratorItem" 255 20
DropItem "AEoDRedeemerItem" 255 15
}
//==================================================================================
//==================================================================================
//==================================================================================
//==================================================================================
ACTOR AEoDMorserLauncherItem : CustomInventory 6054
{
+FLOORCLIP
+INVENTORY.IGNORESKILL
Scale 0.375
Inventory.Amount 1
Inventory.PickupMessage "You picked up the Mortar Launcher!"
Inventory.PickupSound "reilsss/weappickup/heavyrocketlauncher"
States
{
Spawn:
R032 Q -1
Loop
Pickup:
TNT1 A 0 A_JumpIfInventory("AEoDMorserLauncher",1,"Ammo")
TNT1 A 0 A_JumpIf(CallACS("WeaponSlotLimitCheck",8) <= 0,"Nothing")
TNT1 A 0 A_GiveInventory("Weapon8Count",1)
TNT1 A 0 A_GiveInventory("MorserLauncherDrop",1)
TNT1 A 0 A_GiveInventory("AEoDMorserLauncher",1)
TNT1 A 0 //ACS_NamedExecute("s799",0,10,0,0)
Stop
Nothing:
TNT1 A 0 A_JumpIfInventory("AEoDMorserLauncher",1,"Ammo")
TNT1 A 0 A_JumpIfInventory("LimitScriptActive",1,1)
Goto Pickup+2
TNT1 A 0 ACS_NamedExecute("s798",0,8,0,0)
Fail
Ammo:
TNT1 A 0 A_GiveInventory("AEoDMorserLauncher",1)
Stop
}
}
-
-
- Posts: 3819
- Joined: Sun Aug 07, 2011 4:32 am
Re: RandomSpawner Crash with No Monsters DMFlag
I can take a look at this crash, but I need exact steps to reproduce including PWAD(s) you are using (or some test PWAD).
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RandomSpawner Crash with No Monsters DMFlag
Alright, it might take a bit for me to bundle it all up together. Hang in there.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RandomSpawner Crash with No Monsters DMFlag
Sent you a PM, mental.
-
-
- Posts: 3819
- Joined: Sun Aug 07, 2011 4:32 am
Re: RandomSpawner Crash with No Monsters DMFlag
Made a pretty straightforward fix for this crash three weeks ago.
Maybe it was missed for some reason. Please comment if something wrong with it.
Maybe it was missed for some reason. Please comment if something wrong with it.
-
- Lead GZDoom+Raze Developer
- Posts: 49184
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: RandomSpawner Crash with No Monsters DMFlag
No, nothing wrong with it, but you should have posted a note here right away.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RandomSpawner Crash with No Monsters DMFlag
Thus let it be known to people who claim "it doesn't matter if we post it on the forums or not, because they get a pull request email notification" that "it doesn't matter" part is bullshit.
-
- Lead GZDoom+Raze Developer
- Posts: 49184
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: RandomSpawner Crash with No Monsters DMFlag
Of course it's bullshit. If you get pull requests for several projects where you are only a minor contributor you tend to move them to the trash in bulk (i.e. by automated settings.
Start a discussion on Github and it's very likely I'll miss it.
This forum should be the central hub where bugs and feature requests should be discussed.
Start a discussion on Github and it's very likely I'll miss it.
This forum should be the central hub where bugs and feature requests should be discussed.
-
- Posts: 8196
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: RandomSpawner Crash with No Monsters DMFlag
FINALLY. Now I have proof to show others they NEED to do this. Thank you Graf!