- Changed the encoding for ALL language texfiles to UTF 8

o Now we can also build FUNCTIONAL Polish version with VS 2005 instead of only building with VS 2008/VS 2010

- Multiplayer fixes and improvements
o Increased MP version to v1.9
o Added and info output text when the AI interrupts the pure client, that the game could hang and the server should press ALT + E
o Disabled the possibility, that the server could always give himself the turn with ALT + E. Now when pressing '1' on the dialog instead of giving the server the turn, the dialog closes without any action
o Disabled the possibility, that the server could kick himself from the game when pressing ALT + K and then selecting '1'. The '1' button now cancels the dialog without doing any action.
o Disabled the possibility, that the server could kick a client in the strategy screen
o When client gets kicked from tactical, the game automatically switches to spectator mode for the kicked client
o Disabled Encyclopedia and Briefing room links from the laptop

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4692 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-10-06 16:06:33 +00:00
parent b0697174bc
commit fa2af2de1a
21 changed files with 4640 additions and 4582 deletions
+79 -23
View File
@@ -2412,7 +2412,7 @@ void recieveSETTINGS (RPCParameters *rpcParameters) //recive settings from serve
// Disable Reinforcements
gGameExternalOptions.gfAllowReinforcements = false;
gGameExternalOptions.gfAllowReinforcementsOnlyInCity = false;
// Disable Real-Time Mode
// SANDRO - huh? real-time sneak is in preferences
//gGameExternalOptions.fAllowRealTimeSneak = false;
@@ -4090,12 +4090,18 @@ void UpdateSoldierFromNetwork (RPCParameters *rpcParameters)
void kick_player (void)
{
if(is_server)
{
//manual overide command for server
const STR16 msg = MPClientMessage[74];
{
CHAR16 Cmsg[255];
if (cMaxClients == 2)
swprintf(Cmsg, MPClientMessage[74], client_names[1],"<?>","<?>");
else if (cMaxClients == 3)
swprintf(Cmsg, MPClientMessage[74], client_names[1],client_names[2],"<?>");
else
swprintf(Cmsg, MPClientMessage[74], client_names[1],client_names[2],client_names[3]);
SGPRect CenterRect = { 100, 100, SCREEN_WIDTH - 100, 300 };
DoMessageBox( MSG_BOX_BASIC_STYLE, msg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT, kick_callback, &CenterRect );
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT, kick_callback, &CenterRect );
}
else
ScreenMsg( FONT_LTGREEN, MSG_INTERFACE, MPClientMessage[22] );
@@ -4104,10 +4110,34 @@ void kick_player (void)
void kick_callback (UINT8 ubResult)
{
kickR kick;
kick.ubResult=ubResult+5;
client->RPC("Snull_team",(const char*)&kick, (int)sizeof(kickR)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
if (is_server)
{
// Pressed '1'
if(ubResult ==1)
{
// WANNE: Nothing should happen
}
else
{
if (ubResult <= cMaxClients)
{
kickR kick;
kick.ubResult=ubResult+5;
client->RPC("Snull_team",(const char*)&kick, (int)sizeof(kickR)*8, HIGH_PRIORITY, RELIABLE, 0, UNASSIGNED_SYSTEM_ADDRESS, true, 0, UNASSIGNED_NETWORK_ID,0);
// If the team that should be kicked has the turn, give the turn to the server
if (gTacticalStatus.ubCurrentTeam == kick.ubResult)
{
EndTurn(0);
}
}
else
{
// The client to which we should give the turn doe not exists. Do nothinig!
}
}
}
}
void null_team (RPCParameters *rpcParameters)
@@ -4125,6 +4155,12 @@ void null_team (RPCParameters *rpcParameters)
{
TacticalRemoveSoldier( cnt );
}
if (kick->ubResult==netbTeam)
{
gTacticalStatus.uiFlags |= SHOW_ALL_MERCS;//hayden
ScreenMsg( FONT_YELLOW, MSG_MPSYSTEM, MPClientMessage[41] );
}
}
void overide_turn (void)
@@ -4133,10 +4169,17 @@ void overide_turn (void)
{
//manual overide command for server
CHAR16 Cmsg[255];
swprintf(Cmsg, MPClientMessage[30], client_names[0],client_names[1],client_names[2],client_names[3]);
if (cMaxClients == 2)
swprintf(Cmsg, MPClientMessage[30], client_names[1],"<?>","<?>");
else if (cMaxClients == 3)
swprintf(Cmsg, MPClientMessage[30], client_names[1],client_names[2],"<?>");
else
swprintf(Cmsg, MPClientMessage[30], client_names[1],client_names[2],client_names[3]);
SGPRect CenterRect = { 100, 100, SCREEN_WIDTH - 100, 300 };
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT, turn_callback, &CenterRect );
DoMessageBox( MSG_BOX_BASIC_STYLE, Cmsg, guiCurrentScreen, MSG_BOX_FLAG_FOUR_NUMBERED_BUTTONS | MSG_BOX_FLAG_USE_CENTERING_RECT | MSG_BOX_FLAG_OK, turn_callback, &CenterRect );
}
else
ScreenMsg( FONT_LTGREEN, MSG_INTERFACE, MPClientMessage[22] );
@@ -4145,18 +4188,31 @@ void overide_turn (void)
void turn_callback (UINT8 ubResult)
{
if(is_server)
{
ScreenMsg( FONT_LTGREEN, MSG_INTERFACE, MPClientMessage[31],ubResult );
if(!( gTacticalStatus.uiFlags & INCOMBAT ))
{
gTacticalStatus.uiFlags |= INCOMBAT;
}
{
// Pressed '1'
if(ubResult ==1)
EndTurn( 0 );
{
// WANNE: Nothing should happen. Do not give the turn to the server!
//EndTurn( 0 );
}
else
EndTurn( ubResult+5 );
{
if (ubResult <= cMaxClients)
{
ScreenMsg( FONT_LTGREEN, MSG_INTERFACE, MPClientMessage[31],ubResult );
if(!( gTacticalStatus.uiFlags & INCOMBAT ))
{
gTacticalStatus.uiFlags |= INCOMBAT;
}
EndTurn( ubResult+5 );
}
else
{
// The client to which we should give the turn doe not exists. Do nothinig!
}
}
}
}
@@ -4492,7 +4548,7 @@ void recieve_heal (RPCParameters *rpcParameters)
pSoldier->bBleeding=data->bBleeding;
pSoldier->stats.bLife=data->bLife;
#if BETAVERSION
#ifdef BETAVERSION
ScreenMsg( FONT_LTGREEN, MSG_INTERFACE, L"healing..." );
#endif
}
+1 -1
View File
@@ -185,7 +185,7 @@ extern BOOLEAN fClientReceivedAllFiles;
// OJW - 20090507
// Add basic version checking, will only work from now on
// note: this cannot be longer than char[30]
#define MPVERSION "MP v1.8"
#define MPVERSION "MP v1.9"
// OJW - 2009128 - inline funcs for working with soldiers and teams
// sick of confusing myself :)