Release 1.6.2
Fixed !nobuild to not collide with mark (Issue 128) Removed "abusive" admin commands (Issue 138) Updated allstats to v2 (Issue 139) Hardcoded !info credits (Issue 140)
This commit is contained in:
1 parent
f25c7cb807
commit
79e85b0608
11 files changed
+156
-647
No files matched your search
+5
-8
@@ -1605,24 +1605,21 @@ void ClientThink_real( gentity_t *ent )
|
||||
client->lastPoisonTime + ALIEN_POISON_TIME < level.time )
|
||||
client->ps.stats[ STAT_STATE ] &= ~SS_POISONED;
|
||||
|
||||
if( !client->pers.cusgrav )
|
||||
{
|
||||
client->ps.gravity = g_gravity.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ent->client->ps.gravity = ent->client->pers.cusgravlvl;
|
||||
}
|
||||
|
||||
if( client->pers.grabbed && ent->client->pers.grabber->client->pers.teamSelection != PTE_NONE )
|
||||
ent->client->pers.grabbed = qfalse;
|
||||
|
||||
if( client->pers.grabbed ){
|
||||
|
||||
vec3_t clear;
|
||||
|
||||
clear[0] = 0;
|
||||
clear[1] = 0;
|
||||
clear[2] = 0;
|
||||
VectorCopy( clear, ent->client->ps.velocity );
|
||||
VectorCopy( ent->client->pers.grabber->s.origin, ent->client->ps.origin );
|
||||
}
|
||||
|
||||
|
||||
if( BG_InventoryContainsUpgrade( UP_MEDKIT, client->ps.stats ) &&
|
||||
BG_UpgradeIsActive( UP_MEDKIT, client->ps.stats ) )
|
||||
|
||||
+65
-511
@@ -104,11 +104,6 @@ g_admin_cmd_t g_admin_cmds[ ] =
|
||||
"Add/subtract credits to/from a player",
|
||||
"[^3name|slot#^7] [^3amount#^7]"
|
||||
},
|
||||
|
||||
{"customgrav", G_admin_customgrav, "Q",
|
||||
"set the gravity for a specific player. Normal gives normal server gravity",
|
||||
"[^3name|slot#^7] [^3#^7]"
|
||||
},
|
||||
|
||||
{"demo", G_admin_demo, "?",
|
||||
"turn admin chat off for the caller so it does not appear in demos. "
|
||||
@@ -140,21 +135,16 @@ g_admin_cmd_t g_admin_cmds[ ] =
|
||||
"kick a client from the server without log",
|
||||
"[^3name|slot#^7] [^3message^7]"
|
||||
},
|
||||
|
||||
{"drug", G_admin_drug, "Q",
|
||||
"induce a gas like effect on a player",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"explode", G_admin_explode, "Q",
|
||||
"cause a player to explode. Caution: damages surrounding players and structures.",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"grab", G_admin_grab, "Q",
|
||||
"Grab a player as a spectator and make him move around.",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"bring", G_admin_bring, "Q",
|
||||
"This will bring you to said players location.",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"flag", G_admin_flag, "f",
|
||||
"add an admin flag to a player, prefix flag with '-' to disallow",
|
||||
@@ -245,11 +235,6 @@ g_admin_cmd_t g_admin_cmds[ ] =
|
||||
"show recently played maps",
|
||||
""
|
||||
},
|
||||
|
||||
{"mix", G_admin_mix, "X",
|
||||
"mix another player into yourself",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"mute", G_admin_mute, "m",
|
||||
"mute a player, to prevent them from speaking, calling votes, using private messages, or renaming",
|
||||
@@ -352,22 +337,12 @@ g_admin_cmd_t g_admin_cmds[ ] =
|
||||
""
|
||||
},
|
||||
|
||||
{"steal", G_admin_steal, "T",
|
||||
"steal health from another player",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"suspendban", G_admin_suspendban, "B",
|
||||
"suspend a ban for a length of time. time is specified as numbers "
|
||||
"followed by units 'w' (weeks), 'd' (days), 'h' (hours) or 'm' (minutes),"
|
||||
" or seconds if no units are specified",
|
||||
"[^5ban #^7] [^5length^7]"
|
||||
},
|
||||
|
||||
{"switch", G_admin_switch, "X",
|
||||
"switch places with somenone",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"time", G_admin_time, "C",
|
||||
"show the current local server time",
|
||||
@@ -377,11 +352,6 @@ g_admin_cmd_t g_admin_cmds[ ] =
|
||||
"list recent teamkill activity",
|
||||
"(^5start id#|name|-skip#^7) (^5search skip#^7)"
|
||||
},
|
||||
|
||||
{"trade", G_admin_trade, "T",
|
||||
"trade health with another player",
|
||||
"[^3name|slot#^7]"
|
||||
},
|
||||
|
||||
{"unban", G_admin_unban, "b",
|
||||
"unbans a player specified by the slot as seen in showbans",
|
||||
@@ -3827,6 +3797,14 @@ qboolean G_admin_info( gentity_t *ent, int skiparg )
|
||||
Q_strncpyz( infoname, "default", 8 );
|
||||
else //what subject?
|
||||
G_SayArgv( 1 + skiparg, infoname, sizeof( infoname ) );
|
||||
//Hardcoded info file for p-g-qvm
|
||||
if( !Q_stricmp( infoname, "credits" ) )
|
||||
{
|
||||
trap_Cvar_VariableStringBuffer( "qvm_version", info, sizeof( info ) );
|
||||
ADMP( va( "%s\n", info ) );
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
Com_sprintf( filename, MAX_OSPATH, "info/info-%s.txt", infoname );
|
||||
length = trap_FS_FOpenFile( filename, &handle, FS_READ );
|
||||
if( !handle || !length ) //file not found or length 0
|
||||
@@ -5558,288 +5536,6 @@ qboolean G_admin_revert( gentity_t *ent, int skiparg )
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
//once again my long, long ass list of commands
|
||||
qboolean G_admin_switch( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
|
||||
if( !ent )
|
||||
{
|
||||
ADMP( "^3!switch: ^7console cannot use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!switch: ^7usage: !switch [name|slot#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!switch: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!switch: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
|
||||
//put them on noclip
|
||||
vic->client->noclip = qtrue;
|
||||
ent->client->noclip = qtrue;
|
||||
|
||||
//switch places
|
||||
trap_UnlinkEntity( ent );
|
||||
VectorCopy( vic->s.origin, ent->client->ps.origin );
|
||||
|
||||
//switch places
|
||||
trap_UnlinkEntity( vic );
|
||||
VectorCopy( ent->s.origin, vic->client->ps.origin );
|
||||
|
||||
//spectator fix
|
||||
if( ent->client->sess.sessionTeam != TEAM_SPECTATOR )
|
||||
trap_LinkEntity (ent);
|
||||
|
||||
if( vic->client->sess.sessionTeam != TEAM_SPECTATOR )
|
||||
trap_LinkEntity (vic);
|
||||
|
||||
|
||||
//take them off noclip
|
||||
vic->client->noclip = qfalse;
|
||||
ent->client->noclip = qfalse;
|
||||
|
||||
trap_SendServerCommand( vic-g_entities, va( "print \"^7%s^7 switched with you\n\"", ent->client->pers.netname ) );
|
||||
trap_SendServerCommand( ent-g_entities, va( "print \"^7you switched with ^7%s^7\n\"", vic->client->pers.netname ) );
|
||||
|
||||
|
||||
|
||||
return qtrue;
|
||||
|
||||
}
|
||||
|
||||
qboolean G_admin_steal( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
|
||||
if( !ent )
|
||||
{
|
||||
ADMP( "^3!steal: ^7console cannot use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!steal: ^7usage: !steal [name|slot#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!steal: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!switch: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
//dont steal from the dead
|
||||
if( vic->client->pers.teamSelection == PTE_NONE || vic->client->pers.classSelection == PCL_NONE )
|
||||
{
|
||||
ADMP( "^3!steal: ^7cannot steal from the dead\n" );
|
||||
return qfalse;
|
||||
}
|
||||
//have to be alive to steal
|
||||
if( ent->client->pers.teamSelection == PTE_NONE || ent->client->pers.classSelection == PCL_NONE )
|
||||
{
|
||||
ADMP( "^3!steal: ^7must be living to use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
//your at full health
|
||||
if( ent->health >= ent->client->ps.stats[ STAT_MAX_HEALTH ] )
|
||||
{
|
||||
ADMP( "^3!steal: ^7you cannot steal anymore health\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic->health -= 5;
|
||||
ent->health += 5;
|
||||
vic->lastDamageTime = level.time;
|
||||
ent->lastDamageTime = level.time;
|
||||
|
||||
|
||||
if( vic->health <= 0 )
|
||||
{
|
||||
vic->enemy = ent;
|
||||
vic->die( vic, ent, ent, 5, MOD_UNKNOWN );
|
||||
}
|
||||
//make sure you dont go over max health
|
||||
if( ent->health > ent->client->ps.stats[ STAT_MAX_HEALTH ] )
|
||||
{
|
||||
ent->health = ent->client->ps.stats[ STAT_MAX_HEALTH ];
|
||||
ent->lastDamageTime = level.time;
|
||||
}
|
||||
|
||||
|
||||
trap_SendServerCommand( vic-g_entities, va( "print \"^7%s^7 stole health from you\n\"", ent->client->pers.netname ) );
|
||||
trap_SendServerCommand( ent-g_entities, va( "print \"^7you stole health from ^7%s^7\n\"", vic->client->pers.netname ) );
|
||||
|
||||
return qtrue;
|
||||
|
||||
}
|
||||
|
||||
qboolean G_admin_trade( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
int hp1, hp2;
|
||||
gentity_t *vic;
|
||||
|
||||
|
||||
if( !ent )
|
||||
{
|
||||
ADMP( "^3!trade: ^7console cannot use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!trade: ^7usage: !trade [name|slot#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!trade: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!trade: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
//dont trade with the dead
|
||||
|
||||
if( vic->client->pers.teamSelection == PTE_NONE || vic->client->pers.classSelection == PCL_NONE )
|
||||
{
|
||||
ADMP( "^3!trade: ^7cannot trade with the dead\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
//have to be alive to trade
|
||||
if( ent->client->pers.teamSelection == PTE_NONE || ent->client->pers.classSelection == PCL_NONE )
|
||||
{
|
||||
ADMP( "^3!trade: ^7must be living to use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
hp1 = vic->health;
|
||||
hp2 = ent->health;
|
||||
|
||||
vic->health = hp2;
|
||||
ent->health = hp1;
|
||||
|
||||
vic->lastDamageTime = level.time;
|
||||
ent->lastDamageTime = level.time;
|
||||
|
||||
|
||||
//make sure you dont go over max health
|
||||
if( ent->health > ent->client->ps.stats[ STAT_MAX_HEALTH ] )
|
||||
{
|
||||
ent->health = ent->client->ps.stats[ STAT_MAX_HEALTH ];
|
||||
ent->lastDamageTime = level.time;
|
||||
}
|
||||
|
||||
//make sure they dont go over max health
|
||||
if( vic->health > vic->client->ps.stats[ STAT_MAX_HEALTH ] )
|
||||
{
|
||||
vic->health = vic->client->ps.stats[ STAT_MAX_HEALTH ];
|
||||
vic->lastDamageTime = level.time;
|
||||
}
|
||||
|
||||
trap_SendServerCommand( vic-g_entities, va( "print \"^7%s^7 traded health with you\n\"", ent->client->pers.netname ) );
|
||||
trap_SendServerCommand( ent-g_entities, va( "print \"^7you traded health with ^7%s^7\n\"", vic->client->pers.netname ) );
|
||||
|
||||
return qtrue;
|
||||
|
||||
}
|
||||
|
||||
qboolean G_admin_drug( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!drug: ^7usage: !drug [name|slot#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!drug: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!drug: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
vic->client->ps.stats[ STAT_STATE ] |= SS_POISONCLOUDED;
|
||||
vic->client->lastPoisonCloudedTime = level.time;
|
||||
trap_SendServerCommand( vic->client->ps.clientNum, "poisoncloud" );
|
||||
|
||||
return qtrue;
|
||||
|
||||
}
|
||||
|
||||
qboolean G_admin_drop( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
@@ -5919,111 +5615,6 @@ qboolean G_admin_cp( gentity_t *ent, int skiparg )
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean G_admin_customgrav( gentity_t *ent, int skiparg )
|
||||
{
|
||||
|
||||
char lvl[ MAX_STRING_CHARS ];
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!customgrav: ^7usage: !customgrav [name|slot#] [gravity#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!customgrav: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!customgrav: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
G_SayArgv( 2 + skiparg, lvl, sizeof( lvl ) );
|
||||
|
||||
minargc = 3 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
vic->client->pers.cusgrav = qfalse;
|
||||
ADMP( "^3!customgrav: ^7player's custom gravity has been disabled\n" );
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ADMP( va( "^3!customgrav: ^7player's gravity has been set to %s\n", ( atoi(lvl) == 0 ) ? "0" : lvl ) );
|
||||
vic->client->pers.cusgrav = qtrue;
|
||||
vic->client->pers.cusgravlvl = atoi(lvl);
|
||||
}
|
||||
|
||||
|
||||
return qtrue;
|
||||
|
||||
}
|
||||
|
||||
qboolean G_admin_explode( gentity_t *ent, int skiparg )
|
||||
{
|
||||
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!explode: ^7usage: !explode [name|slot#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!explode: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!explode: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
|
||||
if( vic->client->pers.teamSelection == PTE_NONE || vic->client->pers.classSelection == PCL_NONE )
|
||||
{
|
||||
ADMP( "^3!explode: ^7they must be living to use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
Blow_up(vic);
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean G_admin_L0(gentity_t *ent, int skiparg ){
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ] = {""};
|
||||
@@ -7517,76 +7108,6 @@ qboolean G_admin_outlaw( gentity_t *ent, int skiparg )
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
||||
qboolean G_admin_mix( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
|
||||
if( !ent )
|
||||
{
|
||||
ADMP( "^3!mix: ^7console cannot use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!mix: ^7usage: !mix [name|slot#]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!mix: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( !admin_higher( ent, &g_entities[ pids[ 0 ] ] ) )
|
||||
{
|
||||
ADMP( "^3!mix: ^7sorry, but your intended victim has a higher admin"
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
|
||||
//put them on noclip
|
||||
vic->client->noclip = qtrue;
|
||||
ent->client->noclip = qtrue;
|
||||
|
||||
//mix us
|
||||
trap_UnlinkEntity( ent );
|
||||
trap_UnlinkEntity( vic );
|
||||
VectorCopy( ent->s.origin, vic->client->ps.origin );
|
||||
|
||||
//spectator fix
|
||||
if( ent->client->sess.sessionTeam != TEAM_SPECTATOR )
|
||||
trap_LinkEntity (ent);
|
||||
|
||||
if( vic->client->sess.sessionTeam != TEAM_SPECTATOR )
|
||||
trap_LinkEntity (vic);
|
||||
|
||||
|
||||
//take them off noclip
|
||||
vic->client->noclip = qfalse;
|
||||
ent->client->noclip = qfalse;
|
||||
|
||||
|
||||
trap_SendServerCommand( vic-g_entities, va( "print \"^7%s^7 mixed with you\n\"", ent->client->pers.netname ) );
|
||||
trap_SendServerCommand( ent-g_entities, va( "print \"^7you mixed with ^7%s^7\n\"", vic->client->pers.netname ) );
|
||||
|
||||
return qtrue;
|
||||
|
||||
}
|
||||
|
||||
qboolean G_admin_credits( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
@@ -7802,23 +7323,6 @@ qboolean G_admin_grab( gentity_t *ent, int skiparg )
|
||||
}
|
||||
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( !strcmp( name, "clear") ){
|
||||
|
||||
for( i = 0; i < level.maxclients; i++ )
|
||||
{
|
||||
vic = &g_entities[ i ];
|
||||
if( !vic->client )
|
||||
continue;
|
||||
if( vic->client->pers.connected != CON_CONNECTED )
|
||||
continue;
|
||||
if( vic->client->pers.grabbed )
|
||||
{
|
||||
vic->client->pers.grabbed = qfalse;
|
||||
}
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
@@ -7833,17 +7337,67 @@ qboolean G_admin_grab( gentity_t *ent, int skiparg )
|
||||
" level than you\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( ent->client->pers.teamSelection != PTE_NONE )
|
||||
{
|
||||
ADMP( "^3!grab: ^7you can only use this command while being a spectator\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
if( vic->client->pers.grabbed ){
|
||||
ADMP( "^3!grab: ^7grabbing has been disabled.\n" );
|
||||
ADMP( va("^3!grab: ^7grabbing of %s^7 has been disabled.\n", vic->client->pers.netname ));
|
||||
vic->client->pers.grabbed = qfalse;
|
||||
}
|
||||
else{
|
||||
vic->client->pers.grabber = ent;
|
||||
vic->client->pers.grabbed = qtrue;
|
||||
ADMP( "^3!grab: ^7grabbing has been enabled.\n" );
|
||||
ADMP( va("^3!grab: ^7grabbing of %s^7 has been enabled.\n", vic->client->pers.netname ));
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
qboolean G_admin_bring( gentity_t *ent, int skiparg )
|
||||
{
|
||||
int pids[ MAX_CLIENTS ];
|
||||
char name[ MAX_NAME_LENGTH ], err[ MAX_STRING_CHARS ];
|
||||
int minargc;
|
||||
gentity_t *vic;
|
||||
int i;
|
||||
|
||||
if( !ent )
|
||||
{
|
||||
ADMP( "^3!bring: ^7console cannot use this command\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
minargc = 2 + skiparg;
|
||||
|
||||
if( G_SayArgc() < minargc )
|
||||
{
|
||||
ADMP( "^3!bring: ^7usage: !grab [name|slot#|clear]\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
G_SayArgv( 1 + skiparg, name, sizeof( name ) );
|
||||
|
||||
if( G_ClientNumbersFromString( name, pids ) != 1 )
|
||||
{
|
||||
G_MatchOnePlayer( pids, err, sizeof( err ) );
|
||||
ADMP( va( "^3!bring: ^7%s\n", err ) );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
if( ent->client->pers.teamSelection != PTE_NONE )
|
||||
{
|
||||
ADMP( "^3!bring: ^7you can only use this command while being a spectator\n" );
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
vic = &g_entities[ pids[ 0 ] ];
|
||||
|
||||
VectorCopy( vic->s.origin, ent->client->ps.origin );
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
+2
-9
@@ -256,22 +256,15 @@ qboolean G_admin_chat_readconfig( gentity_t *ent );
|
||||
void G_admin_chat_sync( gentity_t *ent );
|
||||
void G_admin_chat_update( gentity_t *ent, int chan );
|
||||
|
||||
//all of my commands WEEEEEEEEEE
|
||||
qboolean G_admin_switch( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_mix( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_steal( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_trade( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_drug( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_drop( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_cp( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_credits( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_customgrav( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_explode( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_credits( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_outlaw( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_fireworks( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_nobuild( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_nobuildsave( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_grab( gentity_t *ent, int skiparg );
|
||||
qboolean G_admin_bring( gentity_t *ent, int skiparg );
|
||||
|
||||
void G_admin_print( gentity_t *ent, char *m );
|
||||
void G_admin_buffer_print( gentity_t *ent, char *m );
|
||||
|
||||
+41
-40
@@ -3066,46 +3066,6 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
|
||||
minNormal = BG_FindMinNormalForBuildable( buildable );
|
||||
invert = BG_FindInvertNormalForBuildable( buildable );
|
||||
|
||||
VectorCopy( entity_origin, tmp );
|
||||
|
||||
tmp[2] += mins[2];
|
||||
|
||||
nb = G_Spawn( );
|
||||
nb->s.modelindex = 0;
|
||||
nb->think = NoThink;
|
||||
nb->nextthink = level.time;
|
||||
VectorCopy( tmp, nb->s.pos.trBase );
|
||||
VectorCopy( tmp, nb->r.currentOrigin );
|
||||
trap_LinkEntity( nb );
|
||||
|
||||
|
||||
for ( i = 1, nbent = g_entities + i; i < level.num_entities; i++, nbent++ )
|
||||
{
|
||||
if( nbent->nobuilder == qtrue )
|
||||
{
|
||||
|
||||
range[0] = nbent->nobuildArea;
|
||||
range[1] = nbent->nobuildArea;
|
||||
range[2] = nbent->nobuildHeight;
|
||||
|
||||
VectorAdd( nbent->r.currentOrigin, range, maxs3 );
|
||||
VectorSubtract( nbent->r.currentOrigin, range, mins3 );
|
||||
|
||||
num2 = trap_EntitiesInBox( mins3, maxs3, entitylist, MAX_GENTITIES );
|
||||
for(i = 0; i < num2; i++)
|
||||
{
|
||||
gentity_t *tent2 = &g_entities[ entitylist[ i ] ];
|
||||
|
||||
if( tent2 == nb )
|
||||
{
|
||||
reason = IBE_PERMISSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G_FreeEntity( nb );
|
||||
|
||||
//can we build at this angle?
|
||||
if( !( normal[ 2 ] >= minNormal || ( invert && normal[ 2 ] <= -minNormal ) ) )
|
||||
reason = IBE_NORMAL;
|
||||
@@ -3338,6 +3298,47 @@ itemBuildError_t G_CanBuild( gentity_t *ent, buildable_t buildable, int distance
|
||||
if( !G_SufficientBPAvailable( BIT_HUMANS, buildPoints, buildable ) )
|
||||
reason = IBE_NOPOWER;
|
||||
}
|
||||
|
||||
BG_FindBBoxForBuildable( buildable, mins, maxs );
|
||||
VectorCopy( entity_origin, tmp );
|
||||
|
||||
tmp[2] += mins[2];
|
||||
|
||||
nb = G_Spawn( );
|
||||
nb->s.modelindex = 0;
|
||||
nb->think = NoThink;
|
||||
nb->nextthink = level.time;
|
||||
VectorCopy( tmp, nb->s.pos.trBase );
|
||||
VectorCopy( tmp, nb->r.currentOrigin );
|
||||
trap_LinkEntity( nb );
|
||||
|
||||
|
||||
for ( i = 1, nbent = g_entities + i; i < level.num_entities; i++, nbent++ )
|
||||
{
|
||||
if( nbent->nobuilder == qtrue )
|
||||
{
|
||||
|
||||
range[0] = nbent->nobuildArea;
|
||||
range[1] = nbent->nobuildArea;
|
||||
range[2] = nbent->nobuildHeight;
|
||||
|
||||
VectorAdd( nbent->r.currentOrigin, range, maxs3 );
|
||||
VectorSubtract( nbent->r.currentOrigin, range, mins3 );
|
||||
|
||||
num2 = trap_EntitiesInBox( mins3, maxs3, entitylist, MAX_GENTITIES );
|
||||
for(i = 0; i < num2; i++)
|
||||
{
|
||||
gentity_t *tent2 = &g_entities[ entitylist[ i ] ];
|
||||
|
||||
if( tent2 == nb )
|
||||
{
|
||||
reason = IBE_PERMISSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G_FreeEntity( nb );
|
||||
|
||||
//this item does not fit here
|
||||
if( reason == IBE_NONE && ( tr2.fraction < 1.0 || tr3.fraction < 1.0 ) )
|
||||
|
||||
+34
-10
@@ -4069,7 +4069,7 @@ char *G_statsString( statsCounters_t *sc, pTeam_t *pt )
|
||||
return s;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
=================
|
||||
Cmd_AllStats_f
|
||||
=================
|
||||
@@ -4078,7 +4078,8 @@ char *G_statsString( statsCounters_t *sc, pTeam_t *pt )
|
||||
{
|
||||
int i;
|
||||
int NextViewTime;
|
||||
qboolean HasResults;
|
||||
int NumResults;
|
||||
int Teamcolor;
|
||||
gentity_t *tmpent;
|
||||
|
||||
//check if ent exists
|
||||
@@ -4097,10 +4098,10 @@ char *G_statsString( statsCounters_t *sc, pTeam_t *pt )
|
||||
ADMP( "AllStats has been disabled\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ADMP("^3K^2=^7Kills ^3A^2=^7Assists ^3SK^2=^7StructKills\n^3D^2=^7Deaths ^3F^2=^7Feeds ^3S^2=^7Suicides ^3TK^2=^7Teamkills\n^3DD^2=^7Damage done ^3TDD^2=^7Team Damage done\n^3SB^2=^7Structs Built\n\n" );
|
||||
//display a header describing the data
|
||||
ADMP( "^3 K A SK| D F S TK| DD| SB| Name\n" );
|
||||
HasResults = qfalse;
|
||||
ADMP( "^3 #| K A SK| D F S TK| DD TDD| SB| Name\n" );
|
||||
NumResults = 0;
|
||||
//loop through the clients that are connected
|
||||
for( i = 0; i < level.numConnectedClients; i++ )
|
||||
{
|
||||
@@ -4113,18 +4114,27 @@ char *G_statsString( statsCounters_t *sc, pTeam_t *pt )
|
||||
//check if client is connected and on same team
|
||||
if( tmpent->client && tmpent->client->pers.connected == CON_CONNECTED && tmpent->client->pers.teamSelection == ent->client->pers.teamSelection && tmpent->client->pers.teamSelection != PTE_NONE )
|
||||
{
|
||||
ADMP( va( "^7%3i %3i %3i^3|^7%3i %3i %3i %3i^3|^7%5i^3|^7%3i^3|^7 %s\n",
|
||||
NumResults++;
|
||||
if( tmpent->client->pers.teamSelection == PTE_ALIENS ) Teamcolor = 1;
|
||||
if( tmpent->client->pers.teamSelection == PTE_HUMANS ) Teamcolor = 5;
|
||||
ADMP( va( "^%i%2i^3|^%i%3i %3i %3i^3|^%i%3i %3i %3i %3i^3|^%i%5i %5i^3|^%i%3i^3|^7 %s\n",
|
||||
Teamcolor,
|
||||
NumResults,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.kills ) ? tmpent->client->pers.statscounters.kills : 0,
|
||||
( tmpent->client->pers.statscounters.assists ) ? tmpent->client->pers.statscounters.assists : 0,
|
||||
( tmpent->client->pers.statscounters.structskilled ) ? tmpent->client->pers.statscounters.structskilled : 0,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.deaths ) ? tmpent->client->pers.statscounters.deaths : 0,
|
||||
( tmpent->client->pers.statscounters.feeds ) ? tmpent->client->pers.statscounters.feeds : 0,
|
||||
( tmpent->client->pers.statscounters.suicides ) ? tmpent->client->pers.statscounters.suicides : 0,
|
||||
( tmpent->client->pers.statscounters.teamkills ) ? tmpent->client->pers.statscounters.teamkills : 0,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.dmgdone ) ? tmpent->client->pers.statscounters.dmgdone : 0,
|
||||
( tmpent->client->pers.statscounters.ffdmgdone ) ? tmpent->client->pers.statscounters.ffdmgdone : 0,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.structsbuilt ) ? tmpent->client->pers.statscounters.structsbuilt : 0,
|
||||
( tmpent->client->pers.netname ) ? tmpent->client->pers.netname : "Unknown" ) );
|
||||
HasResults = qtrue;
|
||||
}
|
||||
}
|
||||
else if( g_AllStats.integer == 2 )
|
||||
@@ -4132,23 +4142,37 @@ char *G_statsString( statsCounters_t *sc, pTeam_t *pt )
|
||||
//check if client is connected and has some stats or atleast is on a team
|
||||
if( tmpent->client && tmpent->client->pers.connected == CON_CONNECTED && ( tmpent->client->pers.teamSelection != PTE_NONE ) )
|
||||
{
|
||||
ADMP( va( "^7%3i %3i %3i^3|^7%3i %3i %3i %3i^3|^7%5i^3|^7%3i^3|^7 %s\n",
|
||||
NumResults++;
|
||||
if( tmpent->client->pers.teamSelection == PTE_ALIENS ) Teamcolor = 1;
|
||||
if( tmpent->client->pers.teamSelection == PTE_HUMANS ) Teamcolor = 5;
|
||||
ADMP( va( "^%i%2i^3|^%i%3i %3i %3i^3|^%i%3i %3i %3i %3i^3|^%i%5i %5i^3|^%i%3i^3|^7 %s\n",
|
||||
Teamcolor,
|
||||
NumResults,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.kills ) ? tmpent->client->pers.statscounters.kills : 0,
|
||||
( tmpent->client->pers.statscounters.assists ) ? tmpent->client->pers.statscounters.assists : 0,
|
||||
( tmpent->client->pers.statscounters.structskilled ) ? tmpent->client->pers.statscounters.structskilled : 0,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.deaths ) ? tmpent->client->pers.statscounters.deaths : 0,
|
||||
( tmpent->client->pers.statscounters.feeds ) ? tmpent->client->pers.statscounters.feeds : 0,
|
||||
( tmpent->client->pers.statscounters.suicides ) ? tmpent->client->pers.statscounters.suicides : 0,
|
||||
( tmpent->client->pers.statscounters.teamkills ) ? tmpent->client->pers.statscounters.teamkills : 0,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.dmgdone ) ? tmpent->client->pers.statscounters.dmgdone : 0,
|
||||
( tmpent->client->pers.statscounters.ffdmgdone ) ? tmpent->client->pers.statscounters.ffdmgdone : 0,
|
||||
Teamcolor,
|
||||
( tmpent->client->pers.statscounters.structsbuilt ) ? tmpent->client->pers.statscounters.structsbuilt : 0,
|
||||
( tmpent->client->pers.netname ) ? tmpent->client->pers.netname : "Unknown" ) );
|
||||
HasResults = qtrue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( HasResults == qfalse ) ADMP( " ^3EMPTY!\n" );
|
||||
if( NumResults == 0 ) {
|
||||
ADMP( " ^3EMPTY!\n" );
|
||||
} else {
|
||||
ADMP( va( "^7 %i Players found!\n", NumResults ) );
|
||||
}
|
||||
//update time last viewed
|
||||
|
||||
ent->client->pers.statscounters.AllstatstimeLastViewed = level.time;
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -264,7 +264,7 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||
// this works as a temporary hack until the client supports it
|
||||
if ( meansOfDeath == MOD_RADIATION )
|
||||
trap_SendServerCommand( -1, va( "print \"%s^7 was irradiated by his base\n\"", self->client->pers.netname ) );
|
||||
else if ( meansOfDeath == MOD_LEVEL2_CLAW )
|
||||
else if ( meansOfDeath == MOD_LEVEL2_CLAW && g_maraObituary.integer )
|
||||
trap_SendServerCommand( -1, va( "print \"%s^7 bit off %s^7's face\n\"", attacker->client->pers.netname, self->client->pers.netname ) );
|
||||
else
|
||||
{
|
||||
|
||||
+3
-6
@@ -403,9 +403,7 @@ typedef struct
|
||||
qboolean specd;
|
||||
qboolean saved;
|
||||
qboolean designatedBuilder;
|
||||
statsCounters_t statscounters;
|
||||
qboolean cusgrav;
|
||||
int cusgravlvl;
|
||||
statsCounters_t statscounters;
|
||||
qboolean healing;
|
||||
char chat[ CHAT_MAXCHAN ][ CHAT_MAXPASS ];
|
||||
qboolean ignoreAdminWarnings;
|
||||
@@ -993,8 +991,6 @@ gentity_t *fire_slowBlob( gentity_t *self, vec3_t start, vec3_t dir );
|
||||
gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir );
|
||||
gentity_t *fire_hive( gentity_t *self, vec3_t start, vec3_t dir );
|
||||
gentity_t *launch_grenade( gentity_t *self, vec3_t start, vec3_t dir );
|
||||
gentity_t *launch_grenade2( gentity_t *self, vec3_t start, vec3_t dir );
|
||||
|
||||
|
||||
//
|
||||
// g_mover.c
|
||||
@@ -1075,7 +1071,6 @@ qboolean G_FilterPacket( char *from );
|
||||
void FireWeapon( gentity_t *ent );
|
||||
void FireWeapon2( gentity_t *ent );
|
||||
void FireWeapon3( gentity_t *ent );
|
||||
void Blow_up( gentity_t *ent );
|
||||
|
||||
//
|
||||
// g_cmds.c
|
||||
@@ -1379,6 +1374,8 @@ extern vmCvar_t g_chat;
|
||||
|
||||
extern vmCvar_t g_KillerHP;
|
||||
|
||||
extern vmCvar_t g_maraObituary
|
||||
|
||||
extern vmCvar_t g_decolorLogfiles;
|
||||
|
||||
extern vmCvar_t g_privateMessages;
|
||||
|
||||
@@ -177,6 +177,8 @@ vmCvar_t g_bleedingSpree;
|
||||
|
||||
vmCvar_t g_KillerHP;
|
||||
|
||||
vmCvar_t g_maraObituary;
|
||||
|
||||
vmCvar_t g_decolorLogfiles;
|
||||
|
||||
vmCvar_t g_tag;
|
||||
@@ -453,6 +455,8 @@ static cvarTable_t gameCvarTable[ ] =
|
||||
|
||||
{ &g_KillerHP, "g_KillerHP", "0", CVAR_ARCHIVE, 0, qtrue },
|
||||
|
||||
{ &g_maraObituary, "g_maraObituary", "1", CVAR_ARCHIVE, 0, qfalse },
|
||||
|
||||
{ &g_decolorLogfiles, "g_decolorLogfiles", "0", CVAR_ARCHIVE, 0, qfalse },
|
||||
|
||||
{ &g_tag, "g_tag", "main", CVAR_INIT, 0, qfalse },
|
||||
|
||||
@@ -876,50 +876,3 @@ gentity_t *fire_bounceBall( gentity_t *self, vec3_t start, vec3_t dir )
|
||||
|
||||
return bolt;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
launch_grenade2
|
||||
|
||||
This is called in the explode command in g_admin.c
|
||||
=================
|
||||
*/
|
||||
gentity_t *launch_grenade2( gentity_t *self, vec3_t start, vec3_t dir )
|
||||
{
|
||||
gentity_t *bolt;
|
||||
|
||||
VectorNormalize( dir );
|
||||
|
||||
bolt = G_Spawn( );
|
||||
bolt->classname = "grenade";
|
||||
bolt->nextthink = level.time;
|
||||
bolt->think = G_ExplodeMissile;
|
||||
bolt->s.eType = ET_MISSILE;
|
||||
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
|
||||
bolt->s.weapon = WP_GRENADE;
|
||||
bolt->s.eFlags = EF_BOUNCE_HALF;
|
||||
bolt->s.generic1 = WPM_PRIMARY; //weaponMode
|
||||
bolt->r.ownerNum = self->s.number;
|
||||
bolt->parent = self;
|
||||
bolt->damage = GRENADE_DAMAGE;
|
||||
bolt->splashDamage = GRENADE_DAMAGE;
|
||||
bolt->splashRadius = GRENADE_RANGE;
|
||||
bolt->methodOfDeath = MOD_SUICIDE;
|
||||
bolt->splashMethodOfDeath = MOD_EXPLODE;
|
||||
bolt->clipmask = MASK_SHOT;
|
||||
bolt->target_ent = NULL;
|
||||
bolt->r.mins[ 0 ] = bolt->r.mins[ 1 ] = bolt->r.mins[ 2 ] = -3.0f;
|
||||
bolt->r.maxs[ 0 ] = bolt->r.maxs[ 1 ] = bolt->r.maxs[ 2 ] = 3.0f;
|
||||
bolt->s.time = level.time;
|
||||
|
||||
bolt->s.pos.trType = TR_GRAVITY;
|
||||
bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame
|
||||
VectorCopy( start, bolt->s.pos.trBase );
|
||||
VectorScale( dir, GRENADE_SPEED, bolt->s.pos.trDelta );
|
||||
SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
|
||||
|
||||
VectorCopy( start, bolt->r.currentOrigin );
|
||||
|
||||
return bolt;
|
||||
}
|
||||
//=============================================================================
|
||||
@@ -1625,17 +1625,3 @@ void FireWeapon( gentity_t *ent )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Blow_up( gentity_t *ent )
|
||||
{
|
||||
|
||||
gentity_t *m;
|
||||
|
||||
|
||||
// set directions
|
||||
AngleVectors( ent->client->ps.viewangles, forward, right, up );
|
||||
CalcMuzzlePoint( ent, forward, right, up, muzzle );
|
||||
|
||||
m = launch_grenade2( ent, muzzle, forward );
|
||||
}
|
||||
@@ -27,7 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
// q_shared.h -- included first by ALL program modules.
|
||||
// A user mod should never modify this file
|
||||
#define PRODUCT_NAME "p-g-qvm"
|
||||
#define PRODUCT_VERSION "1.6.1"
|
||||
#define PRODUCT_VERSION "1.6.2"
|
||||
|
||||
#ifdef SVN_VERSION
|
||||
# define Q3_VERSION PRODUCT_NAME " v" PRODUCT_VERSION " SVN r" SVN_VERSION
|
||||
|
||||
Reference in new issue
Block a user