commit 3c8e201eeac11f4881eb2637ab531fe6eece17b4 Author: /dev/humancontroller Date: Sat Aug 6 02:38:01 2011 +0200 allow a special trigger to bring movers down manually diff --git a/src/game/g_local.h b/src/game/g_local.h index 0294662..7a371d1 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -57,6 +57,7 @@ typedef struct gclient_s gclient_t; #define SIGN_BIT 0x00020000 #define TEAM_BIT 0x00040000 #define LOCKSTAGE_BIT 0x00080000 +#define TRIGGER_BIT 0x20000000 #define RESET_AFTER_USE 0x40000000 #define RESET_BIT 0x80000000 diff --git a/src/game/g_mover.c b/src/game/g_mover.c index 906d648..9fe940e 100644 --- a/src/game/g_mover.c +++ b/src/game/g_mover.c @@ -875,14 +875,16 @@ void Use_BinaryMover( gentity_t *ent, gentity_t *other, gentity_t *activator ) trap_AdjustAreaPortalState( ent, qtrue ); } else if( ent->moverState == MOVER_POS2 && - !( teamState == MOVER_1TO2 || other == master ) ) + !( teamState == MOVER_1TO2 || other == master || + ( master->targetnames[ 0 ] && other && ( other->targetGate & TRIGGER_BIT ) ) ) ) { // if all the way up, just delay before coming down master->think = ReturnToPos1orApos1; master->nextthink = MAX( master->nextthink, level.time + ent->wait ); } else if( ent->moverState == MOVER_POS2 && - ( teamState == MOVER_1TO2 || other == master ) ) + ( teamState == MOVER_1TO2 || other == master || + ( master->targetnames[ 0 ] && other && ( other->targetGate & TRIGGER_BIT ) ) ) ) { // start moving 50 msec later, becase if this was player // triggered, level.time hasn't been advanced yet @@ -945,14 +947,16 @@ void Use_BinaryMover( gentity_t *ent, gentity_t *other, gentity_t *activator ) trap_AdjustAreaPortalState( ent, qtrue ); } else if( ent->moverState == ROTATOR_POS2 && - !( teamState == MOVER_1TO2 || other == master ) ) + !( teamState == MOVER_1TO2 || other == master || + ( master->targetnames[ 0 ] && other && ( other->targetGate & TRIGGER_BIT ) ) ) ) { // if all the way up, just delay before coming down master->think = ReturnToPos1orApos1; master->nextthink = MAX( master->nextthink, level.time + ent->wait ); } else if( ent->moverState == ROTATOR_POS2 && - ( teamState == MOVER_1TO2 || other == master ) ) + ( teamState == MOVER_1TO2 || other == master || + ( master->targetnames[ 0 ] && other && ( other->targetGate & TRIGGER_BIT ) ) ) ) { // start moving 50 msec later, becase if this was player // triggered, level.time hasn't been advanced yet