Page 1 of 1

Players behave different in Editor

Posted: Wed Aug 13, 2008 4:01 pm
by Sascha
If you choose the yellow player 1 from
the list and drag it over the screen
(with the function "draw single element")
there can be only one player.
If you do the same with players 2, 3 or 4
there can be an infinite amount of players.
Why?

Posted: Wed Aug 13, 2008 4:26 pm
by Nathan H.
Must have been a feature added in the early times of the level editor, I guess. It happens only with player 1, and only with that tool, so it really doesn't effect me since I use the line tool most of the time... but hm, I never realized it didn't do that for players 2-4. Were they added later or something? That would cause it.

Posted: Thu Aug 14, 2008 12:48 pm
by Sascha
> Were they added later or something? That would cause it.

Probably. BTW: I mostly use the "filled rectangle" tool!

Posted: Tue Jul 27, 2010 9:05 pm
by Daniel H.
Suggested fix: Make the following changes to editor.c:

Find the comment /* remove player at old position */ (line 10676 in R'n'D 3.3.0.1).
Change if (new_element == EL_PLAYER_1) to if (new_element >= EL_PLAYER_1 && new_element <= EL_PLAYER_4)
and change if (Feld[x][y] == EL_PLAYER_1) to if (Feld[x][y] == new_element).

Posted: Fri Jul 30, 2010 10:09 pm
by Zomis
Or even better, use the "ELEM_IS_PLAYER" function, as the same behavior should also be for Murphy, our Supaplex friend.

Posted: Sat Jul 31, 2010 12:47 am
by Daniel H.
Good point; Murphy needs to be included too.

In addition to Murphy, that would also cover the "Sokoban field with player." But that should probably be replaced with sokoban field rather than empty space. So that makes it a little more complicated...