Fixed ammo bug when dropping bandolier. Added color to more errormessages

This commit is contained in:
Richard Allen 2003-03-29 18:53:41 +00:00
parent acb8264a2f
commit 3314a0a70a
7 changed files with 109 additions and 86 deletions

View File

@ -1,5 +1,6 @@
# List fixes here for the 3.0 release
* Fixed bug where dropping the bandolier would not reduce amount of ammo
* Its now impossible to change nicks to avoide votekicks.
* Reactionmale is now the default model
* Fixed Ignore so it now works on players with colored nicks

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.18 2003/03/29 18:53:41 jbravo
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
//
// Revision 1.17 2002/12/02 19:52:05 niceass
// water pressure & shell ejection stuff
//
@ -1235,7 +1238,7 @@ void CG_ParticleSnowFlurry(qhandle_t pshader, centity_t * cent)
qboolean turb = qtrue;
if (!pshader)
CG_Printf("CG_ParticleSnowFlurry pshader == ZERO!\n");
CG_Printf("^1CG_ParticleSnowFlurry pshader == ZERO!\n");
if (!free_particles)
return;
@ -1298,7 +1301,7 @@ void CG_ParticleSnow(qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb,
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleSnow pshader == ZERO!\n");
CG_Printf("^1CG_ParticleSnow pshader == ZERO!\n");
if (!free_particles)
return;
@ -1351,7 +1354,7 @@ void CG_ParticleBubble(qhandle_t pshader, vec3_t origin, vec3_t origin2, int tur
float randsize;
if (!pshader)
CG_Printf("CG_ParticleSnow pshader == ZERO!\n");
CG_Printf("^1CG_ParticleSnow pshader == ZERO!\n");
if (!free_particles)
return;
@ -1409,7 +1412,7 @@ void CG_ParticleSmoke(qhandle_t pshader, centity_t * cent)
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleSmoke == ZERO!\n");
CG_Printf("^1CG_ParticleSmoke == ZERO!\n");
if (!free_particles)
return;
@ -1652,7 +1655,7 @@ void CG_ParticleImpactSmokePuff(qhandle_t pshader, vec3_t origin)
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleImpactSmokePuff pshader == ZERO!\n");
CG_Printf("^1CG_ParticleImpactSmokePuff pshader == ZERO!\n");
if (!free_particles)
return;
@ -1692,7 +1695,7 @@ void CG_Particle_Bleed(qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEnt
cparticle_t *p;
if (!pshader)
CG_Printf("CG_Particle_Bleed pshader == ZERO!\n");
CG_Printf("^1CG_Particle_Bleed pshader == ZERO!\n");
if (!free_particles)
return;
@ -1753,7 +1756,7 @@ void CG_Particle_OilParticle(qhandle_t pshader, centity_t * cent)
ratio = (float) 1 - ((float) time / (float) time2);
if (!pshader)
CG_Printf("CG_Particle_OilParticle == ZERO!\n");
CG_Printf("^1CG_Particle_OilParticle == ZERO!\n");
if (!free_particles)
return;
@ -1805,7 +1808,7 @@ void CG_Particle_OilSlick(qhandle_t pshader, centity_t * cent)
cparticle_t *p;
if (!pshader)
CG_Printf("CG_Particle_OilSlick == ZERO!\n");
CG_Printf("^1CG_Particle_OilSlick == ZERO!\n");
if (!free_particles)
return;
@ -1871,7 +1874,7 @@ void CG_OilSlickRemove(centity_t * cent)
id = 1.0f;
if (!id)
CG_Printf("CG_OilSlickRevove NULL id\n");
CG_Printf("^1CG_OilSlickRevove NULL id\n");
for (p = active_particles; p; p = next) {
next = p->next;
@ -1939,7 +1942,7 @@ void CG_BloodPool(localEntity_t * le, qhandle_t pshader, trace_t * tr)
float rndSize;
if (!pshader)
CG_Printf("CG_BloodPool pshader == ZERO!\n");
CG_Printf("^1CG_BloodPool pshader == ZERO!\n");
if (!free_particles)
return;
@ -2226,7 +2229,7 @@ void CG_ParticleMisc(qhandle_t pshader, vec3_t origin, int size, int duration, f
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleImpactSmokePuff pshader == ZERO!\n");
CG_Printf("^1CG_ParticleImpactSmokePuff pshader == ZERO!\n");
if (!free_particles)
return;

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.7 2003/03/29 18:53:41 jbravo
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
//
// Revision 1.6 2002/06/16 20:06:13 jbravo
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
//
@ -902,7 +905,7 @@ void CG_ParticleSnowFlurry(qhandle_t pshader, centity_t * cent)
qboolean turb = qtrue;
if (!pshader)
CG_Printf("CG_ParticleSnowFlurry pshader == ZERO!\n");
CG_Printf("^1CG_ParticleSnowFlurry pshader == ZERO!\n");
if (!free_particles)
return;
@ -965,7 +968,7 @@ void CG_ParticleSnow(qhandle_t pshader, vec3_t origin, vec3_t origin2, int turb,
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleSnow pshader == ZERO!\n");
CG_Printf("^1CG_ParticleSnow pshader == ZERO!\n");
if (!free_particles)
return;
@ -1018,7 +1021,7 @@ void CG_ParticleBubble(qhandle_t pshader, vec3_t origin, vec3_t origin2, int tur
float randsize;
if (!pshader)
CG_Printf("CG_ParticleSnow pshader == ZERO!\n");
CG_Printf("^1CG_ParticleSnow pshader == ZERO!\n");
if (!free_particles)
return;
@ -1076,7 +1079,7 @@ void CG_ParticleSmoke(qhandle_t pshader, centity_t * cent)
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleSmoke == ZERO!\n");
CG_Printf("^1CG_ParticleSmoke == ZERO!\n");
if (!free_particles)
return;
@ -1318,7 +1321,7 @@ void CG_ParticleImpactSmokePuff(qhandle_t pshader, vec3_t origin)
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleImpactSmokePuff pshader == ZERO!\n");
CG_Printf("^1CG_ParticleImpactSmokePuff pshader == ZERO!\n");
if (!free_particles)
return;
@ -1358,7 +1361,7 @@ void CG_Particle_Bleed(qhandle_t pshader, vec3_t start, vec3_t dir, int fleshEnt
cparticle_t *p;
if (!pshader)
CG_Printf("CG_Particle_Bleed pshader == ZERO!\n");
CG_Printf("^1CG_Particle_Bleed pshader == ZERO!\n");
if (!free_particles)
return;
@ -1419,7 +1422,7 @@ void CG_Particle_OilParticle(qhandle_t pshader, centity_t * cent)
ratio = (float) 1 - ((float) time / (float) time2);
if (!pshader)
CG_Printf("CG_Particle_OilParticle == ZERO!\n");
CG_Printf("^1CG_Particle_OilParticle == ZERO!\n");
if (!free_particles)
return;
@ -1471,7 +1474,7 @@ void CG_Particle_OilSlick(qhandle_t pshader, centity_t * cent)
cparticle_t *p;
if (!pshader)
CG_Printf("CG_Particle_OilSlick == ZERO!\n");
CG_Printf("^1CG_Particle_OilSlick == ZERO!\n");
if (!free_particles)
return;
@ -1537,7 +1540,7 @@ void CG_OilSlickRemove(centity_t * cent)
id = 1.0f;
if (!id)
CG_Printf("CG_OilSlickRevove NULL id\n");
CG_Printf("^1CG_OilSlickRevove NULL id\n");
for (p = active_particles; p; p = next) {
next = p->next;
@ -1605,7 +1608,7 @@ void CG_BloodPool(localEntity_t * le, qhandle_t pshader, trace_t * tr)
float rndSize;
if (!pshader)
CG_Printf("CG_BloodPool pshader == ZERO!\n");
CG_Printf("^1CG_BloodPool pshader == ZERO!\n");
if (!free_particles)
return;
@ -1882,7 +1885,7 @@ void CG_ParticleMisc(qhandle_t pshader, vec3_t origin, int size, int duration, f
cparticle_t *p;
if (!pshader)
CG_Printf("CG_ParticleImpactSmokePuff pshader == ZERO!\n");
CG_Printf("^1CG_ParticleImpactSmokePuff pshader == ZERO!\n");
if (!free_particles)
return;

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.58 2003/03/29 18:53:41 jbravo
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
//
// Revision 1.57 2003/03/09 21:30:38 jbravo
// Adding unlagged. Still needs work.
//
@ -232,7 +235,7 @@ static qboolean CG_ParseAnimationFile(const char *filename, clientInfo_t * ci)
return qfalse;
}
if (len >= sizeof(text) - 1) {
CG_Printf("File %s too long\n", filename);
CG_Printf("^1File %s too long\n", filename);
return qfalse;
}
trap_FS_Read(text, len, f);
@ -277,7 +280,7 @@ static qboolean CG_ParseAnimationFile(const char *filename, clientInfo_t * ci)
//Makro - added developer 1 check
trap_Cvar_VariableStringBuffer("developer", var, sizeof(var));
if (atoi(var))
CG_Printf("Bad footsteps parm in %s: %s\n", filename, token);
CG_Printf("^1Bad footsteps parm in %s: %s\n", filename, token);
}
continue;
} else if (!Q_stricmp(token, "headoffset")) {
@ -314,7 +317,7 @@ static qboolean CG_ParseAnimationFile(const char *filename, clientInfo_t * ci)
text_p = prev; // unget the token
break;
}
Com_Printf("unknown token '%s' is %s\n", token, filename);
Com_Printf("^1unknown token '%s' is %s\n", token, filename);
}
// read information for each frame
@ -376,7 +379,7 @@ static qboolean CG_ParseAnimationFile(const char *filename, clientInfo_t * ci)
}
if (i != MAX_ANIMATIONS) {
CG_Printf("Error parsing animation file: %s", filename);
CG_Printf("^1Error parsing animation file: %s", filename);
return qfalse;
}
// crouch backward animation
@ -632,14 +635,14 @@ static qboolean CG_RegisterClientSkin(clientInfo_t * ci, const char *teamName, c
ci->legsSkin = trap_R_RegisterSkin(filename);
}
if (!ci->legsSkin) {
Com_Printf("Leg skin load failure: %s\n", filename);
Com_Printf("^1Leg skin load failure: %s\n", filename);
}
if (CG_FindClientModelFile(filename, sizeof(filename), ci, teamName, modelName, skinName, "upper", "skin")) {
ci->torsoSkin = trap_R_RegisterSkin(filename);
}
if (!ci->torsoSkin) {
Com_Printf("Torso skin load failure: %s\n", filename);
Com_Printf("^1Torso skin load failure: %s\n", filename);
}
if (CG_FindClientHeadFile
@ -647,7 +650,7 @@ static qboolean CG_RegisterClientSkin(clientInfo_t * ci, const char *teamName, c
ci->headSkin = trap_R_RegisterSkin(filename);
}
if (!ci->headSkin) {
Com_Printf("Head skin load failure: %s\n", filename);
Com_Printf("^1Head skin load failure: %s\n", filename);
}
// if any skins failed to load
if (!ci->legsSkin || !ci->torsoSkin || !ci->headSkin) {
@ -679,7 +682,7 @@ static qboolean CG_RegisterClientModelname(clientInfo_t * ci, const char *modelN
Com_sprintf(filename, sizeof(filename), "models/players/characters/%s/lower.md3", modelName);
ci->legsModel = trap_R_RegisterModel(filename);
if (!ci->legsModel) {
Com_Printf("Failed to load model file %s\n", filename);
Com_Printf("^1Failed to load model file %s\n", filename);
return qfalse;
}
}
@ -690,7 +693,7 @@ static qboolean CG_RegisterClientModelname(clientInfo_t * ci, const char *modelN
Com_sprintf(filename, sizeof(filename), "models/players/characters/%s/upper.md3", modelName);
ci->torsoModel = trap_R_RegisterModel(filename);
if (!ci->torsoModel) {
Com_Printf("Failed to load model file %s\n", filename);
Com_Printf("^1Failed to load model file %s\n", filename);
return qfalse;
}
}
@ -708,13 +711,13 @@ static qboolean CG_RegisterClientModelname(clientInfo_t * ci, const char *modelN
ci->headModel = trap_R_RegisterModel(filename);
}
if (!ci->headModel) {
Com_Printf("Failed to load model file %s\n", filename);
Com_Printf("^1Failed to load model file %s\n", filename);
return qfalse;
}
// if any skins failed to load, return failure
if (!CG_RegisterClientSkin(ci, teamName, modelName, skinName, headName, headSkinName)) {
if (teamName && *teamName) {
Com_Printf("Failed to load skin file: %s : %s : %s, %s : %s\n", teamName, modelName, skinName,
Com_Printf("^1Failed to load skin file: %s : %s : %s, %s : %s\n", teamName, modelName, skinName,
headName, headSkinName);
if (ci->team == TEAM_BLUE) {
Com_sprintf(newTeamName, sizeof(newTeamName), "%s/", DEFAULT_BLUETEAM_NAME);
@ -722,12 +725,12 @@ static qboolean CG_RegisterClientModelname(clientInfo_t * ci, const char *modelN
Com_sprintf(newTeamName, sizeof(newTeamName), "%s/", DEFAULT_REDTEAM_NAME);
}
if (!CG_RegisterClientSkin(ci, newTeamName, modelName, skinName, headName, headSkinName)) {
Com_Printf("Failed to load skin file: %s : %s : %s, %s : %s\n", newTeamName, modelName,
Com_Printf("^1Failed to load skin file: %s : %s : %s, %s : %s\n", newTeamName, modelName,
skinName, headName, headSkinName);
return qfalse;
}
} else {
Com_Printf("Failed to load skin file: %s : %s, %s : %s\n", modelName, skinName, headName,
Com_Printf("^1Failed to load skin file: %s : %s, %s : %s\n", modelName, skinName, headName,
headSkinName);
return qfalse;
}
@ -737,7 +740,7 @@ static qboolean CG_RegisterClientModelname(clientInfo_t * ci, const char *modelN
if (!CG_ParseAnimationFile(filename, ci)) {
Com_sprintf(filename, sizeof(filename), "models/players/characters/%s/animation.cfg", modelName);
if (!CG_ParseAnimationFile(filename, ci)) {
Com_Printf("Failed to load animation file %s\n", filename);
Com_Printf("^1Failed to load animation file %s\n", filename);
return qfalse;
}
}
@ -1009,7 +1012,7 @@ static void CG_SetDeferredClientInfo(clientInfo_t * ci)
}
// we should never get here...
CG_Printf("CG_SetDeferredClientInfo: no valid clients!\n");
CG_Printf("^1CG_SetDeferredClientInfo: no valid clients!\n");
CG_LoadClientInfo(ci);
}
@ -1238,7 +1241,7 @@ void CG_NewClientInfo(int clientNum)
CG_SetDeferredClientInfo(&newInfo);
// if we are low on memory, leave them with this model
if (forceDefer) {
CG_Printf("Memory is low. Using deferred model.\n");
CG_Printf("^1Memory is low. Using deferred model.\n");
newInfo.deferred = qfalse;
}
} else {
@ -1270,7 +1273,7 @@ void CG_LoadDeferredPlayers(void)
if (ci->infoValid && ci->deferred) {
// if we are low on memory, leave it deferred
if (trap_MemoryRemaining() < 4000000) {
CG_Printf("Memory is low. Using deferred model.\n");
CG_Printf("^1Memory is low. Using deferred model.\n");
ci->deferred = qfalse;
continue;
}

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.51 2003/03/29 18:53:41 jbravo
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
//
// Revision 1.50 2002/10/21 21:17:16 niceass
// bleh
//
@ -300,7 +303,7 @@ static void CG_DrawTeamplayClientScore(int y, score_t * score, float *Fill, floa
int l;
if (score->client < 0 || score->client >= cgs.maxclients) {
Com_Printf("Bad score->client: %i\n", score->client);
Com_Printf("^1Bad score->client: %i\n", score->client);
return;
}

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.110 2003/03/29 18:53:41 jbravo
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
//
// Revision 1.109 2003/03/29 17:00:11 jbravo
// More replacement hiccups after skin cvars where removed
//
@ -752,17 +755,17 @@ void CG_RegisterWeapon(int weaponNum)
// Load the animation information
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
// Load sound information -- ALWAYS DO THIS AFTER THE ANIMATION
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -770,23 +773,23 @@ void CG_RegisterWeapon(int weaponNum)
case WP_KNIFE:
MAKERGB(weaponInfo->flashDlightColor, 1, 0.70f, 0);
weaponInfo->flashSound[0] = trap_S_RegisterSound("sound/weapons/knife/slash.wav", qfalse);
weaponInfo->missileModel =
trap_R_RegisterModel(va("models/weapons2/%s/knife.md3", cg_RQ3_knife.string));
// JBravo: skin replacements
// Makro - no longer using skin cvars
trap_Cvar_VariableStringBuffer("cg_RQ3_knife", str, sizeof(str));
model = modelFromStr(str);
skin = skinFromStr(str);
weaponInfo->missileModel =
trap_R_RegisterModel(va("models/weapons2/%s/knife.md3", model));
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
// Load the animation information
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
break;
@ -806,22 +809,22 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -843,21 +846,21 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
}
// Load sound information -- ALWAYS DO THIS AFTER THE ANIMATION
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -876,22 +879,22 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -911,22 +914,22 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -944,22 +947,22 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -980,22 +983,22 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
// Load sound information -- ALWAYS DO THIS AFTER THE ANIMATION
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -1016,23 +1019,23 @@ void CG_RegisterWeapon(int weaponNum)
if (strcmp(skin, "default")) {
weaponInfo->customSkin = trap_R_RegisterSkin (va("models/weapons2/%s/%s.skin", model, skin));
if (!weaponInfo->customSkin) {
Com_Printf("Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
Com_Printf("^1Weapon skin load failure: %s\n", va("models/weapons2/%s/%s.skin", model, skin));
}
}
// Load the animation information
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/animation.cfg", model);
if (!CG_ParseWeaponAnimFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon animation file %s\n", filename);
Com_Printf("^1Failed to load weapon animation file %s\n", filename);
weapAnimLoad = qfalse;
}
// Load sound information -- ALWAYS DO THIS AFTER THE ANIMATION
if (weapAnimLoad) {
Com_sprintf(filename, sizeof(filename), "models/weapons2/%s/sound.cfg", model);
if (!CG_ParseWeaponSoundFile(filename, weaponInfo)) {
Com_Printf("Failed to load weapon sound file %s\n", filename);
Com_Printf("^1Failed to load weapon sound file %s\n", filename);
}
} else {
Com_Printf("Could not load sound.cfg because animation.cfg loading failed\n");
Com_Printf("^1Could not load sound.cfg because animation.cfg loading failed\n");
}
break;
@ -1078,7 +1081,7 @@ void CG_RegisterItemVisuals(int itemNum)
if (strcmp(skin, "default")) {
itemInfo->customSkin = trap_R_RegisterSkin (va("models/items/%s/%s.skin", model, skin));
if (!itemInfo->customSkin)
Com_Printf("Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
Com_Printf("^1Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
}
}
if (!strcmp(item->classname, "item_silencer")) {
@ -1088,7 +1091,7 @@ void CG_RegisterItemVisuals(int itemNum)
if (strcmp(skin, "default")) {
itemInfo->customSkin = trap_R_RegisterSkin (va("models/items/%s/%s.skin", model, skin));
if (!itemInfo->customSkin)
Com_Printf("Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
Com_Printf("^1Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
}
}
if (!strcmp(item->classname, "item_laser")) {
@ -1098,7 +1101,7 @@ void CG_RegisterItemVisuals(int itemNum)
if (strcmp(skin, "default")) {
itemInfo->customSkin = trap_R_RegisterSkin (va("models/items/%s/%s.skin", model, skin));
if (!itemInfo->customSkin)
Com_Printf("Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
Com_Printf("^1Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
}
}
if (!strcmp(item->classname, "item_bandolier")) {
@ -1108,7 +1111,7 @@ void CG_RegisterItemVisuals(int itemNum)
if (strcmp(skin, "default")) {
itemInfo->customSkin = trap_R_RegisterSkin (va("models/items/%s/%s.skin", model, skin));
if (!itemInfo->customSkin)
Com_Printf("Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
Com_Printf("^1Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
}
}
if (!strcmp(item->classname, "item_slippers")) {
@ -1118,7 +1121,7 @@ void CG_RegisterItemVisuals(int itemNum)
if (strcmp(skin, "default")) {
itemInfo->customSkin = trap_R_RegisterSkin (va("models/items/%s/%s.skin", model, skin));
if (!itemInfo->customSkin)
Com_Printf("Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
Com_Printf("^1Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
}
}
if (!strcmp(item->classname, "item_helmet")) {
@ -1128,7 +1131,7 @@ void CG_RegisterItemVisuals(int itemNum)
if (strcmp(skin, "default")) {
itemInfo->customSkin = trap_R_RegisterSkin (va("models/items/%s/%s.skin", model, skin));
if (!itemInfo->customSkin)
Com_Printf("Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
Com_Printf("^1Item skin load failure: %s\n", va("models/items/%s/%s.skin", model, skin));
}
}
}

View File

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.183 2003/03/29 18:53:41 jbravo
// Fixed ammo bug when dropping bandolier. Added color to more errormessages
//
// Revision 1.182 2003/03/28 13:10:36 jbravo
// *** empty log message ***
//
@ -2672,18 +2675,22 @@ void Cmd_DropItem_f(gentity_t * ent)
if (ent->client->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_BANDOLIER)) {
if (ent->client->numClips[WP_SSG3000] > RQ3_SSG3000_EXTRA_AMMO)
ent->client->numClips[WP_SSG3000] = RQ3_SSG3000_EXTRA_AMMO;
if (ent->client->numClips[WP_M3] > RQ3_M3_EXTRA_AMMO)
ent->client->numClips[WP_M3] = RQ3_M3_EXTRA_AMMO;
if (ent->client->numClips[WP_M3] > RQ3_M3_MAXCLIP)
ent->client->numClips[WP_M3] = RQ3_M3_MAXCLIP;
if (ent->client->numClips[WP_HANDCANNON] > RQ3_M3_MAXCLIP)
ent->client->numClips[WP_HANDCANNON] = RQ3_M3_MAXCLIP;
if (ent->client->numClips[WP_M4] > RQ3_M4_EXTRA_AMMO)
ent->client->numClips[WP_M4] = RQ3_M4_EXTRA_AMMO;
if (ent->client->numClips[WP_MP5] > RQ3_MP5_EXTRA_AMMO)
ent->client->numClips[WP_MP5] = RQ3_MP5_EXTRA_AMMO;
if (ent->client->numClips[WP_KNIFE] > RQ3_KNIVES_EXTRA_AMMO)
ent->client->numClips[WP_KNIFE] = RQ3_KNIVES_EXTRA_AMMO;
if (ent->client->ps.ammo[WP_KNIFE] > RQ3_KNIVES_EXTRA_AMMO) {
ent->client->ps.ammo[WP_KNIFE] = RQ3_KNIVES_EXTRA_AMMO;
ent->client->weaponCount[WP_KNIFE] = RQ3_KNIVES_EXTRA_AMMO;
}
if (ent->client->numClips[WP_AKIMBO] > RQ3_AKIMBO_EXTRA_AMMO)
ent->client->numClips[WP_AKIMBO] = RQ3_AKIMBO_EXTRA_AMMO;
if (ent->client->ps.ammo[WP_GRENADE] > 0)
ent->client->ps.ammo[WP_GRENADE] = 0;
ent->client->ps.ammo[WP_GRENADE] = 2;
if (ent->client->numClips[WP_PISTOL] > 1)
ent->client->numClips[WP_PISTOL] = 1;
if (ent->client->uniqueWeapons > g_RQ3_maxWeapons.integer) {