mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-12-02 10:36:39 +00:00
Make LiveActor::isNerve() 1:1
This commit is contained in:
parent
e06aa64d64
commit
d1ec5f3780
@ -54,7 +54,7 @@ public:
|
||||
|
||||
void calcAnmMtx();
|
||||
void setNerve(const Nerve *);
|
||||
bool isNerve(const Nerve *) const;
|
||||
u8 isNerve(const Nerve *) const;
|
||||
u32 getNerveStep() const;
|
||||
HitSensor* getSensor(const char *) const;
|
||||
void initModelManagerWithAnm(const char *, const char *, bool);
|
||||
|
@ -255,12 +255,16 @@ void LiveActor::calcAnmMtx()
|
||||
// todo -- figure out why
|
||||
void LiveActor::calcViewAndEntry()
|
||||
{
|
||||
if (mFlags.mIsNoCalcView)
|
||||
u8 cond = mFlags.mIsNoCalcView != 0;
|
||||
|
||||
if (cond)
|
||||
{
|
||||
if (mModelManager != 0)
|
||||
{
|
||||
mModelManager->calcView();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (mModelManager != 0)
|
||||
{
|
||||
mModelManager->calcView();
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,13 +362,10 @@ void LiveActor::setNerve(const Nerve *pNerve)
|
||||
mSpine->setNerve(pNerve);
|
||||
}
|
||||
|
||||
bool LiveActor::isNerve(const Nerve *pNerve) const
|
||||
u8 LiveActor::isNerve(const Nerve *pNerve) const
|
||||
{
|
||||
// this adds some weird instructions
|
||||
const Nerve* curNerve = mSpine->getCurrentNerve();
|
||||
s32 what = curNerve - pNerve;
|
||||
s32 blah = __cntlzw(what);
|
||||
return blah >> 5;
|
||||
return __cntlzw((u32)pNerve - (u32)curNerve) >> 5;
|
||||
}
|
||||
|
||||
u32 LiveActor::getNerveStep() const
|
||||
|
Loading…
Reference in New Issue
Block a user