@@ -38,11 +38,11 @@ public class GameController
3838
3939 private int _keyUp = ( int ) Keys . UpArrow ;
4040 private int _keyDown = ( int ) Keys . DownArrow ;
41- private int _keyStrafeLeft = 'A ' ;
42- private int _keyStrafeRight = 'D ' ;
43- private int _keyFire = ' ' ;
44- private int _keyUse = ( int ) Keys . Enter ;
45- private int _keyStrafe = ( int ) Keys . LAlt ;
41+ private int _keyStrafeLeft = ', ' ;
42+ private int _keyStrafeRight = '. ' ;
43+ private int _keyFire = ( int ) Keys . RCtrl ;
44+ private int _keyUse = ' ' ;
45+ private int _keyStrafe = ( int ) Keys . RAlt ;
4646 private int _keySpeed = ( int ) Keys . RShift ;
4747
4848 private int _mouseButtonFire = 0 ;
@@ -230,6 +230,7 @@ public GameController()
230230
231231 public SkillLevel GameSkill { get ; set ; }
232232 public bool RespawnMonsters { get ; set ; }
233+ public bool RespawnParm { get ; set ; }
233234 public bool FastParm { get ; set ; }
234235 public bool NoMonsters { get ; set ; }
235236 public int GameEpisode { get ; set ; }
@@ -247,7 +248,7 @@ public GameController()
247248
248249 public bool ViewActive { get ; set ; }
249250
250- public bool DeathMatch { get ; set ; }
251+ public int DeathMatch { get ; set ; }
251252 public bool NetGame { get ; set ; } = false ;
252253 public bool [ ] PlayerInGame { get ; } = new bool [ Constants . MaxPlayers ] ;
253254 public Player [ ] Players { get ; } = new Player [ Constants . MaxPlayers ] ;
@@ -615,7 +616,7 @@ private void DoReborn(int player)
615616 Players [ player ] . MapObject ! . Player = null ;
616617
617618 // spawn at random spot if in death match
618- if ( DeathMatch )
619+ if ( DeathMatch != 0 )
619620 {
620621 DeathMatchSpawnPlayer ( player ) ;
621622 return ;
@@ -664,8 +665,9 @@ private void DoPlayDemo()
664665 var skill = ( SkillLevel ) _demoData [ _demoDataIdx ++ ] ;
665666 var episode = _demoData [ _demoDataIdx ++ ] ;
666667 var map = _demoData [ _demoDataIdx ++ ] ;
667- DeathMatch = _demoData [ _demoDataIdx ++ ] != 0 ;
668+ DeathMatch = _demoData [ _demoDataIdx ++ ] ;
668669 var respawnparm = _demoData [ _demoDataIdx ++ ] != 0 ;
670+ RespawnParm = respawnparm ;
669671 FastParm = _demoData [ _demoDataIdx ++ ] != 0 ;
670672 NoMonsters = _demoData [ _demoDataIdx ++ ] != 0 ;
671673 ConsolePlayer = _demoData [ _demoDataIdx ++ ] ;
@@ -702,11 +704,11 @@ public void DoNewGame()
702704 DemoPlayback = false ;
703705 NetDemo = false ;
704706 NetGame = false ;
705- DeathMatch = false ;
707+ DeathMatch = 0 ;
706708 PlayerInGame [ 1 ] = PlayerInGame [ 2 ] = PlayerInGame [ 3 ] = false ;
707- //respawnparm = false;
708- //fastparm = false;
709- //nomonsters = false;
709+ RespawnParm = false ;
710+ FastParm = false ;
711+ NoMonsters = false ;
710712 ConsolePlayer = 0 ;
711713 InitNew ( _d_skill , _d_episode , _d_map ) ;
712714 GameAction = GameAction . Nothing ;
@@ -762,7 +764,7 @@ public void InitNew(SkillLevel skill, int episode, int map)
762764
763765 DoomRandom . ClearRandom ( ) ;
764766
765- if ( skill == SkillLevel . Nightmare || RespawnMonsters )
767+ if ( skill == SkillLevel . Nightmare || RespawnParm )
766768 RespawnMonsters = true ;
767769 else
768770 RespawnMonsters = false ;
@@ -898,7 +900,7 @@ private void BeginRecording()
898900 _demoData [ _demoDataIdx ++ ] = ( byte ) GameSkill ;
899901 _demoData [ _demoDataIdx ++ ] = ( byte ) GameEpisode ;
900902 _demoData [ _demoDataIdx ++ ] = ( byte ) GameMap ;
901- _demoData [ _demoDataIdx ++ ] = ( byte ) ( DeathMatch ? 1 : 0 ) ;
903+ _demoData [ _demoDataIdx ++ ] = ( byte ) DeathMatch ;
902904 _demoData [ _demoDataIdx ++ ] = 0 ; // respawnparam
903905 _demoData [ _demoDataIdx ++ ] = 0 ; // fastparm;
904906 _demoData [ _demoDataIdx ++ ] = 0 ; // nomonsters;
@@ -1005,11 +1007,11 @@ public bool CheckDemoStatus()
10051007 DemoPlayback = false ;
10061008 NetDemo = false ;
10071009 NetGame = false ;
1008- DeathMatch = false ;
1010+ DeathMatch = 0 ;
10091011 PlayerInGame [ 1 ] = PlayerInGame [ 2 ] = PlayerInGame [ 3 ] = false ;
1010- //respawnparm = false;
1011- //fastparm = false;
1012- //nomonsters = false;
1012+ RespawnParm = false ;
1013+ FastParm = false ;
1014+ NoMonsters = false ;
10131015 ConsolePlayer = 0 ;
10141016 DoomGame . Instance . AdvanceDemo ( ) ;
10151017 return true ;
@@ -1112,8 +1114,8 @@ public void P_Ticker()
11121114
11131115 private void RespawnSpecials ( )
11141116 {
1115- // only respawn items in deathmatch
1116- if ( ! DeathMatch )
1117+ // only respawn items in deathmatch 2 (altdeath)
1118+ if ( DeathMatch != 2 )
11171119 {
11181120 return ;
11191121 }
@@ -1423,7 +1425,7 @@ private void P_SpawnPlayer(MapThing mthing)
14231425 P_SetupPlayerSprites ( p ) ;
14241426
14251427 // give all cards in death match mode
1426- if ( DeathMatch )
1428+ if ( DeathMatch != 0 )
14271429 {
14281430 for ( i = 0 ; i < ( int ) KeyCardType . NumberOfKeyCards ; i ++ )
14291431 {
@@ -1661,7 +1663,7 @@ private void P_SpawnMapThing(MapThing mapThing)
16611663 {
16621664 // save spots for respawning in network games
16631665 _playerStarts [ mapThing . Type - 1 ] = mapThing ;
1664- if ( ! DeathMatch )
1666+ if ( DeathMatch == 0 )
16651667 {
16661668 P_SpawnPlayer ( mapThing ) ;
16671669 }
@@ -1696,7 +1698,7 @@ private void P_SpawnMapThing(MapThing mapThing)
16961698 }
16971699
16981700 // don't spawn keycards and players in deathmatch
1699- if ( DeathMatch && ( moInfo . Value . Flags & MapObjectFlag . MF_NOTDMATCH ) != 0 )
1701+ if ( DeathMatch != 0 && ( moInfo . Value . Flags & MapObjectFlag . MF_NOTDMATCH ) != 0 )
17001702 {
17011703 return ;
17021704 }
@@ -4053,7 +4055,7 @@ private void SetupLevel(int episode, int map, int playerMask, SkillLevel skillLe
40534055 P_LoadThings ( lumpNum + MapLumps . Things ) ;
40544056
40554057 // if deathmatch, randomly spawn the active players
4056- if ( DeathMatch )
4058+ if ( DeathMatch != 0 )
40574059 {
40584060 for ( var i = 0 ; i < Constants . MaxPlayers ; i ++ )
40594061 {
@@ -5704,7 +5706,7 @@ public bool HandleEvent(InputEvent currentEvent)
57045706 if ( GameState == GameState . Level &&
57055707 currentEvent . Type == EventType . KeyDown &&
57065708 currentEvent . Data1 == ( int ) Keys . F12 &&
5707- ( SingleDemo || ! DeathMatch ) )
5709+ ( SingleDemo || DeathMatch == 0 ) )
57085710 {
57095711 // spy mode
57105712 do
0 commit comments