mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 15:21:34 +00:00
splint warning fixed in g_main.c
This commit is contained in:
parent
cf7a1fe666
commit
3e93946d0b
3 changed files with 11 additions and 7 deletions
|
@ -4,5 +4,6 @@
|
||||||
#include "g_local.h"
|
#include "g_local.h"
|
||||||
|
|
||||||
qboolean SetClass( gentity_t *ent, char *s, /*@null@*/ char *teamName, qboolean SaveToCvar );
|
qboolean SetClass( gentity_t *ent, char *s, /*@null@*/ char *teamName, qboolean SaveToCvar );
|
||||||
|
void DragCheck( void );
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -2618,7 +2618,7 @@ extern vmCvar_t g_developer;
|
||||||
// Prevents a single statement from beeing executed if developer isn't set
|
// Prevents a single statement from beeing executed if developer isn't set
|
||||||
#define DEVELOPER(X) if(g_developer.integer != 0) { \
|
#define DEVELOPER(X) if(g_developer.integer != 0) { \
|
||||||
X\
|
X\
|
||||||
} else
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "g_team.h" // teamplay specific stuff
|
#include "g_team.h" // teamplay specific stuff
|
||||||
|
|
|
@ -2568,6 +2568,10 @@ Runs thinking code for this frame if necessary
|
||||||
void G_RunThink (gentity_t *ent) {
|
void G_RunThink (gentity_t *ent) {
|
||||||
float thinktime;
|
float thinktime;
|
||||||
|
|
||||||
|
if(ent == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
thinktime = ent->nextthink;
|
thinktime = ent->nextthink;
|
||||||
if (thinktime <= 0) {
|
if (thinktime <= 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -2577,13 +2581,13 @@ void G_RunThink (gentity_t *ent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ent->nextthink = 0;
|
ent->nextthink = 0;
|
||||||
if (!ent->think) {
|
if (ent->think == NULL) {
|
||||||
G_Error ( "NULL ent->think");
|
G_Error ( "NULL ent->think");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_LUA
|
#ifdef G_LUA
|
||||||
if(ent->luaThink && !ent->client)
|
if(ent->luaThink != NULL && ent->client == NULL)
|
||||||
{
|
{
|
||||||
LuaHook_G_EntityThink(ent->luaThink, ent->s.number);
|
LuaHook_G_EntityThink(ent->luaThink, ent->s.number);
|
||||||
}
|
}
|
||||||
|
@ -2600,7 +2604,6 @@ Advances the non-player objects in the world
|
||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void DragCheck( void ); //RPG-X: J2J - Added to rid warning.
|
|
||||||
void CheckHealthInfoMessage( void );
|
void CheckHealthInfoMessage( void );
|
||||||
void G_RunFrame( int levelTime ) {
|
void G_RunFrame( int levelTime ) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -2731,15 +2734,15 @@ void G_RunFrame( int levelTime ) {
|
||||||
|
|
||||||
client = ent->client;
|
client = ent->client;
|
||||||
|
|
||||||
if (!(client->pers.cmd.buttons & BUTTON_USE)) {
|
if ((client->pers.cmd.buttons & BUTTON_USE) == 0) {
|
||||||
client->pressedUse = qfalse;
|
client->pressedUse = qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_classData[client->sess.sessionClass].isn00b == qtrue)
|
if (g_classData[client->sess.sessionClass].isn00b == qtrue)
|
||||||
{
|
{
|
||||||
if ((client->n00bTime != -1) && (client->n00bTime <= level.time) && client->origClass)
|
if ((client->n00bTime != -1) && (client->n00bTime <= level.time) && client->origClass[0] != 0)
|
||||||
{
|
{
|
||||||
if(!SetClass( ent, client->origClass, NULL, qtrue )) {
|
if(SetClass( ent, client->origClass, NULL, qtrue ) == qfalse) {
|
||||||
DEVELOPER(G_Printf(S_COLOR_YELLOW "G_RunFrame - Warning: SetClass failed!\n"););
|
DEVELOPER(G_Printf(S_COLOR_YELLOW "G_RunFrame - Warning: SetClass failed!\n"););
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue