334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
|
if (player1.quadMillis && (player1.quadMillis -= time) < 0) {
player1.quadMillis = 0;
playsoundc(S_PUPOUT);
conoutf(@"quad damage is over");
}
}
void
putitems(uchar **p) // puts items in network stream and also spawns them locally
{
[ents enumerateObjectsUsingBlock:^(Entity *e, size_t i, bool *stop) {
if ((e.type >= I_SHELLS && e.type <= I_QUAD) ||
e.type == CARROT) {
putint(p, i);
e.spawned = true;
}
}];
}
void
resetspawns()
{
for (Entity *e in ents)
e.spawned = false;
}
void
setspawn(uint i, bool on)
{
if (i < (uint)ents.count)
ents[i].spawned = on;
}
|
>
|
|
|
|
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
if (player1.quadMillis && (player1.quadMillis -= time) < 0) {
player1.quadMillis = 0;
playsoundc(S_PUPOUT);
conoutf(@"quad damage is over");
}
}
// puts items in network stream and also spawns them locally
void
putitems(unsigned char **p)
{
[ents enumerateObjectsUsingBlock:^(Entity *e, size_t i, bool *stop) {
if ((e.type >= I_SHELLS && e.type <= I_QUAD) ||
e.type == CARROT) {
putint(p, i);
e.spawned = true;
}
}];
}
void
resetspawns()
{
for (Entity *e in ents)
e.spawned = false;
}
void
setspawn(size_t i, bool on)
{
if (i < ents.count)
ents[i].spawned = on;
}
|