summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2015-06-14 15:29:02 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:16 +0100
commitc595c658853ee1198cb2ed6798c57ba1be5ae8c3 (patch)
treed952e8f8ea3c6f62ec9c9f245dd283be2fed039e /src
parentfd05e89083603366d816445350b632ae60bc4387 (diff)
constize the input-only parameters of a bunch of functions
Diffstat (limited to 'src')
-rw-r--r--src/game/g_client.c4
-rw-r--r--src/game/g_local.h14
-rw-r--r--src/game/g_utils.c12
3 files changed, 15 insertions, 15 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 8fd483e8..7c1254f9 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -550,7 +550,7 @@ G_SetClientViewAngle
==================
*/
-void G_SetClientViewAngle( gentity_t *ent, vec3_t angle )
+void G_SetClientViewAngle( gentity_t *ent, const vec3_t angle )
{
int i;
@@ -1195,7 +1195,7 @@ after the first ClientBegin, and after each respawn
Initializes all non-persistant parts of playerState
============
*/
-void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles )
+void ClientSpawn( gentity_t *ent, gentity_t *spawn, const vec3_t origin, const vec3_t angles )
{
int index;
vec3_t spawn_origin, spawn_angles;
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 0ff9ce1a..f8094715 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -844,10 +844,10 @@ void G_UpdateBuildableRangeMarkers( void );
qboolean G_AddressParse( const char *str, addr_t *addr );
qboolean G_AddressCompare( const addr_t *a, const addr_t *b );
-int G_ParticleSystemIndex( char *name );
-int G_ShaderIndex( char *name );
-int G_ModelIndex( char *name );
-int G_SoundIndex( char *name );
+int G_ParticleSystemIndex( const char *name );
+int G_ShaderIndex( const char *name );
+int G_ModelIndex( const char *name );
+int G_SoundIndex( const char *name );
void G_KillBox (gentity_t *ent);
gentity_t *G_Find (gentity_t *from, int fieldofs, const char *match);
gentity_t *G_PickTarget (char *targetname);
@@ -856,7 +856,7 @@ void G_SetMovedir ( vec3_t angles, vec3_t movedir);
void G_InitGentity( gentity_t *e );
gentity_t *G_Spawn( void );
-gentity_t *G_TempEntity( vec3_t origin, int event );
+gentity_t *G_TempEntity( const vec3_t origin, int event );
void G_Sound( gentity_t *ent, int channel, int soundIndex );
void G_FreeEntity( gentity_t *e );
qboolean G_EntitiesFree( void );
@@ -982,14 +982,14 @@ void G_ClearPlayerZapEffects( gentity_t *player );
// g_client.c
//
void G_AddCreditToClient( gclient_t *client, short credit, qboolean cap );
-void G_SetClientViewAngle( gentity_t *ent, vec3_t angle );
+void G_SetClientViewAngle( gentity_t *ent, const vec3_t angle );
gentity_t *G_SelectTremulousSpawnPoint( team_t team, vec3_t preference, vec3_t origin, vec3_t angles );
gentity_t *G_SelectSpawnPoint( vec3_t avoidPoint, vec3_t origin, vec3_t angles );
gentity_t *G_SelectAlienLockSpawnPoint( vec3_t origin, vec3_t angles );
gentity_t *G_SelectHumanLockSpawnPoint( vec3_t origin, vec3_t angles );
void respawn( gentity_t *ent );
void BeginIntermission( void );
-void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles );
+void ClientSpawn( gentity_t *ent, gentity_t *spawn, const vec3_t origin, const vec3_t angles );
void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod );
qboolean SpotWouldTelefrag( gentity_t *spot );
diff --git a/src/game/g_utils.c b/src/game/g_utils.c
index 71cf52e4..83bd0c55 100644
--- a/src/game/g_utils.c
+++ b/src/game/g_utils.c
@@ -93,7 +93,7 @@ G_FindConfigstringIndex
================
*/
-int G_FindConfigstringIndex( char *name, int start, int max, qboolean create )
+int G_FindConfigstringIndex( const char *name, int start, int max, qboolean create )
{
int i;
char s[ MAX_STRING_CHARS ];
@@ -122,22 +122,22 @@ int G_FindConfigstringIndex( char *name, int start, int max, qboolean create )
return i;
}
-int G_ParticleSystemIndex( char *name )
+int G_ParticleSystemIndex( const char *name )
{
return G_FindConfigstringIndex( name, CS_PARTICLE_SYSTEMS, MAX_GAME_PARTICLE_SYSTEMS, qtrue );
}
-int G_ShaderIndex( char *name )
+int G_ShaderIndex( const char *name )
{
return G_FindConfigstringIndex( name, CS_SHADERS, MAX_GAME_SHADERS, qtrue );
}
-int G_ModelIndex( char *name )
+int G_ModelIndex( const char *name )
{
return G_FindConfigstringIndex( name, CS_MODELS, MAX_MODELS, qtrue );
}
-int G_SoundIndex( char *name )
+int G_SoundIndex( const char *name )
{
return G_FindConfigstringIndex( name, CS_SOUNDS, MAX_SOUNDS, qtrue );
}
@@ -514,7 +514,7 @@ The origin will be snapped to save net bandwidth, so care
must be taken if the origin is right on a surface (snap towards start vector first)
=================
*/
-gentity_t *G_TempEntity( vec3_t origin, int event )
+gentity_t *G_TempEntity( const vec3_t origin, int event )
{
gentity_t *e;
vec3_t snapped;