Fix weirdness

This commit is contained in:
ineedbots 2021-06-28 19:55:38 -06:00
parent 221785f437
commit 39cc0f9a15
2 changed files with 17 additions and 0 deletions

View File

@ -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" );

View File

@ -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 = [];