[Fixed] "summon" bug

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

"summon" bug

Postby cccp_leha » Tue Jan 13, 2004 3:03 pm

When you try to summon something when not in a game, ZDoom crashes.
User avatar
cccp_leha
Words are silver; silence is gold... so stfu.
 
Joined: 16 Jul 2003
Location: NJ, USA

Postby Biff » Tue Jan 13, 2004 3:43 pm

Don't do that!
User avatar
Biff
Caleb is back for a visit
 
Joined: 16 Jul 2003
Location: Monrovia, CA, USA

Postby cccp_leha » Tue Jan 13, 2004 4:04 pm

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
cccp_leha
Words are silver; silence is gold... so stfu.
 
Joined: 16 Jul 2003
Location: NJ, USA

Postby Smuggle » Thu Jan 15, 2004 12:12 pm

crash message?
User avatar
Smuggle
One, two, three... I'm master!!!
 
Joined: 04 Dec 2003
Location: My house

Postby Cyb » Thu Jan 15, 2004 4:12 pm

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.
Cyb
 
Joined: 15 Jul 2003

Postby cccp_leha » Thu Jan 15, 2004 4:50 pm

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
cccp_leha
Words are silver; silence is gold... so stfu.
 
Joined: 16 Jul 2003
Location: NJ, USA

Postby Enjay » Thu Jan 15, 2004 5:10 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby Graf Zahl » Thu Jan 15, 2004 5:21 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Thu Jan 15, 2004 6:04 pm

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
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Graf Zahl » Thu Jan 15, 2004 6:48 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Thu Jan 15, 2004 7:46 pm

Stability only when someone attempts to use the command at a completely inappropriate time. :P
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Nanami » Fri Jan 16, 2004 12:56 am

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
Nanami
Natdhipytadd
 
Joined: 15 Jul 2003
Location: That little island pritch created.

Postby Graf Zahl » Fri Jan 16, 2004 5:00 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randi » Sat Jan 17, 2004 10:16 pm

Fixed.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests