diff --git a/README.md b/README.md index ca69c099..7fff83f4 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,9 @@ ### Remington 870 * Changed weapon cost to 1200 on all maps +### War Machine +* Unupgraded: grenades explode on impact + ### EMP Grenade * Decreased perk EMP time from 90 seconds to 60 seconds * Decreased zombie EMP radius by 30% (same radius as perk EMP) diff --git a/scripts/zm/main/_zm_reimagined.gsc b/scripts/zm/main/_zm_reimagined.gsc index 666f53b4..c55f94b7 100644 --- a/scripts/zm/main/_zm_reimagined.gsc +++ b/scripts/zm/main/_zm_reimagined.gsc @@ -89,6 +89,8 @@ onplayerspawned() //self thread disable_sniper_scope_sway(); // Buried does not load the clientfield + self thread war_machine_explode_on_impact(); + self thread jetgun_fast_cooldown(); self thread jetgun_fast_spinlerp(); self thread jetgun_overheated_fix(); @@ -3207,6 +3209,32 @@ remove_buildable_pieces( buildable_name ) } } +war_machine_explode_on_impact() +{ + self endon("disconnect"); + + while(1) + { + self waittill("grenade_launcher_fire", grenade, weapname); + + if(weapname == "m32_zm") + { + grenade thread grenade_explode_on_impact(); + } + } +} + +grenade_explode_on_impact() +{ + self endon("death"); + + self waittill("grenade_bounce", pos); + + self.origin = pos; // need this or position is slightly off + + self resetmissiledetonationtime(0); +} + jetgun_increase_grind_range() { level.zombies_vars["jetgun_grind_range"] = 256; diff --git a/scripts/zm/zm_transit/zm_transit_reimagined.gsc b/scripts/zm/zm_transit/zm_transit_reimagined.gsc index 949d51d9..f56dd450 100644 --- a/scripts/zm/zm_transit/zm_transit_reimagined.gsc +++ b/scripts/zm/zm_transit/zm_transit_reimagined.gsc @@ -13,4 +13,24 @@ main() replaceFunc(maps/mp/zombies/_zm_weap_emp_bomb::emp_detonate, scripts/zm/replaced/_zm_weap_emp_bomb::emp_detonate); replaceFunc(maps/mp/zombies/_zm_equip_electrictrap::startelectrictrapdeploy, scripts/zm/replaced/_zm_equip_electrictrap::startelectrictrapdeploy); replaceFunc(maps/mp/zombies/_zm_equip_turret::startturretdeploy, scripts/zm/replaced/_zm_equip_turret::startturretdeploy); +} + +init() +{ + level.grenade_safe_to_bounce = ::grenade_safe_to_bounce; +} + +grenade_safe_to_bounce( player, weapname ) +{ + if ( !is_offhand_weapon( weapname ) ) + { + return 1; + } + + if ( self maps/mp/zm_transit_lava::object_touching_lava() ) + { + return 0; + } + + return 1; } \ No newline at end of file