mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
upload "kind" alien swarm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Base class for many flying NPCs
|
||||
//
|
||||
@@ -97,7 +97,7 @@ Vector CAI_BaseFlyingBot::VelocityToAvoidObstacles(float flInterval)
|
||||
trace_t tr;
|
||||
Vector vTravelDir = m_vCurrentVelocity*flInterval;
|
||||
Vector endPos = GetAbsOrigin() + vTravelDir;
|
||||
AI_TraceEntity( this, GetAbsOrigin(), endPos, MASK_NPCSOLID|CONTENTS_WATER, &tr );
|
||||
AI_TraceEntity( this, GetAbsOrigin(), endPos, GetAITraceMask()|CONTENTS_WATER, &tr );
|
||||
if (tr.fraction != 1.0)
|
||||
{
|
||||
// Bounce off in normal
|
||||
@@ -110,7 +110,7 @@ Vector CAI_BaseFlyingBot::VelocityToAvoidObstacles(float flInterval)
|
||||
// --------------------------------
|
||||
float flMinGroundDist = MinGroundDist();
|
||||
AI_TraceLine(GetAbsOrigin(), GetAbsOrigin() + Vector(0, 0, -flMinGroundDist),
|
||||
MASK_NPCSOLID_BRUSHONLY|CONTENTS_WATER, this, COLLISION_GROUP_NONE, &tr);
|
||||
GetAITraceMask_BrushOnly()|CONTENTS_WATER, this, COLLISION_GROUP_NONE, &tr);
|
||||
if (tr.fraction < 1)
|
||||
{
|
||||
// Clamp veloctiy
|
||||
|
||||
Reference in New Issue
Block a user