mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 15:48:09 -05:00
PoliceEntity::VTable0x50 (#720)
* PoliceEntity::VTable0x50 * fix * don't hardcode Isle world object id * style --------- Co-authored-by: Ramen2X <rmn@legoisland.org> Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
0295a08c94
commit
313bd9ffd0
2 changed files with 37 additions and 2 deletions
|
@ -20,8 +20,7 @@ class PoliceEntity : public BuildingEntity {
|
||||||
return !strcmp(p_name, PoliceEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
return !strcmp(p_name, PoliceEntity::ClassName()) || BuildingEntity::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x10015310
|
MxLong VTable0x50(MxParam& p_param) override;
|
||||||
MxLong VTable0x50(MxParam& p_param) override { return 0; }
|
|
||||||
|
|
||||||
// SYNTHETIC: LEGO1 0x1000f900
|
// SYNTHETIC: LEGO1 0x1000f900
|
||||||
// PoliceEntity::`scalar deleting destructor'
|
// PoliceEntity::`scalar deleting destructor'
|
||||||
|
|
|
@ -1,3 +1,39 @@
|
||||||
#include "policeentity.h"
|
#include "policeentity.h"
|
||||||
|
|
||||||
|
#include "act1state.h"
|
||||||
|
#include "isle.h"
|
||||||
|
#include "isle_actions.h"
|
||||||
|
#include "islepathactor.h"
|
||||||
|
#include "legoanimationmanager.h"
|
||||||
|
#include "legogamestate.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
#include "legoutils.h"
|
||||||
|
#include "legoworld.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "mxtransitionmanager.h"
|
||||||
|
|
||||||
DECOMP_SIZE_ASSERT(PoliceEntity, 0x68)
|
DECOMP_SIZE_ASSERT(PoliceEntity, 0x68)
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10015310
|
||||||
|
MxLong PoliceEntity::VTable0x50(MxParam& p_param)
|
||||||
|
{
|
||||||
|
if (FUN_1003ef60()) {
|
||||||
|
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
|
||||||
|
|
||||||
|
if (state->GetUnknown18() != 10) {
|
||||||
|
state->SetUnknown18(0);
|
||||||
|
|
||||||
|
if (CurrentActor()->GetActorId() != GameState()->GetActorId()) {
|
||||||
|
CurrentActor()->VTable0xe4();
|
||||||
|
}
|
||||||
|
|
||||||
|
Isle* isle = (Isle*) FindWorld(*g_isleScript, IsleScript::c__Isle);
|
||||||
|
isle->SetDestLocation(LegoGameState::Area::e_police);
|
||||||
|
|
||||||
|
AnimationManager()->FUN_10061010(NULL);
|
||||||
|
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue