diff options
author | Matthew Hoops | 2011-09-30 22:44:21 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-09-30 22:44:21 -0400 |
commit | 05c774bb8bca0a166c0656e73802dfc40667e052 (patch) | |
tree | 9480f3417431889a7d7f984f9484816c63d3de77 /engines | |
parent | 9718b8e8036dbdb211e72c6a3d19781d69152230 (diff) | |
download | scummvm-rg350-05c774bb8bca0a166c0656e73802dfc40667e052.tar.gz scummvm-rg350-05c774bb8bca0a166c0656e73802dfc40667e052.tar.bz2 scummvm-rg350-05c774bb8bca0a166c0656e73802dfc40667e052.zip |
PEGASUS: Resolve a couple AI TODO's
Diffstat (limited to 'engines')
-rwxr-xr-x | engines/pegasus/ai/ai_condition.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/pegasus/ai/ai_condition.cpp b/engines/pegasus/ai/ai_condition.cpp index f01d5f9380..8b77d723c6 100755 --- a/engines/pegasus/ai/ai_condition.cpp +++ b/engines/pegasus/ai/ai_condition.cpp @@ -27,6 +27,7 @@ #include "pegasus/energymonitor.h" #include "pegasus/gamestate.h" +#include "pegasus/pegasus.h" #include "pegasus/ai/ai_condition.h" #include "pegasus/items/itemlist.h" #include "pegasus/items/biochips/biochipitem.h" @@ -230,9 +231,7 @@ AICurrentItemCondition::AICurrentItemCondition(const tItemID item) { } bool AICurrentItemCondition::fireCondition() { - // TODO - //InventoryItem *item = ((PegasusEngine *)g_engine)->getCurrentInventoryItem(); - InventoryItem *item = 0; + InventoryItem *item = ((PegasusEngine *)g_engine)->getCurrentInventoryItem(); if (_item == kNoItemID) return item == 0; @@ -245,9 +244,7 @@ AICurrentBiochipCondition::AICurrentBiochipCondition(const tItemID biochip) { } bool AICurrentBiochipCondition::fireCondition() { - // TODO - ///BiochipItem *biochip = ((PegasusEngine *)g_engine)->getCurrentBiochip(); - BiochipItem *biochip = 0; + BiochipItem *biochip = ((PegasusEngine *)g_engine)->getCurrentBiochip(); if (_biochip == kNoItemID) return biochip == 0; @@ -278,8 +275,7 @@ AILastExtraCondition::AILastExtraCondition(const tExtraID lastExtra) { } bool AILastExtraCondition::fireCondition() { - // TODO - return false; + return g_neighborhood && (tExtraID)g_neighborhood->getLastExtra() == _lastExtra; } AICondition *makeLocationAndDoesntHaveItemCondition(const tRoomID room, const tDirectionConstant direction, const tItemID item) { |