mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 23:57:59 -05:00
Tranzit: attach powerups to bus
This commit is contained in:
@ -424,6 +424,7 @@
|
|||||||
### Tranzit
|
### Tranzit
|
||||||
* Any door that requires a Turbine to open is automatically open whenever the power is on
|
* Any door that requires a Turbine to open is automatically open whenever the power is on
|
||||||
* Increased bus speed by 100%
|
* Increased bus speed by 100%
|
||||||
|
* Powerups dropped within the bus are linked to the bus
|
||||||
* Players can sprint and go prone on the bus
|
* Players can sprint and go prone on the bus
|
||||||
* Lava in starting area activates after the power is on
|
* Lava in starting area activates after the power is on
|
||||||
* Lava destroys grenades instantly
|
* Lava destroys grenades instantly
|
||||||
|
@ -67,6 +67,7 @@ init()
|
|||||||
level thread power_local_electric_doors_globally();
|
level thread power_local_electric_doors_globally();
|
||||||
level thread b23r_hint_string_fix();
|
level thread b23r_hint_string_fix();
|
||||||
level thread power_station_vision_change();
|
level thread power_station_vision_change();
|
||||||
|
level thread attach_powerups_to_bus();
|
||||||
}
|
}
|
||||||
|
|
||||||
grief_include_weapons()
|
grief_include_weapons()
|
||||||
@ -390,6 +391,43 @@ change_dvar_over_time(dvar, val, time, increment)
|
|||||||
self setClientDvar(dvar, val);
|
self setClientDvar(dvar, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
attach_powerups_to_bus()
|
||||||
|
{
|
||||||
|
if (!isDefined(level.the_bus))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
level waittill("powerup_dropped", powerup);
|
||||||
|
|
||||||
|
attachpoweruptobus(powerup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
attachpoweruptobus( powerup )
|
||||||
|
{
|
||||||
|
if ( !isdefined( powerup ) || !isdefined( level.the_bus ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
distanceoutsideofbus = 50.0;
|
||||||
|
pos = powerup.origin;
|
||||||
|
posinbus = pointonsegmentnearesttopoint( level.the_bus.frontworld, level.the_bus.backworld, pos );
|
||||||
|
posdist2 = distance2dsquared( pos, posinbus );
|
||||||
|
|
||||||
|
if ( posdist2 > level.the_bus.radius * level.the_bus.radius )
|
||||||
|
{
|
||||||
|
radiusplus = level.the_bus.radius + distanceoutsideofbus;
|
||||||
|
|
||||||
|
if ( posdist2 > radiusplus * radiusplus )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
powerup enablelinkto();
|
||||||
|
powerup linkto( level.the_bus );
|
||||||
|
}
|
||||||
|
|
||||||
manage_zones( initial_zone )
|
manage_zones( initial_zone )
|
||||||
{
|
{
|
||||||
level.zone_manager_init_func = ::transit_zone_init;
|
level.zone_manager_init_func = ::transit_zone_init;
|
||||||
|
Reference in New Issue
Block a user