summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-12 16:30:38 +0200
committerenneract <trem.redman@gmail.com>2014-07-12 17:06:40 +0200
commit6f7401ea027a28db7dbfc981b0a23086f31fc920 (patch)
treee8e3bf90ae28fe2412efac934ad15e53a7a3121c /src/game
parentee3e2ce63c1f6810d36cc4e22eddeb51527efc1d (diff)
fix the crash that occurs, for example, when selecting a cuboid to build
this also possibly fixes "relaying cuboids" also add proper declarations for related functions
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_client.c8
-rw-r--r--src/game/g_local.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 0f96ce6..8aa5bd8 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1797,10 +1797,10 @@ G_RelayCuboidToSpectators
Called everytime a player changes his cuboid size.
============
*/
-void G_RelayCuboidToSpectators( gentity_t *self )
+void G_RelayCuboidToSpectators( gclient_t *client )
{
- self->client->ps.misc[ MISC_CUBOID_X ] = self->client->cuboidSelection[ 0 ] * 10;
- self->client->ps.misc[ MISC_CUBOID_Y ] = self->client->cuboidSelection[ 1 ] * 10;
- self->client->ps.misc[ MISC_CUBOID_Z ] = self->client->cuboidSelection[ 2 ] * 10;
+ client->ps.misc[ MISC_CUBOID_X ] = client->cuboidSelection[ 0 ] * 10;
+ client->ps.misc[ MISC_CUBOID_Y ] = client->cuboidSelection[ 1 ] * 10;
+ client->ps.misc[ MISC_CUBOID_Z ] = client->cuboidSelection[ 2 ] * 10;
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 944140f..17136ce 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -824,6 +824,9 @@ const char *G_CuboidName(buildable_t buildable, const vec3_t cuboidSize,
void G_LayoutBuildItem( buildable_t buildable, vec3_t origin, vec3_t angles, vec3_t origin2, vec3_t angles2 );
void G_RemoveUnbuiltBuildables( gentity_t *self );
void G_UpdatePowerGrid( float dt );
+int G_GetBuildPoints( const vec3_t pos, team_t team );
+void G_RelayCuboidToSpectators( gclient_t *client );
+qboolean G_CheckCuboidSize( vec3_t dims, buildable_t type );
//
// g_utils.c