mirror of
https://github.com/UberGames/RPG-X2.git
synced 2025-03-22 15:31:15 +00:00
Did some cleanup and added additional cvars
* Additional cvars are to set Damage for each weapons primary and secondary fire
This commit is contained in:
parent
dcf4bf2ee7
commit
600b5a28a3
16 changed files with 13297 additions and 3149 deletions
|
@ -5,7 +5,6 @@
|
|||
|
||||
extern void SP_misc_ammo_station( gentity_t *ent );
|
||||
extern void ammo_station_finish_spawning ( gentity_t *self );
|
||||
extern int borgQueenClientNum;
|
||||
//extern qboolean BG_BorgTransporting( playerState_t *ps );
|
||||
|
||||
static int lastTimedMessage; //TiM - Moved here from g_local.h
|
||||
|
@ -2286,16 +2285,9 @@ void G_Rematerialize( gentity_t *ent )
|
|||
{
|
||||
playerState_t *ps = &ent->client->ps;
|
||||
|
||||
if ( ent->s.number == borgQueenClientNum )
|
||||
{
|
||||
ent->client->teleportTime = level.time + ( 60 * 1000 );
|
||||
ps->stats[STAT_USEABLE_PLACED] = 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->client->teleportTime = level.time + ( 15 * 1000 );
|
||||
ps->stats[STAT_USEABLE_PLACED] = 15;
|
||||
}
|
||||
ent->client->teleportTime = level.time + ( 15 * 1000 );
|
||||
ps->stats[STAT_USEABLE_PLACED] = 15;
|
||||
|
||||
ent->flags &= ~FL_NOTARGET;
|
||||
ent->takedamage = qtrue;
|
||||
ent->r.contents = MASK_PLAYERSOLID;
|
||||
|
|
1624
game/g_client.c
1624
game/g_client.c
File diff suppressed because it is too large
Load diff
|
@ -16,7 +16,6 @@ extern qboolean PlaceDecoy( gentity_t *ent );
|
|||
//static void PM_ForceTorsoAnim( int anim );
|
||||
//static void PM_StartTorsoAnim( int anim );
|
||||
|
||||
extern int borgQueenClientNum;
|
||||
extern int numKilled;
|
||||
extern clInitStatus_t clientInitialStatus[];
|
||||
extern qboolean levelExiting;
|
||||
|
@ -853,11 +852,6 @@ qboolean SetTeam( gentity_t *ent, char *s ) {
|
|||
return qfalse;
|
||||
}
|
||||
|
||||
//replace them if they're the queen
|
||||
if ( borgQueenClientNum != -1 )
|
||||
{
|
||||
G_CheckReplaceQueen( clientNum );
|
||||
}
|
||||
//
|
||||
// execute the team change
|
||||
//
|
||||
|
@ -1187,55 +1181,6 @@ static void Cmd_Team_f( gentity_t *ent ) {
|
|||
|
||||
trap_Argv( 1, s, sizeof( s ) );
|
||||
|
||||
if ( !s[0] || s[0] != 's' )
|
||||
{//not trying to become a spectator
|
||||
/*if ( g_pModElimination.integer )
|
||||
{
|
||||
if ( numKilled > 0 )
|
||||
{
|
||||
if ( ent->client->ps.eFlags & EF_ELIMINATED )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "cp \"You have been eliminated until next round\"" );
|
||||
}
|
||||
else if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to join\"" );
|
||||
}
|
||||
else if ( ent->client->sess.sessionTeam != TEAM_SPECTATOR )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to change teams\"" );
|
||||
}
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
/* if ( g_pModAssimilation.integer )
|
||||
{
|
||||
if ( borgQueenClientNum != -1 && numKilled > 0 )
|
||||
{
|
||||
if ( ent->client->ps.eFlags & EF_ASSIMILATED )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "cp \"You have been assimilated until next round\"" );
|
||||
return;
|
||||
}
|
||||
else if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR )
|
||||
{
|
||||
if ( s[0] == 'r' && borgTeam != TEAM_RED || s[0] == 'b' && borgTeam != TEAM_BLUE )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round or join the Borg\"" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ( ent->client->sess.sessionTeam != TEAM_SPECTATOR )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, "cp \"Wait until next round to change teams\"" );
|
||||
return;
|
||||
}
|
||||
// return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// if they are playing a tournement game, count as a loss
|
||||
if ( g_gametype.integer == GT_TOURNAMENT && sess->sessionTeam == TEAM_FREE )
|
||||
{
|
||||
|
|
120
game/g_combat.c
120
game/g_combat.c
|
@ -5,10 +5,7 @@
|
|||
#include "g_local.h"
|
||||
#include "g_breakable.h" //RPG-X | GSIO01 | 09/05/2009: needed by G_Repair
|
||||
|
||||
extern int actionHeroClientNum;
|
||||
extern int borgQueenClientNum;
|
||||
extern int numKilled;
|
||||
extern void G_RandomActionHero( int ignoreClientNum );
|
||||
extern void SetClass( gentity_t *ent, char *s, char *teamName, qboolean SaveToCvar );
|
||||
|
||||
|
||||
|
@ -761,39 +758,13 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
|||
{
|
||||
if ( meansOfDeath != MOD_RESPAWN )
|
||||
{//just changing class
|
||||
if ( self->s.number == borgQueenClientNum )
|
||||
{
|
||||
numKilled++;
|
||||
AddScore( attacker, -500 );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddScore( attacker, -1 );
|
||||
}
|
||||
AddScore( attacker, -1 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
attacker->client->pers.teamState.frags++;
|
||||
if ( self->s.number == borgQueenClientNum && attacker )
|
||||
{
|
||||
numKilled++;
|
||||
if ( attacker->client )
|
||||
{//killed by opponent
|
||||
AddScore( attacker, 500 );//500 bonus
|
||||
}
|
||||
}
|
||||
else if ( self->s.number == actionHeroClientNum && attacker )
|
||||
{
|
||||
if ( attacker->client )
|
||||
{//killed by opponent
|
||||
AddScore( attacker, 5 );//5 bonus
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddScore( attacker, 1 );
|
||||
}
|
||||
AddScore( attacker, 1 );
|
||||
|
||||
// check for two kills in a short amount of time
|
||||
// if this is close enough to the last kill, give a reward sound
|
||||
|
@ -873,15 +844,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
|||
{
|
||||
if ( meansOfDeath != MOD_RESPAWN )
|
||||
{//not just changing class
|
||||
if ( self->s.number == borgQueenClientNum )
|
||||
{
|
||||
numKilled++;
|
||||
AddScore( self, -500 );
|
||||
}
|
||||
else
|
||||
{
|
||||
AddScore( self, -1 );
|
||||
}
|
||||
AddScore( self, -1 );
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1113,83 +1076,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
|||
deathNum = ( deathNum + 1 ) % 3;
|
||||
|
||||
trap_LinkEntity (self);
|
||||
|
||||
if ( g_pModAssimilation.integer != 0 )
|
||||
{
|
||||
if ( meansOfDeath == MOD_ASSIMILATE )
|
||||
{//Go to Borg team if killed by assimilation
|
||||
if ( attacker && attacker->client && attacker->client->sess.sessionTeam != self->client->sess.sessionTeam )
|
||||
{
|
||||
/*
|
||||
if ( !numKilled )
|
||||
{
|
||||
trap_SendServerCommand( -1, "cp \"Assimilation Has Begun!\"" );
|
||||
}
|
||||
*/
|
||||
numKilled++;
|
||||
self->client->mod = meansOfDeath;
|
||||
AddScore( attacker, 9 );//+ the 1 above = 10 points for an assimilation
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ( g_pModActionHero.integer != 0 )
|
||||
{
|
||||
if ( self->client && self->s.number == actionHeroClientNum )
|
||||
{
|
||||
//Make me no longer a hero... *sniff*...
|
||||
ps->persistant[PERS_CLASS] = self->client->sess.sessionClass = 0;//PC_NOCLASS;
|
||||
ClientUserinfoChanged( self->s.number );
|
||||
|
||||
if ( attacker && attacker->client && attacker != self )
|
||||
{//killer of action hero becomes action hero
|
||||
actionHeroClientNum = attacker->s.number;
|
||||
}
|
||||
else
|
||||
{//other kind of hero death picks a random action hero
|
||||
G_RandomActionHero( actionHeroClientNum );
|
||||
}
|
||||
//respawn the new hero
|
||||
//FIXME: or just give them full health and all the goodies?
|
||||
respawn( &g_entities[actionHeroClientNum] );
|
||||
}
|
||||
}
|
||||
//if ( g_pModElimination.integer != 0 && meansOfDeath != MOD_RESPAWN )
|
||||
//{//in elimination, you get scored by when you died, but knockout just respawns you, not kill you
|
||||
// /*
|
||||
// if ( !numKilled )
|
||||
// {
|
||||
// trap_SendServerCommand( -1, "cp \"Elimination Has Begun!\"" );
|
||||
// }
|
||||
// */
|
||||
// numKilled++;
|
||||
// self->r.svFlags |= SVF_ELIMINATED;
|
||||
// switch ( self->client->sess.sessionTeam )
|
||||
// {
|
||||
// case TEAM_RED:
|
||||
// level.teamScores[TEAM_BLUE]++;
|
||||
// break;
|
||||
// case TEAM_BLUE:
|
||||
// level.teamScores[TEAM_RED]++;
|
||||
// break;
|
||||
// }
|
||||
// //Now increment score for everyone else
|
||||
// if ( g_gametype.integer < GT_TEAM )
|
||||
// {
|
||||
// for ( i = 0; i < MAX_CLIENTS; i++ )
|
||||
// {
|
||||
// if ( &g_entities[i] != NULL && &g_entities[i].client != NULL && g_entities[i].inuse )
|
||||
// {
|
||||
// if ( g_entities[i].client->sess.sessionTeam != TEAM_SPECTATOR && g_entities[i].health > 0 && !(g_entities[i].client->ps.eFlags&EF_ELIMINATED) )
|
||||
// {
|
||||
// SetScore( &g_entities[i], numKilled );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// //RPG-X: Redtechie - No need for player frag rank
|
||||
// //CalculateRanks( qfalse );
|
||||
//}
|
||||
}//RPG-X: RedTechie - End of my if statment for medics revive check
|
||||
}//RPG-X: RedTechie - End of void
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#define LOGGING_WEAPONS
|
||||
|
||||
extern int borgQueenClientNum;
|
||||
/*
|
||||
=================
|
||||
G_LogPrintf
|
||||
|
@ -1032,10 +1031,6 @@ qboolean CalculateUntouchable(gentity_t *ent)
|
|||
int playTime;
|
||||
playTime = (level.time - ent->client->pers.enterTime)/60000;
|
||||
|
||||
if ( g_pModAssimilation.integer && ent->client->ps.clientNum == borgQueenClientNum )
|
||||
{//Borg queen can only be killed once anyway
|
||||
return qfalse;
|
||||
}
|
||||
//------------------------------------------------------ MUST HAVE ACHIEVED 2 KILLS PER MINUTE
|
||||
if ( ((float)ent->client->pers.teamState.frags)/((float)(playTime)) < 2.0 || playTime==0)
|
||||
return qfalse;
|
||||
|
@ -1122,10 +1117,6 @@ qboolean CalculateTactician(gentity_t *ent, int *kills)
|
|||
{//duh, only 1 weapon
|
||||
return qfalse;
|
||||
}
|
||||
if ( g_pModAssimilation.integer && ent->client->ps.clientNum == borgQueenClientNum )
|
||||
{//Borg queen has only 1 weapon
|
||||
return qfalse;
|
||||
}
|
||||
//------------------------------------------------------ MUST HAVE ACHIEVED 2 KILLS PER MINUTE
|
||||
if (playTime<0.3)
|
||||
return qfalse;
|
||||
|
|
268
game/g_main.c
268
game/g_main.c
|
@ -228,6 +228,17 @@ vmCvar_t rpg_TR116Delay; //RPG-X | Marcin | 30/12/2008
|
|||
//! Fire delay for Tricorder alt fire
|
||||
vmCvar_t rpg_altTricorderDelay; //RPG-X | GSIO01 | 14/05/2009
|
||||
|
||||
// Weapon Damage
|
||||
vmCvar_t rpg_rifleDamage;
|
||||
vmCvar_t rpg_rifleAltDamage;
|
||||
vmCvar_t rpg_phaserDamage;
|
||||
vmCvar_t rpg_disruptorDamage;
|
||||
vmCvar_t rpg_grenadeDamage;
|
||||
vmCvar_t rpg_grenadeAltDamage;
|
||||
vmCvar_t rpg_tr116Damage;
|
||||
vmCvar_t rpg_photonDamage;
|
||||
vmCvar_t rpg_photonAltDamage;
|
||||
|
||||
// Motd
|
||||
//! Specifies the message of the day file
|
||||
vmCvar_t rpg_motdFile; //RPG-X | Marcin | 23/12/2008
|
||||
|
@ -628,9 +639,18 @@ static cvarTable_t gameCvarTable[] = {
|
|||
,
|
||||
{ &g_debugLua, "g_debugLua", "0", 0, 0, qfalse },
|
||||
{ &lua_allowedModules, "lua_allowedModules", "", 0, 0, qfalse },
|
||||
{ &lua_modules, "lua_modules", "", 0, 0, qfalse }
|
||||
{ &lua_modules, "lua_modules", "", 0, 0, qfalse },
|
||||
#endif
|
||||
|
||||
{ &rpg_rifleDamage, "rpg_rifleDamage", "75", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_rifleAltDamage, "rpg_rifleAltDamage", "16", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_phaserDamage, "rpg_phaserDamage", "55", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_disruptorDamage, "rpg_disruptorDamage", "80", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_grenadeDamage, "rpg_grenadeDamage", "75", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_grenadeAltDamage, "rpg_grenadeAltDamage", "80", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_tr116Damage, "rpg_tr116Damage", "150", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_photonDamage, "rpg_photonDamage", "140", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &rpg_photonAltDamage, "rpg_photonAltDamage", "140", CVAR_ARCHIVE, 0, qfalse }
|
||||
};
|
||||
|
||||
static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[0] );
|
||||
|
@ -3183,47 +3203,6 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
|
|||
|
||||
}
|
||||
|
||||
extern void G_RestoreClientInitialStatus( gentity_t *ent );
|
||||
extern int borgQueenClientNum;
|
||||
void G_CheckResetAssimilationClients( void )
|
||||
{
|
||||
if ( g_pModAssimilation.integer != 0 )
|
||||
{
|
||||
gentity_t *ent;
|
||||
int i;
|
||||
//clear current queen
|
||||
borgQueenClientNum = -1;
|
||||
//put the assimilated players back on their original team and class
|
||||
for ( i = 0; i < level.maxclients; i++ )
|
||||
{
|
||||
ent = &g_entities[i];
|
||||
if ( ent->client && ent->inuse )
|
||||
{
|
||||
G_RestoreClientInitialStatus( ent );
|
||||
}
|
||||
}
|
||||
//clear borg team
|
||||
borgTeam = initialBorgTeam;
|
||||
}
|
||||
}
|
||||
void EliminationRespawn( gentity_t *ent, char *team );
|
||||
void G_CheckResetEliminationClients( void )
|
||||
{
|
||||
if ( g_pModElimination.integer != 0 )
|
||||
{//no players respawn when in elimination
|
||||
gentity_t *client;
|
||||
int i;
|
||||
|
||||
for ( i = 0; i < level.numConnectedClients; i++ )
|
||||
{
|
||||
client = &g_entities[&level.clients[level.sortedClients[i]] - level.clients];
|
||||
if ( client->team && client->client->sess.sessionTeam == TEAM_SPECTATOR )
|
||||
{
|
||||
EliminationRespawn( client, client->team );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -3231,9 +3210,6 @@ G_ShutdownGame
|
|||
=================
|
||||
*/
|
||||
void G_ShutdownGame( int restart ) {
|
||||
G_CheckResetAssimilationClients();
|
||||
G_CheckResetEliminationClients();
|
||||
|
||||
G_Printf ("==== ShutdownGame ====\n");
|
||||
|
||||
#ifdef G_LUA
|
||||
|
@ -3720,8 +3696,6 @@ void BeginIntermission( void ) {
|
|||
return; // already active
|
||||
}
|
||||
|
||||
G_CheckResetEliminationClients();
|
||||
|
||||
// if in tournament mode, change the wins / losses
|
||||
if ( g_gametype.integer == GT_TOURNAMENT ) {
|
||||
AdjustTournamentScores();
|
||||
|
@ -3812,9 +3786,6 @@ void ExitLevel (void) {
|
|||
level.changemap = NULL;
|
||||
level.intermissiontime = 0;
|
||||
|
||||
//don't reset the bots until after level.intermission is off so that it doesn't send 5 billion score updates
|
||||
G_CheckResetAssimilationClients();
|
||||
|
||||
// we need to do this here before chaning to CON_CONNECTING
|
||||
G_WriteSessionData();
|
||||
|
||||
|
@ -3958,189 +3929,9 @@ and the time everyone is moved to the intermission spot, so you
|
|||
can see the last frag.
|
||||
=================
|
||||
*/
|
||||
extern int borgQueenClientNum;
|
||||
void CheckExitRules( void ) {
|
||||
|
||||
//RPG-X: RedTechie - No exit in RPG Your TRAPED! MHAHAHA
|
||||
return;
|
||||
|
||||
/*int i;
|
||||
gclient_t *cl;
|
||||
|
||||
// if at the intermission, wait for all non-bots to
|
||||
// signal ready, then go to next level
|
||||
if ( level.intermissiontime ) {
|
||||
CheckIntermissionExit ();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.intermissionQueued ) {
|
||||
if ( level.time - level.intermissionQueued >= INTERMISSION_DELAY_TIME ) {
|
||||
level.intermissionQueued = 0;
|
||||
BeginIntermission();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//RPG-X: RedTechie - hihohiho is off to commenting out warmup code i go
|
||||
//if ( g_doWarmup.integer )
|
||||
//{
|
||||
// if ( level.warmupTime != 0 )
|
||||
// {
|
||||
// if ( level.warmupTime < 0 || level.time - level.startTime <= level.warmupTime )
|
||||
// {//don't win until warmup is done
|
||||
// if ( g_pModAssimilation.integer != 0 || g_pModElimination.integer != 0 )
|
||||
// {
|
||||
// numKilled = 0;
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// check for sudden death
|
||||
if ( ScoreIsTied() && g_pModAssimilation.integer == 0 && g_pModElimination.integer == 0 )
|
||||
{
|
||||
// always wait for sudden death
|
||||
return;
|
||||
}
|
||||
|
||||
if ( g_timelimit.integer && !level.warmupTime && g_pModAssimilation.integer == 0 && g_pModElimination.integer == 0 )
|
||||
{
|
||||
if ( level.time - level.startTime >= g_timelimit.integer*60000 )
|
||||
{
|
||||
trap_SendServerCommand( -1, "print \"Timelimit hit.\n\"");
|
||||
G_LogExit( "Timelimit hit." );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( level.numPlayingClients < 2 )
|
||||
{
|
||||
//not enough players
|
||||
if ( g_pModAssimilation.integer != 0 || g_pModElimination.integer != 0 )
|
||||
{
|
||||
numKilled = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ( g_pModAssimilation.integer != 0 )
|
||||
{//check assimilation rules
|
||||
if ( level.numConnectedClients > 1 && numKilled > 0 )
|
||||
{
|
||||
gclient_t *survivor = NULL;
|
||||
|
||||
if ( borgQueenClientNum != -1 )
|
||||
{//see if borg queen is dead first
|
||||
if ( g_entities[borgQueenClientNum].health <= 0 )
|
||||
{//the queen is dead!
|
||||
//FIXME: What if the queen disconnects somehow...? Shouldn't be possible
|
||||
G_LogExit( "The Borg Queen has been killed!" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//See if only one player remains alive, if so, end it.
|
||||
for ( i = 0; i < level.maxclients; i++ )
|
||||
{
|
||||
cl = &level.clients[i];
|
||||
if ( cl->pers.connected == CON_CONNECTED && cl->sess.sessionTeam != TEAM_SPECTATOR && cl->sess.sessionClass != PC_BORG )
|
||||
{
|
||||
survivor = cl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( survivor == NULL )
|
||||
{
|
||||
G_LogExit( "Assimilation Complete." );
|
||||
return;
|
||||
}
|
||||
}
|
||||
//don't check anything else
|
||||
return;
|
||||
}
|
||||
|
||||
if ( g_pModElimination.integer != 0 )
|
||||
{//check elimination rules
|
||||
gclient_t *survivor = NULL;
|
||||
//See if only one player remains alive, if so, end it.
|
||||
if ( level.numConnectedClients > 1 && numKilled > 0 )
|
||||
{
|
||||
for ( i = 0; i < level.numConnectedClients; i++ )
|
||||
{
|
||||
cl = &level.clients[ level.sortedClients[i] ];
|
||||
if ( cl->sess.sessionTeam != TEAM_SPECTATOR && !(cl->ps.eFlags&EF_ELIMINATED) )
|
||||
{
|
||||
if ( survivor != NULL )
|
||||
{
|
||||
if ( g_gametype.integer < GT_TEAM || cl->sess.sessionTeam != survivor->sess.sessionTeam )
|
||||
{//not in a team game or survivor is on same team as previously found survivor, keep looking
|
||||
survivor = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
survivor = cl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( survivor != NULL )
|
||||
{
|
||||
G_LogExit( "Last Man Standing." );
|
||||
}
|
||||
//don't check anything else
|
||||
return;
|
||||
}
|
||||
|
||||
if ( g_gametype.integer != GT_CTF && g_fraglimit.integer )
|
||||
{//check fraglimit
|
||||
if ( level.teamScores[TEAM_RED] >= g_fraglimit.integer ) {
|
||||
trap_SendServerCommand( -1, "print \"Red hit the point limit.\n\"" );
|
||||
G_LogExit( "Fraglimit hit." );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamScores[TEAM_BLUE] >= g_fraglimit.integer ) {
|
||||
trap_SendServerCommand( -1, "print \"Blue hit the point limit.\n\"" );
|
||||
G_LogExit( "Fraglimit hit." );
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i=0 ; i< g_maxclients.integer ; i++ ) {
|
||||
cl = level.clients + i;
|
||||
if ( cl->pers.connected != CON_CONNECTED ) {
|
||||
continue;
|
||||
}
|
||||
if ( cl->sess.sessionTeam != TEAM_FREE ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( cl->ps.persistant[PERS_SCORE] >= g_fraglimit.integer ) {
|
||||
G_LogExit( "Fraglimit hit." );
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " hit the point limit.\n\"",
|
||||
cl->pers.netname ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( g_gametype.integer == GT_CTF && g_capturelimit.integer )
|
||||
{//check CTF
|
||||
if ( level.teamScores[TEAM_RED] >= g_capturelimit.integer ) {
|
||||
trap_SendServerCommand( -1, "print \"Red hit the capturelimit.\n\"" );
|
||||
G_LogExit( "Capturelimit hit." );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( level.teamScores[TEAM_BLUE] >= g_capturelimit.integer ) {
|
||||
trap_SendServerCommand( -1, "print \"Blue hit the capturelimit.\n\"" );
|
||||
G_LogExit( "Capturelimit hit." );
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -4376,10 +4167,7 @@ Advances the non-player objects in the world
|
|||
extern void SetClass( gentity_t *ent, char *s, char *teamName, qboolean SaveToCvar );
|
||||
void DragCheck( void ); //RPG-X: J2J - Added to rid warning.
|
||||
void CheckHealthInfoMessage( void );
|
||||
extern void G_PickBorgQueen( void );
|
||||
extern void INeedAHero( void );
|
||||
extern qboolean levelExiting;
|
||||
extern int actionHeroClientNum;
|
||||
void G_RunFrame( int levelTime ) {
|
||||
int i;
|
||||
gentity_t *ent;
|
||||
|
@ -4507,20 +4295,6 @@ start = trap_Milliseconds();
|
|||
// for tracking changes
|
||||
CheckCvars();
|
||||
|
||||
if ( !levelExiting )
|
||||
{
|
||||
//keep looking for a borgQueen if we don't have one yet
|
||||
if ( borgQueenClientNum == -1 )
|
||||
{
|
||||
G_PickBorgQueen();
|
||||
}
|
||||
//keep looking for an actionHero if we don't have one yet
|
||||
if ( actionHeroClientNum == -1 )
|
||||
{
|
||||
INeedAHero();
|
||||
}
|
||||
}
|
||||
|
||||
//RPG-X: RedTechie - Count down our shake camera timer
|
||||
//TiM: NOT NECESSARY
|
||||
/*if(rpg_servershakeallclients.integer == 1){
|
||||
|
|
|
@ -13,7 +13,6 @@ and tournament restarts.
|
|||
=======================================================================
|
||||
*/
|
||||
|
||||
extern int borgQueenClientNum;
|
||||
extern int numKilled;
|
||||
|
||||
/*
|
||||
|
@ -85,68 +84,43 @@ void G_InitSessionData( gclient_t *client, char *userinfo ) {
|
|||
|
||||
sess = &client->sess;
|
||||
|
||||
// initial team determination
|
||||
/*if ( g_gametype.integer >= GT_TEAM )
|
||||
{//Team holomatch or CTF
|
||||
if ( g_teamAutoJoin.integer && !(g_team_group_red.string[0] || g_team_group_blue.string[0]) ) {
|
||||
if ( g_pModElimination.integer && numKilled > 0 )
|
||||
{//elim game already in progress
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
}
|
||||
else if ( g_pModAssimilation.integer && borgQueenClientNum != -1 && numKilled > 0 )
|
||||
{//assim game already in progress
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
sess->sessionTeam = PickTeam( -1 );
|
||||
BroadcastTeamChange( client, -1 );
|
||||
}
|
||||
} else {
|
||||
// always spawn as spectator in team games
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
}
|
||||
}
|
||||
else */
|
||||
{//FFA, tournament or sp
|
||||
value = Info_ValueForKey( userinfo, "team" );
|
||||
if ( value[0] == 's' ) {
|
||||
// a willing spectator, not a waiting-in-line
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
} else {
|
||||
switch ( g_gametype.integer ) {
|
||||
default:
|
||||
case GT_FFA:
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
break;
|
||||
case GT_SINGLE_PLAYER:
|
||||
value = Info_ValueForKey( userinfo, "team" );
|
||||
if ( value[0] == 's' ) {
|
||||
// a willing spectator, not a waiting-in-line
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
} else {
|
||||
switch ( g_gametype.integer ) {
|
||||
default:
|
||||
case GT_FFA:
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
break;
|
||||
case GT_SINGLE_PLAYER:
|
||||
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
|
||||
//RPG-X: RedTechie - Not sure we need this
|
||||
/*if ( g_maxGameClients.integer > 0 &&
|
||||
level.numNonSpectatorClients >= g_maxGameClients.integer ) {
|
||||
//RPG-X: RedTechie - Not sure we need this
|
||||
/*if ( g_maxGameClients.integer > 0 &&
|
||||
level.numNonSpectatorClients >= g_maxGameClients.integer ) {
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
} else {
|
||||
if ( g_pModElimination.integer && numKilled > 0 )
|
||||
{//game already in progress
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
} else {
|
||||
if ( g_pModElimination.integer && numKilled > 0 )
|
||||
{//game already in progress
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
}
|
||||
else
|
||||
{
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
}
|
||||
}*/
|
||||
break;
|
||||
case GT_TOURNAMENT:
|
||||
// if the game is full, go into a waiting mode
|
||||
if ( level.numNonSpectatorClients >= 2 ) {
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
}
|
||||
break;
|
||||
}*/
|
||||
break;
|
||||
case GT_TOURNAMENT:
|
||||
// if the game is full, go into a waiting mode
|
||||
if ( level.numNonSpectatorClients >= 2 ) {
|
||||
sess->sessionTeam = TEAM_SPECTATOR;
|
||||
} else {
|
||||
sess->sessionTeam = TEAM_FREE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
team_t initialBorgTeam = TEAM_FREE;
|
||||
int borgQueenStartPoint = ENTITYNUM_NONE;
|
||||
extern int borgQueenClientNum;
|
||||
|
||||
typedef enum _flag_status {
|
||||
FLAG_ATBASE = 0,
|
||||
|
@ -677,7 +676,7 @@ gentity_t *SelectRandomTeamSpawnPoint( gentity_t *ent, int teamstate, team_t tea
|
|||
gentity_t *spots[MAX_TEAM_SPAWN_POINTS];
|
||||
char *classname;
|
||||
|
||||
if (teamstate == TEAM_BEGIN||ent->s.number == borgQueenClientNum) {
|
||||
if (teamstate == TEAM_BEGIN) {
|
||||
if (team == TEAM_RED)
|
||||
classname = "team_CTF_redplayer";
|
||||
else if (team == TEAM_BLUE)
|
||||
|
@ -697,19 +696,7 @@ gentity_t *SelectRandomTeamSpawnPoint( gentity_t *ent, int teamstate, team_t tea
|
|||
spot = NULL;
|
||||
|
||||
while ((spot = G_Find (spot, FOFS(classname), classname)) != NULL) {
|
||||
if ( teamstate == TEAM_BEGIN || ent->s.number == borgQueenClientNum ) {//just starting
|
||||
if ( spot->s.number == borgQueenStartPoint ) {
|
||||
//Borg queen only
|
||||
if ( ent->s.number != borgQueenClientNum ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if ( borgQueenStartPoint != ENTITYNUM_NONE && ent->s.number == borgQueenClientNum ) {
|
||||
//she must start on the right spot
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( teamstate != TEAM_BEGIN) {
|
||||
if ( spot->spawnflags & 1 ) {
|
||||
//not an active spawn point
|
||||
continue;
|
||||
|
|
|
@ -796,7 +796,6 @@ Kills all entities that would touch the proposed new positioning
|
|||
of ent. Ent should be unlinked before calling this!
|
||||
=================
|
||||
*/
|
||||
extern int borgQueenClientNum;
|
||||
void G_KillBox (gentity_t *ent) {
|
||||
int i, num;
|
||||
int touch[MAX_GENTITIES];
|
||||
|
@ -813,13 +812,6 @@ void G_KillBox (gentity_t *ent) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( g_pModAssimilation.integer && touch[i] == borgQueenClientNum )
|
||||
{//kill me instead
|
||||
G_Damage ( ent, hit, hit, NULL, NULL,
|
||||
100000, DAMAGE_NO_PROTECTION, MOD_TELEFRAG);
|
||||
return;
|
||||
}
|
||||
|
||||
// nail it
|
||||
G_Damage ( hit, ent, ent, NULL, NULL,
|
||||
100000, DAMAGE_NO_PROTECTION, MOD_TELEFRAG);
|
||||
|
|
|
@ -8,68 +8,54 @@
|
|||
|
||||
extern void G_MissileImpact( gentity_t *ent, trace_t *trace);
|
||||
|
||||
extern int borgQueenClientNum;
|
||||
|
||||
#define MAX_BEAM_HITS 4
|
||||
|
||||
#define DMG_VAR (flrandom(0.8,1.2))
|
||||
|
||||
|
||||
// Weapon damages are located up here for easy access...
|
||||
extern vmCvar_t rpg_rifleDamage;
|
||||
extern vmCvar_t rpg_rifleAltDamage;
|
||||
extern vmCvar_t rpg_phaserDamage;
|
||||
extern vmCvar_t rpg_disruptorDamage;
|
||||
extern vmCvar_t rpg_grenadeDamage;
|
||||
extern vmCvar_t rpg_grenadeAltDamage;
|
||||
extern vmCvar_t rpg_tr116Damage;
|
||||
extern vmCvar_t rpg_photonDamage;
|
||||
extern vmCvar_t rpg_photonAltDamage;
|
||||
|
||||
// Phaser
|
||||
#define PHASER_DAMAGE 55 //4 //RPG-X: TiM - Increased to a standard 0.5 second burst - Phenix GOING DOWN - TiM GOING UP we had complaints when this was put down :P //2
|
||||
#define PHASER_DAMAGE rpg_phaserDamage.integer //4 //RPG-X: TiM - Increased to a standard 0.5 second burst - Phenix GOING DOWN - TiM GOING UP we had complaints when this was put down :P //2
|
||||
#define PHASER_ALT_RADIUS 80 //12 //RPG-X: TiM - Increased to a near instant kill
|
||||
|
||||
// Compression Rifle
|
||||
#define CRIFLE_DAMAGE 75 //10 // 20 //RPG-X: TiM - Increased to 2 hits kill (needs debate like TR-116 :P ) //20
|
||||
#define CRIFLE_DAMAGE rpg_rifleDamage.integer //10 // 20 //RPG-X: TiM - Increased to 2 hits kill (needs debate like TR-116 :P ) //20
|
||||
#define CRIFLE_MAIN_SPLASH_RADIUS 64
|
||||
#define CRIFLE_MAIN_SPLASH_DMG 0//16 // 20
|
||||
#define CRIFLE_ALTDAMAGE 16 //85 // 100
|
||||
#define CRIFLE_ALTDAMAGE rpg_rifleAltDamage.integer //85 // 100
|
||||
#define CRIFLE_ALT_SPLASH_RADIUS 32
|
||||
#define CRIFLE_ALT_SPLASH_DMG 0//10
|
||||
|
||||
// Imod
|
||||
#define IMOD_DAMAGE 10 // 32
|
||||
#define IMOD_ALT_DAMAGE 10
|
||||
|
||||
// Scavenger Rifle
|
||||
#define SCAV_DAMAGE 8 // 16
|
||||
#define SCAV_ALT_DAMAGE 60 // 60
|
||||
#define SCAV_ALT_SPLASH_RAD 100
|
||||
#define SCAV_ALT_SPLASH_DAM 60 // 60
|
||||
|
||||
// Stasis Weapon
|
||||
#define STASIS_DAMAGE 80 // 15 //7 //RPG-X: TiM - Increased to 2 hits kill (needs debate like TR-116 :P ) //15
|
||||
#define STASIS_ALT_DAMAGE 7 // 40
|
||||
#define STASIS_ALT_DAMAGE2 7 // 20
|
||||
#define STASIS_DAMAGE rpg_disruptorDamage.integer // 15 //7 //RPG-X: TiM - Increased to 2 hits kill (needs debate like TR-116 :P ) //15
|
||||
|
||||
// Grenade Launcher
|
||||
#define GRENADE_DAMAGE 75 // 100
|
||||
#define GRENADE_DAMAGE rpg_grenadeDamage.integer // 100
|
||||
#define GRENADE_SPLASH_RAD 190 //RPG-X: RedTechie - Before 160
|
||||
#define GRENADE_SPLASH_DAM 100 //RPG-X: RedTechie - Before 75
|
||||
#define GRENADE_ALT_DAMAGE 80 //RPG-X: RedTechie - Before 64
|
||||
#define GRENADE_ALT_DAMAGE rpg_grenadeAltDamage.integer //RPG-X: RedTechie - Before 64
|
||||
|
||||
// Tetrion Disruptor
|
||||
#define TETRION_DAMAGE 150 //RPG-X: J2J - Increased for one shot one kill (needs debate)
|
||||
#define TETRION_ALT_DAMAGE 17 //RPG-X: J2J - Not used anymore for TR-116
|
||||
#define TETRION_DAMAGE rpg_tr116Damage.integer //RPG-X: J2J - Increased for one shot one kill (needs debate)
|
||||
|
||||
// Quantum Burst
|
||||
#define QUANTUM_DAMAGE 140 // 85 // 100
|
||||
#define QUANTUM_SPLASH_DAM 140 // 85 // 128
|
||||
#define QUANTUM_DAMAGE rpg_photonDamage.integer // 85 // 100
|
||||
#define QUANTUM_SPLASH_DAM rpg_photonDamage.integer // 85 // 128
|
||||
#define QUANTUM_SPLASH_RAD 160
|
||||
#define QUANTUM_ALT_DAMAGE 140 // 75 // 100
|
||||
#define QUANTUM_ALT_SPLASH_DAM 140 // 75 // 128
|
||||
#define QUANTUM_ALT_DAMAGE rpg_photonAltDamage.integer // 75 // 100
|
||||
#define QUANTUM_ALT_SPLASH_DAM rpg_photonAltDamage.integer // 75 // 128
|
||||
#define QUANTUM_ALT_SPLASH_RAD 80
|
||||
|
||||
// Dreadnought Weapon
|
||||
#define DREADNOUGHT_DAMAGE 8 // 6
|
||||
#define DREADNOUGHT_WIDTH 9 // 12
|
||||
#define DREADNOUGHT_ALTDAMAGE 35 // 40
|
||||
|
||||
// Borg Weapon
|
||||
#define BORG_PROJ_DAMAGE 20
|
||||
#define BORG_TASER_DAMAGE 15
|
||||
|
||||
/*
|
||||
======================
|
||||
SnapVectorTowards
|
||||
|
@ -209,7 +195,7 @@ void WP_FirePhaser( gentity_t *ent, qboolean alt_fire )
|
|||
if ( traceEnt->takedamage && rpg_phaserdmg.integer != 0 )
|
||||
{
|
||||
// damage = (float)PHASER_DAMAGE*DMG_VAR*s_quadFactor; // No variance on phaser
|
||||
damage = (float)PHASER_DAMAGE*s_quadFactor;
|
||||
damage = (float)PHASER_DAMAGE;
|
||||
|
||||
if (trEntFraction[i] <= PHASER_POINT_BLANK_FRAC)
|
||||
{ // Point blank! Do up to double damage.
|
||||
|
@ -279,7 +265,7 @@ void FirePrifleBullet( gentity_t *ent, vec3_t start, vec3_t dir )
|
|||
}
|
||||
|
||||
if( rpg_rifledmg.integer != 0 )
|
||||
bolt->damage = CRIFLE_DAMAGE*DMG_VAR*s_quadFactor;
|
||||
bolt->damage = CRIFLE_DAMAGE*DMG_VAR;
|
||||
else
|
||||
bolt->damage = 0;
|
||||
|
||||
|
@ -354,7 +340,7 @@ void WP_FireCompressionRifle ( gentity_t *ent, qboolean alt_fire )
|
|||
if ( traceEnt->takedamage && rpg_phaserdmg.integer != 0 )
|
||||
{
|
||||
// damage = (float)PHASER_DAMAGE*DMG_VAR*s_quadFactor; // No variance on phaser
|
||||
damage = (float)PHASER_DAMAGE*s_quadFactor;
|
||||
damage = (float)PHASER_DAMAGE;
|
||||
|
||||
if (tr.fraction <= PHASER_POINT_BLANK_FRAC)
|
||||
{ // Point blank! Do up to double damage.
|
||||
|
@ -423,7 +409,7 @@ void FireDisruptorMissile( gentity_t *ent, vec3_t origin, vec3_t dir, int size )
|
|||
bolt->parent = ent;
|
||||
if ( rpg_stasisdmg.integer != 0 )
|
||||
{
|
||||
bolt->damage = /*size */ STASIS_DAMAGE*DMG_VAR*s_quadFactor;
|
||||
bolt->damage = /*size */ STASIS_DAMAGE*DMG_VAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -622,7 +608,7 @@ void WP_FireDisruptor( gentity_t *ent, qboolean alt_fire )
|
|||
if ( traceEnt->takedamage && rpg_phaserdmg.integer != 0 )
|
||||
{
|
||||
// damage = (float)PHASER_DAMAGE*DMG_VAR*s_quadFactor; // No variance on phaser
|
||||
damage = (float)PHASER_DAMAGE*s_quadFactor;
|
||||
damage = (float)PHASER_DAMAGE;
|
||||
|
||||
if (tr.fraction <= PHASER_POINT_BLANK_FRAC)
|
||||
{ // Point blank! Do up to double damage.
|
||||
|
@ -857,7 +843,7 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
|
|||
}
|
||||
//now make the new one
|
||||
grenade->classname = "tripwire";
|
||||
grenade->splashDamage = GRENADE_SPLASH_DAM*2*s_quadFactor;
|
||||
grenade->splashDamage = GRENADE_SPLASH_DAM*2;
|
||||
grenade->splashRadius = GRENADE_SPLASH_RAD*2;
|
||||
grenade->s.pos.trType = TR_LINEAR;
|
||||
grenade->nextthink = level.time + 1000; // How long 'til she blows
|
||||
|
@ -868,7 +854,7 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
|
|||
else
|
||||
{
|
||||
grenade->classname = "grenade_alt_projectile";
|
||||
grenade->splashDamage = GRENADE_SPLASH_DAM*s_quadFactor;
|
||||
grenade->splashDamage = GRENADE_SPLASH_DAM;
|
||||
grenade->splashRadius = GRENADE_SPLASH_RAD;//*s_quadFactor;
|
||||
grenade->s.pos.trType = TR_GRAVITY;
|
||||
grenade->nextthink = level.time + GRENADE_ALT_TIME; // How long 'til she blows
|
||||
|
@ -877,7 +863,7 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
|
|||
grenade->s.eFlags |= EF_MISSILE_STICK;
|
||||
VectorScale( dir, 1000/*GRENADE_ALT_VELOCITY*/, grenade->s.pos.trDelta );
|
||||
|
||||
grenade->damage = GRENADE_ALT_DAMAGE*DMG_VAR*s_quadFactor;
|
||||
grenade->damage = GRENADE_ALT_DAMAGE*DMG_VAR;
|
||||
grenade->methodOfDeath = MOD_GRENADE_ALT;
|
||||
grenade->splashMethodOfDeath = MOD_GRENADE_ALT_SPLASH;
|
||||
grenade->s.eType = ET_ALT_MISSILE;
|
||||
|
@ -1036,8 +1022,8 @@ void WP_FireGrenade( gentity_t *ent, qboolean alt_fire )
|
|||
VectorScale( dir, GRENADE_VELOCITY, grenade->s.pos.trDelta );
|
||||
grenade->s.pos.trType = TR_GRAVITY;
|
||||
|
||||
grenade->damage = GRENADE_DAMAGE*DMG_VAR*s_quadFactor;
|
||||
grenade->splashDamage = GRENADE_SPLASH_DAM*s_quadFactor;
|
||||
grenade->damage = GRENADE_DAMAGE*DMG_VAR;
|
||||
grenade->splashDamage = GRENADE_SPLASH_DAM;
|
||||
grenade->splashRadius = GRENADE_SPLASH_RAD;//*s_quadFactor;
|
||||
grenade->methodOfDeath = MOD_GRENADE;
|
||||
grenade->splashMethodOfDeath = MOD_GRENADE_SPLASH;
|
||||
|
@ -1129,7 +1115,7 @@ void WP_FireTR116Bullet( gentity_t *ent, vec3_t start, vec3_t dir ) {
|
|||
traceEnt = &g_entities[ tr.entityNum ];
|
||||
|
||||
if ( traceEnt->takedamage ) {
|
||||
G_Damage( traceEnt, ent, ent, dir, tr.endpos, TETRION_DAMAGE * s_quadFactor, 0, MOD_TETRION_ALT );
|
||||
G_Damage( traceEnt, ent, ent, dir, tr.endpos, TETRION_DAMAGE, 0, MOD_TETRION_ALT );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1187,8 +1173,8 @@ void FireQuantumBurst( gentity_t *ent, vec3_t start, vec3_t dir )
|
|||
bolt->r.ownerNum = ent->s.number;
|
||||
bolt->parent = ent;
|
||||
|
||||
bolt->damage = QUANTUM_DAMAGE*DMG_VAR*s_quadFactor;
|
||||
bolt->splashDamage = QUANTUM_SPLASH_DAM*s_quadFactor;
|
||||
bolt->damage = QUANTUM_DAMAGE*DMG_VAR;
|
||||
bolt->splashDamage = QUANTUM_SPLASH_DAM;
|
||||
bolt->splashRadius = QUANTUM_SPLASH_RAD;//*s_quadFactor;
|
||||
|
||||
bolt->methodOfDeath = MOD_QUANTUM;
|
||||
|
@ -1363,8 +1349,8 @@ void FireQuantumBurstAlt( gentity_t *ent, vec3_t start, vec3_t dir )
|
|||
bolt->parent = ent;
|
||||
bolt->s.eFlags |= EF_ALT_FIRING;
|
||||
|
||||
bolt->damage = QUANTUM_ALT_DAMAGE*DMG_VAR*s_quadFactor;
|
||||
bolt->splashDamage = QUANTUM_ALT_SPLASH_DAM*s_quadFactor;
|
||||
bolt->damage = QUANTUM_ALT_DAMAGE*DMG_VAR;
|
||||
bolt->splashDamage = QUANTUM_ALT_SPLASH_DAM;
|
||||
bolt->splashRadius = QUANTUM_ALT_SPLASH_RAD;//*s_quadFactor;
|
||||
|
||||
bolt->methodOfDeath = MOD_QUANTUM_ALT;
|
||||
|
@ -1832,8 +1818,6 @@ void FireWeapon( gentity_t *ent, qboolean alt_fire )
|
|||
{
|
||||
float projsize;
|
||||
|
||||
s_quadFactor = 1;
|
||||
|
||||
ent->client->pers.teamState.lastFireTime = level.time;
|
||||
|
||||
// set aiming directions
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "g_local.h"
|
||||
|
||||
static float s_quadFactor;
|
||||
vec3_t forward, right, up;
|
||||
vec3_t muzzle;
|
||||
|
||||
|
|
101
old_code/g_client.c
Normal file
101
old_code/g_client.c
Normal file
|
@ -0,0 +1,101 @@
|
|||
/**
|
||||
* Get a random player that becomes action hero
|
||||
*/
|
||||
void G_RandomActionHero( int ignoreClientNum )
|
||||
{
|
||||
//int /*i,*/ numConnectedClients = 0;
|
||||
//int ahCandidates[MAX_CLIENTS];
|
||||
|
||||
if ( g_doWarmup.integer )
|
||||
{
|
||||
if ( level.warmupTime != 0 )
|
||||
{
|
||||
if ( level.warmupTime < 0 || level.time - level.startTime <= level.warmupTime )
|
||||
{//don't choose one until warmup is done
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( level.time - level.startTime <= 3000 )
|
||||
{//don't choose one until 3 seconds into the game
|
||||
return;
|
||||
}
|
||||
|
||||
//if ( g_pModActionHero.integer != 0 )
|
||||
//{
|
||||
// for ( i = 0; i < level.maxclients; i++ )
|
||||
// {
|
||||
// if ( i == ignoreClientNum )
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// if ( level.clients[i].pers.connected != CON_DISCONNECTED )
|
||||
// {
|
||||
// //note: these next few checks will mean that the first player to join (usually server client if a listen server) when a new map starts is *always* the AH
|
||||
// if ( &g_entities[i] != NULL && g_entities[i].client != NULL )
|
||||
// {
|
||||
// if ( level.clients[i].sess.sessionClass != PC_ACTIONHERO )
|
||||
// {
|
||||
// if ( level.clients[i].sess.sessionTeam != TEAM_SPECTATOR )
|
||||
// {
|
||||
// ahCandidates[numConnectedClients++] = i;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if ( !numConnectedClients )
|
||||
// {//WTF?!
|
||||
// return;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// actionHeroClientNum = ahCandidates[ irandom( 0, (numConnectedClients-1) ) ];
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
void INeedAHero( void )
|
||||
{
|
||||
//G_RandomActionHero( actionHeroClientNum );
|
||||
if ( actionHeroClientNum >= 0 && actionHeroClientNum < level.maxclients )
|
||||
{// get and distribute relevent paramters
|
||||
ClientUserinfoChanged( actionHeroClientNum );
|
||||
ClientSpawn( &g_entities[actionHeroClientNum], 0, qfalse );//RPG-X: RedTechie - Modifyed
|
||||
}//else ERROR!!!
|
||||
}
|
||||
|
||||
/**
|
||||
* Check wheter to replace the current action hero
|
||||
*/
|
||||
void G_CheckReplaceActionHero( int clientNum )
|
||||
{
|
||||
if ( clientNum == actionHeroClientNum )
|
||||
{
|
||||
//G_RandomActionHero( clientNum );
|
||||
if ( actionHeroClientNum >= 0 && actionHeroClientNum < level.maxclients )
|
||||
{
|
||||
// get and distribute relevent paramters
|
||||
ClientUserinfoChanged( actionHeroClientNum );
|
||||
ClientSpawn( &g_entities[actionHeroClientNum], 0, qfalse );//RPG-X: RedTechie - Modifyed
|
||||
}//else ERROR!!!
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether borgqueen should be replaced
|
||||
*/
|
||||
void G_CheckReplaceQueen( int clientNum )
|
||||
{
|
||||
if ( clientNum == borgQueenClientNum )
|
||||
{
|
||||
G_RandomBorgQueen( clientNum );
|
||||
if ( borgQueenClientNum >= 0 && borgQueenClientNum < level.maxclients )
|
||||
{
|
||||
// get and distribute relevent paramters
|
||||
ClientUserinfoChanged( borgQueenClientNum );
|
||||
ClientSpawn( &g_entities[borgQueenClientNum], 0, qfalse );//RPG-X: RedTechie - Modifyed
|
||||
}//else ERROR!!!
|
||||
}
|
||||
}
|
9489
old_code/g_cmds.c
9489
old_code/g_cmds.c
File diff suppressed because it is too large
Load diff
1
old_code/g_combat.c
Normal file
1
old_code/g_combat.c
Normal file
|
@ -0,0 +1 @@
|
|||
extern void G_RandomActionHero( int ignoreClientNum );
|
4563
old_code/g_main.c
Normal file
4563
old_code/g_main.c
Normal file
File diff suppressed because it is too large
Load diff
BIN
stefgame.suo
BIN
stefgame.suo
Binary file not shown.
Loading…
Reference in a new issue