mirror of
https://github.com/krystalgamer/spidey-decomp.git
synced 2024-11-23 21:39:48 +00:00
CBaddy::AddPointToPath
This commit is contained in:
parent
030ac4aa4c
commit
c48ef50da9
52
baddy.cpp
52
baddy.cpp
@ -12,6 +12,57 @@ CBaddy* ControlBaddyList;
|
||||
|
||||
extern u16** gTrigNodes;
|
||||
|
||||
// @NotOk
|
||||
// check when pathcheck is done <3
|
||||
i32 CBaddy::AddPointToPath(
|
||||
CVector* pVec,
|
||||
i32 a3)
|
||||
{
|
||||
CVector v21;
|
||||
v21.vx = 0;
|
||||
v21.vy = 0;
|
||||
v21.vz = 0;
|
||||
|
||||
CVector v20;
|
||||
v20 = *pVec;
|
||||
v20.vy = this->mPos.vy;
|
||||
|
||||
if (this->field_1F4 > 0)
|
||||
{
|
||||
Trig_GetPosition(&v21, this->field_1F4);
|
||||
v21.vy = this->field_29C;
|
||||
|
||||
if ((!a3 || Utils_CrapDist(v21, v20) < a3) && this->PathCheck(&v21, &v20, 0, 55))
|
||||
{
|
||||
this->field_1F0 = 1;
|
||||
this->field_1B4[0] = v20;
|
||||
this->field_2A8 |= 0x20000000;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (!this->field_1F0)
|
||||
{
|
||||
this->field_1F0 = 1;
|
||||
this->field_1B4[0] = v20;
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i32 i = 0; i<4 && i < this->field_1F0; i++)
|
||||
{
|
||||
if ( (!a3 || Utils_CrapDist(this->field_1B4[i], v20) < a3)
|
||||
&& this->PathCheck(&this->field_1B4[i], &v20, 0, 55))
|
||||
{
|
||||
this->field_1F0 = i + 2;
|
||||
this->field_1B4[i+1] = v20;
|
||||
this->field_2A8 |= 0x20000000;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// @Ok
|
||||
i32 CBaddy::GetNextWaypoint(void)
|
||||
{
|
||||
@ -929,6 +980,7 @@ void validate_CBaddy(void){
|
||||
|
||||
VALIDATE(CBaddy, field_294, 0x294);
|
||||
VALIDATE(CBaddy, field_298, 0x298);
|
||||
VALIDATE(CBaddy, field_29C, 0x29C);
|
||||
|
||||
VALIDATE(CBaddy, field_2A0, 0x2A0);
|
||||
VALIDATE(CBaddy, field_2A4, 0x2A4);
|
||||
|
3
baddy.h
3
baddy.h
@ -47,6 +47,7 @@ public:
|
||||
EXPORT int SmackSpidey(int, CVector*, int, int);
|
||||
EXPORT void RunAppropriateAnim(void);
|
||||
EXPORT i32 GetNextWaypoint(void);
|
||||
EXPORT i32 AddPointToPath(CVector*, i32);
|
||||
|
||||
EXPORT virtual int PlayerIsVisible(int);
|
||||
EXPORT virtual void CreateCombatImpactEffect(CVector*, int);
|
||||
@ -122,7 +123,7 @@ public:
|
||||
|
||||
IntToBytes field_294;
|
||||
IntToBytes field_298;
|
||||
unsigned char padAfter298[0x2A0 - 0x29B - 1];
|
||||
i32 field_29C;
|
||||
|
||||
int field_2A0;
|
||||
int field_2A4;
|
||||
|
12
thug.cpp
12
thug.cpp
@ -796,12 +796,6 @@ void __inline CThug::StandStill(void)
|
||||
}
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
i32 CThug::ShouldFall(i32, i32)
|
||||
{
|
||||
return 0x09062024;
|
||||
}
|
||||
|
||||
// @Ok
|
||||
void CThug::DieAfterFlyingAcrossRoom(void)
|
||||
{
|
||||
@ -862,12 +856,6 @@ void __inline CThug::StopShooting(void)
|
||||
}
|
||||
}
|
||||
|
||||
// @SMALLTODO
|
||||
i32 CThug::AddPointToPath(CVector*, i32)
|
||||
{
|
||||
return 0x09062024;
|
||||
}
|
||||
|
||||
// @Ok
|
||||
i32 CThug::TryAddingCollidePointToPath(CVector* pVector)
|
||||
{
|
||||
|
2
thug.h
2
thug.h
@ -16,11 +16,9 @@ public:
|
||||
EXPORT void RunToWhereTheActionIs(CVector*);
|
||||
EXPORT void PlayHitWallSound(void);
|
||||
EXPORT void StandStill(void);
|
||||
EXPORT i32 ShouldFall(i32, i32);
|
||||
EXPORT void DieAfterFlyingAcrossRoom(void);
|
||||
EXPORT void RunAppropriateHitAnim(void);
|
||||
EXPORT void StopShooting(void);
|
||||
EXPORT i32 AddPointToPath(CVector*, i32);
|
||||
EXPORT i32 TryAddingCollidePointToPath(CVector*);
|
||||
EXPORT void SetHitDirectionFlag(CVector*);
|
||||
EXPORT void SetParamByIndex(i32, i32);
|
||||
|
Loading…
Reference in New Issue
Block a user