X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftarget%2Fspawn.qc;h=9c999ed4df4758612b9052a34aeb22101b85b905;hp=4eed8ef345872f3726bcb03fd4904fdcb63a871e;hb=960a31b121488256a7eebcd6a22d0157b88643a7;hpb=d492869ab1f18e05121529b7bcffcb637d13994c diff --git a/qcsrc/common/triggers/target/spawn.qc b/qcsrc/common/triggers/target/spawn.qc index 4eed8ef34..9c999ed4d 100644 --- a/qcsrc/common/triggers/target/spawn.qc +++ b/qcsrc/common/triggers/target/spawn.qc @@ -12,8 +12,7 @@ // "classname" "target_spawn" // "message" "fieldname value fieldname value ..." // "spawnflags" -// 1 = call the spawn function -// 2 = trigger on map load +// ON_MAPLOAD = trigger on map load float target_spawn_initialized; .void(entity this) target_spawn_spawnfunc; @@ -55,7 +54,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti data = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", key))); if(data.y == 0) // undefined field, i.e., invalid type { - LOG_INFO("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n"); + LOG_INFO("target_spawn: invalid/unknown entity key ", key, " specified, ignored!"); continue; } } @@ -150,7 +149,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti } else { - LOG_INFO("target_spawn: invalid/unknown variable replacement ", value, " specified, ignored!\n"); + LOG_INFO("target_spawn: invalid/unknown variable replacement ", value, " specified, ignored!"); continue; } @@ -163,13 +162,13 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti { if(value != "") { - LOG_INFO("target_spawn: try to get a field of a non-entity, ignored!\n"); + LOG_INFO("target_spawn: try to get a field of a non-entity, ignored!"); continue; } data2 = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", valuefield))); if(data2_y == 0) // undefined field, i.e., invalid type { - LOG_INFO("target_spawn: invalid/unknown entity key replacement ", valuefield, " specified, ignored!\n"); + LOG_INFO("target_spawn: invalid/unknown entity key replacement ", valuefield, " specified, ignored!"); continue; } value = getentityfieldstring(data2_x, valueent); @@ -189,7 +188,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti value = vtos(stov(value) + stov(valueoffset)); break; default: - LOG_INFO("target_spawn: only string, float and vector fields can do calculations, calculation ignored!\n"); + LOG_INFO("target_spawn: only string, float and vector fields can do calculations, calculation ignored!"); break; } } @@ -206,7 +205,7 @@ void target_spawn_edit_entity(entity this, entity e, string msg, entity kt, enti value = vtos(stov(value) + random() * data2_x * '1 0 0' + random() * data2_y * '0 1 0' + random() * data2_z * '0 0 1'); break; default: - LOG_INFO("target_spawn: only float and vector fields can do random calculations, calculation ignored!\n"); + LOG_INFO("target_spawn: only float and vector fields can do random calculations, calculation ignored!"); break; } } @@ -298,7 +297,7 @@ void target_spawn_use(entity this, entity actor, entity trigger) void target_spawn_spawnfirst(entity this) { entity act = this.target_spawn_activator; - if(this.spawnflags & 2) + if(this.spawnflags & ON_MAPLOAD) target_spawn_use(this, act, NULL); }