summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_buildable.c8
-rw-r--r--src/game/g_cmds.c4
2 files changed, 5 insertions, 7 deletions
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 ) &&