SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Reply
 
Thread Tools Search this Thread
Old 01-20-2018   #1
Yacker
Metallic
 
Yacker's Avatar
Default G_DoReborn crashes

If I call G_DoReborn at all in single player it crashes after the fadeout with the error: P_MapStart: tmthing set! But in multiplayer it works fine. Am I missing something or is this function just broken?

Spoiler: Example code
Code:
addHook("ThinkFrame", function()
	for p in players.iterate
		if p.cmd.buttons & BT_USE
			G_DoReborn(0)
		end
	end
end)
Yacker is offline   Reply With Quote
Old 01-20-2018   #2
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Probably the latter, I don't think G_DoReborn was intended to be used in the gamelogic code outside of netgames, since that would mean it actually loads the map ...before it finished doing gamelogic code within the current map.

Might be better if you used p.playerstate = PST_REBORN instead, that way the game will basically call G_DoReborn(#p) when it's safe to do so.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record. Also, it's pronounced "Yes-tin".
Monster Iestyn is offline   Reply With Quote
Old 01-20-2018   #3
Yacker
Metallic
 
Yacker's Avatar
Default

Ah, yeah that'd make sense. Thank you!
Yacker is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:52 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.