[Fixed] "summon" bug

Bugs that have been investigated and resolved somehow.

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.
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA

"summon" bug

Post by cccp_leha »

When you try to summon something when not in a game, ZDoom crashes.
User avatar
Biff
Posts: 1061
Joined: Wed Jul 16, 2003 5:29 pm
Location: Monrovia, CA, USA

Post by Biff »

Don't do that!
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA

Post by cccp_leha »

Heh, it seems like everytime I bring something up, someone says "well, don't do it" :). While I do realize that this is rather insignificant, I guess it would be more reasonable to have a message similar to "cannot summon when not in game!".
User avatar
Smuggle
Posts: 22
Joined: Thu Dec 04, 2003 9:53 am
Location: My house

Post by Smuggle »

crash message?
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

I would like to report that I can't fire my weapon while I'm not in a game and I think an error message should come up telling me so.
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA

Post by cccp_leha »

You have a point, but I don't think ZDoom should spit out a very fatal error. It's like you clicked the left mouse button (bound to fire) and ZDoom crashed.
User avatar
Enjay
 
 
Posts: 26696
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

OK so summoning something whilst not in game is a stupid thing to do, and logically we shouldn't be surprised if Zdoom crashes when doing it. However, Leha has managed to make Zdoom crash. Now I really don't know, but if Zdoom can crash when doing this, or perhaps some of the other odd things that he seems to want to force Zdoom to do, then perhaps clearing up a crash in this area may help make something else more stable too?

-spoken like someone who really doesn't know what the feck they are talking about I suspect. :?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49193
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

This will most likely make nothing else more stable. It's probably just yet another sloppily implemented console command that assumes that some game structures have been initialized but which aren't until a level has been started
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

It'll actually have the opposite effect, Enjay. Basically, the code currently looks like this: (Note: Not an actual programming language... but don't you wish it was?!)

Summon command:

Check for parameter
None? Print usage and return
Search Actors list using parameter
Match not found? Print error and return
Get Player's current position and facing CRASH!
Spawn matching Actor 128 units in front of Player and return

The marked line above is where ZDoom presumably crashes when the game is not in a map (and hence there is no Player to look for). So to fix it, the new code would have to do this:

...
Match not found? Print error and return
Not in game? Print error and return
Get Player's current position and facing
...

That translates to a few opcodes in the compiled EXE, thereby making the code MORE ineffecient, because when the code is used properly (i.e. while in a game), the check is unnecessary.

Of course, this actually amounts to, perhaps, a 0.000001% loss of effeciency, but it certainly won't improve anything. :P
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49193
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

HotWax wrote: Of course, this actually amounts to, perhaps, a 0.000001% loss of effeciency, but it certainly won't improve anything. :P
Except stability, of course (which in non-time-critical code like this is significantly more important than the few wasted CPU-cycles. ;)
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Stability only when someone attempts to use the command at a completely inappropriate time. :P
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.

Post by Nanami »

While we're on the subject of spawn bugs... although Randy made it so you can use all three kinds of flechettes at once in a game (!) you can't spawn a certain type except with ACS.

You can't give or spawn a certain kind on the map for testing purposes. Also, using "give all" will only give you the fighter's flechette.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49193
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Nanami wrote:While we're on the subject of spawn bugs... although Randy made it so you can use all three kinds of flechettes at once in a game (!) you can't spawn a certain type except with ACS.

You can't give or spawn a certain kind on the map for testing purposes. Also, using "give all" will only give you the fighter's flechette.

Sure, but as long as it isn't possible to place Hexen/Heretic items directly in a Doom map this is more a minor annoyance than a real problem. You'd need a script anyway. Implementing a method to use all this stuff directly without ACS and SpawnSpot is much more important than 'give all' being able to give you all types of the flechette (which, BTW, will cause a few minor problems in Hexen.) The timebomb version is equivalent to Heretic's timebomb so if you need that the Heretic version is better anyway.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

Fixed.

Return to “Closed Bugs [GZDoom]”