mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
BLADERUNNER: Call AI script when clue is received
This commit is contained in:
parent
a4c7992388
commit
54accdffae
@ -1062,7 +1062,11 @@ void Actor::addClueToDatabase(int clueId, int weight, bool clueAcquired, bool un
|
||||
}
|
||||
|
||||
void Actor::acquireClue(int clueId, bool unknownFlag, int fromActorId) {
|
||||
bool hasAlready = hasClue(clueId);
|
||||
_clues->acquire(clueId, unknownFlag, fromActorId);
|
||||
if (!hasAlready) {
|
||||
_vm->_aiScripts->ReceivedClue(_id, clueId, fromActorId);
|
||||
}
|
||||
}
|
||||
|
||||
void Actor::loseClue(int clueId) {
|
||||
|
@ -91,6 +91,15 @@ void AIScripts::CompletedMovementTrack(int actor) {
|
||||
}
|
||||
}
|
||||
|
||||
void AIScripts::ReceivedClue(int actor, int clueId, int fromActorId) {
|
||||
assert(actor < _actorsCount);
|
||||
_inScriptCounter++;
|
||||
if (_AIScripts[actor]) {
|
||||
_AIScripts[actor]->ReceivedClue(clueId, fromActorId);
|
||||
}
|
||||
_inScriptCounter--;
|
||||
}
|
||||
|
||||
void AIScripts::EnteredScene(int actor, int setId) {
|
||||
assert(actor < _actorsCount);
|
||||
_inScriptCounter++;
|
||||
|
@ -104,7 +104,7 @@ DECLARE_SCRIPT(McCoy)
|
||||
float off_45A100;
|
||||
float flt_462710;
|
||||
float flt_462714;
|
||||
|
||||
|
||||
void sub_4053E0();
|
||||
void sub_4054F0();
|
||||
void sub_405660();
|
||||
@ -170,6 +170,7 @@ public:
|
||||
void Update(int actor);
|
||||
void TimerExpired(int actor, int timer);
|
||||
void CompletedMovementTrack(int actor);
|
||||
void ReceivedClue(int actor, int clueId, int fromActorId);
|
||||
void EnteredScene(int actor, int setId);
|
||||
void OtherAgentEnteredThisScene(int actor, int otherActorId);
|
||||
void OtherAgentExitedThisScene(int actor, int otherActorId);
|
||||
|
Loading…
Reference in New Issue
Block a user