mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-01 19:43:49 +00:00
don't spool up new cover proxies if those are unchanged either
This commit is contained in:
parent
57890a4327
commit
8e7af0bf55
1 changed files with 18 additions and 2 deletions
|
|
@ -70,8 +70,24 @@ public:
|
|||
private:
|
||||
AICover* mCover;
|
||||
public:
|
||||
void setCover(Point3F loc, F32 rad = 0.0f) { delete(mCover); mCover = new AICover(this, loc, rad); }
|
||||
void setCover(SimObjectPtr<SceneObject> objIn, F32 rad = 0.0f) { delete(mCover); mCover = new AICover(this, objIn, rad); }
|
||||
void setCover(Point3F loc, F32 rad = 0.0f)
|
||||
{
|
||||
if (mCover && mCover->mPosSet && mCover->getPosition() == loc)
|
||||
{
|
||||
mCover->mRadius == rad;
|
||||
return;
|
||||
}
|
||||
delete(mCover); mCover = new AICover(this, loc, rad);
|
||||
}
|
||||
void setCover(SimObjectPtr<SceneObject> objIn, F32 rad = 0.0f)
|
||||
{
|
||||
if (mCover && mCover->mObj == objIn)
|
||||
{
|
||||
mCover->mRadius == rad;
|
||||
return;
|
||||
}
|
||||
delete(mCover); mCover = new AICover(this, objIn, rad);
|
||||
}
|
||||
AICover* getCover() { return mCover; }
|
||||
bool findCover(const Point3F& from, F32 radius);
|
||||
void clearCover();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue