Make sure Cursegp is initialised if using it to set an object when loading a game (EDITOR build). Thought I already committed this

This commit is contained in:
Chris Taylor 2012-04-17 14:28:50 +08:00
parent 1fd979a76b
commit e55406d1ee
2 changed files with 10 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D2X-Rebirth Changelog
20120417
--------
main/game.c: Make sure Cursegp is initialised if using it to set an object when loading a game (EDITOR build). Thought I already committed this
20120416
--------
main/gameseq.c, main/multi.c, main/multi.h: fixed two bugs caused by recent Multiplayer cleanup: Set more player-death-related veriables outside of dead_player_end() when creating new ship as not covered in subfunction is Palyer_is_dead is not true; also init my own inventory properly in multi_prep_level to get our inventory straight after receiving netgame information

View file

@ -1098,6 +1098,12 @@ window *game_setup(void)
netplayerinfo_on = 0;
#ifdef EDITOR
if (!Cursegp)
{
Cursegp = &Segments[0];
Curside = 0;
}
if (Segments[ConsoleObject->segnum].segnum == -1) //segment no longer exists
obj_relink( ConsoleObject-Objects, SEG_PTR_2_NUM(Cursegp) );