[Orxonox-commit 4338] r9009 - in code/branches/presentation2011: data/levels src/modules/weapons/projectiles
jo at orxonox.net
jo at orxonox.net
Tue Dec 20 22:03:15 CET 2011
Author: jo
Date: 2011-12-20 22:03:15 +0100 (Tue, 20 Dec 2011)
New Revision: 9009
Modified:
code/branches/presentation2011/data/levels/presentationHS11.oxw
code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.cc
code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.h
Log:
Quick fix for the rocket. Taking care of this issue later.
Modified: code/branches/presentation2011/data/levels/presentationHS11.oxw
===================================================================
--- code/branches/presentation2011/data/levels/presentationHS11.oxw 2011-12-20 20:39:41 UTC (rev 9008)
+++ code/branches/presentation2011/data/levels/presentationHS11.oxw 2011-12-20 21:03:15 UTC (rev 9009)
@@ -15,7 +15,9 @@
include("templates/spaceshipPirate.oxt")
?>
-<Level>
+<Level
+ gametype = "TeamGametype"
+>
<templates>
<Template link=lodtemplate_default />
</templates>
@@ -27,7 +29,7 @@
>
<Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
- <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+ <TeamSpawnPoint team=0 position="800,700,600" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
<Script code="formationcontroller formationflight true" onLoad="true">
</Script> <!-- activate formation behaviour-->
@@ -35,7 +37,7 @@
<Script code="artificialcontroller setbotlevel 0.1" onLoad="true">
</Script> <!-- make bots "friendly", doesn't work yet :-( -->
- <SpaceShip position="3000,0,5000" lookat="-1300,-600,900" name="attacker" visible="true">
+ <SpaceShip position="1000,-500,2000" lookat="-1300,-600,900" name="attacker" visible="true">
<!--events>
<visibility>
<EventListener event="ondock" />
Modified: code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.cc 2011-12-20 20:39:41 UTC (rev 9008)
+++ code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.cc 2011-12-20 21:03:15 UTC (rev 9009)
@@ -160,7 +160,8 @@
this->BasicProjectile::setShooter(shooter);
this->player_ = this->getShooter()->getPlayer();
- this->getShooter()->getPlayer()->startTemporaryControl(this);
+ if(this->player_)
+ this->player_->startTemporaryControl(this);
if( GameMode::isMaster() )
{
Modified: code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.h
===================================================================
--- code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.h 2011-12-20 20:39:41 UTC (rev 9008)
+++ code/branches/presentation2011/src/modules/weapons/projectiles/Rocket.h 2011-12-20 21:03:15 UTC (rev 9009)
@@ -121,6 +121,7 @@
Vector3 localAngularVelocity_; //!< Variable to temporarily store accumulated steering command input.
WeakPtr<PlayerInfo> player_; //!< The player that controls the Rocket.
+ //WeakPtr<Pawn> pawn_; //!< The pawn that controls the Rocket. TODO
Timer destroyTimer_; //!< Timer to destroy the projectile after its lifetime has run out.
float lifetime_; //!< The time the projectile exists.
More information about the Orxonox-commit
mailing list