LiveActor::startClipped() and endClipped()

This commit is contained in:
shibbo 2019-07-28 23:29:12 -04:00
parent aa61040b66
commit 2d3fc43f27
3 changed files with 55 additions and 0 deletions

View File

@ -17,6 +17,9 @@ public:
void addEffect(const char *, LiveActor *);
void registerEffect(const char *, Mtx *, const char *, const char *);
void updateAttributeEffect();
void stopEmitterOnClipped();
void playEmitterOffClipped();
void clear();
void changeBck();
void onDraw();

View File

@ -6,6 +6,7 @@
namespace MR
{
bool tryUpdateHitSensorsAll(LiveActor *);
void updateHitSensorsAll(LiveActor *);
void clearHitSensors(LiveActor *);
HitSensor* getTaken(const LiveActor *);
HitSensor* getTaking(const LiveActor *);

View File

@ -359,4 +359,55 @@ HitSensor* LiveActor::getSensor(const char *sensorName) const
}
return 0;
}
// LiveActor::getBaseMtx()
void LiveActor::startClipped()
{
bool flag = 1;
HitSensorKeeper* keeper = this->mSensorKeeper;
this->mFlags._7 = flag;
if (keeper != 0)
{
this->mSensorKeeper->invalidateBySystem();
}
if (this->mEffectKeeper != 0)
{
this->mEffectKeeper->stopEmitterOnClipped();
}
MR::disconnectToSceneTemporarily(this);
if (MR::isNoEntryDrawBuffer(this) == 0)
{
MR::disconnectToDrawTemporarily(this);
}
}
void LiveActor::endClipped()
{
bool flag = 0;
HitSensorKeeper* keeper = this->mSensorKeeper;
this->mFlags._7 = flag;
if (keeper != 0)
{
this->mSensorKeeper->validateBySystem();
MR::updateHitSensorsAll(this);
}
if (this->mEffectKeeper != 0)
{
this->mEffectKeeper->playEmitterOffClipped();
}
MR::connectToSceneTemporarily(this);
if (MR::isNoEntryDrawBuffer(this) == 0)
{
MR::connectToDrawTemporarily(this);
}
}