Tweaks and crashbug fixes

This commit is contained in:
Richard Allen 2002-04-07 03:22:48 +00:00
parent 43cac4f361
commit d4a7e30ff0
4 changed files with 29 additions and 8 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.62 2002/04/07 03:22:48 jbravo
// Tweaks and crashbug fixes
//
// Revision 1.61 2002/04/05 18:53:26 jbravo
// Warning fixes
//
@ -1231,8 +1234,8 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) {
client->specMode = SPECTATOR_FREE;
client->ps.pm_flags &= ~PMF_FOLLOW;
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
camera_begin(ent);
client->camera->mode = CAMERA_MODE_SWING;
RQ3_SpectatorMode(ent);
}
//Blaze: Send out the breakable names to the clients
@ -1347,8 +1350,13 @@ void ClientBegin(int clientNum) {
// JBravo: default weapons
if (g_gametype.integer == GT_TEAMPLAY) {
// NiceAss: Only set it if there is no value. Fix for going into spectator resetting values.
if (!client->teamplayWeapon) client->teamplayWeapon = WP_MP5;
if (!client->teamplayItem) client->teamplayItem = HI_KEVLAR;
if (ent->r.svFlags & SVF_BOT) {
if (!client->teamplayWeapon) client->teamplayWeapon = WP_PISTOL;
if (!client->teamplayItem) client->teamplayItem = HI_KEVLAR;
} else {
if (!client->teamplayWeapon) client->teamplayWeapon = WP_MP5;
if (!client->teamplayItem) client->teamplayItem = HI_KEVLAR;
}
i = RQ3TeamCount( -1, client->sess.sessionTeam);
}
}
@ -1688,7 +1696,7 @@ void ClientSpawn(gentity_t *ent) {
//Blaze: Send cheat cvars to client
if (!G_SendCheatVars(ent->s.clientNum))
{
Com_Printf("Error loading cvar cfg");
Com_Printf("Error loading cvar cfg\n");
//return "Error_loading_cvar_cfg";
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.90 2002/04/07 03:22:48 jbravo
// Tweaks and crashbug fixes
//
// Revision 1.89 2002/04/05 18:53:26 jbravo
// Warning fixes
//
@ -1514,7 +1517,8 @@ static void Cmd_VoiceTaunt_f( gentity_t *ent ) {
// insult someone you just killed
// if (ent->client->lastkilled_client >= 0 && ent->client->lastkilled_client != ent->s.number) {
// JBravo: adding the multiple killed system.
if (ent->client->lastkilled_client[0]->s.number >= 0 && ent->client->lastkilled_client[0]->s.number != ent->s.number) {
if (ent->client->lastkilled_client[0] != NULL && ent->client->lastkilled_client[0]->s.number >= 0 &&
ent->client->lastkilled_client[0]->s.number != ent->s.number) {
// who = g_entities + ent->client->lastkilled_client;
who = ent->client->lastkilled_client[0];
if (who->client) {

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.59 2002/04/07 03:22:48 jbravo
// Tweaks and crashbug fixes
//
// Revision 1.58 2002/04/06 20:47:24 niceass
// fall damage bug fix
//
@ -1890,9 +1893,9 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
// do the damage
if (take) {
// G_Printf("(%d) taken as damage\n",take);
// JBravo: for Damage delt tracking
if (attacker && attacker->client) attacker->client->ps.persistant[PERS_DAMAGE_DELT] += take;
if (attacker && attacker->client && targ->health > 0)
attacker->client->ps.persistant[PERS_DAMAGE_DELT] += take;
if (instant_dam) {
// G_Printf("(%d) instant damage\n",take);
targ->health = targ->health - take;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.60 2002/04/07 03:22:48 jbravo
// Tweaks and crashbug fixes
//
// Revision 1.59 2002/04/06 21:42:20 makro
// Changes to bot code. New surfaceparm system.
//
@ -679,7 +682,7 @@ void SpawnPlayers()
for (i=0;i<level.num_entities; i++)
{
ent = &g_entities[i];
if (!strcmp(ent->classname,"func_breakable"))
if (ent->classname != NULL && !strcmp(ent->classname, "func_breakable"))
{
//re-link all unlinked breakables
trap_LinkEntity(ent);
@ -1455,6 +1458,9 @@ void ParseSayText (gentity_t *ent, char *text)
void RQ3_SpectatorMode(gentity_t *ent)
{
if (ent->r.svFlags & SVF_BOT)
return;
if (ent->client->sess.spectatorState == SPECTATOR_ZCAM)
trap_SendServerCommand(ent->client->ps.clientNum,
va("print \"\n" S_COLOR_MAGENTA "Spectator Mode-" S_COLOR_YELLOW"ZCAM-%s\n",