[Orxonox-commit 7778] r12370 - in code/branches/OrxoBlox_FS19: data/levels data/levels/templates data/overlays src/modules/OrxoBlox
ahuwyler at orxonox.net
ahuwyler at orxonox.net
Thu May 16 13:13:22 CEST 2019
Author: ahuwyler
Date: 2019-05-16 13:13:21 +0200 (Thu, 16 May 2019)
New Revision: 12370
Modified:
code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt
code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h
Log:
We have new template
Modified: code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw
===================================================================
--- code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/data/levels/orxoblox.oxw 2019-05-16 11:13:21 UTC (rev 12370)
@@ -6,7 +6,7 @@
/>
<?lua
- include("HUDTemplates3.oxo")
+
include("stats.oxo")
include("OrxoBloxHUD.oxo")
include("templates/lodInformation.oxt")
Modified: code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt
===================================================================
--- code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/data/levels/templates/spaceshipOrxoBlox.oxt 2019-05-16 11:13:21 UTC (rev 12370)
@@ -6,6 +6,17 @@
spawnparticleduration = 3
explosionchunks = 4
+ health = 10
+ maxhealth = 10
+ initialhealth = 10
+
+ shieldhealth = 20
+ initialshieldhealth = 20
+ maxshieldhealth = 20
+ shieldabsorption = 0.1
+ shieldrechargerate = 1
+ shieldrechargewaittime = 1
+
primaryThrust = 150
auxilaryThrust = 30
rotationThrust = 100
@@ -25,6 +36,9 @@
mass = 4200000
linearDamping = 0.9
angularDamping = 0.9999999
+
+ collisiondamage = 100
+ enablecollisiondamage = true
>
<engines>
@@ -71,14 +85,9 @@
<MultiStateEngine
boostfactor = 2.2
+
defEngineSndNormal = "sounds/Engine_low.ogg"
defEngineSndBoost = "sounds/Engine_high.ogg"
-
- accelerationfront = 700
- accelerationbrake = 700
- accelerationback = 700
- accelerationleftright = 500
- accelerationupdown = 500
>
Modified: code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo
===================================================================
--- code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/data/overlays/OrxoBloxHUD.oxo 2019-05-16 11:13:21 UTC (rev 12370)
@@ -20,5 +20,20 @@
caption = "Points: "
/>
+
</OverlayGroup>
</Template>
+<Template name="spaceshiphud">
+ <OverlayGroup name = "spaceshiphud" scale = "1, 1">
+ <HUDNavigation
+ name = "Navigation"
+ correctaspect = true
+ font = "Monofur"
+ textsize = 0
+ navMarkerSize = 0.06
+ aimMarkerSize = 0
+ healthMarkerSize = 0
+ healthLevelMarkerSize = 0
+ />
+ </OverlayGroup>
+</Template>
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.cc 2019-05-16 11:13:21 UTC (rev 12370)
@@ -172,7 +172,7 @@
// Set variable to temporarily force the player to spawn.
// Set variable to temporarily force the player to spawn.
//bool temp = this->bForceSpawn_;
- this->bForceSpawn_ = true;
+ this->bForceSpawn_ = false;
// Call start for the parent class.
Deathmatch::start();
@@ -306,7 +306,7 @@
int size = someStone->getSize()/2;
if((BallPosition.x - Ball->getRadius() >= StonePosition.x - size && BallPosition.x + Ball->getRadius() <= StonePosition.x + size) &&
(BallPosition.z - Ball->getRadius() >= StonePosition.z - size && BallPosition.z + Ball->getRadius() <= StonePosition.z + size)) {
- orxout() << "FOUND ONE" << endl;
+ //orxout() << "FOUND ONE" << endl;
return someStone;
}
}
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBlox.h 2019-05-16 11:13:21 UTC (rev 12370)
@@ -89,7 +89,7 @@
OrxoBloxCenterpoint* getCenterpoint(void)
{ return this->center_; }
OrxoBloxStones* CheckForCollision(OrxoBloxBall* Ball);
-
+ virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
protected:
private:
void startWall(void);
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxPrereqs.h 2019-05-16 11:13:21 UTC (rev 12370)
@@ -73,6 +73,7 @@
class OrxoBloxWall;
class OrxoBloxStones;
class OrxoBloxScore;
+ class OrxoBloxShip;
}
#endif /* _OrxoBloxPrereqs_H__ */
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.cc 2019-05-16 11:13:21 UTC (rev 12370)
@@ -70,23 +70,12 @@
{
SUPER(OrxoBloxShip, tick, dt);
Vector3 pos = this->getPosition();
+ this->setPosition(pos);
+ }
+ void OrxoBloxShip::boost(bool bBoost)
+ {
}
- OrxoBlox* OrxoBloxShip::getGame()
- {
- if (game == nullptr)
- {
- for (OrxoBlox* race : ObjectList<OrxoBlox>())
- {
- game = race;
- }
- }
- return game;
- }
- void OrxoBloxShip::death()
- {
- SpaceShip::death();
- }
}
Modified: code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h
===================================================================
--- code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h 2019-05-16 10:25:10 UTC (rev 12369)
+++ code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxShip.h 2019-05-16 11:13:21 UTC (rev 12370)
@@ -50,8 +50,10 @@
virtual void tick(float dt) override;
//no rotation in x and z direction!
- virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
+ //virtual void rotatePitch(const Vector2& value) override{}; // Rotate in pitch direction.
+ //Yaw
virtual void rotateRoll(const Vector2& value) override{}; // Rotate in roll direction.
+ virtual void boost(bool boost) override; //Override, so that the ship does not shake
/*Functions that can be helpful while debugging.
- Set a timer so that the function is called for instance every 3s to display the coordinates
@@ -67,7 +69,6 @@
}
protected:
- virtual void death() override;
private:
OrxoBlox* getGame();
More information about the Orxonox-commit
mailing list