mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-22 20:31:11 +00:00
More post _skin cvar fixes
This commit is contained in:
parent
3314a0a70a
commit
cf0abd33b8
2 changed files with 43 additions and 4 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.111 2003/03/29 23:04:56 jbravo
|
||||
// More post _skin cvar fixes
|
||||
//
|
||||
// Revision 1.110 2003/03/29 18:53:41 jbravo
|
||||
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
|
||||
//
|
||||
|
@ -629,7 +632,7 @@ void CG_RegisterWeapon(int weaponNum)
|
|||
{
|
||||
weaponInfo_t *weaponInfo;
|
||||
gitem_t *item, *ammo;
|
||||
char path[MAX_QPATH], str[MAX_TOKEN_CHARS];
|
||||
char path[MAX_QPATH], str[MAX_STRING_CHARS];
|
||||
char *model, *skin;
|
||||
vec3_t mins, maxs;
|
||||
// QUARANTINE - Weapon Animations - Added Variable
|
||||
|
@ -731,6 +734,8 @@ void CG_RegisterWeapon(int weaponNum)
|
|||
|
||||
weaponInfo->loopFireSound = qfalse;
|
||||
|
||||
memset (str, 0, sizeof(str));
|
||||
|
||||
switch (weaponNum) {
|
||||
|
||||
//Blaze: Reaction Pistol
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.52 2003/03/29 23:04:56 jbravo
|
||||
// More post _skin cvar fixes
|
||||
//
|
||||
// Revision 1.51 2003/03/29 16:01:36 jbravo
|
||||
// _skin cvars now fully removed. dlight code from Makro added. cvar
|
||||
// defaults fixed.
|
||||
|
@ -1611,7 +1614,7 @@ qboolean IsWoodFlag(int flag)
|
|||
}
|
||||
|
||||
//Makro - added
|
||||
char *modelFromStr(char *s)
|
||||
/* char *modelFromStr(char *s)
|
||||
{
|
||||
char *p, *out = s;
|
||||
if (!s)
|
||||
|
@ -1623,9 +1626,9 @@ char *modelFromStr(char *s)
|
|||
*p='/';
|
||||
}
|
||||
return out;
|
||||
}
|
||||
} */
|
||||
|
||||
char *skinFromStr(char *s)
|
||||
/*char *skinFromStr(char *s)
|
||||
{
|
||||
char *p;
|
||||
if (!s)
|
||||
|
@ -1635,6 +1638,37 @@ char *skinFromStr(char *s)
|
|||
if ((p = Q_strrchr(s, '/')) != NULL)
|
||||
return p+1;
|
||||
return va("default");
|
||||
} */
|
||||
|
||||
// NiceAss: rewriting to avoid va() overriting data.
|
||||
char *modelFromStr(char *s)
|
||||
{
|
||||
static char buffer[128];
|
||||
char *p;
|
||||
|
||||
if (!s)
|
||||
return NULL;
|
||||
strncpy(buffer, s, 128);
|
||||
if ((p = Q_strrchr(buffer, '/')) != NULL)
|
||||
*p = '\0';
|
||||
return buffer;
|
||||
}
|
||||
|
||||
char *skinFromStr(char *s)
|
||||
{
|
||||
static char buffer[128];
|
||||
char *p;
|
||||
|
||||
memset(buffer, 0, 128);
|
||||
if (!s)
|
||||
return NULL;
|
||||
if (!*s)
|
||||
return buffer;
|
||||
strncpy(buffer, s, 128);
|
||||
if ((p = Q_strrchr(buffer, '/')) != NULL)
|
||||
return p+1;
|
||||
strcpy(buffer, "default");
|
||||
return buffer;
|
||||
}
|
||||
|
||||
char *strchrstr(char *s, char *chars)
|
||||
|
|
Loading…
Reference in a new issue