Cube  Diff

Differences From Artifact [72ec7780d9]:

To Artifact [d8eb643406]:


165
166
167
168
169
170
171
172
173

174
175
176
177
178
179
180

	if (OUTBORD(cx, cy))
		return;
	struct sqr *s = S(cx, cy);

	// selected wall
	if (fabs(sheight(s, s, z) - z) > 1) {
		x += x > player1.o.x ? 0.5f : -0.5f; // find right wall cube
		y += y > player1.o.y ? 0.5f : -0.5f;


		cx = (int)x;
		cy = (int)y;

		if (OUTBORD(cx, cy))
			return;
	}







|
|
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181

	if (OUTBORD(cx, cy))
		return;
	struct sqr *s = S(cx, cy);

	// selected wall
	if (fabs(sheight(s, s, z) - z) > 1) {
		// find right wall cube
		x += (x > player1.origin.x ? 0.5f : -0.5f);
		y += (y > player1.origin.y ? 0.5f : -0.5f);

		cx = (int)x;
		cy = (int)y;

		if (OUTBORD(cx, cy))
			return;
	}
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
	loopselxy(s->tag = tag);
}

void
newent(OFString *what, OFString *a1, OFString *a2, OFString *a3, OFString *a4)
{
	EDITSEL;
	newentity(sel.x, sel.y, (int)player1.o.z, what,
	    [a1 cube_intValueWithBase:0], [a2 cube_intValueWithBase:0],
	    [a3 cube_intValueWithBase:0], [a4 cube_intValueWithBase:0]);
}

COMMANDN(select, selectpos, ARG_4INT)
COMMAND(edittag, ARG_1INT)
COMMAND(replace, ARG_NONE)







|







619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
	loopselxy(s->tag = tag);
}

void
newent(OFString *what, OFString *a1, OFString *a2, OFString *a3, OFString *a4)
{
	EDITSEL;
	newentity(sel.x, sel.y, (int)player1.origin.z, what,
	    [a1 cube_intValueWithBase:0], [a2 cube_intValueWithBase:0],
	    [a3 cube_intValueWithBase:0], [a4 cube_intValueWithBase:0]);
}

COMMANDN(select, selectpos, ARG_4INT)
COMMAND(edittag, ARG_1INT)
COMMAND(replace, ARG_NONE)