CThug::SetAttacker

This commit is contained in:
krystalgamer 2024-07-26 15:58:04 +02:00
parent 5b01606c6b
commit 11251c686b
3 changed files with 29 additions and 2 deletions

11
logger.sh Normal file
View File

@ -0,0 +1,11 @@
ok=$(grep -R "@Ok" *.cpp | wc -l)
notok=$(grep -R "@NotOk" *.cpp | wc -l)
btodo=$(grep -R "@BIGTODO" *.cpp | wc -l)
mtodo=$(grep -R "@MEDIUMTODO" *.cpp | wc -l)
stodo=$(grep -R "@SMALLTODO" *.cpp | wc -l)
echo "@Ok $ok"
echo "@NotOk $notok"
echo "@BIGTODO $btodo"
echo "@MEDIUMTODO $mtodo"
echo "@SMALLTODO $stodo"

View File

@ -10,6 +10,23 @@
#include "spidey.h"
extern CPlayer* MechList;
EXPORT CThug* gGlobalThug;
// @Ok
INLINE void CThug::SetAttacker(void)
{
if (gGlobalThug != this)
{
this->ClearAttackFlags();
if (gGlobalThug)
{
gGlobalThug->ClearAttackFlags();
}
gGlobalThug = this;
this->field_3BC = 1;
}
}
// @Ok
INLINE i32 CThug::SpideyAnimUppercut(void)
@ -700,13 +717,11 @@ void CThugPing::Move(void)
this->Die();
}
static CThug* gGlobalThug;
static unsigned char gAttackFlagRelated;
// @Ok
void CThug::ClearAttackFlags(void)
{
if ( gGlobalThug == this )
{
gGlobalThug = 0;

1
thug.h
View File

@ -36,6 +36,7 @@ public:
EXPORT i32 CanAck(i32, i32, i32, CThug*);
EXPORT i32 WallHitCheck(CVector*, CVector*, i32);
EXPORT i32 SpideyAnimUppercut(void);
EXPORT void SetAttacker(void);
EXPORT virtual void SetThugType(int);