mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-04-01 07:20:43 +00:00
file exist function
This commit is contained in:
parent
ed00550e10
commit
32597276c2
2 changed files with 23 additions and 0 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.96 2002/06/18 09:22:16 niceass
|
||||
// file exist function
|
||||
//
|
||||
// Revision 1.95 2002/06/16 20:11:41 niceass
|
||||
// unused cvar removed
|
||||
//
|
||||
|
@ -933,6 +936,7 @@ void G_EvaluateTrajectory(const trajectory_t * tr, int atTime, vec3_t result);
|
|||
void G_EvaluateTrajectoryDelta(const trajectory_t * tr, int atTime, vec3_t result);
|
||||
void G_GravityChange(void);
|
||||
void G_CreatePressure(vec3_t origin, vec3_t normal, gentity_t * ent);
|
||||
qboolean G_FileExists(char *filename);
|
||||
|
||||
//
|
||||
// g_weapon.c
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.58 2002/06/18 09:21:11 niceass
|
||||
// file exist function
|
||||
//
|
||||
// Revision 1.57 2002/06/16 20:06:14 jbravo
|
||||
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
|
||||
//
|
||||
|
@ -964,6 +967,22 @@ void G_CreatePressure(vec3_t origin, vec3_t normal, gentity_t * ent)
|
|||
tent->s.powerups = ent->mass; // speed of pressure
|
||||
}
|
||||
|
||||
/*
|
||||
G_FileExists by NiceAss
|
||||
|
||||
Created for vote map to make sure it exists before voting.
|
||||
I'm sure there are plenty of more uses.
|
||||
*/
|
||||
qboolean G_FileExists(char *filename) {
|
||||
fileHandle_t f;
|
||||
|
||||
trap_FS_FOpenFile(filename, &f, FS_READ);
|
||||
if (!f) return qfalse;
|
||||
trap_FS_FCloseFile(f);
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
G_EvaluateTrajectory
|
||||
|
|
Loading…
Reference in a new issue