mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Added missing from ModularizedTacticalAI :/
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6019 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#include "../include/AbstractPlanFactory.h"
|
||||
#include "../../Tactical/Soldier Control.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace AI
|
||||
{
|
||||
namespace tactical
|
||||
{
|
||||
AIInputData::AIInputData(Auditive , int noise_maker, int grid_no, int level, int volume, int type)
|
||||
: noise_maker_(noise_maker),
|
||||
grid_no_(grid_no),
|
||||
level_(level),
|
||||
volume_(volume),
|
||||
type_(type)
|
||||
{
|
||||
event_type_ = auditive_event;
|
||||
}
|
||||
|
||||
AIInputData::AIInputData(Visual, SOLDIERTYPE* opponent, int grid_no, int level, int caller1, int caller2)
|
||||
: opponent_(opponent),
|
||||
grid_no_(grid_no),
|
||||
level_(level),
|
||||
caller1_(caller1),
|
||||
caller2_(caller2)
|
||||
{
|
||||
event_type_ = visual_event;
|
||||
}
|
||||
|
||||
AIInputData::AIInputData()
|
||||
: event_type_(no_event)
|
||||
{
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const AIInputData& i)
|
||||
{
|
||||
if(i.event_type_ == AIInputData::no_event)
|
||||
return os<<"no_event";
|
||||
if(i.event_type_ == AIInputData::auditive_event)
|
||||
return os<<"sound: "<<i.noise_maker_<<" made a sound at "<<i.grid_no_<<", lvl "<<i.level_<<" vol "<<i.volume_<<" type "<<i.type_;
|
||||
if(i.event_type_ == AIInputData::visual_event)
|
||||
return os<<"visual: "<<(int)i.opponent_->ubID<<" was seen at "<<i.grid_no_<<", lvl "<<i.level_<<" caller1 "<<i.caller1_<<" caller2 "<<i.caller2_;
|
||||
return os;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user