mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 17:00:53 +00:00
fixed more splint warnings in g_main.c
This commit is contained in:
parent
3e93946d0b
commit
86109411f9
4 changed files with 29 additions and 40 deletions
|
@ -2366,7 +2366,6 @@ void G_Client_Disconnect( int clientNum ) {
|
|||
{
|
||||
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
|
||||
level.restarted = qtrue;
|
||||
level.changemap = NULL;
|
||||
level.intermissiontime = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -700,7 +700,6 @@ typedef struct {
|
|||
// intermission state
|
||||
int intermissionQueued; /*!< Intermission was qualified, but wait INTERMISSION_DELAY_TIME before actually going there so the last frag can be watched. Disable future kills during this delay */
|
||||
int intermissiontime; /*!< Time the intermission was started */
|
||||
char* changemap; /*!< ??? */
|
||||
qboolean readyToExit; /*!< Determines whether at least one client wants to exit */
|
||||
int exitTime; /*!< Exit time */
|
||||
vec3_t intermission_origin; /*!< Origin of the camera for intermission. Also used for spectator spawns. */
|
||||
|
@ -2496,7 +2495,7 @@ void LuaHook_G_ClientPrint(char* text, int entnum);
|
|||
* \param entnum entity index of entity the think function was called on
|
||||
* \return success or fail
|
||||
*/
|
||||
qboolean LuaHook_G_EntityThink(char* function, int entnum);
|
||||
void LuaHook_G_EntityThink(char* function, int entnum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity touch function function.
|
||||
|
@ -2506,7 +2505,7 @@ qboolean LuaHook_G_EntityThink(char* function, int entnum);
|
|||
* \param othernum entiy index of touching entity
|
||||
* \return success or fail
|
||||
*/
|
||||
qboolean LuaHook_G_EntityTouch(char* function, int entnum, int othernum);
|
||||
void LuaHook_G_EntityTouch(char* function, int entnum, int othernum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity use function.
|
||||
|
@ -2516,7 +2515,7 @@ qboolean LuaHook_G_EntityTouch(char* function, int entnum, int othernum);
|
|||
* \param othernum entity index of other entity
|
||||
* \param activatornum entity index of activating entity
|
||||
*/
|
||||
qboolean LuaHook_G_EntityUse(char* function, int entnum, int othernum, int activatornum);
|
||||
void LuaHook_G_EntityUse(char* function, int entnum, int othernum, int activatornum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity hurt function.
|
||||
|
@ -2526,7 +2525,7 @@ qboolean LuaHook_G_EntityUse(char* function, int entnum, int othernum, int activ
|
|||
* \param inflictornum entity index of inflictor
|
||||
* \param attackernum entity index of attacker
|
||||
*/
|
||||
qboolean LuaHook_G_EntityHurt(char* function, int entnum, int inflictornum, int attackernum);
|
||||
void LuaHook_G_EntityHurt(char* function, int entnum, int inflictornum, int attackernum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity die function.
|
||||
|
@ -2538,7 +2537,7 @@ qboolean LuaHook_G_EntityHurt(char* function, int entnum, int inflictornum, int
|
|||
* \param dmg ammount of damage
|
||||
* \param mod means of death
|
||||
*/
|
||||
qboolean LuaHook_G_EntityDie(char* function, int entnum, int inflictornum, int attackernum, int dmg, int mod);
|
||||
void LuaHook_G_EntityDie(char* function, int entnum, int inflictornum, int attackernum, int dmg, int mod);
|
||||
|
||||
/**
|
||||
* Lua hook for entity free function.
|
||||
|
@ -2546,7 +2545,7 @@ qboolean LuaHook_G_EntityDie(char* function, int entnum, int inflictornum, int a
|
|||
* \param function name of function to call
|
||||
* \param entnum entity index of entity the free function was called on
|
||||
*/
|
||||
qboolean LuaHook_G_EntityFree(char* function, int entnum);
|
||||
void LuaHook_G_EntityFree(char* function, int entnum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity trigger function.
|
||||
|
@ -2555,7 +2554,7 @@ qboolean LuaHook_G_EntityFree(char* function, int entnum);
|
|||
* \param entnum entity index of entity the trigger function was called on
|
||||
* \param othernum entity index of triggering entity
|
||||
*/
|
||||
qboolean LuaHook_G_EntityTrigger(char* function, int entnum, int othernum);
|
||||
void LuaHook_G_EntityTrigger(char* function, int entnum, int othernum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity spawn function.
|
||||
|
@ -2563,7 +2562,7 @@ qboolean LuaHook_G_EntityTrigger(char* function, int entnum, int othernum);
|
|||
* \param function name of function to call
|
||||
* \param entnum entity index of entity the spawn function was called on
|
||||
*/
|
||||
qboolean LuaHook_G_EntitySpawn(char* function, int entnum);
|
||||
void LuaHook_G_EntitySpawn(char* function, int entnum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity reached function.
|
||||
|
@ -2571,7 +2570,7 @@ qboolean LuaHook_G_EntitySpawn(char* function, int entnum);
|
|||
* \param function name of function to call
|
||||
* \param entnum entity index of entity the reached function was called on
|
||||
*/
|
||||
qboolean LuaHook_G_EntityReached(char* function, int entnum);
|
||||
void LuaHook_G_EntityReached(char* function, int entnum);
|
||||
|
||||
/**
|
||||
* Lua hook for entity reached angular function.
|
||||
|
@ -2579,7 +2578,7 @@ qboolean LuaHook_G_EntityReached(char* function, int entnum);
|
|||
* \param function name of function to call
|
||||
* \param entnum entity index of entity the reached angular function was called on
|
||||
*/
|
||||
qboolean LuaHook_G_EntityReachedAngular(char* function, int entnum);
|
||||
void LuaHook_G_EntityReachedAngular(char* function, int entnum);
|
||||
|
||||
/**
|
||||
* Output information about lua threads.
|
||||
|
|
|
@ -577,7 +577,7 @@ void LuaHook_G_Print(char *text)
|
|||
}
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityThink(char *function, int entnum)
|
||||
void LuaHook_G_EntityThink(char *function, int entnum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -618,10 +618,9 @@ qboolean LuaHook_G_EntityThink(char *function, int entnum)
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityTouch(char *function, int entnum, int othernum)
|
||||
void LuaHook_G_EntityTouch(char *function, int entnum, int othernum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -672,10 +671,9 @@ qboolean LuaHook_G_EntityTouch(char *function, int entnum, int othernum)
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityUse(char *function, int entnum, int othernum, int activatornum)
|
||||
void LuaHook_G_EntityUse(char *function, int entnum, int othernum, int activatornum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -736,10 +734,9 @@ qboolean LuaHook_G_EntityUse(char *function, int entnum, int othernum, int activ
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityHurt(char *function, int entnum, int inflictornum, int attackernum)
|
||||
void LuaHook_G_EntityHurt(char *function, int entnum, int inflictornum, int attackernum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -801,10 +798,9 @@ qboolean LuaHook_G_EntityHurt(char *function, int entnum, int inflictornum, int
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityDie(char *function, int entnum, int inflictornum, int attackernum, int dmg, int mod)
|
||||
void LuaHook_G_EntityDie(char *function, int entnum, int inflictornum, int attackernum, int dmg, int mod)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -870,10 +866,9 @@ qboolean LuaHook_G_EntityDie(char *function, int entnum, int inflictornum, int a
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityFree(char *function, int entnum)
|
||||
void LuaHook_G_EntityFree(char *function, int entnum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -913,10 +908,9 @@ qboolean LuaHook_G_EntityFree(char *function, int entnum)
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityReached(char *function, int entnum) {
|
||||
void LuaHook_G_EntityReached(char *function, int entnum) {
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
lua_State *t;
|
||||
|
@ -951,10 +945,9 @@ qboolean LuaHook_G_EntityReached(char *function, int entnum) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityReachedAngular(char *function, int entnum) {
|
||||
void LuaHook_G_EntityReachedAngular(char *function, int entnum) {
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
lua_State *t;
|
||||
|
@ -989,10 +982,9 @@ qboolean LuaHook_G_EntityReachedAngular(char *function, int entnum) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntityTrigger(char *function, int entnum, int othernum)
|
||||
void LuaHook_G_EntityTrigger(char *function, int entnum, int othernum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -1043,10 +1035,9 @@ qboolean LuaHook_G_EntityTrigger(char *function, int entnum, int othernum)
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean LuaHook_G_EntitySpawn(char *function, int entnum)
|
||||
void LuaHook_G_EntitySpawn(char *function, int entnum)
|
||||
{
|
||||
int i;
|
||||
lvm_t *vm;
|
||||
|
@ -1086,7 +1077,6 @@ qboolean LuaHook_G_EntitySpawn(char *function, int entnum)
|
|||
}
|
||||
}
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
void G_LuaNumThreads(void) {
|
||||
|
|
|
@ -2405,7 +2405,7 @@ void G_Client_BeginIntermission( void ) {
|
|||
|
||||
static void G_ClearObjectives( void )
|
||||
{
|
||||
gentity_t *tent;
|
||||
/*@shared@*/ gentity_t *tent;
|
||||
|
||||
tent = G_TempEntity( vec3_origin, EV_OBJECTIVE_COMPLETE );
|
||||
//Be sure to send the event to everyone
|
||||
|
@ -2438,14 +2438,12 @@ void ExitLevel (void) {
|
|||
RemoveTournamentLoser();
|
||||
trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
|
||||
level.restarted = qtrue;
|
||||
level.changemap = NULL;
|
||||
level.intermissiontime = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
trap_SendConsoleCommand( EXEC_APPEND, "vstr nextmap\n" );
|
||||
level.changemap = NULL;
|
||||
level.intermissiontime = 0;
|
||||
|
||||
// we need to do this here before chaning to CON_CONNECTING
|
||||
|
@ -2516,16 +2514,19 @@ CheckVote
|
|||
==================
|
||||
*/
|
||||
static void CheckVote( void ) {
|
||||
if ( !level.voteTime ) {
|
||||
if ( level.voteTime == 0 ) {
|
||||
return;
|
||||
}
|
||||
if ( level.time - level.voteTime >= VOTE_TIME ) {
|
||||
trap_SendServerCommand( -1, "print \"Vote failed.\n\"" );
|
||||
} else {
|
||||
if ( level.voteYes > level.numVotingClients/2 ) {
|
||||
char message[1024];
|
||||
|
||||
// execute the command, then remove the vote
|
||||
trap_SendServerCommand( -1, "print \"Vote passed.\n\"" );
|
||||
trap_SendConsoleCommand( EXEC_APPEND, va("%s\n", level.voteString ) );
|
||||
Com_sprintf(message, 1024, "%s\n", level.voteString);
|
||||
trap_SendConsoleCommand( EXEC_APPEND, message );
|
||||
} else if ( level.voteNo >= level.numVotingClients/2 ) {
|
||||
// same behavior as a timeout
|
||||
trap_SendServerCommand( -1, "print \"Vote failed.\n\"" );
|
||||
|
@ -2550,7 +2551,7 @@ static void CheckCvars( void ) {
|
|||
|
||||
if ( g_password.modificationCount != lastMod ) {
|
||||
lastMod = g_password.modificationCount;
|
||||
if ( *g_password.string && Q_stricmp( g_password.string, "none" ) ) {
|
||||
if ( g_password.string[0] && Q_stricmp( g_password.string, "none" ) ) {
|
||||
trap_Cvar_Set( "g_needpass", "1" );
|
||||
} else {
|
||||
trap_Cvar_Set( "g_needpass", "0" );
|
||||
|
@ -2566,7 +2567,7 @@ Runs thinking code for this frame if necessary
|
|||
=============
|
||||
*/
|
||||
void G_RunThink (gentity_t *ent) {
|
||||
float thinktime;
|
||||
int thinktime;
|
||||
|
||||
if(ent == NULL) {
|
||||
return;
|
||||
|
@ -2738,7 +2739,7 @@ void G_RunFrame( int levelTime ) {
|
|||
client->pressedUse = qfalse;
|
||||
}
|
||||
|
||||
if (g_classData[client->sess.sessionClass].isn00b == qtrue)
|
||||
if (g_classData[client->sess.sessionClass].isn00b != 0)
|
||||
{
|
||||
if ((client->n00bTime != -1) && (client->n00bTime <= level.time) && client->origClass[0] != 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue