From d0c367a5575199fa893956089516a5db24682c8a Mon Sep 17 00:00:00 2001 From: Walter Julius Hennecke Date: Tue, 13 Dec 2011 10:38:49 +0100 Subject: [PATCH] func_stasis_door Trigger problem resolved. Stil not done with the game side logic. --- game/bg_public.h | 2 +- game/g_mover.c | 6 +++++- qcommon/stv_version.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/game/bg_public.h b/game/bg_public.h index 35042a2..87e7c16 100644 --- a/game/bg_public.h +++ b/game/bg_public.h @@ -10,7 +10,7 @@ // because games can change separately from the main system version, we need a // second version that must match between game and cgame -#define RPGX_VERSION "RPG-X v2.2 wc131211a" +#define RPGX_VERSION "RPG-X v2.2 wc131211c" #define RPGX_COMPILEDATE "20/05/11" #define RPGX_COMPILEDBY "GSIO01" //const char GAME_VERSION[] = strcat("RPG-X v",RPGX_VERSION); diff --git a/game/g_mover.c b/game/g_mover.c index 869e6d6..f5818d4 100644 --- a/game/g_mover.c +++ b/game/g_mover.c @@ -3362,6 +3362,7 @@ will manage the door-toggeling ------------------------------------------- */ +void touch_stasis_door( gentity_t *ent, gentity_t *other, trace_t *trace ); void toggle_stasis_door( gentity_t *ent ) { @@ -3389,6 +3390,7 @@ void toggle_stasis_door( gentity_t *ent ) trap_AdjustAreaPortalState(parent, qfalse); // close AP trap_LinkEntity(parent); parent->count = STASIS_DOOR_CLOSED; + ent->touch = touch_stasis_door; break; case STASIS_DOOR_OPENED: // then go to closing state G_Printf(S_COLOR_MAGENTA"STASIS_DOOR_OPENED\n"); @@ -3443,11 +3445,13 @@ triggers the door on touch void touch_stasis_door( gentity_t *ent, gentity_t *other, trace_t *trace ) { + G_Printf("touch_stasis_door\n"); // The door is solid so it's ok to open it, otherwise, // the door is already open and we don't need to bother with the state change - if (other->client && ent->parent->count == STASIS_DOOR_CLOSED) + if (ent->parent->count == STASIS_DOOR_CLOSED) { + ent->touch = 0; ent->think = toggle_stasis_door; ent->nextthink = level.time + FRAMETIME; } diff --git a/qcommon/stv_version.h b/qcommon/stv_version.h index 2419ee8..26741cd 100644 --- a/qcommon/stv_version.h +++ b/qcommon/stv_version.h @@ -1,5 +1,5 @@ // Current version of holomatch game -#define Q3_VERSION "RPG-X v2.2 wc131211a" +#define Q3_VERSION "RPG-X v2.2 wc131211c" // end