[Orxonox-commit 4583] r9254 - code/trunk/src/orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Mon May 28 00:19:55 CEST 2012
Author: landauf
Date: 2012-05-28 00:19:54 +0200 (Mon, 28 May 2012)
New Revision: 9254
Modified:
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
code/trunk/src/orxonox/worldentities/pawns/Pawn.h
Log:
update radar-visibility if the visibility of the pawn itself changes. but don't tie it to the visibility directly (and neither to the activity).
Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc 2012-05-27 22:13:00 UTC (rev 9253)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc 2012-05-27 22:19:54 UTC (rev 9254)
@@ -128,7 +128,7 @@
XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
-
+
XMLPortParam ( RadarViewable, "RVName", setRVName, getRVName, xmlelement, mode );
}
@@ -452,18 +452,12 @@
this->isHumanShip_ = true;
}
- void Pawn::changedActivity(void)
- {
- SUPER(Pawn, changedActivity);
-
- this->setRadarVisibility(this->isVisible());
- }
-
void Pawn::changedVisibility(void)
{
SUPER(Pawn, changedVisibility);
- //this->setVisible(this->isVisible());
- this->setRadarVisibility(this->isVisible());
+
+ // enable proper radarviewability when the visibility is changed
+ this->RadarViewable::settingsChanged();
}
}
Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h 2012-05-27 22:13:00 UTC (rev 9253)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h 2012-05-27 22:19:54 UTC (rev 9254)
@@ -170,9 +170,9 @@
virtual const Vector3& getCarrierPosition(void) const
{ return this->getWorldPosition(); };
- virtual void changedActivity(void); //!< To enable radarviewability when the activity is changed
- virtual void changedVisibility(void); //!< To enable proper radarviewability when the visibility is changed
+ virtual void changedVisibility();
+
protected:
virtual void preDestroy();
More information about the Orxonox-commit
mailing list