This file is part of Lugaru.
-Lugaru is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
+Lugaru is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-This program is distributed in the hope that it will be useful,
+Lugaru is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+along with Lugaru. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Game.h"
void Game::LoadingScreen()
{
static float loadprogress;
- static AbsoluteTime time = {0, 0};
+ //~ static AbsoluteTime time = {0, 0};
static AbsoluteTime frametime = {0, 0};
AbsoluteTime currTime = UpTime ();
double deltaTime = (float) AbsoluteDeltaToDuration (currTime, frametime);
stillloading = 1;
- for (i = 0; i < maxplayers; i++)
- player[i].skeleton.drawmodel.textureptr.destroy();
+ for (auto p:Person::players) {
+ p->skeleton.drawmodel.textureptr.destroy();
+ }
i = abs(Random() % 4);
visibleloading = 0; //don't use loadscreentexture yet
realtexdetail = texdetail;
- numplayers = 1;
-
-
LOG("Loading weapon data...");
Weapon::knifetextureptr.load(":Data:Textures:knife.png", 0, 1);
XYZ moveamount;
moveamount = 0;
moveamount.z = 2;
- for (i = 0; i < player[0].skeleton.num_joints; i++) {
+ for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) {
for (j = 0; j < animation[knifesneakattackanim].numframes; j++) {
animation[knifesneakattackanim].position[i][j] += moveamount;
}
LoadingScreen();
- for (i = 0; i < player[0].skeleton.num_joints; i++) {
+ for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) {
for (j = 0; j < animation[knifesneakattackedanim].numframes; j++) {
animation[knifesneakattackedanim].position[i][j] += moveamount;
}
LoadingScreen();
- for (i = 0; i < player[0].skeleton.num_joints; i++) {
+ for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) {
animation[dead1anim].position[i][1] = animation[dead1anim].position[i][0];
animation[dead2anim].position[i][1] = animation[dead2anim].position[i][0];
animation[dead3anim].position[i][1] = animation[dead3anim].position[i][0];
animation[dead3anim].speed[1] = 0.001;
animation[dead4anim].speed[1] = 0.001;
- for (i = 0; i < player[0].skeleton.num_joints; i++) {
+ for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) {
for (j = 0; j < animation[swordsneakattackanim].numframes; j++) {
animation[swordsneakattackanim].position[i][j] += moveamount;
}
LoadingScreen();
- for (i = 0; i < player[0].skeleton.num_joints; i++) {
+ for (i = 0; i < Person::players[0]->skeleton.num_joints; i++) {
for (j = 0; j < animation[swordsneakattackedanim].numframes; j++) {
animation[swordsneakattackedanim].position[i][j] += moveamount;
}