Merge branch 'splint' of git@github.com:UberGames/rpgxEF.git into splint

This commit is contained in:
Harry Young 2013-08-13 22:50:00 +02:00
commit e1198d3079
4 changed files with 26 additions and 20 deletions

View file

@ -425,7 +425,6 @@ custom explosion effect/sound?
void SP_misc_model_breakable( gentity_t *ent )
{
char damageModel[MAX_QPATH];
int32_t len = 0;
entityShared_t* eShared = &ent->r;
entityState_t* eState = &ent->s;
@ -455,7 +454,7 @@ void SP_misc_model_breakable( gentity_t *ent )
if(ent->model2 == NULL) {
len = strlen( ent->model ) - 4;
int32_t len = strlen( ent->model ) - 4;
strncpy( damageModel, ent->model, len );
damageModel[len] = 0; //chop extension
}
@ -541,12 +540,12 @@ void ammo_fade_out( gentity_t *ent )
//! Think function for the ammo station
void ammo_think( gentity_t *ent )
{
int32_t dif = 0;
int32_t i = 0;
// Still has ammo to give
if ( ent->enemy && ent->enemy->client )
{
int32_t i = 0;
//assume that we'll finish here, if we don't, it will be overridden
ent->use = ammo_use;
ent->think = 0;//qvm complains about using NULL
@ -556,7 +555,7 @@ void ammo_think( gentity_t *ent )
if ( (ent->enemy->client->ps.stats[STAT_WEAPONS]&( 1 << i )) ) {
//has this weapon
dif = Max_Weapon(i) - ent->enemy->client->ps.ammo[i];//needs ammo?
int32_t dif = Max_Weapon(i) - ent->enemy->client->ps.ammo[i];//needs ammo?
if (dif > 2 ) {
dif= 2;
@ -595,8 +594,6 @@ void ammo_think( gentity_t *ent )
//! use function for a ammo station
void ammo_use( gentity_t *self, gentity_t *other, gentity_t *activator)
{
int32_t dif = 0;
int32_t i = 0;
if (self->think != NULL) {
if (self->use != NULL) {
@ -604,7 +601,11 @@ void ammo_use( gentity_t *self, gentity_t *other, gentity_t *activator)
self->nextthink = -1;
}
} else {
int32_t dif = 0;
if ( other && other->client ) {
int32_t i = 0;
for ( ; i < WP_NUM_WEAPONS && dif == 0; i++ ) {
//go through all weapons

View file

@ -1206,8 +1206,6 @@ char* G_Client_Connect( int32_t clientNum, qboolean firstTime, qboolean isBot )
gentity_t* ent = NULL;
vmCvar_t mapname;
vmCvar_t sv_hostname;
int32_t tmpScore = 0; //Without these, tonnes of proverbial shyte hits the fan if a bot connects O_o
int32_t i = 0;
qboolean changeRank = qfalse;
ent = &g_entities[ clientNum ];
@ -1247,6 +1245,7 @@ char* G_Client_Connect( int32_t clientNum, qboolean firstTime, qboolean isBot )
if ( rpg_uniqueNames.integer != 0 && !isBot ) {
char name[36];
char oldName[36];
int32_t i = 0;
memset(name, 0, sizeof(name));
memset(oldName, 0, sizeof(oldName));
@ -1304,6 +1303,9 @@ char* G_Client_Connect( int32_t clientNum, qboolean firstTime, qboolean isBot )
client->sess.sessionClass = 0;
client->ps.persistant[PERS_SCORE] = 1;
} else {
int32_t tmpScore = 0;
int32_t i = 0;
newClass = Info_ValueForKey (userinfo, "ui_playerClass" );
newRank = Info_ValueForKey (userinfo, "ui_playerRank" );
@ -1360,6 +1362,8 @@ char* G_Client_Connect( int32_t clientNum, qboolean firstTime, qboolean isBot )
//Check to see if this player already connected on this server
if ( (rpg_renamedPlayers.integer != 0) && ((ent->r.svFlags & SVF_BOT) == 0) ) {
int32_t i = 0;
for ( i = 0; i < MAX_RECON_NAMES; i++ ) {
if ( g_reconData[i].previousName[0] == 0 ) {
continue;
@ -2518,11 +2522,12 @@ static void G_Client_LocationsMessage( gentity_t *ent ) {
//TiM - Modified to work with RPG-X
void G_Client_CheckClientStatus(void) {
int32_t i = 0;
gentity_t* loc = NULL;
gentity_t* ent = NULL;
if (level.time - level.lastTeamLocationTime > TEAM_LOCATION_UPDATE_TIME) {
int32_t i = 0;
level.lastTeamLocationTime = level.time;
for ( ; i < g_maxclients.integer; i++) {
@ -2659,10 +2664,8 @@ FIXME: for elimination, the last man standing must be ranked first
============
*/
void G_Client_CalculateRanks( qboolean fromExit ) {
int i;
int rank;
int score;
int newScore;
int32_t i = 0;
gclient_t *cl;
level.follow1 = -1;
@ -2671,7 +2674,7 @@ void G_Client_CalculateRanks( qboolean fromExit ) {
level.numNonSpectatorClients = 0;
level.numPlayingClients = 0;
level.numVotingClients = 0; // don't count bots
for ( i = 0 ; i < level.maxclients ; i++ ) {
for ( ; i < level.maxclients ; i++ ) {
if ( level.clients[i].pers.connected != CON_DISCONNECTED ) {
level.sortedClients[level.numConnectedClients] = i;
level.numConnectedClients++;
@ -2712,9 +2715,11 @@ void G_Client_CalculateRanks( qboolean fromExit ) {
}
}
} else {
rank = -1;
score = 0;
int32_t rank = -1;
int32_t score = 0;
for ( i = 0; i < level.numPlayingClients; i++ ) {
int32_t newScore = 0;
cl = &level.clients[ level.sortedClients[i] ];
newScore = cl->ps.persistant[PERS_SCORE];
if ( i == 0 || newScore != score ) {
@ -2756,7 +2761,7 @@ void G_Client_CalculateRanks( qboolean fromExit ) {
}
}
void G_Client_UpdateSoundZones() {
void G_Client_UpdateSoundZones(void) {
int32_t i = 0;
int32_t b = 0;
int32_t entlist[MAX_GENTITIES];

View file

@ -2808,7 +2808,7 @@ void trap_UnlinkEntity( gentity_t* ent );
*
* The size of the box is defined by mins and maxs.
*/
int trap_EntitiesInBox( const vec3_t mins, const vec3_t maxs, int* entityList, int maxcount );
int trap_EntitiesInBox( const vec3_t mins, const vec3_t maxs, int32_t* entityList, int maxcount );
/**
* Checks if a entity is in contact with a defined box.

View file

@ -165,7 +165,7 @@ void trap_UnlinkEntity( gentity_t *ent ) {
}
int trap_EntitiesInBox( const vec3_t mins, const vec3_t maxs, int *list, int maxcount ) {
int trap_EntitiesInBox( const vec3_t mins, const vec3_t maxs, int32_t* list, int maxcount ) {
return syscall( G_ENTITIES_IN_BOX, mins, maxs, list, maxcount );
}