// frees the passed edict! void RespawnSpec(edict_t *ent) { edict_t *spot; if ((spot = FindSpecSpawn()) != NULL) SpawnSpec(ent->item, spot); G_FreeEdict(ent); }
void SpecThink(edict_t * spec) { edict_t *spot; spot = FindSpecSpawn(); if (spot) { SpawnSpec(spec->item, spot); } G_FreeEdict(spec); }
void SpecThink(edict_t *spec) { edict_t *spot; if ((spot = FindSpecSpawn()) != NULL) { SpawnSpec(spec->item, spot); G_FreeEdict(spec); } else { spec->nextthink = level.time + SPEC_RESPAWN_TIME; spec->think = SpecThink; } }
void SpawnSpecs(edict_t *ent) { gitem_t *spec; edict_t *spot; int i; i = 0; while (tnames[i]) { if ((spec = FindItemByClassname(tnames[i])) != NULL && (spot = FindSpecSpawn()) != NULL) SpawnSpec(spec, spot); i++; } }
void SpawnSpecs(edict_t * ent) { gitem_t *spec; edict_t *spot; int i; if(item_respawnmode->value) return; for(i = 0; i<ITEM_COUNT; i++) { if ((spec = GET_ITEM(tnums[i])) != NULL && (spot = FindSpecSpawn()) != NULL) { //AQ2:TNG - Igor adding itm_flags if ((int)itm_flags->value & items[tnums[i]].flag) { //gi.dprintf("Spawning special item '%s'.\n", tnames[i]); SpawnSpec(spec, spot); } //AQ2:TNG End adding itm_flags } } }
void SpawnSpecs(edict_t * ent) { gitem_t *spec; edict_t *spot; int i, itemNum; G_FreeEdict(ent); if(item_respawnmode->value) return; for(i = 0; i<ITEM_COUNT; i++) { itemNum = ITEM_FIRST + i; if (!ITF_ALLOWED(itemNum)) continue; if ((spec = GET_ITEM(itemNum)) != NULL && (spot = FindSpecSpawn()) != NULL) { //gi.dprintf("Spawning special item '%s'.\n", tnames[i]); SpawnSpec(spec, spot); } } }