mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-03-15 07:26:56 +00:00
more script fixes
This commit is contained in:
parent
18c67cb334
commit
97236e2e5f
@ -2689,6 +2689,42 @@ detach_hip_weapon()
|
||||
}
|
||||
|
||||
|
||||
FixHideTagList( hideTagList, stowWeapon )
|
||||
{
|
||||
answer = [];
|
||||
|
||||
for ( i = 0; i < hideTagList.size; i++ )
|
||||
{
|
||||
tag = hideTagList[ i ];
|
||||
|
||||
if ( stowWeapon == "weapon_ak74u" )
|
||||
{
|
||||
if ( tag == "tag_reflex_sight" || tag == "tag_acog" || tag == "tag_ak47_mount" )
|
||||
continue;
|
||||
}
|
||||
else if ( stowWeapon == "weapon_ak47_classic" )
|
||||
{
|
||||
if ( tag == "tag_reflex_sight" || tag == "tag_acog" || tag == "tag_ak47_mount" )
|
||||
continue;
|
||||
}
|
||||
else if ( stowWeapon == "worldmodel_bo2_peacekeeper" )
|
||||
{
|
||||
if ( tag == "tag_holo" || tag == "tag_reflex" || tag == "tag_silencer" )
|
||||
continue;
|
||||
}
|
||||
else if ( stowWeapon == "weapon_beretta" )
|
||||
{
|
||||
if ( tag == "tag_knife" )
|
||||
continue;
|
||||
}
|
||||
|
||||
answer[ answer.size ] = tag;
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
||||
stow_on_back()
|
||||
{
|
||||
prof_begin( "stow_on_back" );
|
||||
@ -2778,6 +2814,8 @@ stow_on_back()
|
||||
prof_end( "stow_on_back" );
|
||||
return;
|
||||
}
|
||||
|
||||
hideTagList = FixHideTagList( hideTagList, self.tag_stowed_back );
|
||||
|
||||
for ( i = 0; i < hideTagList.size; i++ )
|
||||
self HidePart( hideTagList[ i ], self.tag_stowed_back );
|
||||
@ -2815,6 +2853,8 @@ stow_on_hip()
|
||||
|
||||
if ( !isDefined( hideTagList ) )
|
||||
return;
|
||||
|
||||
hideTagList = FixHideTagList( hideTagList, self.tag_stowed_hip );
|
||||
|
||||
for ( i = 0; i < hideTagList.size; i++ )
|
||||
self HidePart( hideTagList[ i ], self.tag_stowed_hip );
|
||||
|
@ -231,8 +231,10 @@ waitForChangeTeam()
|
||||
for ( ;; )
|
||||
{
|
||||
self waittill ( "joined_team" );
|
||||
clearKillstreaks();
|
||||
self clearUsingRemote();
|
||||
self clearKillstreaks();
|
||||
|
||||
if ( self isUsingRemote() )
|
||||
self clearUsingRemote();
|
||||
}
|
||||
}
|
||||
|
||||
@ -861,7 +863,9 @@ clearRideIntro( delay )
|
||||
destroyOnEvents(elem)
|
||||
{
|
||||
self waittill_either("disconnect", "start_killstreak_hud");
|
||||
elem destroy();
|
||||
|
||||
if ( isDefined( elem ) )
|
||||
elem destroy();
|
||||
}
|
||||
|
||||
initKillstreakHud(inity)
|
||||
|
@ -36,8 +36,12 @@ destoryHPdraw()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self waittill( "death" );
|
||||
self.drawHP destroy();
|
||||
self.drawSpeed destroy();
|
||||
|
||||
if ( isDefined( self.drawHP ) )
|
||||
self.drawHP destroy();
|
||||
|
||||
if ( isDefined( self.drawSpeed ) )
|
||||
self.drawSpeed destroy();
|
||||
}
|
||||
|
||||
initHPdraw()
|
||||
|
Loading…
x
Reference in New Issue
Block a user