Cube  Diff

Differences From Artifact [cb52ab13f9]:

To Artifact [0157413baa]:


289
290
291
292
293
294
295
296

297
298
299
300

301
302
303
304
305
306
307
308
309
310
311

312
313
314
315
316
317
318
289
290
291
292
293
294
295

296
297
298
299

300
301
302
303
304
305
306
307
308
309
310

311
312
313
314
315
316
317
318







-
+



-
+










-
+







};

void
delent()
{
	int e = closestent();
	if (e < 0) {
		conoutf("no more entities");
		conoutf(@"no more entities");
		return;
	};
	int t = ents[e].type;
	conoutf("%s entity deleted", entnames[t]);
	conoutf(@"%s entity deleted", entnames[t]);
	ents[e].type = NOTUSED;
	addmsg(1, 10, SV_EDITENT, e, NOTUSED, 0, 0, 0, 0, 0, 0, 0);
	if (t == LIGHT)
		calclight();
};

int
findtype(char *what)
{
	loopi(MAXENTTYPES) if (strcmp(what, entnames[i]) == 0) return i;
	conoutf("unknown entity type \"%s\"", what);
	conoutf(@"unknown entity type \"%s\"", what);
	return NOTUSED;
}

entity *
newentity(int x, int y, int z, char *what, int v1, int v2, int v3, int v4)
{
	int type = findtype(what);