static void initStateConditions(fi_state_t* s) { // Only the server is able to figure out the truth values of all the conditions. if(IS_CLIENT) { // Set the presets. s->conditions.secret = false; s->conditions.leave_hub = false; return; } #if __JHEXEN__ s->conditions.secret = false; // Current hub has been completed? s->conditions.leave_hub = (P_GetMapCluster(gameMap) != P_GetMapCluster(nextMap)); # ifdef _DEBUG Con_Message("Infine state condition: leave_hub=%i", s->conditions.leave_hub); # endif #else s->conditions.secret = secretExit; // Only Hexen has hubs. s->conditions.leave_hub = false; #endif }
static void InitStats(void) { int i; int j; int oldCluster; signed int slaughterfrags; int posnum; int slaughtercount; int playercount; char *msgLumpName; int msgSize; int msgLump; extern int LeaveMap; if(!deathmatch) { gametype = SINGLE; HubCount = 0; oldCluster = P_GetMapCluster(gamemap); if(oldCluster != P_GetMapCluster(LeaveMap)) { if(oldCluster >= 1 && oldCluster <= 5) { /*msgLumpName = ClusMsgLumpNames[oldCluster-1]; msgLump = W_GetNumForName(msgLumpName); msgSize = W_LumpLength(msgLump);*/ if(msgSize >= MAX_INTRMSN_MESSAGE_SIZE) { I_Error("Cluster message too long (%s)", msgLumpName); } //W_ReadLump(msgLump, ClusterMessage); strcpy(ClusterMessage, "You have completed the Hexen demo!"); msgSize = 35; // ClusterMessage[msgSize] = 0; // Append terminator HubText = ClusterMessage; HubCount = strlen(HubText)*TEXTSPEED+TEXTWAIT; extern void F_AwardMedal(const int medalId); // MIKE F_AwardMedal(6 + players[consoleplayer].class); S_StartSongName("hub", true); } } }
static void InitStats(void) { int i; int j; int oldCluster; signed int slaughterfrags; int posnum; int slaughtercount; int playercount; char *msgLumpName; int msgSize; int msgLump; extern int LeaveMap; if (!deathmatch) { gametype = SINGLE; HubCount = 0; oldCluster = P_GetMapCluster(gamemap); if (oldCluster != P_GetMapCluster(LeaveMap)) { if (oldCluster >= 1 && oldCluster <= 5) { msgLumpName = ClusMsgLumpNames[oldCluster - 1]; msgLump = W_GetNumForName(msgLumpName); msgSize = W_LumpLength(msgLump); if (msgSize >= MAX_INTRMSN_MESSAGE_SIZE) { I_Error("Cluster message too long (%s)", msgLumpName); } W_ReadLump(msgLump, ClusterMessage); ClusterMessage[msgSize] = 0; // Append terminator HubText = ClusterMessage; HubCount = strlen(HubText) * TEXTSPEED + TEXTWAIT; S_StartSongName("hub", true); } } } else { gametype = DEATHMATCH; slaughterboy = 0; slaughterfrags = -9999; posnum = 0; playercount = 0; slaughtercount = 0; for (i = 0; i < MAXPLAYERS; i++) { totalFrags[i] = 0; if (playeringame[i]) { playercount++; for (j = 0; j < MAXPLAYERS; j++) { if (playeringame[j]) { totalFrags[i] += players[i].frags[j]; } } posnum++; } if (totalFrags[i] > slaughterfrags) { slaughterboy = 1 << i; slaughterfrags = totalFrags[i]; slaughtercount = 1; } else if (totalFrags[i] == slaughterfrags) { slaughterboy |= 1 << i; slaughtercount++; } } if (playercount == slaughtercount) { // don't do the slaughter stuff if everyone is equal slaughterboy = 0; } S_StartSongName("hub", true); } }
static void InitStats(void) { int i; int j; int oldCluster; signed int slaughterfrags; int posnum; int slaughtercount; int playercount; char *msgLumpName; int msgSize; int msgLump; extern int LeaveMap; if (!deathmatch) { gametype = SINGLE; HubCount = 0; oldCluster = P_GetMapCluster(gamemap); if (oldCluster != P_GetMapCluster(LeaveMap)) { if (oldCluster >= 1 && oldCluster <= 5) { #ifdef __ANDROID__ if (gamemode == shareware) { strcpy(ClusterMessage, "having passed the seven portals\n\ which sealed this realm, a vast\n\ domain of harsh wilderness stretches\n\ before you. fire, ice and steel have\n\ tested you, but greater challenges\n\ remain ahead. the dense tangle of\n\ forest surely hides hostile eyes,\n\ but what lies beyond will be worse.\n\ \n\ barren desert, dank swamps and\n\ musty caverns bar your way, but you\n\ cannot let anything keep you from\n\ your fate, even if you might come\n\ to wish that it would. \n\ \n\ and beyond, flickering in the\n\ distance, the ever-shifting walls\n\ of the hypostyle seem to mock\n\ your every effort.\n\ \n\ End of Demo"); //Copied from the retail version HubText = ClusterMessage; HubCount = strlen(HubText) * TEXTSPEED + TEXTWAIT; } else { msgLumpName = ClusMsgLumpNames[oldCluster - 1]; msgLump = W_GetNumForName(msgLumpName); msgSize = W_LumpLength(msgLump); if (msgSize >= MAX_INTRMSN_MESSAGE_SIZE) { I_Error("Cluster message too long (%s)", msgLumpName); } W_ReadLump(msgLump, ClusterMessage); ClusterMessage[msgSize] = 0; // Append terminator HubText = ClusterMessage; HubCount = strlen(HubText) * TEXTSPEED + TEXTWAIT; } #else msgLumpName = ClusMsgLumpNames[oldCluster - 1]; msgLump = W_GetNumForName(msgLumpName); msgSize = W_LumpLength(msgLump); if (msgSize >= MAX_INTRMSN_MESSAGE_SIZE) { I_Error("Cluster message too long (%s)", msgLumpName); } W_ReadLump(msgLump, ClusterMessage); ClusterMessage[msgSize] = 0; // Append terminator HubText = ClusterMessage; HubCount = strlen(HubText) * TEXTSPEED + TEXTWAIT; #endif S_StartSongName("hub", true); }