ref: fdd60ae9c63381c41a3e2b4f8913ac820e4d25df
parent: 97360a3abbfd12ddb022df342866eebff1d1f932
author: Marc-Alexandre Espiaut <marcalexandre@member.fsf.org>
date: Tue Jun 5 09:34:42 EDT 2018
Removing obsolete battle development code from rt_battl.c
--- a/rott/rt_battl.c
+++ b/rott/rt_battl.c
@@ -131,18 +131,6 @@
int team;
int TeamNumber[ MAXPLAYERCOLORS ];
-#if (BATTLECHECK == 1)
- if ( ( gamestate.teamplay ) && ( BattleMode == battle_Tag ) )
- {
- Error( "BATTLE_Init : Cannot play Tag in team mode.\n" );
- }
-
- if ( ( gamestate.teamplay ) && ( BattleMode == battle_CaptureTheTriad ) )
- {
- Error( "BATTLE_Init : Can only play Capture the Triad in team mode.\n" );
- }
-#endif
-
Timer = 0;
RoundOver = false;
@@ -391,22 +379,6 @@
}
BATTLE_StartRound();
-
-#if (BATTLEINFO == 1)
- SoftError( "GRAVITY = %d\n", GRAVITY );
- SoftError( "BO_Gravity = %d\n", BattleOptions.Gravity );
- SoftError( "BO_Speed = %d\n", BattleOptions.Speed );
- SoftError( "BO_Ammo = %d\n", BattleOptions.Ammo );
- SoftError( "BO_HitPoints = %d\n", BattleOptions.HitPoints );
- SoftError( "BO_Dangers = %d\n", BattleOptions.SpawnDangers );
- SoftError( "BO_Health = %d\n", BattleOptions.SpawnHealth );
- SoftError( "BO_Weapons = %d\n", BattleOptions.SpawnWeapons );
- SoftError( "BO_Respawn = %d\n", BattleOptions.RespawnItems );
- SoftError( "BO_Light = %d\n", BattleOptions.LightLevel );
- SoftError( "BO_Kills = %d\n", BattleOptions.Kills );
- SoftError( "BO_DangerDam = %d\n", BattleOptions.DangerDamage );
- SoftError( "BO_TimeLimit = %d\n", BattleOptions.TimeLimit );
-#endif
}
@@ -606,12 +578,7 @@
if ( ( player < 0 ) || ( player >= MAXPLAYERS ) )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_CheckGameStatus - reason %d : Player out of range!\n",
- reason );
-#else
return( battle_no_event );
-#endif
}
if ( !BATTLEMODE )
@@ -665,10 +632,6 @@
break;
case battle_player_killed :
-#if (BATTLEINFO == 1)
- SoftError( "BATTLE_CheckGameStatus: Player %d Died", player );
- SoftError( "---ticks = %d\n", Timer );
-#endif
switch( BattleMode )
{
@@ -700,11 +663,7 @@
if ( ( BattleMode != battle_Collector ) &&
( BattleMode != battle_Scavenger ) )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_CheckGameStatus : Got collector item on wrong battle mode!" );
-#else
return( battle_no_event );
-#endif
}
BATTLE_Points[ team ]++;
UpdateKills = true;
@@ -725,11 +684,7 @@
if ( BattleMode != battle_Eluder )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_CheckGameStatus : Caught Eluder on non-Eluder battle mode!" );
-#else
return( battle_no_event );
-#endif
}
BATTLE_Points[ team ]++;
@@ -752,11 +707,7 @@
if ( BattleMode != battle_Deluder )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_CheckGameStatus : Shot Eluder on non-Eluder battle mode!" );
-#else
return( battle_no_event );
-#endif
}
BATTLE_Points[ team ]++;
@@ -774,11 +725,7 @@
case battle_captured_triad :
if ( BattleMode != battle_CaptureTheTriad )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_CheckGameStatus : Triad Captured on invalid battle mode!" );
-#else
return( battle_no_event );
-#endif
}
if ( consoleplayer == player )
@@ -798,12 +745,7 @@
break;
default :
-#if (BATTLECHECK == 1)
- Error( "BATTLE_CheckGameStatus called with a reason of %d.",
- reason );
-#else
return( battle_no_event );
-#endif
break;
}
@@ -868,14 +810,6 @@
}
}
-#if (BATTLEINFO == 1)
- for( i = 0; i < BATTLE_NumberOfTeams; i++ )
- {
- SoftError( "Sorted rank %d = player %d : Score = %d\n", i,
- BATTLE_PlayerOrder[ i ], BATTLE_Points[ BATTLE_PlayerOrder[ i ] ] );
- }
-#endif
-
if ( ( SwapFlag == true ) && ( gamestate.ShowScores ) &&
( SHOW_TOP_STATUS_BAR() || SHOW_KILLS() ) )
{
@@ -903,42 +837,19 @@
int killerteam;
int victimteam;
-#if (BATTLEINFO == 1)
- SoftError( "PlayerKilledPlayer:\nMode = %d\n", BattleMode );
- SoftError( "Reason = %d\n", reason );
- SoftError( "killer = %d, team = %d\n", killer, killerteam );
- SoftError( "victim = %d, team = %d\n", victim, victimteam );
- SoftError( "---ticks = %d\n", Timer );
-#endif
-
if ( ( killer < 0 ) || ( killer >= MAXPLAYERS ) )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer - reason %d : Killer out of range!\n",
- reason );
-#else
return( battle_no_event );
-#endif
}
if ( ( victim < 0 ) || ( victim >= MAXPLAYERS ) )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer - reason %d : Victim out of range!\n",
- reason );
-#else
return( battle_no_event );
-#endif
}
if ( ( killer == victim ) && ( reason != battle_kill_with_missile ) &&
( reason != battle_kill_with_missile_in_air ) )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer : Player "
- "killed self with illegal reason of %d.", reason );
-#else
return( battle_no_event );
-#endif
}
killerteam = BATTLE_Team[ killer ];
@@ -947,12 +858,7 @@
if ( ( killerteam < 0 ) || ( killerteam >= BATTLE_NumberOfTeams ) ||
( victimteam < 0 ) || ( victimteam >= BATTLE_NumberOfTeams ) )
{
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer - reason %d : Team out of range!\n",
- reason );
-#else
return( battle_no_event );
-#endif
}
if ( !BATTLEMODE )
@@ -993,12 +899,7 @@
break;
default :
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer called with a reason of %d.",
- reason );
-#else
return( battle_no_event );
-#endif
}
if ( killerteam == victimteam )
@@ -1032,13 +933,6 @@
status = battle_end_game;
}
}
-#if (BATTLECHECK == 1)
- else if ( reason != battle_kill_by_crushing )
- {
- Error( "BATTLE_PlayerKilledPlayer - reason %d : "
- "Illegal reason in Tag!\n", reason );
- }
-#endif
return( status );
}
@@ -1070,12 +964,7 @@
}
break;
default :
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer called with a "
- "reason of %d in Hunter.", reason );
-#else
;
-#endif
}
}
else
@@ -1110,12 +999,7 @@
break;
default :
-#if (BATTLECHECK == 1)
- Error( "BATTLE_PlayerKilledPlayer called with a reason of %d.",
- reason );
-#else
return( battle_no_event );
-#endif
}
}