Cube  Diff

Differences From Artifact [9e368d7a28]:

To Artifact [b3c4009ae5]:


127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
			o[0] = SWS(w, x, y, ws); // the 4 constituent cubes
			o[1] = SWS(w, x + 1, y, ws);
			o[2] = SWS(w, x + 1, y + 1, ws);
			o[3] = SWS(w, x, y + 1, ws);
			// the target cube in the higher mip level
			struct sqr *r = SWS(v, x / 2, y / 2, vs);
			*r = *o[0];
			uchar nums[MAXTYPE];
			for (int i = 0; i < MAXTYPE; i++)
				nums[i] = 0;
			for (int j = 0; j < 4; j++)
				nums[o[j]->type]++;
			// cube contains both solid and space, treated
			// specially in the renderer
			r->type = SEMISOLID;







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
			o[0] = SWS(w, x, y, ws); // the 4 constituent cubes
			o[1] = SWS(w, x + 1, y, ws);
			o[2] = SWS(w, x + 1, y + 1, ws);
			o[3] = SWS(w, x, y + 1, ws);
			// the target cube in the higher mip level
			struct sqr *r = SWS(v, x / 2, y / 2, vs);
			*r = *o[0];
			unsigned char nums[MAXTYPE];
			for (int i = 0; i < MAXTYPE; i++)
				nums[i] = 0;
			for (int j = 0; j < 4; j++)
				nums[o[j]->type]++;
			// cube contains both solid and space, treated
			// specially in the renderer
			r->type = SEMISOLID;
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
			e.attr2 = 255;
		break;
	case MAPMODEL:
		e.attr4 = e.attr3;
		e.attr3 = e.attr2;
	case MONSTER:
	case TELEDEST:
		e.attr2 = (uchar)e.attr1;
	case PLAYERSTART:
		e.attr1 = (int)player1.yaw;
		break;
	}
	addmsg(1, 10, SV_EDITENT, ents.count, type, e.x, e.y, e.z, e.attr1,
	    e.attr2, e.attr3, e.attr4);








|







377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
			e.attr2 = 255;
		break;
	case MAPMODEL:
		e.attr4 = e.attr3;
		e.attr3 = e.attr2;
	case MONSTER:
	case TELEDEST:
		e.attr2 = (unsigned char)e.attr1;
	case PLAYERSTART:
		e.attr1 = (int)player1.yaw;
		break;
	}
	addmsg(1, 10, SV_EDITENT, ents.count, type, e.x, e.y, e.z, e.attr1,
	    e.attr2, e.attr3, e.attr4);

410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
			e.type = NOTUSED;

	if (type == LIGHT)
		calclight();
}
COMMAND(clearents, ARG_1STR)

static uchar
scalecomp(uchar c, int intens)
{
	int n = c * intens / 100;
	if (n > 255)
		n = 255;
	return n;
}








|
|







410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
			e.type = NOTUSED;

	if (type == LIGHT)
		calclight();
}
COMMAND(clearents, ARG_1STR)

static unsigned char
scalecomp(unsigned char c, int intens)
{
	int n = c * intens / 100;
	if (n > 255)
		n = 255;
	return n;
}