diff --git a/mods/bots/maps/mp/bots/_bot.gsc b/mods/bots/maps/mp/bots/_bot.gsc index b3fc2ef..8143211 100644 --- a/mods/bots/maps/mp/bots/_bot.gsc +++ b/mods/bots/maps/mp/bots/_bot.gsc @@ -272,9 +272,21 @@ onPlayerConnect() player thread watchWeapons(); player thread watchVelocity(); player thread watchVars(); + player thread doPlayerModelFix(); } } +/* + Fixes a weird iw3 bug when for a frame the player doesn't have any bones when they first spawn in. +*/ +doPlayerModelFix() +{ + self endon( "disconnect" ); + self waittill( "spawned_player" ); + wait 0.05; + self.bot_model_fix = true; +} + /* CoD2 */ @@ -442,6 +454,8 @@ connected() spawnBot() { + self endon( "disconnect" ); + wait 5; self notify( "menuresponse", game["menu_team"], "autoassign" ); diff --git a/mods/bots/maps/mp/bots/_bot_utility.gsc b/mods/bots/maps/mp/bots/_bot_utility.gsc index e92daa5..c7e60e9 100644 --- a/mods/bots/maps/mp/bots/_bot_utility.gsc +++ b/mods/bots/maps/mp/bots/_bot_utility.gsc @@ -466,6 +466,9 @@ getTagOrigin( where ) if ( !isAlive( self ) ) return ( 0, 0, 0 ); + if ( !isDefined( self.bot_model_fix ) ) + return self.origin; + if ( !isDefined( self.tags ) ) { self.tags = [];