summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_buildable.c2
-rw-r--r--src/game/g_buildable.c8
-rw-r--r--src/game/g_cmds.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index 9b1d8d4..9821bbc 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -2216,7 +2216,7 @@ void CG_Cuboid_Response(void)
// cb2 <a> <b> <c> : server sets client-side cuboid
// cb3 <echo> : server agrees on player's cuboid
// cb4 <echo> : server disagrees on player's cuboid
- int offs;
+ int offs = 0;
if( !BG_Buildable( cg.predictedPlayerState.stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT, NULL )->cuboid )
return;
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 3114792..efac6b3 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2407,10 +2407,8 @@ void HMGTurret_Think( gentity_t *self )
if( !self->powered )
{
// if power loss drop turret
- if( self->spawned &&
- HMGTurret_State( self, MGT_STATE_INACTIVE ) );
- return;
-
+ if( self->spawned )
+ HMGTurret_State( self, MGT_STATE_INACTIVE );
return;
}
if( !self->spawned )
@@ -3736,7 +3734,7 @@ static gentity_t *G_FinishSpawningBuildable( gentity_t *ent, qboolean force )
else
VectorSet( normal, 0.0f, 0.0f, 1.0f );
- built = G_Build( ent, buildable, ent->s.pos.trBase, normal, ent->s.angles, built->cuboidSize );
+ built = G_Build( ent, buildable, ent->s.pos.trBase, normal, ent->s.angles, ent->cuboidSize );
built->takedamage = qtrue;
built->spawned = qtrue; //map entities are already spawned
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index f3eaa83..16bc9b9 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -2616,6 +2616,8 @@ void Cmd_Build_f( gentity_t *ent )
buildable = BG_BuildableByName( s )->number;
+ team = ent->client->ps.stats[ STAT_TEAM ];
+
/* To allow players build cuboids with completely arbitrary
* dimensions (the current resizing method doesn't provide
* much precision) the build command was extended with the
@@ -2667,8 +2669,6 @@ void Cmd_Build_f( gentity_t *ent )
return;
}
- team = ent->client->ps.stats[ STAT_TEAM ];
-
if( buildable != BA_NONE &&
( ( 1 << ent->client->ps.weapon ) & BG_Buildable( buildable, NULL )->buildWeapon ) &&
BG_BuildableIsAllowed( buildable ) &&