mirror of
https://github.com/ENSL/NS.git
synced 2025-03-22 02:11:30 +00:00
o added 3 second warmup to web
o need to add visual and audio effects to match the sequence. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@400 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
50b2f03297
commit
4469e62659
4 changed files with 33 additions and 12 deletions
|
@ -457,6 +457,7 @@
|
|||
#define kWeaponDamageLevelThree 0.30
|
||||
#define kWeaponDamageLevelTwo 0.20
|
||||
#define kWebEnergyCost 0.18
|
||||
#define kWebWarmupTime 3.0
|
||||
#define kWebSpinnerROF 0.50
|
||||
#define kWelderBuildingModifier 1.00
|
||||
#define kWelderPlayerModifier 0.50
|
||||
|
|
|
@ -1658,7 +1658,7 @@ void AvHTriggerScript::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TY
|
|||
}
|
||||
|
||||
|
||||
AvHWebStrand::AvHWebStrand()
|
||||
AvHWebStrand::AvHWebStrand() : mSolid(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1666,6 +1666,7 @@ void AvHWebStrand::Break()
|
|||
{
|
||||
EMIT_SOUND(ENT(this->pev), CHAN_AUTO, kWebStrandBreakSound, 1.0, ATTN_IDLE);
|
||||
UTIL_Remove(this);
|
||||
SetThink(NULL);
|
||||
|
||||
// Decrement number of strands
|
||||
AvHTeam* theTeam = GetGameRules()->GetTeam((AvHTeamNumber)this->pev->team);
|
||||
|
@ -1693,7 +1694,7 @@ void AvHWebStrand::Setup(const Vector& inPointOne, const Vector& inPointTwo)
|
|||
this->BeamInit(kWebStrandSprite, kWebStrandWidth);
|
||||
|
||||
this->PointsInit(inPointOne, inPointTwo);
|
||||
this->SetColor( 255, 255, 255 );
|
||||
this->SetColor( 255, 255, 100 );
|
||||
this->SetScrollRate( 0 );
|
||||
//this->SetBrightness( 64 );
|
||||
this->SetBrightness( 8 );
|
||||
|
@ -1713,15 +1714,27 @@ void AvHWebStrand::Spawn(void)
|
|||
//this->pev->solid = SOLID_BBOX;
|
||||
this->pev->health = kWebHitPoints;
|
||||
this->pev->takedamage = DAMAGE_YES;
|
||||
|
||||
this->mSolid=false;
|
||||
this->pev->nextthink = gpGlobals->time + BALANCE_VAR(kWebWarmupTime);
|
||||
SetThink(StrandThink);
|
||||
|
||||
//SetBits(this->pev->flags, FL_MONSTER);
|
||||
|
||||
this->RelinkBeam();
|
||||
|
||||
//SetThink(StrandExpire);
|
||||
//this->pev->nextthink = gpGlobals->time + kWebStrandLifetime;
|
||||
}
|
||||
|
||||
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->mSolid=true;
|
||||
SetThink(NULL);
|
||||
}
|
||||
void AvHWebStrand::StrandExpire()
|
||||
{
|
||||
this->Break();
|
||||
|
@ -1734,15 +1747,20 @@ void AvHWebStrand::StrandTouch( CBaseEntity *pOther )
|
|||
//if(GetGameRules()->CanEntityDoDamageTo(this, pOther))
|
||||
if(pOther->pev->team != this->pev->team)
|
||||
{
|
||||
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(pOther);
|
||||
if(thePlayer && thePlayer->GetCanBeAffectedByEnemies())
|
||||
{
|
||||
// Break web and ensnare player if possible (players can't be too webbed)
|
||||
if(thePlayer->SetEnsnareState(true))
|
||||
if ( this->mSolid ) {
|
||||
AvHPlayer* thePlayer = dynamic_cast<AvHPlayer*>(pOther);
|
||||
if(thePlayer && thePlayer->GetCanBeAffectedByEnemies())
|
||||
{
|
||||
this->Break();
|
||||
// Break web and ensnare player if possible (players can't be too webbed)
|
||||
if(thePlayer->SetEnsnareState(true))
|
||||
{
|
||||
this->Break();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->Break();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -522,8 +522,10 @@ public:
|
|||
void EXPORT StrandExpire();
|
||||
|
||||
virtual int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType );
|
||||
void EXPORT StrandThink();
|
||||
|
||||
private:
|
||||
bool mSolid;
|
||||
};
|
||||
|
||||
class AvHFuncResource : public CBaseAnimating
|
||||
|
|
|
@ -3153,7 +3153,7 @@ Swipe - Deadly close-combat attack. Get close to your enemies and attack. Good
|
|||
|
||||
Weapon8Help
|
||||
{
|
||||
Webs - Shoot globules near each other and a web will be created between them. Webs slow enemies and prevent them from using their weapons for a time. Webs can be destroyed with the welder or by grenade fire
|
||||
Webs - Shoot globules near each other and a web will be created between them. Wabes take 3 seconds to harden and become active. Webs slow enemies and prevent them from using their weapons for a time. Webs can be destroyed with the welder or by grenade fire
|
||||
}
|
||||
|
||||
Weapon9Help
|
||||
|
@ -3521,7 +3521,7 @@ You are now a Gorge. Stay out of combat and use your pop-up menu to build differ
|
|||
|
||||
HelpTextWeb
|
||||
{
|
||||
Fire web strands at walls and floors to create webs between them. Enemies that touch webs are slowed and can't use their weapons temporarily
|
||||
Fire web strands at walls and floors to create webs between them. Strands take 3 seconds to harden and become active. Enemies that touch webs are slowed and can't use their weapons temporarily
|
||||
}
|
||||
|
||||
HelpTextWallwalking
|
||||
|
|
Loading…
Reference in a new issue