mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Implement/match Act2GenActor::VTable0x94 (#1138)
This commit is contained in:
committed by
GitHub
parent
2c10c8e344
commit
0b94b4803b
@@ -1,10 +1,32 @@
|
||||
#include "act2genactor.h"
|
||||
|
||||
#include "legocachesoundmanager.h"
|
||||
#include "legosoundmanager.h"
|
||||
#include "misc.h"
|
||||
#include "mxmisc.h"
|
||||
#include "mxtimer.h"
|
||||
#include "roi/legoroi.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(Act2GenActor, 0x154)
|
||||
|
||||
// STUB: LEGO1 0x10018740
|
||||
MxResult Act2GenActor::VTable0x94(LegoPathActor*, MxBool)
|
||||
// GLOBAL: LEGO1 0x100f0f18
|
||||
MxLong Act2GenActor::g_lastHitActorTime = 0;
|
||||
|
||||
// FUNCTION: LEGO1 0x10018740
|
||||
// FUNCTION: BETA10 0x1000c7a0
|
||||
MxResult Act2GenActor::VTable0x94(LegoPathActor* p_actor, MxBool)
|
||||
{
|
||||
// TODO
|
||||
MxLong time = Timer()->GetTime();
|
||||
MxLong diff = time - g_lastHitActorTime;
|
||||
|
||||
if (strcmp(p_actor->GetROI()->GetName(), "pepper")) {
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
g_lastHitActorTime = time;
|
||||
if (diff > 1000) {
|
||||
SoundManager()->GetCacheSoundManager()->Play("hitactor", NULL, FALSE);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user