diff options
author | Tim Angus <tim@ngus.net> | 2011-02-13 19:25:56 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:59 +0000 |
commit | e0a39a125ba29d2851a7bcdecb520f77c3e68b43 (patch) | |
tree | feb1c11c3584021533eddf3ab34e08b58ae530f1 /src | |
parent | f8a3affa56ffb27759684a8cdd74c9a8c672a88a (diff) |
* Make parameters to G_Build const
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_buildable.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index f64e1372..dd603309 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -3471,14 +3471,18 @@ G_Build Spawns a buildable ================ */ -static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, vec3_t origin, vec3_t angles ) +static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, + const vec3_t origin, const vec3_t angles ) { gentity_t *built; vec3_t normal; + vec3_t localOrigin; char readable[ MAX_STRING_CHARS ]; char buildnums[ MAX_STRING_CHARS ]; buildLog_t *log; + VectorCopy( origin, localOrigin ); + if( builder->client ) log = G_BuildLogNew( builder, BF_CONSTRUCT ); else @@ -3522,7 +3526,7 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, vec3_t ori // when building the initial layout, spawn the entity slightly off its // target surface so that it can be "dropped" onto it if( !builder->client ) - VectorMA( origin, 1.0f, normal, origin ); + VectorMA( localOrigin, 1.0f, normal, localOrigin ); built->health = 1; @@ -3654,7 +3658,7 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, vec3_t ori else built->builtBy = -1; - G_SetOrigin( built, origin ); + G_SetOrigin( built, localOrigin ); // gently nudge the buildable onto the surface :) VectorScale( normal, -50.0f, built->s.pos.trDelta ); |