mirror of
https://github.com/UberGames/RPG-X2.git
synced 2025-02-07 15:31:03 +00:00
func_stasis_door
Trigger problem resolved. Stil not done with the game side logic.
This commit is contained in:
parent
09559579cc
commit
d0c367a557
3 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue