[Orxonox-commit 4877] r9546 - code/trunk/src/orxonox/worldentities/pawns

smerkli at orxonox.net smerkli at orxonox.net
Tue Mar 12 15:41:50 CET 2013


Author: smerkli
Date: 2013-03-12 15:41:50 +0100 (Tue, 12 Mar 2013)
New Revision: 9546

Modified:
   code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
Log:
Added a BigExplosion creation to the Pawn constructor.
This loads all the files for the first time and hence
gets rid of the long delay when the first ship is 
killed.


Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2013-03-11 22:17:42 UTC (rev 9545)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2013-03-12 14:41:50 UTC (rev 9546)
@@ -97,6 +97,12 @@
         this->isHumanShip_ = this->hasLocalController();
 
         this->setSyncMode(ObjectDirection::Bidirectional); // needed to synchronise e.g. aimposition
+
+        /* sewper awesome optimization. This loads all the files required for
+         * the big explosion once in the beginning to make sure the game does
+         * not start lagging at the first in-action explosion.
+         */
+        BigExplosion *chunk = new BigExplosion(this->getCreator());
     }
 
     Pawn::~Pawn()




More information about the Orxonox-commit mailing list