Added patches for chat messages, chat messages are now accepted in messagemodes
Added patch for medi, no more slow heals Added !practice command, flag [ Changed /builder flag to ) Nerfed basi and granger back to most 1.1 defaults
This commit is contained in:
1 parent
0026746947
commit
5d6fae210a
7 files changed
+190
-27
No files matched your search
@@ -256,6 +256,13 @@ g_admin_cmd_t g_admin_cmds[ ] =
|
||||
"(^5name|slot|*^7)"
|
||||
},
|
||||
|
||||
{"practice", G_admin_practice, "[",
|
||||
"set practice mode for player names with 'clan tag', "
|
||||
"these players will be allowed to join any team regardless of balance. "
|
||||
"'map count' is number of maps to maintain practice mode",
|
||||
"[^3clan tag|off^7] [^3map count^7])"
|
||||
},
|
||||
|
||||
{"putteam", G_admin_putteam, "p",
|
||||
"move a player to a specified team",
|
||||
"[^3name|slot#^7] [^3h|a|s^7]"
|
||||
@@ -4908,6 +4915,78 @@ qboolean G_admin_pause( gentity_t *ent, int skiparg )
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean G_admin_practice( gentity_t *ent, int skiparg )
|
||||
{
|
||||
char clantag[ MAX_NAME_LENGTH ];
|
||||
char mapsarg[ 8 ];
|
||||
int maps;
|
||||
|
||||
if( G_SayArgc() < 2 + skiparg )
|
||||
{
|
||||
if( g_practiceCount.integer )
|
||||
{
|
||||
AP( va( "print \"^3practice:^7 practice mode is in effect for the next %d maps\n\"",
|
||||
g_practiceCount.integer ) );
|
||||
ADMP( va( "^3!practice: ^7practice mode set to %s^7 for next %d maps\n",
|
||||
g_practiceText.string, g_practiceCount.integer ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ADMP( "^3!practice: ^7practice mode is off\n" );
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
G_SayArgv( 1 + skiparg, clantag, sizeof( clantag ) );
|
||||
|
||||
if( G_SayArgc() < 3 + skiparg )
|
||||
{
|
||||
if( !Q_stricmp( clantag, "off" ) )
|
||||
{
|
||||
if( g_practiceCount.integer )
|
||||
{
|
||||
trap_Cvar_Set( "g_practiceCount", "0" );
|
||||
AP( va ("print \"^3!practice: ^7 practice mode turned off by %s^7\n\"",
|
||||
( ent ) ? ent->client->pers.netname : "console" ) );
|
||||
ADMP( "^3!practice: ^7practice mode set to off\n" );
|
||||
return qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
ADMP( "^3!practice: ^7practice mode already off\n" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ADMP( "^3!practice: ^7usage: practice [clan tag] [map count]\n" );
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
G_SayArgv( 2 + skiparg, mapsarg, sizeof( mapsarg ) );
|
||||
maps = atoi( mapsarg );
|
||||
|
||||
if( !clantag[ 0 ] )
|
||||
{
|
||||
ADMP( "^3!practice: ^7no clan tag specified\n" );
|
||||
return qfalse;
|
||||
}
|
||||
if( maps < 1 || maps > 8 )
|
||||
{
|
||||
ADMP( "^3!practice: ^7map count must be between 1 and 8\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
trap_Cvar_Set( "g_practiceText", clantag );
|
||||
trap_Cvar_Set( "g_practiceCount", va( "%d", maps ) );
|
||||
|
||||
AP( va( "print \"^3practice:^7 %s^7 has activated practice mode for the next %d maps\n\"",
|
||||
( ent ) ? ent->client->pers.netname : "console",
|
||||
maps ) );
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean G_admin_slap( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ], damage = 0;
|
||||
|
||||
+2
-1
@@ -82,7 +82,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define ADMF_SEESFULLLISTPLAYERS '$'
|
||||
#define ADMF_DBUILDER '#'
|
||||
#define ADMF_ADMINCHAT '?'
|
||||
#define ADMF_BUILDCHECK '+'
|
||||
#define ADMF_BUILDCHECK ')'
|
||||
|
||||
#define ADMF_BANIMMUNITY '&'
|
||||
|
||||
@@ -215,6 +215,7 @@ qboolean G_admin_designate( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_forcespec( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_unforcespec( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_pause( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_practice( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_buildlog( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_revert( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_slap( gentity_t *ent, int skiparg );
|
||||
|
||||
+10
-8
@@ -1949,18 +1949,12 @@ void HMedistat_Think( gentity_t *self )
|
||||
//nothing left to heal so go back to idling
|
||||
if( !self->enemy && self->active )
|
||||
{
|
||||
int i;
|
||||
|
||||
for( i = 0; i < level.maxclients; i++ )
|
||||
{
|
||||
vic = &g_entities[ i ];
|
||||
vic->client->pers.healing = qfalse;
|
||||
}
|
||||
|
||||
G_SetBuildableAnim( self, BANIM_CONSTRUCT2, qtrue );
|
||||
G_SetIdleBuildableAnim( self, BANIM_IDLE1 );
|
||||
|
||||
self->active = qfalse;
|
||||
self->oldent->client->pers.healing = qfalse;
|
||||
}
|
||||
else if( self->enemy ) //heal!
|
||||
{
|
||||
@@ -1972,6 +1966,7 @@ void HMedistat_Think( gentity_t *self )
|
||||
|
||||
self->enemy->health++;
|
||||
self->enemy->client->pers.healing = qtrue;
|
||||
self->oldent = self->enemy;
|
||||
|
||||
//if they're completely healed, give them a medkit
|
||||
if( self->enemy->health >= self->enemy->client->ps.stats[ STAT_MAX_HEALTH ] &&
|
||||
@@ -2422,6 +2417,10 @@ void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||
new->fate = ( attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) ? BF_TEAMKILLED : BF_DESTROYED;
|
||||
new->next = NULL;
|
||||
G_LogBuild( new );
|
||||
|
||||
if(self->s.modelindex == BA_H_MEDISTAT )
|
||||
self->oldent->client->pers.healing = qfalse;
|
||||
|
||||
|
||||
//pretty events and cleanup
|
||||
G_SetBuildableAnim( self, BANIM_DESTROY1, qtrue );
|
||||
@@ -2431,7 +2430,7 @@ void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||
self->powered = qfalse; //free up power
|
||||
//prevent any firing effects and cancel structure protection
|
||||
self->s.eFlags &= ~( EF_FIRING | EF_DBUILDER );
|
||||
|
||||
|
||||
if( self->spawned )
|
||||
{
|
||||
self->think = HSpawn_Blast;
|
||||
@@ -2809,6 +2808,9 @@ void G_FreeMarkedBuildables( void )
|
||||
new->marked = NULL;
|
||||
|
||||
last = last->marked = new;
|
||||
|
||||
if(ent->s.modelindex == BA_H_MEDISTAT )
|
||||
ent->oldent->client->pers.healing = qfalse;
|
||||
|
||||
G_FreeEntity( ent );
|
||||
}
|
||||
|
||||
+76
-14
@@ -787,6 +787,18 @@ void Cmd_Team_f( gentity_t *ent )
|
||||
else if( oldteam == PTE_HUMANS )
|
||||
humans--;
|
||||
|
||||
// practice mode
|
||||
if( !force && g_practiceCount.integer )
|
||||
{
|
||||
char name[ MAX_NAME_LENGTH ];
|
||||
|
||||
G_DecolorString( ent->client->pers.netname, name );
|
||||
if( strstr( name, g_practiceText.string ) )
|
||||
{
|
||||
force = qtrue;
|
||||
}
|
||||
}
|
||||
|
||||
// do warm up
|
||||
if( g_doWarmup.integer &&
|
||||
level.time - level.startTime < g_warmup.integer * 1000 )
|
||||
@@ -1329,6 +1341,31 @@ static void Cmd_Say_f( gentity_t *ent )
|
||||
}
|
||||
}
|
||||
|
||||
args = G_SayConcatArgs(0);
|
||||
if( !Q_stricmpn( args, "say /join", 9 ) )
|
||||
{
|
||||
Cmd_Join_f( ent );
|
||||
return;
|
||||
}
|
||||
if( !Q_stricmpn( args, "say /part", 9 ) )
|
||||
{
|
||||
Cmd_Part_f( ent );
|
||||
return;
|
||||
}
|
||||
if( !Q_stricmpn( args, "say /0", 6 ) ||
|
||||
!Q_stricmpn( args, "say /1", 6 ) ||
|
||||
!Q_stricmpn( args, "say /2", 6 ) ||
|
||||
!Q_stricmpn( args, "say /3", 6 ) ||
|
||||
!Q_stricmpn( args, "say /4", 6 ) ||
|
||||
!Q_stricmpn( args, "say /5", 6 ) ||
|
||||
!Q_stricmpn( args, "say /6", 6 ) ||
|
||||
!Q_stricmpn( args, "say /7", 6 ) ||
|
||||
!Q_stricmpn( args, "say /8", 6 ) ||
|
||||
!Q_stricmpn( args, "say /9", 6 ) )
|
||||
{
|
||||
Cmd_Channel_f( ent );
|
||||
return;
|
||||
}
|
||||
|
||||
if( trap_Argc( ) < 2 )
|
||||
return;
|
||||
@@ -1379,6 +1416,7 @@ void Cmd_Join_f( gentity_t *ent )
|
||||
{
|
||||
char pass[CHAT_MAXPASS];
|
||||
char arg[MAX_TOKEN_CHARS];
|
||||
int skipargs = 0;
|
||||
int chan;
|
||||
int i;
|
||||
gentity_t *target;
|
||||
@@ -1391,7 +1429,11 @@ void Cmd_Join_f( gentity_t *ent )
|
||||
return;
|
||||
}
|
||||
|
||||
if( trap_Argc( ) < 2 )
|
||||
G_SayArgv( skipargs, arg, sizeof( arg ) );
|
||||
if( !Q_stricmp( arg, "say" ) )
|
||||
skipargs++;
|
||||
|
||||
if( G_SayArgc( ) < 2 + skipargs )
|
||||
{
|
||||
char message[ 64 ];
|
||||
int n;
|
||||
@@ -1414,7 +1456,7 @@ void Cmd_Join_f( gentity_t *ent )
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 1, arg, sizeof( arg ) );
|
||||
G_SayArgv( 1 + skipargs, arg, sizeof( arg ) );
|
||||
chan = atoi( arg );
|
||||
if( chan < 0 || chan >= CHAT_MAXCHAN )
|
||||
{
|
||||
@@ -1423,7 +1465,7 @@ void Cmd_Join_f( gentity_t *ent )
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 2, pass, sizeof( pass ) );
|
||||
G_SayArgv( 2 + skipargs, pass, sizeof( pass ) );
|
||||
if( pass[0] == '\0' )
|
||||
Q_strncpyz( pass, "default", sizeof( pass ) );
|
||||
|
||||
@@ -1454,11 +1496,16 @@ void Cmd_Join_f( gentity_t *ent )
|
||||
void Cmd_Part_f( gentity_t *ent )
|
||||
{
|
||||
char arg[MAX_TOKEN_CHARS];
|
||||
int skipargs = 0;
|
||||
int chan;
|
||||
int i;
|
||||
gentity_t *target;
|
||||
|
||||
if( trap_Argc( ) < 2 )
|
||||
G_SayArgv( skipargs, arg, sizeof( arg ) );
|
||||
if( !Q_stricmp( arg, "say" ) )
|
||||
skipargs++;
|
||||
|
||||
if( G_SayArgc( ) < 2 + skipargs )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities, va( "print \"^3/part^7 usage: /part [0-%d]\n\"", CHAT_MAXCHAN - 1 ) );
|
||||
return;
|
||||
@@ -1471,7 +1518,7 @@ void Cmd_Part_f( gentity_t *ent )
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 1, arg, sizeof( arg ) );
|
||||
G_SayArgv( 1 + skipargs, arg, sizeof( arg ) );
|
||||
chan = atoi( arg );
|
||||
if( chan < 0 || chan >= CHAT_MAXCHAN )
|
||||
{
|
||||
@@ -1508,12 +1555,13 @@ void Cmd_Channel_f( gentity_t *ent )
|
||||
{
|
||||
char arg[MAX_TOKEN_CHARS];
|
||||
char str[MAX_STRING_CHARS];
|
||||
char *p;
|
||||
char *cmd, *p;
|
||||
char location[ 64 ];
|
||||
char escaped[ 64 ];
|
||||
int chan;
|
||||
int i;
|
||||
int num = 0;
|
||||
int skipargs = 0;
|
||||
qboolean who = qfalse;
|
||||
gentity_t *target;
|
||||
|
||||
@@ -1524,17 +1572,25 @@ void Cmd_Channel_f( gentity_t *ent )
|
||||
return;
|
||||
}
|
||||
|
||||
trap_Argv( 0, arg, sizeof( arg ) );
|
||||
chan = atoi( arg );
|
||||
G_SayArgv( skipargs, arg, sizeof( arg ) );
|
||||
if( !Q_stricmp( arg, "say" ) )
|
||||
{
|
||||
skipargs++;
|
||||
G_SayArgv( skipargs, arg, sizeof( arg ) );
|
||||
}
|
||||
cmd = arg;
|
||||
if( *cmd == '/' )
|
||||
cmd++;
|
||||
chan = atoi( cmd );
|
||||
if( chan < 0 || chan >= CHAT_MAXCHAN ||
|
||||
ent->client->pers.chat[chan][0] == '\0' )
|
||||
{
|
||||
trap_SendServerCommand( ent-g_entities,
|
||||
va( "print \"^3/%s^7: you are not joined to that channel, use /join\n\"", arg ) );
|
||||
va( "print \"^3/%s^7: you are not joined to that channel, use /join\n\"", cmd ) );
|
||||
return;
|
||||
}
|
||||
|
||||
p = ConcatArgs( 1 );
|
||||
p = G_SayConcatArgs( 1 + skipargs );
|
||||
if( !p || p[0] == '\0' )
|
||||
who = qtrue;
|
||||
|
||||
@@ -1584,7 +1640,7 @@ void Cmd_Channel_f( gentity_t *ent )
|
||||
target->client->pers.connected == CON_CONNECTED &&
|
||||
!Q_stricmp( target->client->pers.chat[ chan ], ent->client->pers.chat[ chan ] ) )
|
||||
{
|
||||
trap_SendServerCommand( i, va( "print \"(^1#%d^7 %d) [%s^7]%s: ^1%s^7\n\"",
|
||||
trap_SendServerCommand( i, va( "chat \"(^1#%d^7 %d) [%s^7]%s: ^1%s^7\"",
|
||||
chan, num, ent->client->pers.netname,
|
||||
( OnSameTeam( target, ent ) ) ? escaped : "",
|
||||
p ) );
|
||||
@@ -2970,6 +3026,9 @@ void Cmd_Destroy_f( gentity_t *ent )
|
||||
new->next = NULL;
|
||||
new->marked = NULL;
|
||||
G_LogBuild( new );
|
||||
|
||||
if(traceEnt->s.modelindex == BA_H_MEDISTAT )
|
||||
traceEnt->oldent->client->pers.healing = qfalse;
|
||||
|
||||
G_TeamCommand( ent->client->pers.teamSelection,
|
||||
va( "print \"%s ^3DECONSTRUCTED^7 by %s^7\n\"",
|
||||
@@ -4829,7 +4888,8 @@ int G_SayArgc()
|
||||
s++;
|
||||
c++;
|
||||
}
|
||||
s++;
|
||||
if( *s )
|
||||
s++;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
@@ -4877,7 +4937,8 @@ qboolean G_SayArgv( int n, char *buffer, int bufferLength )
|
||||
s++;
|
||||
c++;
|
||||
}
|
||||
s++;
|
||||
if( *s )
|
||||
s++;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
@@ -4903,7 +4964,8 @@ char *G_SayConcatArgs(int start)
|
||||
s++;
|
||||
c++;
|
||||
}
|
||||
s++;
|
||||
if( *s )
|
||||
s++;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -242,6 +242,7 @@ struct gentity_s
|
||||
int lastDamageTime;
|
||||
|
||||
int bdnumb; // buildlog entry ID
|
||||
gentity_t *oldent;
|
||||
int livetime;
|
||||
};
|
||||
|
||||
@@ -807,6 +808,9 @@ void G_LeaveTeam( gentity_t *self );
|
||||
void G_ChangeTeam( gentity_t *ent, pTeam_t newTeam );
|
||||
void G_SanitiseName( char *in, char *out );
|
||||
void G_PrivateMessage( gentity_t *ent );
|
||||
void Cmd_Join_f( gentity_t *ent );
|
||||
void Cmd_Part_f( gentity_t *ent );
|
||||
void Cmd_Channel_f( gentity_t *ent );
|
||||
void Cmd_TeamVote_f( gentity_t *ent );
|
||||
char *G_statsString( statsCounters_t *sc, pTeam_t *pt );
|
||||
void Cmd_Share_f( gentity_t *ent );
|
||||
@@ -1377,6 +1381,9 @@ extern vmCvar_t g_devmapVotes;
|
||||
extern vmCvar_t g_slapKnockback;
|
||||
extern vmCvar_t g_slapDamage;
|
||||
|
||||
extern vmCvar_t g_practiceText;
|
||||
extern vmCvar_t g_practiceCount;
|
||||
|
||||
extern vmCvar_t g_msg;
|
||||
extern vmCvar_t g_msgTime;
|
||||
|
||||
|
||||
+13
-1
@@ -198,6 +198,9 @@ vmCvar_t g_devmapNoStructDmg;
|
||||
vmCvar_t g_slapKnockback;
|
||||
vmCvar_t g_slapDamage;
|
||||
|
||||
vmCvar_t g_practiceText;
|
||||
vmCvar_t g_practiceCount;
|
||||
|
||||
vmCvar_t g_msg;
|
||||
vmCvar_t g_msgTime;
|
||||
|
||||
@@ -267,7 +270,7 @@ static cvarTable_t gameCvarTable[ ] =
|
||||
|
||||
{ &g_specAspec, "g_specAspec", "0", CVAR_ARCHIVE, 0, qtrue },
|
||||
|
||||
{ &g_healShove, "g_healShove", "0", CVAR_ARCHIVE, 0, qtrue },
|
||||
{ &g_healShove, "g_healShove", "1", CVAR_ARCHIVE, 0, qtrue },
|
||||
|
||||
{ &g_modBuildableHealth, "g_modBuildableHealth", "0", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &g_modBuildableSpeed, "g_modBuildableSpeed", "0", CVAR_ARCHIVE, 0, qfalse },
|
||||
@@ -428,6 +431,9 @@ static cvarTable_t gameCvarTable[ ] =
|
||||
{ &g_slapKnockback, "g_slapKnockback", "200", CVAR_ARCHIVE, 0, qfalse},
|
||||
{ &g_slapDamage, "g_slapDamage", "5", CVAR_ARCHIVE, 0, qfalse},
|
||||
|
||||
{ &g_practiceText, "g_practiceText", "", 0, 0, qfalse},
|
||||
{ &g_practiceCount, "g_practiceCount", "0", 0, 0, qfalse},
|
||||
|
||||
{ &g_msg, "g_msg", "", CVAR_ARCHIVE, 0, qfalse },
|
||||
{ &g_msgTime, "g_msgTime", "0", CVAR_ARCHIVE, 0, qfalse },
|
||||
|
||||
@@ -826,6 +832,12 @@ void G_InitGame( int levelTime, int randomSeed, int restart )
|
||||
// syncronize mod cvars
|
||||
G_InitModCvars( );
|
||||
|
||||
// practice counter
|
||||
if( g_practiceCount.integer > 0 )
|
||||
{
|
||||
trap_Cvar_Set( "g_practiceCount", va( "%d", g_practiceCount.integer - 1 ) );
|
||||
}
|
||||
|
||||
// general initialization
|
||||
G_FindTeams( );
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#define ABUILDER_BASE_DELAY 17000
|
||||
#define ABUILDER_ADV_DELAY 12000
|
||||
#define ABUILDER_BLOB_DMG ADM(9)
|
||||
#define ABUILDER_BLOB_REPEAT 600
|
||||
#define ABUILDER_BLOB_REPEAT 1000
|
||||
#define ABUILDER_BLOB_SPEED 800.0f
|
||||
#define ABUILDER_BLOB_SPEED_MOD 0.5f
|
||||
#define ABUILDER_BLOB_TIME 5000
|
||||
@@ -157,13 +157,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#define LEVEL1_SPEED 1.25f
|
||||
#define LEVEL1_VALUE AVM(225)
|
||||
#define LEVEL1_HEALTH AHM(90)
|
||||
#define LEVEL1_HEALTH AHM(75)
|
||||
#define LEVEL1_REGEN 2
|
||||
#define LEVEL1_COST 1
|
||||
|
||||
#define LEVEL1_UPG_SPEED 1.25f
|
||||
#define LEVEL1_UPG_VALUE AVM(275)
|
||||
#define LEVEL1_UPG_HEALTH AHM(115)
|
||||
#define LEVEL1_UPG_HEALTH AHM(100)
|
||||
#define LEVEL1_UPG_REGEN 3
|
||||
#define LEVEL1_UPG_COST 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user