Some mods for target_turbolift

- added override key to allow mappers to override "override"
rpg_calcLiftTravelDuration
This commit is contained in:
Walter Julius Hennecke 2012-12-13 16:31:11 +01:00
parent a57b6979d6
commit 80d8eab4c9
3 changed files with 12 additions and 1 deletions

View file

@ -697,6 +697,9 @@ typedef struct {
list_p selfdestructSafeZones;
list_p locations;
list_p timedMessages;
// override rpg_calcLiftTravelDuration
int overrideCalcLiftTravelDuration;
} level_locals_t;

View file

@ -459,7 +459,7 @@ static cvarTable_t gameCvarTable[] = {
{ &rpg_forceFieldColor, "rpg_forceFieldColor", "0", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_allowRemodulation, "rpg_allowRemodulation", "1", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_forceFieldFreq, "rpg_forceFieldFreq", "0", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_calcLiftTravelDuration, "rpg_calcLiftTravelDuration", "0", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_calcLiftTravelDuration, "rpg_calcLiftTravelDuration", "1", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_liftDurationModifier, "rpg_liftDurationModifier" , "0.5", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_altTricorderDelay, "rpg_altTricorderDelay", "1000", CVAR_ARCHIVE, 0, qfalse },
{ &rpg_borgMoveThroughFields, "rpg_borgMoveThroughFields", "0", CVAR_ARCHIVE, 0, qfalse },
@ -1745,6 +1745,8 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
G_Printf ("gamename: %s\n", GAMEVERSION);
G_Printf ("gamedate: %s\n", __DATE__);
level.overrideCalcLiftTravelDuration = 0;
init_tonextint(qtrue);
srand( randomSeed );

View file

@ -1578,6 +1578,7 @@ For the angles, the entity's angle must be aimed at the main set of doors to the
"targetShaderName" - lights off shader
"falsename" - lights up
"truename" - lights down
"override" - if set to 1 overrides rpg_calcLiftTravelDuration
-----LUA-----
Retrofit:
@ -1676,6 +1677,11 @@ void SP_target_turbolift ( gentity_t *self )
G_SpawnFloat( "wait", "3000", &self->wait );
G_SpawnInt( "waitEnd", "1000", &self->sound1to2 );
G_SpawnInt("override", "0", &i);
if(i) {
level.overrideCalcLiftTravelDuration = i;
}
if(!self->tmpEntity)
trap_SetBrushModel( self, self->model );
self->r.contents = CONTENTS_TRIGGER; // replaces the -1 from trap_SetBrushModel