inline Joint& playerJoint(Person* pplayer, int bodypart){
return pplayer->skeleton.joints[pplayer->skeleton.jointlabels[bodypart]]; }
-inline float sq(float n){ return n*n; }
+inline float sq(float n) { return n*n; }
inline float stepTowardf(float from, float to, float by){
if(fabs(from-to)<by) return to;
LOGFUNC;
LOG(std::string("Loading level...") + name);
+ cout << "Loading level..." << name << endl;
if(!gameon)
visibleloading=1;
gamestarted=1;
numenvsounds=0;
- //visibleloading=1;
+
if(tutoriallevel!=-1)
tutoriallevel=0;
else
if(tutoriallevel==1)
tutorialstage=0;
- if(tutorialstage==0){
+ if(tutorialstage==0) {
tutorialstagetime=0;
tutorialmaxtime=1;
}
int mapvers;
FILE *tfile;
+ char* buff=getcwd(NULL,0);
+ cout << buff << " " << FixedFN << endl;
+ free(buff);
tfile=fopen( FixedFN, "rb" );
- if(tfile){
+ if(tfile) {
+ cout << "existe" << endl;
pause_sound(stream_firesound);
scoreadded=0;
windialogue=0;
emit_sound_np(consolesuccesssound);
freeze=0;
console=false;
+ cout << "console contente" << endl;
}
if(!stealthloading){
if(!firstload)
firstload=1;
+ } else {
+ perror("Soucis");
}
leveltime=0;
loadingstuff=0;
targetlevel=-1;
if(firstload) {
TickOnceAfter();
- Loadlevel(-1);
} else
LoadStuff();
+ Loadlevel(-1);
mainmenu=0;
gameon=1;
c=campaigns.begin();
accountactive->setCurrentCampaign(*c);
}
- if(Mainmenuitems[7])
- glDeleteTextures(1,&Mainmenuitems[7]); // we delete the world texture so load campaign will reload it
- Mainmenuitems[7] = 0;
LoadCampaign();
break;
}
loading=2;
loadtime=0;
targetlevel=selected;
- if(firstload)TickOnceAfter();
- if(!firstload)LoadStuff();
- else Loadlevel(selected);
+ if(firstload)
+ TickOnceAfter();
+ else
+ LoadStuff();
+ Loadlevel(selected);
campaign=0;
mainmenu=0;
// 0 = load next level
// 1 = go back to level select screen
// 2 = stealthload next level
- if(mainmenu==0&&winfreeze&&(campaignlevels[actuallevel].choosenext)==1){
+ if(mainmenu==0&&winfreeze&&(campaignlevels[actuallevel].choosenext)==1) {
if(campaignlevels[actuallevel].nextlevel.empty())
endgame=1;
} else if(mainmenu==0&&winfreeze) {