[Fixed] "summon" bug

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Fixed] "summon" bug

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

Fixed.

by 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.

by 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.

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

Stability only when someone attempts to use the command at a completely inappropriate time. :P

by 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. ;)

by 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

by 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

by 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. :?

by 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.

by 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.

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

crash message?

by 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!".

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

Don't do that!

"summon" bug

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

When you try to summon something when not in a game, ZDoom crashes.

Top