mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-23 21:50:46 -05:00
Die Rise: make both elevator direction lights active when elevator is locked
This commit is contained in:
@ -177,9 +177,15 @@ elevator_think( elevator )
|
||||
if ( dist > 0 )
|
||||
{
|
||||
if ( elevator.body.origin[2] > floor_goal[2] )
|
||||
clientnotify( elevator.name + "_d" );
|
||||
{
|
||||
elevator.dir = "_d";
|
||||
}
|
||||
else
|
||||
clientnotify( elevator.name + "_u" );
|
||||
{
|
||||
elevator.dir = "_u";
|
||||
}
|
||||
|
||||
clientnotify( elevator.name + elevator.dir );
|
||||
}
|
||||
|
||||
if ( is_true( start_location ) )
|
||||
@ -223,9 +229,15 @@ elevator_think( elevator )
|
||||
if ( dist > 0 )
|
||||
{
|
||||
if ( elevator.body.origin[2] > floor_goal[2] )
|
||||
clientnotify( elevator.name + "_d" );
|
||||
{
|
||||
elevator.dir = "_d";
|
||||
}
|
||||
else
|
||||
clientnotify( elevator.name + "_u" );
|
||||
{
|
||||
elevator.dir = "_u";
|
||||
}
|
||||
|
||||
clientnotify( elevator.name + elevator.dir );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,6 +266,46 @@ elevator_think( elevator )
|
||||
}
|
||||
}
|
||||
|
||||
predict_floor( elevator, next, speed )
|
||||
{
|
||||
next = elevator_next_floor( elevator, next, 1 );
|
||||
|
||||
if ( isdefined( elevator.floors["" + ( next + 1 )] ) )
|
||||
elevator.body.next_level = "" + ( next + 1 );
|
||||
else
|
||||
{
|
||||
start_location = 1;
|
||||
elevator.body.next_level = "0";
|
||||
}
|
||||
|
||||
floor_stop = elevator.floors[elevator.body.next_level];
|
||||
floor_goal = undefined;
|
||||
cur_level_start_pos = elevator.floors[elevator.body.next_level].starting_position;
|
||||
start_level_start_pos = elevator.floors[elevator.body.starting_floor].starting_position;
|
||||
|
||||
if ( elevator.body.next_level == elevator.body.starting_floor || isdefined( cur_level_start_pos ) && isdefined( start_level_start_pos ) && cur_level_start_pos == start_level_start_pos )
|
||||
floor_goal = cur_level_start_pos;
|
||||
else
|
||||
floor_goal = floor_stop.origin;
|
||||
|
||||
dist = distance( elevator.body.origin, floor_goal );
|
||||
time = dist / speed;
|
||||
|
||||
if ( dist > 0 )
|
||||
{
|
||||
if ( elevator.body.origin[2] > floor_goal[2] )
|
||||
{
|
||||
elevator.dir = "_d";
|
||||
}
|
||||
else
|
||||
{
|
||||
elevator.dir = "_u";
|
||||
}
|
||||
|
||||
clientnotify( elevator.name + elevator.dir );
|
||||
}
|
||||
}
|
||||
|
||||
elevator_initial_wait( elevator, minwait, maxwait, delaybeforeleaving )
|
||||
{
|
||||
elevator.body endon( "forcego" );
|
||||
|
@ -203,6 +203,11 @@ elevator_call()
|
||||
trig thread watch_elevator_prompt();
|
||||
trig thread watch_elevator_body_prompt();
|
||||
}
|
||||
|
||||
foreach (elevator in level.elevators)
|
||||
{
|
||||
elevator thread watch_elevator_lights();
|
||||
}
|
||||
}
|
||||
|
||||
elevator_call_think()
|
||||
@ -346,6 +351,44 @@ watch_elevator_body_prompt()
|
||||
}
|
||||
}
|
||||
|
||||
watch_elevator_lights()
|
||||
{
|
||||
set = 1;
|
||||
dir = "_d";
|
||||
|
||||
while ( 1 )
|
||||
{
|
||||
if ( is_true( self.body.elevator_stop ) )
|
||||
{
|
||||
if ( set )
|
||||
{
|
||||
set = 0;
|
||||
|
||||
dir = self.dir;
|
||||
}
|
||||
|
||||
clientnotify( self.name + dir );
|
||||
|
||||
if ( dir == "_d" )
|
||||
{
|
||||
dir = "_u";
|
||||
}
|
||||
else
|
||||
{
|
||||
dir = "_d";
|
||||
}
|
||||
}
|
||||
else if ( !set )
|
||||
{
|
||||
set = 1;
|
||||
|
||||
clientnotify( self.name + self.dir );
|
||||
}
|
||||
|
||||
wait 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
escape_pod_call()
|
||||
{
|
||||
trig = getent( "escape_pod_key_console_trigger", "targetname" );
|
||||
|
Reference in New Issue
Block a user