Cube  Diff

Differences From Artifact [f38617a638]:

To Artifact [2ac8b85a8f]:


63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
		return;

	settag(tag, type);

	if (!savegame && type != 3)
		playsound(S_RUMBLE);

	@autoreleasepool {
		OFString *aliasname =
		    [OFString stringWithFormat:@"level_trigger_%d", tag];

		if (identexists(aliasname))
			execute(aliasname);
	}

	if (type == 2)
		endsp(false);
}
COMMAND(trigger, ARG_2INT)

// main geometric mipmapping routine, recursively rebuild mipmaps within block







<
|
|

|
|
<







63
64
65
66
67
68
69

70
71
72
73
74

75
76
77
78
79
80
81
		return;

	settag(tag, type);

	if (!savegame && type != 3)
		playsound(S_RUMBLE);


	OFString *aliasname =
	    [OFString stringWithFormat:@"level_trigger_%d", tag];

	if (identexists(aliasname))
		execute(aliasname);


	if (type == 2)
		endsp(false);
}
COMMAND(trigger, ARG_2INT)

// main geometric mipmapping routine, recursively rebuild mipmaps within block
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
{
	int e = closestent();
	if (e < 0) {
		conoutf(@"no more entities");
		return;
	}
	int t = ents[e].type;
	@autoreleasepool {
		conoutf(@"%@ 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(OFString *what)
{
	@autoreleasepool {
		loopi(MAXENTTYPES) if ([what isEqual:entnames[i]]) return i;
		conoutf(@"unknown entity type \"%@\"", what);
		return NOTUSED;
	}
}

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







<
|
<









<
|
|
|
<







300
301
302
303
304
305
306

307

308
309
310
311
312
313
314
315
316

317
318
319

320
321
322
323
324
325
326
{
	int e = closestent();
	if (e < 0) {
		conoutf(@"no more entities");
		return;
	}
	int t = ents[e].type;

	conoutf(@"%@ 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(OFString *what)
{

	loopi(MAXENTTYPES) if ([what isEqual:entnames[i]]) return i;
	conoutf(@"unknown entity type \"%@\"", what);
	return NOTUSED;

}

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