1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-10 07:08:06 -05:00

Tranzit: allow sprinting and going prone on bus

This commit is contained in:
Jbleezy
2023-03-07 10:40:02 -08:00
parent 508b2f193a
commit f1dd7655d7
3 changed files with 151 additions and 0 deletions

View File

@ -365,6 +365,7 @@
### Tranzit
* Any door that requires a Turbine to open is automatically open whenever the power is on
* Players can sprint and go prone on the bus
* Lava in starting area activates after the power is on
* Lava destroys grenades instantly
* Decreased brightness at Power Station

View File

@ -0,0 +1,148 @@
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_weapons;
#include maps\mp\zm_transit_utility;
#include maps\mp\zm_transit_automaton;
#include maps\mp\zm_transit_cling;
#include maps\mp\zm_transit_openings;
#include maps\mp\zombies\_zm_zonemgr;
#include maps\mp\zm_transit_ambush;
#include maps\mp\zombies\_zm;
#include maps\mp\zombies\_zm_spawner;
#include maps\mp\zombies\_zm_ai_basic;
#include maps\mp\zombies\_zm_equipment;
#include maps\mp\zombies\_zm_stats;
#include maps\mp\zombies\_zm_laststand;
#include maps\mp\zombies\_zm_powerups;
#include maps\mp\zombies\_zm_buildables;
#include maps\mp\zombies\_zm_weap_emp_bomb;
#include maps\mp\zm_transit_lava;
#include maps\mp\zombies\_zm_audio;
#include maps\mp\zm_transit_bus;
busupdateplayers()
{
level endon( "end_game" );
while ( true )
{
self.numplayers = 0;
self.numplayerson = 0;
self.numplayersonroof = 0;
self.numplayersinsidebus = 0;
self.numplayersnear = 0;
self.numaliveplayersridingbus = 0;
self.frontworld = self localtoworldcoords( self.frontlocal );
self.backworld = self localtoworldcoords( self.backlocal );
self.bus_riders_alive = [];
players = get_players();
foreach ( player in players )
{
if ( !isalive( player ) )
continue;
self.numplayers++;
if ( distance2d( player.origin, self.origin ) < 1700 )
self.numplayersnear++;
playerisinbus = 0;
mover = player getmoverent();
if ( isdefined( mover ) )
{
if ( isdefined( mover.targetname ) )
{
if ( mover.targetname == "the_bus" || mover.targetname == "bus_path_blocker" || mover.targetname == "hatch_clip" || mover.targetname == "ladder_mantle" )
playerisinbus = 1;
}
if ( isdefined( mover.equipname ) )
{
if ( mover.equipname == "riotshield_zm" )
{
if ( isdefined( mover.isonbus ) && mover.isonbus )
playerisinbus = 1;
}
}
if ( isdefined( mover.is_zombie ) && mover.is_zombie && ( isdefined( mover.isonbus ) && mover.isonbus ) )
playerisinbus = 1;
}
if ( playerisinbus )
{
self.numplayerson++;
if ( is_player_valid( player ) )
{
self.numaliveplayersridingbus++;
self.bus_riders_alive[self.bus_riders_alive.size] = player;
}
}
ground_ent = player getgroundent();
if ( player isonladder() )
ground_ent = mover;
if ( isdefined( ground_ent ) )
{
if ( isdefined( ground_ent.is_zombie ) && ground_ent.is_zombie )
player thread zombie_surf( ground_ent );
else
{
if ( playerisinbus && !( isdefined( player.isonbus ) && player.isonbus ) )
{
bbprint( "zombie_events", "category %s type %s round %d playername %s", "BUS", "player_enter", level.round_number, player.name );
player thread bus_audio_interior_loop( self );
player clientnotify( "OBS" );
player setclientplayerpushamount( 0 );
if ( randomint( 100 ) > 80 && level.automaton.greeting_timer == 0 )
{
thread automatonspeak( "convo", "player_enter" );
level.automaton thread greeting_timer();
}
}
if ( !playerisinbus && ( isdefined( player.isonbus ) && player.isonbus ) )
{
bbprint( "zombie_events", "category %s type %s round %d playername %s", "BUS", "player_exit", level.round_number, player.name );
self.buyable_weapon setinvisibletoplayer( player );
player setclientplayerpushamount( 1 );
player notify( "left bus" );
player clientnotify( "LBS" );
if ( randomint( 100 ) > 80 && level.automaton.greeting_timer == 0 )
{
thread automatonspeak( "convo", "player_leave" );
level.automaton thread greeting_timer();
}
}
player.isonbus = playerisinbus;
player.isonbusroof = player _entityisonroof();
}
}
if ( isdefined( player.isonbusroof ) && player.isonbusroof )
{
self.buyable_weapon setinvisibletoplayer( player );
self.numplayersonroof++;
}
else if ( isdefined( player.isonbus ) && player.isonbus )
{
self.buyable_weapon setvisibletoplayer( player );
self.numplayersinsidebus++;
}
wait 0.05;
}
wait 0.05;
}
}

View File

@ -5,6 +5,7 @@
#include scripts\zm\replaced\zm_transit;
#include scripts\zm\replaced\zm_transit_gamemodes;
#include scripts\zm\replaced\zm_transit_utility;
#include scripts\zm\replaced\zm_transit_bus;
#include scripts\zm\replaced\_zm_weap_jetgun;
#include scripts\zm\replaced\_zm_weap_emp_bomb;
#include scripts\zm\replaced\_zm_equip_electrictrap;
@ -18,6 +19,7 @@ main()
replaceFunc(maps\mp\zm_transit::lava_damage_depot, scripts\zm\replaced\zm_transit::lava_damage_depot);
replaceFunc(maps\mp\zm_transit_gamemodes::init, scripts\zm\replaced\zm_transit_gamemodes::init);
replaceFunc(maps\mp\zm_transit_utility::solo_tombstone_removal, scripts\zm\replaced\zm_transit_utility::solo_tombstone_removal);
replaceFunc(maps\mp\zm_transit_bus::busupdateplayers, scripts\zm\replaced\zm_transit_bus::busupdateplayers);
replaceFunc(maps\mp\zombies\_zm_weap_jetgun::is_jetgun_firing, scripts\zm\replaced\_zm_weap_jetgun::is_jetgun_firing);
replaceFunc(maps\mp\zombies\_zm_weap_jetgun::jetgun_check_enemies_in_range, scripts\zm\replaced\_zm_weap_jetgun::jetgun_check_enemies_in_range);
replaceFunc(maps\mp\zombies\_zm_weap_jetgun::jetgun_grind_zombie, scripts\zm\replaced\_zm_weap_jetgun::jetgun_grind_zombie);