Make the parameter isTanker controllable
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
parent
8ca420ec53
commit
118036cdda
1 changed files with 508 additions and 504 deletions
|
@ -70,7 +70,7 @@ void FGAIMultiplayer::bind() {
|
||||||
FGAIBase::bind();
|
FGAIBase::bind();
|
||||||
|
|
||||||
props->tie("refuel/contact", SGRawValuePointer<bool>(&contact));
|
props->tie("refuel/contact", SGRawValuePointer<bool>(&contact));
|
||||||
props->setBoolValue("tanker",isTanker);
|
props->tie("tanker", SGRawValuePointer<bool>(&isTanker));
|
||||||
|
|
||||||
props->tie("controls/invisible",
|
props->tie("controls/invisible",
|
||||||
SGRawValuePointer<bool>(&invisible));
|
SGRawValuePointer<bool>(&invisible));
|
||||||
|
@ -460,16 +460,20 @@ void FGAIMultiplayer::update(double dt)
|
||||||
|
|
||||||
|
|
||||||
if ( isTanker) {
|
if ( isTanker) {
|
||||||
|
//cout << "IS tanker ";
|
||||||
if ( (range_ft2 < 250.0 * 250.0) &&
|
if ( (range_ft2 < 250.0 * 250.0) &&
|
||||||
(y_shift > 0.0) &&
|
(y_shift > 0.0) &&
|
||||||
(elevation > 0.0) ){
|
(elevation > 0.0) ){
|
||||||
// refuel_node->setBoolValue(true);
|
// refuel_node->setBoolValue(true);
|
||||||
|
//cout << "in contact" << endl;
|
||||||
contact = true;
|
contact = true;
|
||||||
} else {
|
} else {
|
||||||
// refuel_node->setBoolValue(false);
|
// refuel_node->setBoolValue(false);
|
||||||
|
//cout << "not in contact" << endl;
|
||||||
contact = false;
|
contact = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
//cout << "NOT tanker " << endl;
|
||||||
contact = false;
|
contact = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue