o Added sprite for unhardened web strand

o Hives under attack are prioritised with hive +use
o inverted the cloakometer on j-'s request.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@426 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
puzl 2006-04-27 01:33:51 +00:00
parent 49358f1199
commit b6111e19d2
4 changed files with 17 additions and 10 deletions

View file

@ -1694,8 +1694,9 @@ void AvHWebStrand::Setup(const Vector& inPointOne, const Vector& inPointTwo)
this->BeamInit(kWebStrandSprite, kWebStrandWidth);
this->PointsInit(inPointOne, inPointTwo);
this->SetColor( 255, 255, 100 );
this->SetColor( 255, 255, 255 );
this->SetScrollRate( 0 );
this->SetFrame(0);
//this->SetBrightness( 64 );
this->SetBrightness( 8 );
@ -1728,10 +1729,9 @@ void AvHWebStrand::Spawn(void)
void AvHWebStrand::StrandThink()
{
EMIT_SOUND(ENT(this->pev), CHAN_AUTO, kWebStrandBreakSound, 1.0, ATTN_IDLE);
this->SetColor( 255, 255, 255 );
this->SetScrollRate( 0 );
//this->SetBrightness( 64 );
this->SetBrightness( 8 );
this->SetColor( 255, 255, 255 );
this->SetFrame(1);
this->mSolid=true;
SetThink(NULL);
}

View file

@ -913,10 +913,11 @@ void AvHHive::TeleportUse(CBaseEntity* inActivator, CBaseEntity* inCaller, USE_T
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(inActivator);
vector<int> theHives;
if(thePlayer && (thePlayer->pev->team == this->pev->team) && (thePlayer->GetUser3() != AVH_USER3_ALIEN_EMBRYO))
{
vector<int> theHives;
vector<int> theHivesUnderAttack;
if((this->mLastTimeScannedHives == -1) || (gpGlobals->time > (this->mLastTimeScannedHives + kHiveScanInterval)))
{
this->mTeleportHiveIndex = -1;
@ -930,6 +931,8 @@ void AvHHive::TeleportUse(CBaseEntity* inActivator, CBaseEntity* inCaller, USE_T
if(!theEntity->GetIsSpawning() || ( theEntity->GetIsSpawning() && theHiveIsUnderAttack ) )
{
theHives.push_back(theEntity->entindex());
if ( theHiveIsUnderAttack )
theHivesUnderAttack.push_back(theEntity->entindex());
}
}
END_FOR_ALL_ENTITIES(kesTeamHive)
@ -937,17 +940,21 @@ void AvHHive::TeleportUse(CBaseEntity* inActivator, CBaseEntity* inCaller, USE_T
this->mLastTimeScannedHives = gpGlobals->time;
}
if ( theHives.size() > 0 ) {
vector<int> *tmpPtr=&theHives;
if ( theHivesUnderAttack.size() > 0 )
tmpPtr=&theHivesUnderAttack;
if ( tmpPtr->size() > 0 ) {
int myIndex=this->entindex();
for ( int i=0; i < theHives.size(); i++ ) {
int hiveIndex=theHives[i];
for ( int i=0; i < tmpPtr->size(); i++ ) {
int hiveIndex=(*tmpPtr)[i];
if ( hiveIndex > myIndex ) {
this->mTeleportHiveIndex=hiveIndex;
break;
}
}
if ( this->mTeleportHiveIndex == -1 ) {
this->mTeleportHiveIndex=theHives[0];
this->mTeleportHiveIndex=(*tmpPtr)[0];
}
}

View file

@ -3738,7 +3738,7 @@ void AvHHud::RenderAlienUI()
if ( theLocalPlayer->curstate.renderamt > 0 ) {
theAmount=min(kAlienSelfCloakingMinOpacity, max(kAlienSelfCloakingBaseOpacity,theLocalPlayer->curstate.renderamt));
}
float theFactor = 1.0f -(float)(theAmount-kAlienSelfCloakingBaseOpacity)/float(kAlienSelfCloakingMinOpacity-kAlienSelfCloakingBaseOpacity);
float theFactor = (float)(theAmount-kAlienSelfCloakingBaseOpacity)/float(kAlienSelfCloakingMinOpacity-kAlienSelfCloakingBaseOpacity);
AvHSpriteSetColor(1,1,1);
AvHSpriteSetRenderMode(kRenderTransTexture);

Binary file not shown.