static void G_SpawnSmoke (const vec3_t vec, const char *particle, int rounds) { pos3_t pos; edict_t *ent; VecToPos(vec, pos); ent = G_GetEdictFromPos(pos, ET_SMOKE); if (ent == NULL) { pos_t z = gi.GridFall(gi.routingMap, ACTOR_SIZE_NORMAL, pos); if (z != pos[2]) return; ent = G_Spawn(); VectorCopy(pos, ent->pos); G_EdictCalcOrigin(ent); ent->spawnflags = G_GetLevelFlagsFromPos(pos); ent->particle = particle; SP_misc_smoke(ent); } ent->count = rounds; }
static void G_SpawnFire (const vec3_t vec, const char *particle, int rounds, int damage) { pos3_t pos; edict_t *ent; VecToPos(vec, pos); ent = G_GetEdictFromPos(pos, ET_FIRE); if (ent == NULL) { pos_t z = gi.GridFall(gi.routingMap, ACTOR_SIZE_NORMAL, pos); if (z != pos[2]) return; ent = G_Spawn(); VectorCopy(pos, ent->pos); VectorCopy(vec, ent->origin); ent->dmg = damage; ent->particle = particle; ent->spawnflags = G_GetLevelFlagsFromPos(pos); SP_misc_fire(ent); } ent->count = rounds; }
static void G_SpawnStunSmoke (const vec3_t vec, const char* particle, int rounds, int damage) { pos3_t pos; Edict* ent; VecToPos(vec, pos); ent = G_GetEdictFromPos(pos, ET_SMOKESTUN); if (ent == nullptr) { pos_t z = gi.GridFall(ACTOR_SIZE_NORMAL, pos); if (z != pos[2]) return; ent = G_Spawn(); VectorCopy(pos, ent->pos); VectorCopy(vec, ent->origin); ent->dmg = damage; ent->particle = particle; ent->spawnflags = G_GetLevelFlagsFromPos(pos); SP_misc_smokestun(ent); } ent->count = rounds; }