Skip to content

Commit 2aa7588

Browse files
committed
fix bug where portal stuff came out the wrong side, fixes save id:1448557
1 parent aa98fa8 commit 2aa7588

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,8 +1881,6 @@ void prop_edit_ui(pixel *vid_buf)
18811881
error_ui(vid_buf, 0, "Invalid property");
18821882
goto exit;
18831883
}
1884-
propSelected = ed.selected;
1885-
strncpy(propValue, ed2.str, 254);
18861884

18871885
PropTool* propTool = (PropTool*)GetToolFromIdentifier("DEFAULT_TOOL_PROP");
18881886
propTool->propOffset = propoffset;
@@ -1958,6 +1956,8 @@ void prop_edit_ui(pixel *vid_buf)
19581956
propTool->propValue.UInteger = value;
19591957
propTool->propType = UInteger;
19601958
}
1959+
propSelected = ed.selected;
1960+
strncpy(propValue, ed2.str, 254);
19611961

19621962
exit:
19631963
while (!sdl_poll())

src/simulation/elements/PRTI.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ int PRTI_update(UPDATE_FUNC_ARGS)
6565
}
6666

6767

68-
if (fe) {
68+
if (fe)
69+
{
6970
int orbd[4] = {0, 0, 0, 0}; //Orbital distances
7071
int orbl[4] = {0, 0, 0, 0}; //Orbital locations
7172
if (!parts[i].life) parts[i].life = rand()*rand()*rand();

src/simulation/elements/PRTO.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ int PRTO_update(UPDATE_FUNC_ARGS)
3737
{
3838
//add -1,0,or 1 to count
3939
int randomness = (count + rand()%3-1 + 4)%8;
40-
rx = portal_rx[(count + 4)%8];
41-
ry = portal_ry[(count + 4)%8];
40+
rx = portal_rx[count];
41+
ry = portal_ry[count];
4242
if (BOUNDS_CHECK && (rx || ry))
4343
{
4444
if (!pmap[y+ry][x+rx])

0 commit comments

Comments
 (0)