diff options
author | /dev/humancontroller <devhc@example.com> | 2015-03-28 02:54:30 +0100 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:12 +0100 |
commit | f8dd3e4323d44c717c34e64d26128cc9ed4d6c98 (patch) | |
tree | 74b55396a63bdb585911bd39d6f6a56fbcf0238f /src/game | |
parent | 02b95e3bc75c48849dcfc34e32cca028ee09a3b7 (diff) |
refactor stuff
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_active.c | 6 | ||||
-rw-r--r-- | src/game/g_admin.c | 2 | ||||
-rw-r--r-- | src/game/g_admin.h | 2 | ||||
-rw-r--r-- | src/game/g_buildable.c | 6 | ||||
-rw-r--r-- | src/game/g_local.h | 7 | ||||
-rw-r--r-- | src/game/g_main.c | 10 |
6 files changed, 4 insertions, 29 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index f99e7661..e17f3806 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -1249,16 +1249,10 @@ void ClientThink_real( gentity_t *ent ) // sanity check the command time to prevent speedup cheating if( ucmd->serverTime > level.time + 200 ) - { ucmd->serverTime = level.time + 200; -// G_Printf("serverTime <<<<<\n" ); - } if( ucmd->serverTime < level.time - 1000 ) - { ucmd->serverTime = level.time - 1000; -// G_Printf("serverTime >>>>>\n" ); - } msec = ucmd->serverTime - client->ps.commandTime; // following others may result in bad times, but we still want diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 272dd363..9c8941fb 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -2441,7 +2441,7 @@ qboolean G_admin_adminhelp( gentity_t *ent ) } else { - //!adminhelp param + // adminhelp param char param[ MAX_ADMIN_CMD_LEN ]; g_admin_cmd_t *admincmd; qboolean denied = qfalse; diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 9971d450..f78752d3 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -50,7 +50,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * IMMUTABLE - admin commands cannot be used on them * INCOGNITO - does not show up as an admin in /listplayers * ALLFLAGS - all flags (including command flags) apply to this player - * ADMINCHAT - receieves and can send /a admin messages + * ADMINCHAT - receives and can send /a admin messages */ #define ADMF_IMMUNITY "IMMUNITY" #define ADMF_NOCENSORFLOOD "NOCENSORFLOOD" diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index a61b0eff..9e122bdc 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -2261,9 +2261,6 @@ void HMGTurret_FindEnemy( gentity_t *self ) gentity_t *target; int start; - if( self->enemy ) - self->enemy->targeted = NULL; - self->enemy = NULL; // Look for targets in a box around the turret @@ -2283,7 +2280,6 @@ void HMGTurret_FindEnemy( gentity_t *self ) continue; self->enemy = target; - self->enemy->targeted = self; return; } } @@ -4145,7 +4141,6 @@ static void G_LayoutBuildItem( buildable_t buildable, vec3_t origin, gentity_t *builder; builder = G_Spawn( ); - builder->client = 0; VectorCopy( origin, builder->s.pos.trBase ); VectorCopy( angles, builder->s.angles ); VectorCopy( origin2, builder->s.origin2 ); @@ -4376,7 +4371,6 @@ void G_BuildLogRevert( int id ) { gentity_t *builder = G_Spawn(); - builder->client = NULL; VectorCopy( log->origin, builder->s.pos.trBase ); VectorCopy( log->angles, builder->s.angles ); VectorCopy( log->origin2, builder->s.origin2 ); diff --git a/src/game/g_local.h b/src/game/g_local.h index 45926560..8fd929e0 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -116,7 +116,6 @@ struct gentity_s int soundLoop; gentity_t *parent; gentity_t *nextTrain; - gentity_t *prevTrain; vec3_t pos1, pos2; float rotatorAngle; gentity_t *clipBrush; // clipping brush for model doors @@ -125,7 +124,6 @@ struct gentity_s int timestamp; // body queue sinking, etc - float angle; // set in editor, -1 = up, -2 = down char *target; char *targetname; char *team; @@ -154,7 +152,6 @@ struct gentity_s void (*die)( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod ); int pain_debounce_time; - int fly_sound_debounce_time; // wind tunnel int last_move_time; int health; @@ -192,7 +189,6 @@ struct gentity_s gentity_t *parentNode; // for creep and defence/spawn dependencies gentity_t *rangeMarker; qboolean active; // for power repeater, but could be useful elsewhere - qboolean locked; // used for turret tracking qboolean powered; // for human buildables struct namelog_s *builtBy; // person who built this int dcc; // number of controlling dccs @@ -213,7 +209,6 @@ struct gentity_s int credits[ MAX_CLIENTS ]; // human credits for each client int killedBy; // clientNum of killer - gentity_t *targeted; // true if the player is currently a valid target of a turret vec3_t turretAim; // aim vector for turrets vec3_t turretAimRate; // track turn speed for norfenturrets int turretSpinupTime; // spinup delay for norfenturrets @@ -234,8 +229,6 @@ struct gentity_s int lastDamageTime; int nextRegenTime; - qboolean ownerClear; // used for missle tracking - qboolean pointAgainstWorld; // don't use the bbox for map collisions int buildPointZone; // index for zone diff --git a/src/game/g_main.c b/src/game/g_main.c index 52e59ddd..b150a95d 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -388,11 +388,8 @@ void G_FindTeams( void ) c = 0; c2 = 0; - for( i = 1, e = g_entities+i; i < level.num_entities; i++, e++ ) + for( i = MAX_CLIENTS, e = g_entities + i; i < level.num_entities; i++, e++ ) { - if( !e->inuse ) - continue; - if( !e->team ) continue; @@ -405,9 +402,6 @@ void G_FindTeams( void ) for( j = i + 1, e2 = e + 1; j < level.num_entities; j++, e2++ ) { - if( !e2->inuse ) - continue; - if( !e2->team ) continue; @@ -1667,7 +1661,7 @@ void ExitLevel( void ) cl->ps.persistant[ PERS_SCORE ] = 0; } - // we need to do this here before chaning to CON_CONNECTING + // we need to do this here before changing to CON_CONNECTING G_WriteSessionData( ); // change all client states to connecting, so the early players into the |