[Orxonox-commit 2882] r7585 - in code/branches/lastmanstanding: data/levels src/orxonox/gametypes
jo at orxonox.net
jo at orxonox.net
Tue Oct 26 21:01:48 CEST 2010
Author: jo
Date: 2010-10-26 21:01:48 +0200 (Tue, 26 Oct 2010)
New Revision: 7585
Modified:
code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc
Log:
With collisionshapes. Still problems with collisionshapes and movable entities. Warning Message added. Suddenly a new HUD bug appeared.
Modified: code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw
===================================================================
--- code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw 2010-10-25 21:49:25 UTC (rev 7584)
+++ code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw 2010-10-26 19:01:48 UTC (rev 7585)
@@ -3,9 +3,6 @@
include("hudtemplates3.oxo")
include("templates/lodinformation.oxt")
include("lastmanstandinghud.oxo")
-?>
-
-<?lua
include("templates/spaceship_assff.oxt")
include("templates/spaceship_pirate.oxt")
?>
@@ -34,17 +31,20 @@
<Bot />
<!-- ------------ middle asteroid -------------- -->
- <StaticEntity position="0,20,0">
+ <StaticEntity position="0,20,0" collisionType=static>
<attached>
<Model position="0,0,0" scale=140 mesh="asteroid_UV.mesh" shadow=true />
<!-- ParticleEmitter position="0,0,0" source="Orxonox/Steam" / -->
</attached>
+ <collisionShapes>
+ <SphereCollisionShape radius="145" />
+ </collisionShapes>
</StaticEntity>
-<StaticEntity position="0,0,0" collisionType=static>
+<!--StaticEntity position="0,0,0" collisionType=static>
<collisionShapes>
<SphereCollisionShape radius="145" />
</collisionShapes>
- </StaticEntity>
+ </StaticEntity-->
<!-- ---------------asteroid dome----------------- -->
<?lua
@@ -56,44 +56,59 @@
x = i*10
?>
<?lua
-for k = 1, 25, 1
+for k = 1, 17, 1
do
j = math.random()
?>
- <StaticEntity position="<?lua print(y) ?>,0,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> >
+ <StaticEntity position="<?lua print(y) ?>,0,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
</Model>
</attached>
+ <collisionShapes>
+ <BoxCollisionShape halfExtents="<?lua print(j * 2) ?>,100,<?lua print(j * 2) ?>" position = "0,0,0" />
+ </collisionShapes>
</StaticEntity>
- <StaticEntity position="<?lua print(y) ?>,100,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> >
+ <StaticEntity position="<?lua print(y) ?>,100,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
</Model>
</attached>
+ <collisionShapes>
+ <BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
+ </collisionShapes>
</StaticEntity>#
- <StaticEntity position="<?lua print(y) ?>,200,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> >
+ <StaticEntity position="<?lua print(y) ?>,200,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
</Model>
</attached>
+ <collisionShapes>
+ <BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
+ </collisionShapes>
</StaticEntity>
- <StaticEntity position="<?lua print(y) ?>,-100,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> >
+ <StaticEntity position="<?lua print(y) ?>,-100,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
</Model>
</attached>
+ <collisionShapes>
+ <BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
+ </collisionShapes>
</StaticEntity>
- <StaticEntity position="<?lua print(y) ?>,-200,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> >
+ <StaticEntity position="<?lua print(y) ?>,-200,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
</Model>
</attached>
+ <collisionShapes>
+ <BoxCollisionShape halfExtents="45,100,45" position = "0,0,0" />
+ </collisionShapes>
</StaticEntity>
@@ -101,15 +116,13 @@
<MovableEntity position="<?lua print(y) ?>,300,<?lua print(z) ?>" scale=<?lua print(j * 2.1) ?> pitch="90" roll="180" yaw="<?lua print(-90+i*360/max) ?>" >
<attached>
<Model position="0,0,0" scale=25 mesh="ast6.mesh" shadow=true />
- <!--ParticleEmitter position="0,0,0" source="Orxonox/Steam" /-->
</attached>
-
<!--collisionShapes>
- <BoxCollisionShape position="<?lua print(y) ?>,0,<?lua print(z) ?>" halfExtents="50, 200, 50" />
+ <BoxCollisionShape position="<?lua print(y) ?>,0,<?lua print(z) ?>" halfExtents="5, 5, 5" />
</collisionShapes-->
-
</MovableEntity>
+
<?lua
end
?>
Modified: code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc 2010-10-25 21:49:25 UTC (rev 7584)
+++ code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc 2010-10-26 19:01:48 UTC (rev 7585)
@@ -150,6 +150,7 @@
{
if (!player)
return;
+ this->timeToAct_[player]=timeRemaining+3.0f;//reset timer
//Update: Individual Players "lifes"-HUD
std::map<PlayerInfo*, Player>::iterator it2 = this->players_.find(player);
if (it2 != this->players_.end())
@@ -208,6 +209,11 @@
for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
{
it->second-=dt;
+ if (it->second<timeRemaining/6)//Warning message
+ {
+ const std::string& message = "Camper Warning! Don't forget to shoot.";
+ this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
+ }
if (it->second<0.0f)
{
it->second=timeRemaining+3.0f;//reset timer
More information about the Orxonox-commit
mailing list