mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 07:30:01 +00:00
unused CFerryDoor
This commit is contained in:
parent
0345861b5f
commit
0f0812618a
|
@ -168,3 +168,58 @@ CTrainDoor::IsClosed(void)
|
|||
{
|
||||
return m_fPosn == RetTranslationWhenClosed();
|
||||
}
|
||||
|
||||
bool
|
||||
CFerryDoor::IsInUse(void)
|
||||
{
|
||||
float translationDifference = m_fPrevPosn - m_fPosn;
|
||||
m_fPrevPosn = m_fPosn;
|
||||
return Abs(translationDifference) > 0.002f;
|
||||
}
|
||||
|
||||
float
|
||||
CFerryDoor::RetTranslationWhenClosed(void)
|
||||
{
|
||||
if(Abs(m_fClosedPosn) < Abs(m_fOpenPosn))
|
||||
return m_fClosedPosn;
|
||||
else
|
||||
return m_fOpenPosn;
|
||||
}
|
||||
|
||||
bool
|
||||
CFerryDoor::IsClosed(void)
|
||||
{
|
||||
return m_fPosn == RetTranslationWhenClosed();
|
||||
}
|
||||
|
||||
float
|
||||
CFerryDoor::RetTranslationWhenOpen(void)
|
||||
{
|
||||
if(Abs(m_fClosedPosn) < Abs(m_fOpenPosn))
|
||||
return m_fOpenPosn;
|
||||
else
|
||||
return m_fClosedPosn;
|
||||
}
|
||||
|
||||
bool
|
||||
CFerryDoor::IsFullyOpen(void)
|
||||
{
|
||||
if(Abs(m_fPosn) < Abs(RetTranslationWhenOpen()) - 0.5f)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CFerryDoor::Open(float ratio)
|
||||
{
|
||||
float open;
|
||||
|
||||
m_fPrevPosn = m_fPosn;
|
||||
open = RetTranslationWhenOpen();
|
||||
if(ratio < 1.0f){
|
||||
m_fPosn = open*ratio;
|
||||
}else{
|
||||
m_nDoorState = DOORST_OPEN;
|
||||
m_fPosn = open;
|
||||
}
|
||||
}
|
|
@ -67,3 +67,22 @@ public:
|
|||
float RetTranslationWhenOpen(void);
|
||||
void Open(float ratio);
|
||||
};
|
||||
|
||||
|
||||
class CFerryDoor {
|
||||
private:
|
||||
float m_fClosedPosn;
|
||||
float m_fOpenPosn;
|
||||
int8 m_nDirn;
|
||||
int8 m_nAxis;
|
||||
int8 m_nDoorState;
|
||||
float m_fPosn;
|
||||
float m_fPrevPosn;
|
||||
public:
|
||||
bool IsInUse(void);
|
||||
float RetTranslationWhenClosed(void);
|
||||
float RetTranslationWhenOpen(void);
|
||||
bool IsClosed(void);
|
||||
bool IsFullyOpen(void);
|
||||
void Open(float ratio);
|
||||
};
|
Loading…
Reference in a new issue