Fix gib error

This commit is contained in:
INeedBots 2020-12-03 21:34:55 -06:00
parent 884c0b0959
commit 04b82f16e4
2 changed files with 15 additions and 1 deletions

View File

@ -255,6 +255,7 @@ onPlayerConnect()
player thread onGrenadeFire(); player thread onGrenadeFire();
player thread onWeaponFired(); player thread onWeaponFired();
player thread doPlayerModelFix(); player thread doPlayerModelFix();
player thread onPlayerSpawned();
player thread connected(); player thread connected();
} }
@ -664,6 +665,19 @@ addBots()
} }
} }
/*
When any player spawns
*/
onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill ( "spawned_player" );
self.gib_ref = undefined;
}
}
/* /*
A thread for ALL players, will monitor and grenades thrown. A thread for ALL players, will monitor and grenades thrown.
*/ */

View File

@ -162,7 +162,7 @@ IsBotKnifing()
*/ */
IsPlayerModelOK() IsPlayerModelOK()
{ {
return (isDefined(self.bot_model_fix)); return (isDefined(self.bot_model_fix) && !isDefined(self.gib_ref));
} }
/* /*