mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-05-13 07:54:50 +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()
|
stow_on_back()
|
||||||
{
|
{
|
||||||
prof_begin( "stow_on_back" );
|
prof_begin( "stow_on_back" );
|
||||||
@ -2779,6 +2815,8 @@ stow_on_back()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideTagList = FixHideTagList( hideTagList, self.tag_stowed_back );
|
||||||
|
|
||||||
for ( i = 0; i < hideTagList.size; i++ )
|
for ( i = 0; i < hideTagList.size; i++ )
|
||||||
self HidePart( hideTagList[ i ], self.tag_stowed_back );
|
self HidePart( hideTagList[ i ], self.tag_stowed_back );
|
||||||
|
|
||||||
@ -2816,6 +2854,8 @@ stow_on_hip()
|
|||||||
if ( !isDefined( hideTagList ) )
|
if ( !isDefined( hideTagList ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
hideTagList = FixHideTagList( hideTagList, self.tag_stowed_hip );
|
||||||
|
|
||||||
for ( i = 0; i < hideTagList.size; i++ )
|
for ( i = 0; i < hideTagList.size; i++ )
|
||||||
self HidePart( hideTagList[ i ], self.tag_stowed_hip );
|
self HidePart( hideTagList[ i ], self.tag_stowed_hip );
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,9 @@ waitForChangeTeam()
|
|||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill ( "joined_team" );
|
self waittill ( "joined_team" );
|
||||||
clearKillstreaks();
|
self clearKillstreaks();
|
||||||
|
|
||||||
|
if ( self isUsingRemote() )
|
||||||
self clearUsingRemote();
|
self clearUsingRemote();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -861,6 +863,8 @@ clearRideIntro( delay )
|
|||||||
destroyOnEvents(elem)
|
destroyOnEvents(elem)
|
||||||
{
|
{
|
||||||
self waittill_either("disconnect", "start_killstreak_hud");
|
self waittill_either("disconnect", "start_killstreak_hud");
|
||||||
|
|
||||||
|
if ( isDefined( elem ) )
|
||||||
elem destroy();
|
elem destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,11 @@ destoryHPdraw()
|
|||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
self waittill( "death" );
|
self waittill( "death" );
|
||||||
|
|
||||||
|
if ( isDefined( self.drawHP ) )
|
||||||
self.drawHP destroy();
|
self.drawHP destroy();
|
||||||
|
|
||||||
|
if ( isDefined( self.drawSpeed ) )
|
||||||
self.drawSpeed destroy();
|
self.drawSpeed destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user