mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-27 15:40:34 -05:00
Die Rise: fix elevator call during start location wait
This commit is contained in:
@ -188,8 +188,13 @@ elevator_think( elevator )
|
|||||||
|
|
||||||
if ( !skipinitialwait )
|
if ( !skipinitialwait )
|
||||||
{
|
{
|
||||||
|
elevator.body.start_location_wait = 1;
|
||||||
|
|
||||||
|
elevator.body notify( "startwait" );
|
||||||
event = elevator.body waittill_any_timeout( 3, "forcego" );
|
event = elevator.body waittill_any_timeout( 3, "forcego" );
|
||||||
|
|
||||||
|
elevator.body.start_location_wait = 0;
|
||||||
|
|
||||||
if ( event == "forcego" )
|
if ( event == "forcego" )
|
||||||
{
|
{
|
||||||
next = elevator_next_floor( elevator, next, 0 );
|
next = elevator_next_floor( elevator, next, 0 );
|
||||||
|
@ -194,15 +194,15 @@ elevator_call_think()
|
|||||||
|
|
||||||
while ( 1 )
|
while ( 1 )
|
||||||
{
|
{
|
||||||
if ( !self.elevator.body.is_moving && self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) )
|
if ( !self.elevator.body.is_moving && self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) && !is_true( self.elevator.body.start_location_wait ) )
|
||||||
{
|
{
|
||||||
if ( !is_true( self.elevator.body.elevator_stop ) )
|
if ( !is_true( self.elevator.body.elevator_stop ) )
|
||||||
{
|
{
|
||||||
self sethintstring( "Hold ^3[{+activate}]^7 to lock the elevator" );
|
self sethintstring( "Hold ^3[{+activate}]^7 to lock elevator" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self sethintstring( "Hold ^3[{+activate}]^7 to unlock the elevator" );
|
self sethintstring( "Hold ^3[{+activate}]^7 to unlock elevator" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -221,7 +221,7 @@ elevator_call_think()
|
|||||||
|
|
||||||
self playsound( "zmb_elevator_ding" );
|
self playsound( "zmb_elevator_ding" );
|
||||||
|
|
||||||
if ( !self.elevator.body.is_moving && self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) )
|
if ( !self.elevator.body.is_moving && self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) && !is_true( self.elevator.body.start_location_wait ) )
|
||||||
{
|
{
|
||||||
if ( !is_true( self.elevator.body.elevator_stop ) )
|
if ( !is_true( self.elevator.body.elevator_stop ) )
|
||||||
{
|
{
|
||||||
@ -239,6 +239,11 @@ elevator_call_think()
|
|||||||
self sethintstring( "" );
|
self sethintstring( "" );
|
||||||
self trigger_off();
|
self trigger_off();
|
||||||
|
|
||||||
|
if ( self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) && !is_true( self.elevator.body.start_location_wait ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.elevator.body.elevator_stop = 0;
|
self.elevator.body.elevator_stop = 0;
|
||||||
self.elevator.body.elevator_force_go = 1;
|
self.elevator.body.elevator_force_go = 1;
|
||||||
self maps\mp\zm_highrise_buildables::onuseplantobject_elevatorkey( who );
|
self maps\mp\zm_highrise_buildables::onuseplantobject_elevatorkey( who );
|
||||||
@ -264,7 +269,7 @@ watch_elevator_body_prompt()
|
|||||||
{
|
{
|
||||||
while ( 1 )
|
while ( 1 )
|
||||||
{
|
{
|
||||||
msg = self.elevator.body waittill_any_return( "movedone", "forcego" );
|
msg = self.elevator.body waittill_any_return( "movedone", "forcego", "startwait" );
|
||||||
|
|
||||||
if ( msg == "movedone" )
|
if ( msg == "movedone" )
|
||||||
{
|
{
|
||||||
@ -276,19 +281,36 @@ watch_elevator_body_prompt()
|
|||||||
self.elevator.body.elevator_force_go = 0;
|
self.elevator.body.elevator_force_go = 0;
|
||||||
self thread elevator_call_think();
|
self thread elevator_call_think();
|
||||||
}
|
}
|
||||||
else
|
else if ( msg == "forcego" )
|
||||||
{
|
{
|
||||||
while ( !is_true( self.elevator.body.is_moving ) )
|
while ( !is_true( self.elevator.body.is_moving ) && !is_true( self.elevator.body.start_location_wait ) )
|
||||||
{
|
{
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( is_true( self.elevator.body.start_location_wait ) )
|
||||||
|
{
|
||||||
|
while ( is_true( self.elevator.body.start_location_wait ) )
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.elevator.body.elevator_force_go = 0;
|
||||||
|
self thread elevator_call_think();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if ( !self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) )
|
if ( !self.elevator maps\mp\zm_highrise_elevators::elevator_is_on_floor( self.floor ) )
|
||||||
{
|
{
|
||||||
self thread elevator_call_think();
|
self thread elevator_call_think();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self thread elevator_call_think();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
escape_pod_call()
|
escape_pod_call()
|
||||||
|
Reference in New Issue
Block a user