mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Merged Multi Player Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2144 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
#endif
|
||||
|
||||
#include "Quest Debug System.h"
|
||||
|
||||
#include "connect.h"
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -188,7 +188,7 @@ BOOLEAN gfNextFireJam = FALSE;
|
||||
|
||||
extern INT16 ITEMDESC_START_X;
|
||||
extern INT16 ITEMDESC_START_Y;
|
||||
|
||||
#include "fresh_header.h"
|
||||
|
||||
//Little functions called by keyboard input
|
||||
void SwapGoggles(SOLDIERTYPE *pTeamSoldier);
|
||||
@@ -1530,7 +1530,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
|
||||
|
||||
/// Allow to save everywhere
|
||||
/// Allow to load everywhere
|
||||
if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == 'l') )
|
||||
{
|
||||
if( InputEvent.usKeyState & ALT_DOWN )
|
||||
@@ -1557,6 +1557,91 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_networked)
|
||||
{
|
||||
|
||||
if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == 's') )//allow saving 'always'//hayden
|
||||
{
|
||||
if( InputEvent.usKeyState & ALT_DOWN )
|
||||
{
|
||||
if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
{
|
||||
//if the game CAN be saved
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
guiPreviousOptionScreen = GAME_SCREEN;
|
||||
//guiPreviousOptionScreen = guiCurrentScreen;
|
||||
DoQuickSave();
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display a message saying the player cant save now
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zNewTacticalMessages[ TCTL_MSG__IRON_MAN_CANT_SAVE_NOW ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_OK, NULL, NULL );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( InputEvent.usKeyState & CTRL_DOWN )
|
||||
{
|
||||
if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
{
|
||||
//if the game CAN be saved
|
||||
if( CanGameBeSaved() )
|
||||
{
|
||||
gfSaveGame = TRUE;
|
||||
gfCameDirectlyFromGame = TRUE;
|
||||
|
||||
guiPreviousOptionScreen = GAME_SCREEN;
|
||||
LeaveTacticalScreen( SAVE_LOAD_SCREEN );
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display a message saying the player cant save now
|
||||
DoMessageBox( MSG_BOX_BASIC_STYLE, zNewTacticalMessages[ TCTL_MSG__IRON_MAN_CANT_SAVE_NOW ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_OK, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == '0') )
|
||||
{
|
||||
//if( InputEvent.usKeyState & ALT_DOWN )
|
||||
{
|
||||
if ( !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
{
|
||||
test_func2();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == 'e') )
|
||||
{
|
||||
if( InputEvent.usKeyState & ALT_DOWN )
|
||||
{
|
||||
if ( !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
{
|
||||
overide_turn();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((InputEvent.usEvent == KEY_DOWN )&& ( InputEvent.usParam == 'k') )
|
||||
{
|
||||
if( InputEvent.usKeyState & ALT_DOWN )
|
||||
{
|
||||
if ( !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
{
|
||||
kick_player();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Break of out IN CONV...
|
||||
@@ -2186,7 +2271,12 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeCurrentSquad( 4 );
|
||||
|
||||
if (is_networked)
|
||||
grid_display();//hayden
|
||||
}
|
||||
break;
|
||||
|
||||
case '6':
|
||||
@@ -2203,10 +2293,16 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
case '9':
|
||||
ChangeCurrentSquad( 8 );
|
||||
|
||||
if (is_networked)
|
||||
cheat_func();
|
||||
break;
|
||||
|
||||
case '0':
|
||||
ChangeCurrentSquad( 9 );
|
||||
|
||||
if (is_networked)
|
||||
//test_func2();
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
@@ -3474,7 +3570,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
if ( fAlt )
|
||||
RemoveCharacterFromSquads(MercPtrs[gusSelectedSoldier]);
|
||||
|
||||
else if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
else if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) && !is_networked)
|
||||
{
|
||||
//if the game CAN be saved
|
||||
if( CanGameBeSaved() )
|
||||
@@ -3495,7 +3591,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
else
|
||||
if( fAlt )
|
||||
{
|
||||
if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
|
||||
if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV )&& !is_networked )
|
||||
{
|
||||
//if the game CAN be saved
|
||||
if( CanGameBeSaved() )
|
||||
|
||||
Reference in New Issue
Block a user