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

Tranzit: add Tunnel location

This commit is contained in:
Jbleezy
2022-08-12 22:20:26 -07:00
parent 0f30dd6f82
commit 965d71b514
5 changed files with 301 additions and 4 deletions

View File

@ -176,9 +176,13 @@ wallbuy( weapon_name, target, targetname, origin, angles )
unitrigger_stub.angles = angles;
model_name = undefined;
if ( weapon_name == "claymore_zm" )
if ( weapon_name == "sticky_grenade_zm" )
{
model_name = "t6_wpn_claymore_world"; // getWeaponModel for claymore is wrong model
model_name = "semtex_bag";
}
else if ( weapon_name == "claymore_zm" )
{
model_name = "t6_wpn_claymore_world";
}
wallmodel = spawn_weapon_model( weapon_name, model_name, origin, angles );
@ -197,7 +201,7 @@ wallbuy( weapon_name, target, targetname, origin, angles )
unitrigger_stub.targetname = targetname;
unitrigger_stub.cursor_hint = "HINT_NOICON";
// move model foreward so it always shows in front of chalk
// move model forward so it always shows in front of chalk
move_amount = anglesToRight( wallmodel.angles ) * -0.3;
wallmodel.origin += move_amount;
unitrigger_stub.origin += move_amount;
@ -289,6 +293,11 @@ wallbuy( weapon_name, target, targetname, origin, angles )
chalk_fx = weapon_name + "_fx";
level thread playchalkfx( chalk_fx, origin, angles );
if(weaponType(weapon_name) == "grenade")
{
unitrigger_stub thread wallbuy_grenade_model_fix();
}
}
playchalkfx( effect, origin, angles )
@ -302,6 +311,21 @@ playchalkfx( effect, origin, angles )
}
}
// fixes grenade wallbuy model doing first trigger animation everytime
wallbuy_grenade_model_fix()
{
model = getent(self.target, "targetname");
if(!isDefined(model))
{
return;
}
model waittill("movedone");
self.target = undefined;
}
barrier( model, origin, angles, not_solid )
{
if ( !isDefined( level.survival_barriers ) )

View File

@ -15,6 +15,7 @@
#include scripts/zm/locs/zm_transit_loc_diner;
#include scripts/zm/locs/zm_transit_loc_power;
#include scripts/zm/locs/zm_transit_loc_tunnel;
init()
{
@ -29,15 +30,19 @@ init()
add_map_location_gamemode( "zstandard", "town", maps/mp/zm_transit_standard_town::precache, maps/mp/zm_transit_standard_town::main );
add_map_location_gamemode( "zstandard", "diner", scripts/zm/locs/zm_transit_loc_diner::precache, scripts/zm/locs/zm_transit_loc_diner::main );
add_map_location_gamemode( "zstandard", "power", scripts/zm/locs/zm_transit_loc_power::precache, scripts/zm/locs/zm_transit_loc_power::main );
add_map_location_gamemode( "zstandard", "tunnel", scripts/zm/locs/zm_transit_loc_tunnel::precache, scripts/zm/locs/zm_transit_loc_tunnel::main );
add_map_location_gamemode( "zgrief", "transit", maps/mp/zm_transit_grief_station::precache, maps/mp/zm_transit_grief_station::main );
add_map_location_gamemode( "zgrief", "farm", maps/mp/zm_transit_grief_farm::precache, maps/mp/zm_transit_grief_farm::main );
add_map_location_gamemode( "zgrief", "town", maps/mp/zm_transit_grief_town::precache, maps/mp/zm_transit_grief_town::main );
add_map_location_gamemode( "zgrief", "diner", scripts/zm/locs/zm_transit_loc_diner::precache, scripts/zm/locs/zm_transit_loc_diner::main );
add_map_location_gamemode( "zgrief", "power", scripts/zm/locs/zm_transit_loc_power::precache, scripts/zm/locs/zm_transit_loc_power::main );
add_map_location_gamemode( "zgrief", "tunnel", scripts/zm/locs/zm_transit_loc_tunnel::precache, scripts/zm/locs/zm_transit_loc_tunnel::main );
scripts/zm/replaced/utility::add_struct_location_gamemode_func( "zstandard", "diner", scripts/zm/locs/zm_transit_loc_diner::struct_init );
scripts/zm/replaced/utility::add_struct_location_gamemode_func( "zgrief", "diner", scripts/zm/locs/zm_transit_loc_diner::struct_init );
scripts/zm/replaced/utility::add_struct_location_gamemode_func( "zstandard", "power", scripts/zm/locs/zm_transit_loc_power::struct_init );
scripts/zm/replaced/utility::add_struct_location_gamemode_func( "zgrief", "power", scripts/zm/locs/zm_transit_loc_power::struct_init );
scripts/zm/replaced/utility::add_struct_location_gamemode_func( "zstandard", "tunnel", scripts/zm/locs/zm_transit_loc_tunnel::struct_init );
scripts/zm/replaced/utility::add_struct_location_gamemode_func( "zgrief", "tunnel", scripts/zm/locs/zm_transit_loc_tunnel::struct_init );
}