mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 15:48:05 -05:00
Die Rise: allow calling elevator during top floor move wait
This commit is contained in:
@ -187,7 +187,43 @@ elevator_think( elevator )
|
||||
elevator.body thread squashed_death_alarm();
|
||||
|
||||
if ( !skipinitialwait )
|
||||
wait 3;
|
||||
{
|
||||
event = elevator.body waittill_any_timeout( 3, "forcego" );
|
||||
|
||||
if ( event == "forcego" )
|
||||
{
|
||||
next = elevator_next_floor( elevator, next, 0 );
|
||||
|
||||
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] )
|
||||
clientnotify( elevator.name + "_d" );
|
||||
else
|
||||
clientnotify( elevator.name + "_u" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
skipinitialwait = 0;
|
||||
|
Reference in New Issue
Block a user