const int PLAT_LOW_TRIGGER = BIT(0);
const int PLAT_CRUSH = BIT(2);
+// changelevel
+const int CHANGELEVEL_MULTIPLAYER = BIT(1);
+
// teleport
const int TELEPORT_FLAG_SOUND = BIT(0);
const int TELEPORT_FLAG_PARTICLES = BIT(1);
void target_changelevel_use(entity this, entity actor, entity trigger)
{
- if(this.spawnflags & 2)
+ if(this.spawnflags & CHANGELEVEL_MULTIPLAYER)
{
// simply don't react if a non-player triggers it
if(!IS_PLAYER(actor)) { return; }
localcmd(strcat("changelevel ", this.chmap, "\n"));
}
+/*target_changelevel
+Target to change/end level
+KEYS:
+chmap: map to switch to, leave empty for endmatch
+gametype: gametype for the next map
+count: fraction of real players that need to trigger this entity for levelchange
+SPAWNFLAGS:
+CHANGELEVEL_MULTIPLAYER: multiplayer support
+*/
+
spawnfunc(target_changelevel)
{
this.use = target_changelevel_use;
- if(!this.count) { this.count = 0.7; }
+ if(!this.count)
+ {
+ this.count = 0.7;
+ }
}
#endif
FIELD_SCALAR(fld, bgmscriptsustain) \
FIELD_SCALAR(fld, bgmscript) \
FIELD_SCALAR(fld, button0) \
+ FIELD_SCALAR(fld, chmap) \
FIELD_SCALAR(fld, cnt) \
FIELD_SCALAR(fld, colormap) \
FIELD_SCALAR(fld, count) \
FIELD_SCALAR(fld, fog) \
FIELD_SCALAR(fld, frags) \
FIELD_SCALAR(fld, frame) \
+ FIELD_SCALAR(fld, gametype) \
FIELD_SCALAR(fld, gametypefilter) \
FIELD_SCALAR(fld, geomtype) \
FIELD_SCALAR(fld, gravity) \